Skip to content

Commit

Permalink
cxgb4: Fix work request size calculation for loopback test
Browse files Browse the repository at this point in the history
Work request used for sending loopback packet needs to add
the firmware work request only once. So, fix by using
correct structure size.

Fixes: 7235ffa ("cxgb4: add loopback ethtool self-test")
Signed-off-by: Ganji Aravind <ganji.aravind@chelsio.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ganji Aravind authored and David S. Miller committed Aug 18, 2020
1 parent ab97a28 commit 3359564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/chelsio/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2553,8 +2553,8 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev)

pkt_len = ETH_HLEN + sizeof(CXGB4_SELFTEST_LB_STR);

flits = DIV_ROUND_UP(pkt_len + sizeof(struct cpl_tx_pkt) +
sizeof(*wr), sizeof(__be64));
flits = DIV_ROUND_UP(pkt_len + sizeof(*cpl) + sizeof(*wr),
sizeof(__be64));
ndesc = flits_to_desc(flits);

lb = &pi->ethtool_lb;
Expand Down

0 comments on commit 3359564

Please sign in to comment.