History

idpf: adjust TxQ ring count minimum

Set the TxQ ring count minimum to 128 descriptors. Any lower than this, and the queue will stall and trigger Tx timeouts in flow based scheduling mode. This is because next_to_clean might never be updated. In flow based scheduling mode, next_to_clean is only updated after a descriptor completion is processed, i.e. after the RE bit is set in the last descriptor of a Tx packet. This will never happen with a ring size of 64 and an IDPF_TX_SPLITQ_RE_MIN_GAP of 64. No matter what the value of last_re is initialized/set to, the calculated gap will be at most 63 and never trigger the RE bit. Even a ring size of 96 does not solve this. Because of how infrequent next_to_clean is updated and how small the ring is, IDPF_DESC_UNUSED will be much smaller on average. This increases the chance the queue will be stopped because a multi-descriptor packet, e.g. a large LSO packet, does not see enough resources on the ring. In this case, the queue will trigger the stop logic. The queue permanently stalls because there is no chance for a descriptor completion to update next_to_clean since it is dependent on a packet being sent.

Joshua Hay committed 4 months ago

Commit bef152d1 parent 9f7007e2 files · +2 −5Browse files

Unified · Split

2 files
  1. drivers/net/ethernet/intel/idpf/idpf_txrx.c +1 −4
  2. drivers/net/ethernet/intel/idpf/idpf_txrx.h +1 −1
drivers/net/ethernet/intel/idpf/idpf_txrx.c+1−4
@@ -3097,10 +3097,7 @@ static netdev_tx_t idpf_tx_splitq_frame(struct sk_buff *skb, · 3096 unmodified lines
30973097
30983098 tx_params.dtype = IDPF_TX_DESC_DTYPE_FLEX_FLOW_SCHE;
30993099 tx_params.eop_cmd = IDPF_TXD_FLEX_FLOW_CMD_EOP;
3100− /* Set the RE bit to periodically "clean" the descriptor ring.
3101− * MIN_GAP is set to MIN_RING size to ensure it will be set at
3102− * least once each time around the ring.
3103− */
3100+ /* Set the RE bit periodically to "clean" the descriptor ring */
31043101 if (idpf_tx_splitq_need_re(tx_q)) {
31053102 tx_params.eop_cmd |= IDPF_TXD_FLEX_FLOW_CMD_RE;
31063103 tx_q->txq_grp->num_completions_pending++;
drivers/net/ethernet/intel/idpf/idpf_txrx.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 /* Mailbox Queue */
2222 #define IDPF_MAX_MBXQ 1
2323
24−#define IDPF_MIN_TXQ_DESC 64
24+#define IDPF_MIN_TXQ_DESC 128
2525 #define IDPF_MIN_RXQ_DESC 64
2626 #define IDPF_MIN_TXQ_COMPLQ_DESC 256
2727 #define IDPF_MAX_QIDS 256

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t