cxgb4: add loopback ethtool self-test
Subsystems (3)
PATCH v2 1/1 cxgb4: add loopback ethtool self-test
In this test, loopback pkt is created and sent on default queue.
v2:
- Add only loopback self-test.
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 8 ++ .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 52 +++++++++ drivers/net/ethernet/chelsio/cxgb4/sge.c | 107 +++++++++++++++++- 3 files changed, 166 insertions(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +8 -0
@@ -532,6 +532,12 @@ static inline struct mbox_cmd *mbox_cmd_log_entry(struct mbox_cmd_log *log, FW_HDR_FW_VER_BUILD_G(chip##FW_VERSION_BUILD))#define FW_INTFVER (chip, intf) (FW_HDR_INTFVER_##intf) +struct cxgb4_ethtool_lb_test { +struct completion completion; +int result; +int loopback; +}; +struct fw_info {u8 chip;char *fs_name;
@@ -685,6 +691,7 @@ struct port_info {u16 nmirrorqsets;u32 vi_mirror_count;struct mutex vi_mirror_mutex;/* Sync access to Mirror VI info */ +struct cxgb4_ethtool_lb_test ethtool_lb; };struct dentry ;
@@ -1595,6 +1602,7 @@ void t4_free_sge_resources(struct adapter *adap);void t4_free_ofld_rxqs (struct adapter *adap,int n,struct sge_ofld_rxq *q);irq_handler_t t4_intr_handler (struct adapter *adap);netdev_tx_t t4_start_xmit (struct sk_buff *skb,struct net_device *dev); +int cxgb4_selftest_lb_pkt (struct net_device *netdev);int t4_ethrx_handler (struct sge_rspq *q,const __be64 *rsp,const struct pkt_gl *gl);int t4_mgmt_tx (struct adapter *adap,struct sk_buff *skb);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +52 -0
82 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/sge.c +106 -1
137 lines not on this page · raw message
Signature · 1 line
2.21.1
Jakub Kicinski
maintainerQuoted 4 lines · On Wed, 22 Jul 2020 19:28:44 +0530 Vishal Kulkarni wrote:
In this test, loopback pkt is created and sent on default queue.
v2:
- Add only loopback self-test.
Thanks for dropping the rest of the patches. Is it worth specifying what level of loopback this test is? PCI / MAC / PHY / other?
Quoted 8 lines · Jakub Kicinski
Quoted 4 lines · On Wed, 22 Jul 2020 19:28:44 +0530 Vishal Kulkarni wrote:
In this test, loopback pkt is created and sent on default queue.
v2:
- Add only loopback self-test.Thanks for dropping the rest of the patches. Is it worth specifying what level of loopback this test is? PCI / MAC / PHY / other?
Hi Jakub,
I will add details to commit message and send v3.
-Vishal
David Miller
maintainerFrom: Vishal Kulkarni <[email protected]>
Date: Wed, 22 Jul 2020 19:28:44 +0530
Quoted 6 lines
In this test, loopback pkt is created and sent on default queue.
v2:
- Add only loopback self-test.Signed-off-by Vishal Kulkarni <[email protected]>
Please answer Andrew's question, thank you.