cxgb4: add loopback ethtool self-test
authorVishal Kulkarni <vishal@chelsio.com>
Thu, 23 Jul 2020 12:49:50 +0000 (18:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jul 2020 18:59:26 +0000 (11:59 -0700)
commit7235ffae3d2cd3dd02ea840b1f51eeb394e40b0d
treea6416f118f9d8e94b9f542500091002f705e178e
parent15be4ea3f07034a50eee2db6f3fefd2bec582170
cxgb4: add loopback ethtool self-test

In this test, loopback pkt is created and sent on default queue.
The packet goes until the Multi Port Switch (MPS) just before
the MAC and based on the specified channel number, it either
goes outside the wire on one of the physical ports or looped
back to Rx path by MPS. In this case, we're specifying loopback
channel, instead of physical ports, so the packet gets looped
back to Rx path, instead of getting transmitted on the wire.

v3:
- Modify commit message to include test details.
v2:
- Add only loopback self-test.

Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
drivers/net/ethernet/chelsio/cxgb4/sge.c