DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jie Hai <haijie1@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
	<aman.deep.singh@intel.com>, <lihuisong@huawei.com>,
	<fengchengwen@huawei.com>, <huangdengdui@huawei.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbox@nvidia.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	Long Li <longli@microsoft.com>, Gagandeep Singh <g.singh@nxp.com>
Subject: Re: [PATCH v3 1/2] net: add ptype parse for tunnel packets
Date: Sat, 22 Feb 2025 09:53:31 +0800	[thread overview]
Message-ID: <4d6ed2e8-957d-0c2d-cc19-7246c9266a5c@huawei.com> (raw)
In-Reply-To: <20250214083553.492ddbd7@hermes.local>

On 2025/2/15 0:35, Stephen Hemminger wrote:
> On Fri, 14 Feb 2025 09:56:37 +0800
> Jie Hai <haijie1@huawei.com> wrote:
> 
>> Add packet types parse for vxlan/vxlan-gpe/gtp/geneve packets.
>>
>> Signed-off-by: Jie Hai <haijie1@huawei.com>
>> ---
> 
> Not sure about this.
> The original purpose of ptype was to support hardware offload information.
> 
> Does any driver do this ptype detection in tunnels?
> 
> Would the software detection produce the same result as HW offload?
> .
As far as I know, there are two types of packet type: sw packet type and 
hw packet type.

The formmer comes from the call of function rte_net_get_ptype(), which 
parses the
network headers in mbuf data and return its packet type.
All caller(of different drivers) share the same standard.
And it's commonly used in Tx checksum process.

The latter comes from the 'packet_type' field in mbuf.
It is about data really present in the Rx mbuf, and it is defined by drivers
themselves and generally arived from Rx descriptor (or hardware).

Only a few drivers use rte_net_get_ptype() to set packet_type, e.g.

1.With mask RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK | RTE_PTYPE_L4_MASK
	drivers\net\netvsc\hn_rxtx.c
	drivers\net\pfe\pfe_hif_lib.c  under contidion RTE_LIBRTE_PFE_SW_PARSE

2. With mask RTE_PTYPE_ALL_MASK
	drivers\net\tap\rte_eth_tap.c
	drivers\net\virtio\virtio_rxtx_packed.h
	drivers\net\virtio\virtio_rxtx.c
	lib\vhost\virtio_net.c
	lib\node\kernel_rx.c


What this patch changes is the sw packet type, only these examples are 
affected.

And they may not have hardware information of packets to report.
Please check whether there is any impact, @all maintainers.


  reply	other threads:[~2025-02-22  1:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  2:46 [PATCH] app/testpmd: add ipv6 extension header parse Jie Hai
2025-01-08 17:02 ` Stephen Hemminger
2025-01-14  2:05   ` Jie Hai
2025-01-14 11:24     ` Thomas Monjalon
2025-01-24  9:43 ` [PATCH v2 0/2] parse ptype for tunnel packets Jie Hai
2025-01-24  9:43   ` [PATCH v2 1/2] net: add ptype parse " Jie Hai
2025-01-30 18:26     ` Stephen Hemminger
2025-01-24  9:43   ` [PATCH v2 2/2] app/test-pmd: use ptype API parse packets Jie Hai
2025-02-14  1:56 ` [PATCH v3 0/2] app/testpmd: add ipv6 extension header parse Jie Hai
2025-02-14  1:56   ` [PATCH v3 1/2] net: add ptype parse for tunnel packets Jie Hai
2025-02-14 16:35     ` Stephen Hemminger
2025-02-22  1:53       ` Jie Hai [this message]
2025-02-14  1:56   ` [PATCH v3 2/2] app/test-pmd: use ptype API parse packets Jie Hai

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=4d6ed2e8-957d-0c2d-cc19-7246c9266a5c@huawei.com \
    --to=haijie1@huawei.com \
    --cc=aman.deep.singh@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=g.singh@nxp.com \
    --cc=huangdengdui@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=longli@microsoft.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).