Skip to content

Commit 08f1a1b

Browse files
Hariprasad Shenaidavem330
authored andcommitted
cxgb4: Free completed tx skbs promptly
Description of problem: The NIC card is not reporting back to the driver the transmitted skbs, so they get stuck in the TX ring causing issues with reference counters in other kernel components. Developed a new Automatic Egress Queue Update firmware facility to slowly tick through Egress Queues and send back any outstanding CIDX Updates which are laying around. Based on original work by Casey Leedom <[email protected]> Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 215a004 commit 08f1a1b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,8 @@ int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
23032303
FW_EQ_ETH_CMD_PFN(adap->fn) | FW_EQ_ETH_CMD_VFN(0));
23042304
c.alloc_to_len16 = htonl(FW_EQ_ETH_CMD_ALLOC |
23052305
FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c));
2306-
c.viid_pkd = htonl(FW_EQ_ETH_CMD_VIID(pi->viid));
2306+
c.viid_pkd = htonl(FW_EQ_ETH_CMD_AUTOEQUEQE |
2307+
FW_EQ_ETH_CMD_VIID(pi->viid));
23072308
c.fetchszm_to_iqid = htonl(FW_EQ_ETH_CMD_HOSTFCMODE(2) |
23082309
FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) |
23092310
FW_EQ_ETH_CMD_FETCHRO(1) |

drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,7 @@ struct fw_eq_eth_cmd {
12271227
#define FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << 16)
12281228
#define FW_EQ_ETH_CMD_EQSIZE(x) ((x) << 0)
12291229

1230+
#define FW_EQ_ETH_CMD_AUTOEQUEQE (1U << 30)
12301231
#define FW_EQ_ETH_CMD_VIID(x) ((x) << 16)
12311232

12321233
struct fw_eq_ctrl_cmd {

drivers/net/ethernet/chelsio/cxgb4vf/sge.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,8 @@ int t4vf_sge_alloc_eth_txq(struct adapter *adapter, struct sge_eth_txq *txq,
22502250
cmd.alloc_to_len16 = cpu_to_be32(FW_EQ_ETH_CMD_ALLOC |
22512251
FW_EQ_ETH_CMD_EQSTART |
22522252
FW_LEN16(cmd));
2253-
cmd.viid_pkd = cpu_to_be32(FW_EQ_ETH_CMD_VIID(pi->viid));
2253+
cmd.viid_pkd = cpu_to_be32(FW_EQ_ETH_CMD_AUTOEQUEQE |
2254+
FW_EQ_ETH_CMD_VIID(pi->viid));
22542255
cmd.fetchszm_to_iqid =
22552256
cpu_to_be32(FW_EQ_ETH_CMD_HOSTFCMODE(SGE_HOSTFCMODE_STPG) |
22562257
FW_EQ_ETH_CMD_PCIECHN(pi->port_id) |

0 commit comments

Comments
 (0)