DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ansar Kannankattil <ansarkannankat@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, <dev@dpdk.org>
Subject: Re: Can I use rte_pktmbuf_chain to chain multiple mbuffs for calling only single tx_eth_burst API
Date: Thu, 10 Feb 2022 10:43:03 +0000	[thread overview]
Message-ID: <1a04cc13-8201-4c10-fcb0-bae86c18b4b3@intel.com> (raw)
In-Reply-To: <CAPA_rBcKPFkBomMRr0-dPuTEZi32Dp_rA-QaqN_KwUxsWErTJA@mail.gmail.com>

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@intel.com <mailto:ferruh.yigit@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@intel.com <mailto:ferruh.yigit@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.

  reply	other threads:[~2022-02-10 10:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 18:03 Ansar Kannankattil
2022-02-09 20:56 ` Stephen Hemminger
2022-02-09 22:18 ` Ferruh Yigit
2022-02-09 22:46   ` Stephen Hemminger
2022-02-10  8:56     ` Ferruh Yigit
2022-02-10 10:37       ` Ansar Kannankattil
2022-02-10 10:43         ` Ferruh Yigit [this message]
2022-02-10 11:36         ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a04cc13-8201-4c10-fcb0-bae86c18b4b3@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ansarkannankat@gmail.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).