CodeRabbit picked up on something here, and I think it's worth highlighting.

When we're splitting segments, we assign txe->mbuf to the first segment...

<snip>

+                txe = &sw_ring[sw_id];
+                /* sub-descriptor slots do not own the mbuf */
+                txe->mbuf = NULL;

...then set subsequent segments to NULL...

+            }
-            /* Setup TX descriptor */
-            txd->buf_addr =
-                rte_cpu_to_le_64(rte_mbuf_data_iova(tx_pkt));
-            cmd_dtype |= IDPF_TX_DESC_DTYPE_FLEX_FLOW_SCHE;
+            /* Write the final (or only) descriptor for this segment */
+            txd = &txr[tx_id];
+            txd->buf_addr = rte_cpu_to_le_64(buf_dma_addr);
              txd->qw1.cmd_dtype = cmd_dtype;
-            txd->qw1.rxr_bufsize = tx_pkt->data_len;
+            txd->qw1.rxr_bufsize = slen;
              txd->qw1.compl_tag = sw_id;

...and we're supposed to write the final descriptor here, but we've stored the mbuf pointer in the *first* descriptor, not in the *last* one, which means when this descriptor gets to processing completions, the mbuf pointer of that descriptor will be NULL? Is that intended?

Actually, digging in, I don't see where we free mbufs at all in splitq path? Am I missing something here?

--
Thanks,
Anatoly

Reply via email to