Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 831bfb0e authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

qed*: Tx-switching configuration



Device should be configured by default to VEB once VFs are active.
This changes the configuration of both PFs' and VFs' vports into enabling
tx-switching once sriov is enabled.

Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73390ac9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -688,7 +688,8 @@ static int qed_hw_init_pf(struct qed_hwfn *p_hwfn,
		qed_int_igu_enable(p_hwfn, p_ptt, int_mode);

		/* send function start command */
		rc = qed_sp_pf_start(p_hwfn, p_tunn, p_hwfn->cdev->mf_mode);
		rc = qed_sp_pf_start(p_hwfn, p_tunn, p_hwfn->cdev->mf_mode,
				     allow_npar_tx_switch);
		if (rc)
			DP_NOTICE(p_hwfn, "Function start ramrod failed\n");
	}
+4 −0
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
		break;
	}

	p_ramrod->tx_switching_en = p_params->tx_switching;

	/* Software Function ID in hwfn (PFs are 0 - 15, VFs are 16 - 135) */
	p_ramrod->sw_fid = qed_concrete_to_sw_fid(p_hwfn->cdev,
						  p_params->concrete_fid);
@@ -1792,6 +1794,8 @@ static int qed_update_vport(struct qed_dev *cdev,
		params->update_vport_active_flg;
	sp_params.vport_active_rx_flg = params->vport_active_flg;
	sp_params.vport_active_tx_flg = params->vport_active_flg;
	sp_params.update_tx_switching_flg = params->update_tx_switching_flg;
	sp_params.tx_switching_flg = params->tx_switching_flg;
	sp_params.accept_any_vlan = params->accept_any_vlan;
	sp_params.update_accept_any_vlan_flg =
		params->update_accept_any_vlan_flg;
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ enum qed_tpa_mode {
struct qed_sp_vport_start_params {
	enum qed_tpa_mode tpa_mode;
	bool remove_inner_vlan;
	bool tx_switching;
	bool only_untagged;
	bool drop_ttl0;
	u8 max_buffers_per_cqe;
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ int qed_fill_dev_info(struct qed_dev *cdev,
		dev_info->fw_rev = FW_REVISION_VERSION;
		dev_info->fw_eng = FW_ENGINEERING_VERSION;
		dev_info->mf_mode = cdev->mf_mode;
		dev_info->tx_switching = true;
	} else {
		qed_vf_get_fw_version(&cdev->hwfns[0], &dev_info->fw_major,
				      &dev_info->fw_minor, &dev_info->fw_rev,
+2 −1
Original line number Diff line number Diff line
@@ -344,13 +344,14 @@ int qed_sp_init_request(struct qed_hwfn *p_hwfn,
 * @param p_hwfn
 * @param p_tunn
 * @param mode
 * @param allow_npar_tx_switch
 *
 * @return int
 */

int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
		    struct qed_tunn_start_params *p_tunn,
		    enum qed_mf_mode mode);
		    enum qed_mf_mode mode, bool allow_npar_tx_switch);

/**
 * @brief qed_sp_pf_stop - PF Function Stop Ramrod
Loading