netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH intel-net 0/2] ice: bring up ethtool selftests
@ 2022-07-07 10:20 Maciej Fijalkowski
  2022-07-07 10:20 ` [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
  2022-07-07 10:20 ` [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
  0 siblings, 2 replies; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-07-07 10:20 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, anthony.l.nguyen, kuba, davem, magnus.karlsson,
	anatolii.gerasymenko, alexandr.lobakin, john.fastabend,
	Maciej Fijalkowski

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/20220616180609.905015-1-maciej.fijalkowski@intel.com/

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(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
  2022-07-07 10:20 [PATCH intel-net 0/2] ice: bring up ethtool selftests Maciej Fijalkowski
@ 2022-07-07 10:20 ` Maciej Fijalkowski
  2022-07-26 18:14   ` [Intel-wired-lan] " Kuruvinakunnel, George
  2022-07-07 10:20 ` [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
  1 sibling, 1 reply; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-07-07 10:20 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, anthony.l.nguyen, kuba, davem, magnus.karlsson,
	anatolii.gerasymenko, alexandr.lobakin, john.fastabend,
	Maciej Fijalkowski

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.

Fixes: 0e674aeb0b77 ("ice: Add handler for ethtool selftest")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index 70335f6e8524..4efa5e5846e0 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -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];
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI
  2022-07-07 10:20 [PATCH intel-net 0/2] ice: bring up ethtool selftests Maciej Fijalkowski
  2022-07-07 10:20 ` [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
@ 2022-07-07 10:20 ` Maciej Fijalkowski
  2022-07-26 18:16   ` [Intel-wired-lan] " Kuruvinakunnel, George
  1 sibling, 1 reply; 5+ messages in thread
From: Maciej Fijalkowski @ 2022-07-07 10:20 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: netdev, anthony.l.nguyen, kuba, davem, magnus.karlsson,
	anatolii.gerasymenko, alexandr.lobakin, john.fastabend,
	Maciej Fijalkowski

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 <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index c1ac2f746714..2c40873bcbb2 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -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);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [Intel-wired-lan] [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS)
  2022-07-07 10:20 ` [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
@ 2022-07-26 18:14   ` Kuruvinakunnel, George
  0 siblings, 0 replies; 5+ messages in thread
From: Kuruvinakunnel, George @ 2022-07-26 18:14 UTC (permalink / raw)
  To: Fijalkowski, Maciej, intel-wired-lan
  Cc: netdev, john.fastabend, Gerasymenko, Anatolii, kuba, davem,
	Karlsson, Magnus

> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Maciej
> Fijalkowski
> Sent: Thursday, July 7, 2022 3:51 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; john.fastabend@gmail.com; Gerasymenko, Anatolii
> <anatolii.gerasymenko@intel.com>; kuba@kernel.org; davem@davemloft.net;
> Karlsson, Magnus <magnus.karlsson@intel.com>
> 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.
> 
> 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 <maciej.fijalkowski@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Intel-wired-lan] [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI
  2022-07-07 10:20 ` [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
@ 2022-07-26 18:16   ` Kuruvinakunnel, George
  0 siblings, 0 replies; 5+ messages in thread
From: Kuruvinakunnel, George @ 2022-07-26 18:16 UTC (permalink / raw)
  To: Fijalkowski, Maciej, intel-wired-lan
  Cc: netdev, john.fastabend, Gerasymenko, Anatolii, kuba, davem,
	Karlsson, Magnus

> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Maciej
> Fijalkowski
> Sent: Thursday, July 7, 2022 3:51 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; john.fastabend@gmail.com; Gerasymenko, Anatolii
> <anatolii.gerasymenko@intel.com>; kuba@kernel.org; davem@davemloft.net;
> Karlsson, Magnus <magnus.karlsson@intel.com>
> Subject: [Intel-wired-lan] [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI
> 
> 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 <maciej.fijalkowski@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 

Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-26 18:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 10:20 [PATCH intel-net 0/2] ice: bring up ethtool selftests Maciej Fijalkowski
2022-07-07 10:20 ` [PATCH intel-net 1/2] ice: check (DD | EOF) bits on Rx descriptor rather than (EOP | RS) Maciej Fijalkowski
2022-07-26 18:14   ` [Intel-wired-lan] " Kuruvinakunnel, George
2022-07-07 10:20 ` [PATCH intel-net 2/2] ice: do not setup vlan for loopback VSI Maciej Fijalkowski
2022-07-26 18:16   ` [Intel-wired-lan] " Kuruvinakunnel, George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).