DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ding, Xuan" <xuan.ding@intel.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Jerin Jacob <jerinjacobk@gmail.com>,
	"Wu, WenxuanX" <wenxuanx.wu@intel.com>
Cc: "Thomas Monjalon" <thomas@monjalon.net>,
	"Li, Xiaoyun" <xiaoyun.li@intel.com>,
	"Singh, Aman Deep" <aman.deep.singh@intel.com>,
	"Zhang, Yuying" <yuying.zhang@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>, dpdk-dev <dev@dpdk.org>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>,
	"Yu, Ping" <ping.yu@intel.com>,
	"Wang, YuanX" <yuanx.wang@intel.com>
Subject: RE: [v4 1/3] ethdev: introduce protocol type based header split
Date: Mon, 25 Apr 2022 09:23:22 +0000	[thread overview]
Message-ID: <BN9PR11MB5513EE72136246BC672FBD33E7F89@BN9PR11MB5513.namprd11.prod.outlook.com> (raw)
In-Reply-To: <d191a5ad-c6cb-926b-c17c-652d09241f42@oktetlabs.ru>

Hi Andrew,

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: Wednesday, April 20, 2022 10:40 PM
> To: Ding, Xuan <xuan.ding@intel.com>; Jerin Jacob <jerinjacobk@gmail.com>;
> Wu, WenxuanX <wenxuanx.wu@intel.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; Li, Xiaoyun
> <xiaoyun.li@intel.com>; Singh, Aman Deep <aman.deep.singh@intel.com>;
> Zhang, Yuying <yuying.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; dpdk-dev <dev@dpdk.org>; Stephen Hemminger
> <stephen@networkplumber.org>; Morten Brørup
> <mb@smartsharesystems.com>; Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>; Yu, Ping <ping.yu@intel.com>; Wang, YuanX
> <yuanx.wang@intel.com>
> Subject: Re: [v4 1/3] ethdev: introduce protocol type based header split
> 
> On 4/12/22 19:40, Ding, Xuan wrote:
> > Hi Jacob,
> >
> >> -----Original Message-----
> >> From: Jerin Jacob <jerinjacobk@gmail.com>
> >> Sent: Thursday, April 7, 2022 9:27 PM
> >> To: Wu, WenxuanX <wenxuanx.wu@intel.com>
> >> Cc: Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
> >> <andrew.rybchenko@oktetlabs.ru>; Li, Xiaoyun <xiaoyun.li@intel.com>;
> >> Singh, Aman Deep <aman.deep.singh@intel.com>; Zhang, Yuying
> >> <yuying.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> >> dpdk-dev <dev@dpdk.org>; Stephen Hemminger
> >> <stephen@networkplumber.org>; Morten Brørup
> >> <mb@smartsharesystems.com>; Viacheslav Ovsiienko
> >> <viacheslavo@nvidia.com>; Yu, Ping <ping.yu@intel.com>; Ding, Xuan
> >> <xuan.ding@intel.com>; Wang, YuanX <yuanx.wang@intel.com>
> >> Subject: Re: [v4 1/3] ethdev: introduce protocol type based header
> >> split
> >>
> >> On Sat, Apr 2, 2022 at 4:33 PM <wenxuanx.wu@intel.com> wrote:
> >>>
> >>> From: Xuan Ding <xuan.ding@intel.com>
> >>>
> >>> Header split consists of splitting a received packet into two
> >>> separate regions based on the packet content. The split happens
> >>> after the packet header and before the packet payload. Splitting is
> >>> usually between the packet header that can be posted to a dedicated
> >>> buffer and the packet payload that can be posted to a different buffer.
> >>>
> >>> Currently, Rx buffer split supports length and offset based packet split.
> >>> Although header split is a subset of buffer split, configuring
> >>> buffer split based on length is not suitable for NICs that do split
> >>> based on header protocol types. Because tunneling makes the
> >>> conversion from length to protocol type impossible.
> >>>
> >>> This patch extends the current buffer split to support protocol type
> >>> and offset based header split. A new proto field is introduced in
> >>> the rte_eth_rxseg_split structure reserved field to specify header
> >>> protocol type. With Rx offload flag
> RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
> >>> enabled and protocol type configured, PMD will split the ingress
> >>> packets into two separate regions. Currently, both inner and outer
> >>> L2/L3/L4 level header split can be supported.
> >>>
> >>> For example, let's suppose we configured the Rx queue with the
> >>> following segments:
> >>>      seg0 - pool0, off0=2B
> >>>      seg1 - pool1, off1=128B
> >>>
> >>> With header split type configured with RTE_ETH_RX_HEADER_SPLIT_UDP,
> >>> the packet consists of MAC_IP_UDP_PAYLOAD will be split like following:
> >>>      seg0 - udp header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from
> pool0
> >>
> >> If we set rte_eth_rxseg_split::proto = RTE_ETH_RX_HEADER_SPLIT_UDP
> >> and rte_eth_rxseg_split.offset = 2, What will be the content for
> >> seg0, Will it be,
> >> - offset as Starts atUDP Header
> >> - size of segment as MAX(size of UDP header + 2, 128(as seg 1 start
> from128).
> >> Right? If not, Please describe
> >
> > Proto defines the location in packet for split.
> > Offset defines data buffer from beginning of mbuf data buffer, it can be
> zero.
> > With proto and offset configured, packets received will be split into two
> segments.
> >
> > So in this configuration, the seg0 content is UDP header, the seg1 content is
> the payload.
> > Size of seg0 is size of UDP header, size of seg1 is size of payload.
> > rte_eth_rxseg_split.offset = 2/128 decides the mbuf offset, rather than
> segment size.
> 
> Above discussion proves that definition of the struct rte_eth_rxseg_split is
> misleading. It is hard to catch from naming that length defines a maximum
> data amount to be copied, but office is a an offset in destination mbuf. The
> structure is still experimental and I think we should improve naming: offset ->
> mbuf_offset?

Yes, you are right. In rte_eth_rxseg_split structure, even the length and offset
are documented, it is hard to understand just from the naming.

Thanks,
Xuan

> 
> >
> >>
> >> Also, I don't think we need duplate
> >> rte_eth_rx_header_split_protocol_type instead we can reuse existing
> >> RTE_PTYPE_*  flags.
> >
> > That's a good idea. Yes, I can use the RTE_PTYPE_* here. My only
> > concern is the 32-bits RTE_PTYPE_* will run out of the 32-bits reserved
> fields.
> > If this proposal is agreed, I will use RTE_PTYPE_* instead of
> rte_eth_rx_header_split_protocol_type.
> >
> > Best Regards,
> > Xuan
> >
> >>
> >>
> >>>      seg1 - payload @ 128 in mbuf from pool1
> >>>
> >>> The memory attributes for the split parts may differ either - for
> >>> example the mempool0 and mempool1 belong to dpdk memory and
> >> external
> >>> memory, respectively.


  parent reply	other threads:[~2022-04-25  9:23 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  6:01 [RFC] " xuan.ding
2022-03-03  8:55 ` Thomas Monjalon
2022-03-08  7:48   ` Ding, Xuan
2022-03-03 16:15 ` Stephen Hemminger
2022-03-04  9:58   ` Zhang, Qi Z
2022-03-04 11:54     ` Morten Brørup
2022-03-04 17:32     ` Stephen Hemminger
2022-03-22  3:56 ` [RFC,v2 0/3] " xuan.ding
2022-03-22  3:56   ` [RFC,v2 1/3] " xuan.ding
2022-03-22  7:14     ` Zhang, Qi Z
2022-03-22  7:43       ` Ding, Xuan
2022-03-22  3:56   ` [RFC,v2 2/3] app/testpmd: add header split configuration xuan.ding
2022-03-22  3:56   ` [RFC,v2 3/3] net/ice: support header split in Rx data path xuan.ding
2022-03-29  6:49 ` [RFC,v3 0/3] ethdev: introduce protocol type based header split xuan.ding
2022-03-29  6:49   ` [RFC,v3 1/3] " xuan.ding
2022-03-29  7:56     ` Zhang, Qi Z
2022-03-29  8:18       ` Ding, Xuan
2022-03-29  6:49   ` [RFC,v3 2/3] app/testpmd: add header split configuration xuan.ding
2022-03-29  6:49   ` [RFC,v3 3/3] net/ice: support header split in Rx data path xuan.ding
2022-04-02 10:41 ` [v4 0/3] ethdev: introduce protocol type based header split wenxuanx.wu
2022-04-02 10:41   ` [v4 1/3] " wenxuanx.wu
2022-04-07 10:47     ` Andrew Rybchenko
2022-04-12 16:15       ` Ding, Xuan
2022-04-20 15:48         ` Andrew Rybchenko
2022-04-25 14:57           ` Ding, Xuan
2022-04-21 10:27         ` Thomas Monjalon
2022-04-25 15:05           ` Ding, Xuan
2022-04-07 13:26     ` Jerin Jacob
2022-04-12 16:40       ` Ding, Xuan
2022-04-20 14:39         ` Andrew Rybchenko
2022-04-21 10:36           ` Thomas Monjalon
2022-04-25  9:23           ` Ding, Xuan [this message]
2022-04-26 11:13     ` [PATCH v5 0/3] ethdev: introduce protocol based buffer split wenxuanx.wu
2022-04-26 11:13       ` [PATCH v5 1/4] lib/ethdev: introduce protocol type " wenxuanx.wu
2022-05-17 21:12         ` Thomas Monjalon
2022-05-19 14:40           ` Ding, Xuan
2022-05-26 14:58             ` Ding, Xuan
2022-04-26 11:13       ` [PATCH v5 2/4] app/testpmd: add proto based buffer split config wenxuanx.wu
2022-04-26 11:13       ` [PATCH v5 3/4] net/ice: support proto based buf split in Rx path wenxuanx.wu
2022-04-02 10:41   ` [v4 2/3] app/testpmd: add header split configuration wenxuanx.wu
2022-04-02 10:41   ` [v4 3/3] net/ice: support header split in Rx data path wenxuanx.wu
2022-05-27  7:54 ` [PATCH v6] ethdev: introduce protocol header based buffer split xuan.ding
2022-05-27  8:14 ` [PATCH v6 0/1] ethdev: introduce protocol " xuan.ding
2022-05-27  8:14   ` [PATCH v6 1/1] ethdev: introduce protocol header " xuan.ding
2022-05-30  9:43     ` Ray Kinsella
2022-06-01 13:06 ` [PATCH v7 0/3] ethdev: introduce protocol type based header split wenxuanx.wu
2022-06-01 13:06   ` [PATCH v7 1/3] ethdev: introduce protocol header based buffer split wenxuanx.wu
2022-06-01 13:06   ` [PATCH v7 2/3] net/ice: support buffer split in Rx path wenxuanx.wu
2022-06-01 13:06   ` [PATCH v7 3/3] app/testpmd: add rxhdrs commands and parameters wenxuanx.wu
2022-06-01 13:22 ` [PATCH v7 0/3] ethdev: introduce protocol type based header split wenxuanx.wu
2022-06-01 13:22   ` [PATCH v7 1/3] ethdev: introduce protocol header based buffer split wenxuanx.wu
2022-06-01 13:22   ` [PATCH v7 2/3] net/ice: support buffer split in Rx path wenxuanx.wu
2022-06-01 13:22   ` [PATCH v7 3/3] app/testpmd: add rxhdrs commands and parameters wenxuanx.wu
2022-06-01 13:50 ` [PATCH v8 0/3] ethdev: introduce protocol type based header split wenxuanx.wu
2022-06-01 13:50   ` [PATCH v8 1/3] ethdev: introduce protocol hdr based buffer split wenxuanx.wu
2022-06-02 13:20     ` Andrew Rybchenko
2022-06-03 16:30       ` Ding, Xuan
2022-06-04 14:25         ` Andrew Rybchenko
2022-06-07 10:13           ` Ding, Xuan
2022-06-07 10:48             ` Andrew Rybchenko
2022-06-10 15:04               ` Ding, Xuan
2022-06-01 13:50   ` [PATCH v8 1/3] ethdev: introduce protocol header " wenxuanx.wu
2022-06-02 13:20     ` Andrew Rybchenko
2022-06-02 13:44       ` Ding, Xuan
2022-06-01 13:50   ` [PATCH v8 2/3] net/ice: support buffer split in Rx path wenxuanx.wu
2022-06-01 13:50   ` [PATCH v8 3/3] app/testpmd: add rxhdrs commands and parameters wenxuanx.wu
2022-06-02 13:20   ` [PATCH v8 0/3] ethdev: introduce protocol type based header split Andrew Rybchenko
2022-06-13 10:25 ` [PATCH v9 0/4] add an api to support proto based buffer split wenxuanx.wu
2022-06-13 10:25   ` [PATCH v9 1/4] ethdev: introduce protocol header API wenxuanx.wu
2022-07-07  9:05     ` Thomas Monjalon
2022-08-01  7:09       ` Wang, YuanX
2022-08-01 10:01         ` Thomas Monjalon
2022-08-02 10:12           ` Wang, YuanX
2022-07-08 15:00     ` Andrew Rybchenko
2022-08-01  7:17       ` Wang, YuanX
2022-06-13 10:25   ` [PATCH v9 2/4] ethdev: introduce protocol hdr based buffer split wenxuanx.wu
2022-07-07  9:07     ` Thomas Monjalon
2022-07-11  9:54       ` Ding, Xuan
2022-07-11 10:12         ` Thomas Monjalon
2022-07-08 15:00     ` Andrew Rybchenko
2022-07-21  3:24       ` Ding, Xuan
2022-08-01 14:28         ` Andrew Rybchenko
2022-08-02  7:22           ` Ding, Xuan
2022-06-13 10:25   ` [PATCH v9 3/4] app/testpmd: add rxhdrs commands and parameters wenxuanx.wu
2022-06-13 10:25   ` [PATCH v9 4/4] net/ice: support buffer split in Rx path wenxuanx.wu
2022-06-21  8:56   ` [PATCH v9 0/4] add an api to support proto based buffer split Ding, Xuan
2022-07-07  9:10     ` Thomas Monjalon
2022-07-11 10:08       ` Ding, Xuan

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=BN9PR11MB5513EE72136246BC672FBD33E7F89@BN9PR11MB5513.namprd11.prod.outlook.com \
    --to=xuan.ding@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=jerinjacobk@gmail.com \
    --cc=mb@smartsharesystems.com \
    --cc=ping.yu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=wenxuanx.wu@intel.com \
    --cc=xiaoyun.li@intel.com \
    --cc=yuanx.wang@intel.com \
    --cc=yuying.zhang@intel.com \
    /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).