ice: bring up ethtool selftests
Subsystems (3)
cover ice: bring up ethtool selftests
Currently ethtool -t $IFACE fails for loopback testing. These two small patches bring it back to life.
These were pulled out from
https://lore.kernel.org/bpf/[email protected]/
and now I route them via net tree as fixes.
Thanks!
Maciej
Maciej Fijalkowski (2):
ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
ice: do not setup vlan for loopback VSI
drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++- drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-)
Signature · 6 lines
2.27.0 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH 1/2 ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
Tx side sets EOP and RS bits on descriptors to indicate that a particular descriptor is the last one and needs to generate an irq when it was sent. These bits should not be checked on completion path regardless whether it's the Tx or the Rx. DD bit serves this purpose and it indicates that a particular descriptor is either for Rx or was successfully Txed. EOF is also set as loopback test does not xmit fragmented frames.
Look at (DD | EOF) bits setting in ice_lbtest_receive_frames() instead of EOP and RS pair.
--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_ethtool.c +2 -1
@@ -658,7 +658,8 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring) rx_desc =ICE_RX_DESC (rx_ring, i);if (!(rx_desc->wb.status_error0 & -cpu_to_le16 (ICE_TX_DESC_CMD_EOP |ICE_TX_DESC_CMD_RS ))) + (cpu_to_le16 (BIT (ICE_RX_FLEX_DESC_STATUS0_DD_S )) | +cpu_to_le16 (BIT (ICE_RX_FLEX_DESC_STATUS0_EOF_S )))))continue ; rx_buf = &rx_ring->rx_buf[i];
Signature · 6 lines
2.27.0 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
RE: [Intel-wired-lan] [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
Quoted 17 lines
From: Intel-wired-lan <[email protected]> On Behalf Of Maciej Fijalkowski
Sent: Thursday, July 7, 2022 3:51 PM
To: [email protected]
Cc: [email protected]; [email protected]; Gerasymenko, Anatolii <[email protected]>; [email protected]; [email protected]; Karlsson, Magnus <[email protected]>
Subject: [Intel-wired-lan] [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)Tx side sets EOP and RS bits on descriptors to indicate that a particular descriptor is the last one and needs to generate an irq when it was sent. These bits should not be checked on completion path regardless whether it's the Tx or the Rx. DD bit serves this purpose and it indicates that a particular descriptor is either for Rx or was successfully Txed. EOF is also set as loopback test does not xmit fragmented frames.
Quoted 9 lines
Look at (DD | EOF) bits setting in
ice_lbtest_receive_frames()instead of EOP and RS pair.Fixes 0e674aeb0b77 ("ice: Add handler for ethtool selftest")Signed-off-by Maciej Fijalkowski <[email protected]>--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
PATCH 2/2 ice: do not setup vlan for loopback VSI
In reply to Maciej FijalkowskiCurrently loopback test is failiing due to the error returned from ice_vsi_vlan_setup(). Skip calling it when preparing loopback VSI.
--- drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +5 -3
@@ -6010,10 +6010,12 @@ int ice_vsi_cfg(struct ice_vsi *vsi)if (vsi->netdev) {ice_set_rx_mode (vsi->netdev); - err =ice_vsi_vlan_setup (vsi); +if (vsi->type !=ICE_VSI_LB ) { + err =ice_vsi_vlan_setup (vsi); -if (err) -return err; +if (err) +return err; + } }ice_vsi_cfg_dcb_rings (vsi);
Signature · 1 line
2.27.0
RE: [Intel-wired-lan] [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI
Quoted 9 lines
From: Intel-wired-lan <[email protected]> On Behalf Of Maciej Fijalkowski
Sent: Thursday, July 7, 2022 3:51 PM
To: [email protected]
Cc: [email protected]; [email protected]; Gerasymenko, Anatolii <[email protected]>; [email protected]; [email protected]; Karlsson, Magnus <[email protected]>
Subject: [Intel-wired-lan] [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI
Quoted 9 lines
Currently loopback test is failiing due to the error returned from
ice_vsi_vlan_setup(). Skip calling it when preparing loopback VSI.Fixes 0e674aeb0b77 ("ice: Add handler for ethtool selftest")Signed-off-by Maciej Fijalkowski <[email protected]>--- drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)