Can I use rte_pktmbuf_chain to chain multiple mbuffs for calling only single tx_eth_burst API

Ferruh Yigit ferruh.yigit at intel.com
Thu Feb 10 11:43:03 CET 2022


On 2/10/2022 10:37 AM, Ansar Kannankattil wrote:

moved down, please avoid top post

> On Thu, Feb 10, 2022 at 2:26 PM Ferruh Yigit <ferruh.yigit at intel.com <mailto:ferruh.yigit at intel.com>> wrote:
> 
>     On 2/9/2022 10:46 PM, Stephen Hemminger wrote:
>      > On Wed, 9 Feb 2022 22:18:24 +0000
>      > Ferruh Yigit <ferruh.yigit at intel.com <mailto:ferruh.yigit at intel.com>> wrote:
>      >
>      >> On 2/9/2022 6:03 PM, Ansar Kannankattil wrote:
>      >>> Hi
>      >>> My intention is to decrease the number of rte_tx_eth_burst calls, I know that mentioning nb_pkts will result in sending multiple packets in a single call.
>      >>> But providing nb_pkts=1 and posting a head mbuff having number of mbuffs linked with it will results sending multiple packets
>      >>
>      >> If driver supports, you can do it.
>      >> Driver should expose this capability via RTE_ETH_TX_OFFLOAD_MULTI_SEGS flag,
>      >> in 'dev_info->tx_offload_capa'.
>      >>
>      >>> If not, what is the use case of linking multiple mbuffs together
>      >>
>      >> It is also used in Rx path (again if driver supports).
>      >
>      > I think Ansar was asking about chaining multiple packets in one call to tx burst.
>      > The chaining in DPDK is to make a single packet out of multiple pieces (like writev).
>      >
>      > DPDK mbufs were based on original BSD concept.
>      > In BSD mbufs, mbuf has two linked lists.
>      >    BSD m->m_next pointer == DPDK m->next  for multiple parts of packet.
>      >    BSD m->m_nextpkt                       for next packet in queue
>      >
>      > There is no nextpkt in DPDK.
> 
>     Right, chaining mbufs is for segmented packets.
> 
> 
> Thanks for the responses,
> Then what is the advantage of chaining mbuffs over using the mbuff array?
> 

If you have small packet buffer, mbufs can be chained to represent a big packet.
Or scattered buffers can be used to represent a packet by chaining.

Array is used to represent different packets.


More information about the dev mailing list