[PATCH] net/idpf: handle Tx of mbuf segments larger than 16k
Burakov, Anatoly
anatoly.burakov at intel.com
Fri Mar 6 15:16:56 CET 2026
On 3/6/2026 3:03 PM, Burakov, Anatoly wrote:
>
>> 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?
>
Yes I am, RS bit is set by the hardware. I guess the question is then,
does it set RS bits for *all* segments, or just the ones we marked with
EOP? If it's the latter then it's definitely a bug. If all segments get
RS bit set, then it's not.
--
Thanks,
Anatoly
More information about the dev
mailing list