net/i40e: enable the loopback function if it is X722 MAC
PATCH 1/1 net/i40e: enable the loopback function if it is X722 MAC
In FVL, there was an issue and it didn't support the loopback function before FW 5.0. For FPK (X722) it should work.
So it needs to distinguish between the devices by checking MAC type.
--- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/rte_pmd_i40e.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/i40e/i40e_ethdev.c +2 -2
@@ -5371,7 +5371,7 @@ i40e_enable_pf_lb(struct i40e_pf *pf)int ret;/* Use the FW API if FW >= v5.0 */ -if (hw->aq.fw_maj_ver <5 ) { +if (hw->aq.fw_maj_ver <5 && hw->mac.type !=I40E_MAC_X722 ) {PMD_INIT_LOG (ERR ,"FW < v5.0, cannot enable loopback" );return ; }
@@ -5642,7 +5642,7 @@ i40e_vsi_setup(struct i40e_pf *pf, ctxt.flags =I40E_AQ_VSI_TYPE_VF ;/* Use the VEB configuration if FW >= v5.0 */ -if (hw->aq.fw_maj_ver >=5 ) { +if (hw->aq.fw_maj_ver >=5 || hw->mac.type ==I40E_MAC_X722 ) {/* Configure switch ID */ ctxt.info.valid_sections |=rte_cpu_to_le_16 (I40E_AQ_VSI_PROP_SWITCH_VALID );
drivers/net/i40e/rte_pmd_i40e.c +1 -1
@@ -338,7 +338,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on) hw =I40E_VSI_TO_HW (vsi);/* Use the FW API if FW >= v5.0 */ -if (hw->aq.fw_maj_ver <5 ) { +if (hw->aq.fw_maj_ver <5 && hw->mac.type !=I40E_MAC_X722 ) {PMD_INIT_LOG (ERR ,"FW < v5.0, cannot enable loopback" );return -ENOTSUP ; }
Signature · 1 line
2.17.1
Quoted 14 lines
-----Original Message-----
From: Wang, Haiyue
Sent: Monday, October 22, 2018 2:48 AM
To: [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: Chilikin, Andrey <[email protected]>; Wang, Haiyue <[email protected]>
Subject: [PATCH v1] net/i40e: enable the loopback function if it is X722 MACIn FVL, there was an issue and it didn't support the loopback function before FW 5.0. For FPK (X722) it should work.
Quoted 6 lines
So it needs to distinguish between the devices by checking MAC type.
Fixes 689bba33272d (i40e: add VEB switching support)Fixes bce83974ba2c (net/i40e: set Tx loopback from PF)Signed-off-by Haiyue Wang <[email protected]>
Applied to dpdk-next-net-intel with minor change:
1.add missing " in fix line
2.add cc [email protected]
Thanks
Qi