]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
idpf: increment completion queue next_to_clean in sw marker wait routine
authorLi Li <boolli@google.com>
Mon, 5 Jan 2026 06:47:28 +0000 (06:47 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 25 Feb 2026 19:43:56 +0000 (11:43 -0800)
Currently, in idpf_wait_for_sw_marker_completion(), when an
IDPF_TXD_COMPLT_SW_MARKER packet is found, the routine breaks out of
the for loop and does not increment the next_to_clean counter. This
causes the subsequent NAPI polls to run into the same
IDPF_TXD_COMPLT_SW_MARKER packet again and print out the following:

    [   23.261341] idpf 0000:05:00.0 eth1: Unknown TX completion type: 5

Instead, we should increment next_to_clean regardless when an
IDPF_TXD_COMPLT_SW_MARKER packet is found.

Tested: with the patch applied, we do not see the errors above from NAPI
polls anymore.

Fixes: 9d39447051a0 ("idpf: remove SW marker handling from NAPI")
Signed-off-by: Li Li <boolli@google.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf_txrx.c

index 376050308b06c15ccb3e09500efc5354faeee2a6..761a775104673187e0a919b446f6ef3660ee2db0 100644 (file)
@@ -2348,7 +2348,7 @@ void idpf_wait_for_sw_marker_completion(const struct idpf_tx_queue *txq)
 
        do {
                struct idpf_splitq_4b_tx_compl_desc *tx_desc;
-               struct idpf_tx_queue *target;
+               struct idpf_tx_queue *target = NULL;
                u32 ctype_gen, id;
 
                tx_desc = flow ? &complq->comp[ntc].common :
@@ -2368,14 +2368,14 @@ void idpf_wait_for_sw_marker_completion(const struct idpf_tx_queue *txq)
                target = complq->txq_grp->txqs[id];
 
                idpf_queue_clear(SW_MARKER, target);
-               if (target == txq)
-                       break;
 
 next:
                if (unlikely(++ntc == complq->desc_count)) {
                        ntc = 0;
                        gen_flag = !gen_flag;
                }
+               if (target == txq)
+                       break;
        } while (time_before(jiffies, timeout));
 
        idpf_queue_assign(GEN_CHK, complq, gen_flag);