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 0B771A0557; Thu, 9 Jun 2022 10:11:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B538F40689; Thu, 9 Jun 2022 10:11:33 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id D0A3340220 for ; Thu, 9 Jun 2022 10:11:32 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 53C7C5C0111; Thu, 9 Jun 2022 04:11:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 09 Jun 2022 04:11:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1654762291; x= 1654848691; bh=PuPKVI5hvpwiu7KVWyu7u9kw1/uE7kicsKpk+jrDK/Q=; b=e 98Cm9WXb0JAQi6bOtNQBCLn7jWIPKDMqqrrsaJ/jmlTVEdcX3xnYooLzcniPxyhe D2X7ACEwLa+PAaUN1V0QmVXNCLpaHeMolH1bv+28EnFpt9AwdwTAVLXcSJDklRzD EABqKYjE1EYilO8iu+gtcoBRt1SsWfV7tBRrKSn+MrMo9nHivZcLU1TCFavW/ZsN 8ix4qizdBWbLXLM8Vzax8QwQkWU+RqtFlMGGJrnOm1W2T+hyIXQqxuPf2JUh1B5y TUx0OF7F4ql10iSbRc2WpXVxdfiMxAofgKCspqfAUT/BKfjgzKQblKNtX5w/DMYy IkLFfDvpZmFERj8bLW6fA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1654762291; x= 1654848691; bh=PuPKVI5hvpwiu7KVWyu7u9kw1/uE7kicsKpk+jrDK/Q=; b=K CWfzrGInEpkY/FCUEGpGJSvgeLckaFDPetwXh1XgRzUJpY1Vf9fff1YOn6uJs4Wb BBDWnmoACvrp2dOtz5jQkCA8iec/ox9SgC3/ttriDvwzMxSKDpal7iKB3Q9W8k4O UcrX0CYTE7EAoeBEoQd5aL+kiJRRDBRqYn6U7YWn/OtxjZPVd57jWRX9F/Zojq5C AhcDUCPL2rQ/ghlL3SBVMxiTLhS7lcTBegI/H/I3k3QrVcBW2DhkdT/lwILgd7Ol ktxKK6MxXdL696NQQdjoKc0tj7o1HRVyREeSqw7zyiGJoDX/jxUbdWpGo7cCkaRo oPd/DKpqb+Xnp/uTrrdvA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtkedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Jun 2022 04:11:30 -0400 (EDT) From: Thomas Monjalon To: jiayu.hu@intel.com Cc: dev@dpdk.org, olivier.matz@6wind.com, kraghav@vmware.com, kumaraparameshwaran rathinavel Subject: Re: UDP-GRO not working Date: Thu, 09 Jun 2022 10:11:28 +0200 Message-ID: <13031173.dW097sEU6C@thomas> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Jiayu, please could you comment the explanation below? 10/03/2022 13:52, kumaraparameshwaran rathinavel: > 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 unable to interpret the packet type > correctly. > > 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. >