DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Kumara Parameshwaran <kparameshwar@vmware.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"jiayu.hu@intel.com" <jiayu.hu@intel.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Raghav Kempanna <kraghav@vmware.com>
Subject: Re: UDP-GRO not working
Date: Fri, 11 Mar 2022 09:15:40 -0800	[thread overview]
Message-ID: <20220311091540.6d1b67aa@hermes.local> (raw)
In-Reply-To: <SN6PR05MB48953F1EA859CA6D1046E05EB10B9@SN6PR05MB4895.namprd05.prod.outlook.com>

On Thu, 10 Mar 2022 12:49:04 +0000
Kumara Parameshwaran <kparameshwar@vmware.com> wrote:

> Hi ,
> 
> I tried using the UDP GRO feature in DPDK recently and it did not see working. I understand the GRO for UDP is applicable only for fragmented packets, there is the following check in gro_udp4.c
> /*
> * Don't process non-fragment packet.
> */
> if (!is_ipv4_fragment(ipv4_hdr))
> return -1;
> 
> 
> There looks to be some conflict in the definition of RTE_PTYPE in rte_mbuf_ptype.h and the usage of this in GRO layer, rte_gro.c
> 
> The below are the definitions,
> 
> #define RTE_PTYPE_L4_TCP                    0x00000100
> #define RTE_PTYPE_L4_UDP                    0x00000200
> #define RTE_PTYPE_L4_FRAG                   0x00000300
> 
> Below is the check in GRO layer,
> 
> #define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
>         ((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP) && \
>         (RTE_ETH_IS_TUNNEL_PKT(ptype) == 0))
> 
> #define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
>         ((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \
>         (RTE_ETH_IS_TUNNEL_PKT(ptype) == 0))
> 
> So, for a fragmented UDP packet both RTE_PTYPE_L4_TCP & RTE_PTYPE_L4_UDP would be set and the GRO layer would be not able to interpret the packet type right.
> 
> I am using rte_net_get_ptype API before the packet is being sent to the GRO subsystem as the DPDK PMD for the NIC I am using would not set the packet types as required by the GRO subsystem.
> 
> I would like to contribute a patch for this bug if this indeed is an issue, I was thinking if the GRO subsystem is L4 fragmented then in the GRO layer invoked the appropriate handler, either gro_tcp4_reassemble or gro_ud4_reassemble.
> 
> Please let me know if I am missing something here.
> 
> Thanks,
> Param.

Are you using RSS, perhaps the fragmented packet is arriving on a different queue.
Since fragments don't have UDP header, often the arrive on a default queue.

  reply	other threads:[~2022-03-11 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 12:49 Kumara Parameshwaran
2022-03-11 17:15 ` Stephen Hemminger [this message]
2022-03-10 12:52 kumaraparameshwaran rathinavel
2022-06-09  8:11 ` Thomas Monjalon
2022-06-09 15:24   ` Hu, Jiayu

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=20220311091540.6d1b67aa@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jiayu.hu@intel.com \
    --cc=kparameshwar@vmware.com \
    --cc=kraghav@vmware.com \
    --cc=olivier.matz@6wind.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).