From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D79C1A00C2; Thu, 10 Feb 2022 12:30:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56C1240140; Thu, 10 Feb 2022 12:30:00 +0100 (CET) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mails.dpdk.org (Postfix) with ESMTP id 723404013F for ; Thu, 10 Feb 2022 11:37:14 +0100 (CET) Received: by mail-qk1-f173.google.com with SMTP id bs32so4363619qkb.1 for ; Thu, 10 Feb 2022 02:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XeY8o4uXsPGzPiA02GVhUR/SA7VxxiDcg3OOcojreVY=; b=MTTbXmZtw4XObeFjtbQMQ4XUZMJHVSBwGAddtREc4Ih2KMbP9fzj1sObRzE7dOG0pJ Gcwyrq+YQlcadjQtVQbfnINeipFPo1FFvD4B1gABVLUv78Pd12Nbbw9r5HcG3sYetnyQ xcV1oAmJTvP+zltbIWMy4PqtxyQYcAt+Ti36WgrhAKX+hKhn7ztNOj3hOWtSn4fbGMf8 TJXHZZjelC7KtSMdkWiivyRI/UO59gmC+rDMNGGisZgRMINMMU8nwRzvsArnLdSglBqb xo+dzOHG+mIv8G/6Z9ShYkkxiNCpZuGrVtT8L5IdJ9+TwcQSkA9sVxQv9x6vIX0qTNx6 FMMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XeY8o4uXsPGzPiA02GVhUR/SA7VxxiDcg3OOcojreVY=; b=ISbefAec9nu5pwFzri2ejAhvSNaehmWCCHSj23M+eyB999c4M2fYW+XNDh66RVxdv3 QbmGWSjLGrrdQiEtZ38t8ZbYmdI8LFbnIFPxqvWRsALY0CJWLvwYmzqFgh4IMjj4C+gy hC8ZxXVqZxFylyTob530nmhqL8pwpZazZoTKiZSzh6ts+X/WzuIsKyIEYf4HOQgvA18g CgkjYOs0u5h/ZL7YWlCkSEp/5hJntgo0yGA7DaEf9YArq5+SR1yiF7+FJk6Fvk1QrpyF cues+C0mkyNQj7GmLKzbg4Ns0dKe3LL4UcaqkIpFCwUvRY9nvU2/w8O1Ppq/H/MdF8qF KmJg== X-Gm-Message-State: AOAM532+A825VkCrX+4uC0WLK2o0RyF+hXxboKT9FlQSSdFTXMwNAHM9 DQ+BSnTJ9QvCF7Iz7LZxnv+H1Dh5H5c2KVgg0bA= X-Google-Smtp-Source: ABdhPJwvjBgdlDHtJkGHgb46AKXkDAeB6Fh2pzEpJAOlukMtzqs5dAJg7UH9T7j6/LcH7CFe6YFbFxlk6NyV8vi+5uM= X-Received: by 2002:a05:620a:4727:: with SMTP id bs39mr3404555qkb.486.1644489433705; Thu, 10 Feb 2022 02:37:13 -0800 (PST) MIME-Version: 1.0 References: <20220209144617.79834bd6@hermes.local> <7dccdaf8-10d0-69f2-2a91-791dde993cee@intel.com> In-Reply-To: <7dccdaf8-10d0-69f2-2a91-791dde993cee@intel.com> From: Ansar Kannankattil Date: Thu, 10 Feb 2022 16:07:02 +0530 Message-ID: Subject: Re: Can I use rte_pktmbuf_chain to chain multiple mbuffs for calling only single tx_eth_burst API To: Ferruh Yigit Cc: Stephen Hemminger , dev@dpdk.org Content-Type: multipart/alternative; boundary="0000000000008871b305d7a7889a" X-Mailman-Approved-At: Thu, 10 Feb 2022 12:29:58 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --0000000000008871b305d7a7889a Content-Type: text/plain; charset="UTF-8" Thanks for the responses, Then what is the advantage of chaining mbuffs over using the mbuff array? On Thu, Feb 10, 2022 at 2:26 PM Ferruh Yigit wrote: > On 2/9/2022 10:46 PM, Stephen Hemminger wrote: > > On Wed, 9 Feb 2022 22:18:24 +0000 > > Ferruh Yigit 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. > --0000000000008871b305d7a7889a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the responses,
Then what is the advantage o= f chaining mbuffs over using the mbuff array?

On Thu, Feb 10, 2022 at = 2:26 PM Ferruh Yigit <ferruh.y= igit@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> wrote:
>
>> On 2/9/2022 6:03 PM, Ansar Kannankattil wrote:
>>> Hi
>>> My intention is to decrease the number of rte_tx_eth_burst cal= ls, I know that mentioning nb_pkts will result in sending multiple packets = in a single call.
>>> But providing nb_pkts=3D1 and posting a head mbuff having numb= er of mbuffs=C2=A0linked with it will results sending multiple=C2=A0packets=
>>
>> 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=C2=A0t= ogether
>>
>> It is also used in Rx path (again if driver supports).
>
> I think Ansar was asking about chaining multiple packets in one call t= o 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.
>=C2=A0 =C2=A0 BSD m->m_next pointer =3D=3D DPDK m->next=C2=A0 for= multiple parts of packet.
>=C2=A0 =C2=A0 BSD m->m_nextpkt=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for next packet in queue
>
> There is no nextpkt in DPDK.

Right, chaining mbufs is for segmented packets.
--0000000000008871b305d7a7889a--