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 6856FA0093; Fri, 11 Mar 2022 09:37:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7DC540140; Fri, 11 Mar 2022 09:37:44 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2067.outbound.protection.outlook.com [40.107.92.67]) by mails.dpdk.org (Postfix) with ESMTP id 04F154113E for ; Thu, 10 Mar 2022 13:49:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZIjCtDynDZpr0vc/E94V9YmNQ0SE/co0p38Xcms5WpJol5IvWT7HDztJcz2fmp1Cb1cfk3sPfKebafsca/XC98JJNjbW8oi83y4CMdPln7tHmaSOBFeZq+Zcyw5Lgv7gmVH9pI5bS6NVtO4RbMZVmDZyjlpY9b/dbeVT+Bbvi/3Np2rgtHvfKoJ+/LizjXW8TrLHLyeMetbmVtQUeMH2zfw97kO7D22LLtLyiK8TCT7eGeHGn/bm7ojG33zo31Vh7WCVgeyPA1P6vMHnASP1zrRZiovrp4glvLWCCkW1FIS0wXRhkjr8/P6dx6mFVyoELpI4Ks6fQW3FHxDortHQ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KbtmRrYyG3HGiJYOH0dhHXgVjwn7+ckIdnF/zcxzB+Y=; b=DO1LMAPxLvBeD56hDFC5Z6h89xcv46aaj4wQxGYrG7AS1lQ7r13MpD+/cQBXvXYCEHgq/GDHXrXgEJ8MZWitxtmTOaWpOpS2Op4MNLfW1DwFUJR8F9MnAtGAchjYA0qzjMQHWPUJYMigAkj7HQzYY++cbySzRUUmPuF1wxCKaTYc2Q0HxDK9EUEc2osk0lG4Z7Xs3o355OcAibMR56OkBtqLr979I5BzgSK6npNzwB7OOVKV2HWQCzQU9kdiUDKSY0DBXMFDEl1yZA2FRq2N8TD1qxh8tcGKs6Jz7Z7zDuMukUMSUlNz2eP3zT9f/K6Cw27zrG0hS8//Hu/o6M+m5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KbtmRrYyG3HGiJYOH0dhHXgVjwn7+ckIdnF/zcxzB+Y=; b=WayIoJlGO71wYuPYoq+TJyl9aNqMQgWK6kUDZcnS2Y4pH/d4osZtRvUmLcIMCbJ8JCBzbiePruPulVRsN6ElxKkyVEbNsoCgWElI56j9T9TcQOAd/ow1xdBoGVxMQ5qToR+x+hRNtcXePI6aSB6994eSZCDh0wg7biUPAmWy9U8= Received: from SN6PR05MB4895.namprd05.prod.outlook.com (2603:10b6:805:9c::25) by BYAPR05MB6229.namprd05.prod.outlook.com (2603:10b6:a03:dc::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.7; Thu, 10 Mar 2022 12:49:04 +0000 Received: from SN6PR05MB4895.namprd05.prod.outlook.com ([fe80::f48e:8767:d811:3fa3]) by SN6PR05MB4895.namprd05.prod.outlook.com ([fe80::f48e:8767:d811:3fa3%4]) with mapi id 15.20.5061.018; Thu, 10 Mar 2022 12:49:04 +0000 From: Kumara Parameshwaran To: "dev@dpdk.org" CC: "jiayu.hu@intel.com" , "olivier.matz@6wind.com" , Ferruh Yigit , Raghav Kempanna Subject: UDP-GRO not working Thread-Topic: UDP-GRO not working Thread-Index: AQHYNHro2ylvDm4Io0y9wNwhxhE18Q== Date: Thu, 10 Mar 2022 12:49:04 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 77dea820-c69f-fbf7-859b-05556a3e224b authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f47cd39a-c4ec-42b9-9c32-08da02945bf0 x-ms-traffictypediagnostic: BYAPR05MB6229:EE_ x-ms-exchange-atpmessageproperties: SA|SL x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I6hs+iPZOxC/faaSFsa3q5hUNGg3K6L1uUaPUx/CocYpvOg6BOi683hcJpgXM7DkY6WGINBbV2rLEuOK8qlr29KIWeIy2mLmzsH1QsPMv2Xy4u9ua7N4Z8aH/4JtXDitF+gXOxh9++L6D6QOxDVqgeJ7GK0bc7ncK+yXlWEunRY8f3CAVGPF2kTGVp4mKba1lnmdwy1xDfYTcWeTKEjsMUt91sBlia4ANm0RikTl1yZDcB9d9ZO1lMq7QYzZOcquKe5jCUf4jDIGLT8OVyKzaslON4x+bPNd1b4uaZ7mP7oO6zsWKIe0m2hMobnW/KVK31kpexbwK5qcSizVSzROogLCVWz11zphYlG1kqLhQPZ+F38qzA3UAo3/jtHZ0gbpRah/l8nDYJ7mcfNfqJWcBEgiKQop3f8YdoWNO6gj4K4e8LvzuAtdh+6cOZTCH3hnYaaTOOg4gzVa3GXX7ys9wd5dFdsWDWFI5VsTgDzZ1Rad68GlgpvOXx6FSNyaw1+sD/Sfmd+qHRklMQWB9Jhv/0uFkAuLqUgCyvjNc0ub21f7/ZqRiHYXh581p4Feug7mB5rmxAuGrut2auU55icKNQbq2qNLMQyRSBU8NRHqdbf+6d3Rzcl/4B/FTdGDSfdhnFbq7Ym7q6EUrbMkp5A4Pb5fEqqC3RkNQS9OodGn3g/dhgG5fNWGOi6yzoyds830AaLzqbM3Xde2zweSFUgI6g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR05MB4895.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(26005)(66446008)(8936002)(54906003)(91956017)(52536014)(64756008)(83380400001)(2906002)(19627405001)(66556008)(66476007)(5660300002)(186003)(55236004)(33656002)(7696005)(76116006)(66946007)(4326008)(6506007)(107886003)(6916009)(3480700007)(316002)(8676002)(9686003)(71200400001)(55016003)(508600001)(38100700002)(38070700005)(86362001)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?JhSML6W3fBScfO5EP6EHVKac45Ui0VWyI4CItAto5hJleIBRYEoZnm9q3V?= =?iso-8859-1?Q?RSmDJqfyK+VBjuUHCTcAPdR+MFhJnSlAcnIU6Br+DAzg/WVKOSkOGkhnzh?= =?iso-8859-1?Q?Tl05htTiPeORs/6abq5FM8LNzDlE44p33xWWiPKpqHGy/eyoZhuTLr+d6H?= =?iso-8859-1?Q?YVNDuPoOMA9pOK6uN56nvbGTfmv3dVbeIrrAuUUWIn6wXnjEcNjW5fbdT1?= =?iso-8859-1?Q?5rottn5AKuuCZ9gww+v5rU+4mcPzl2PJ50/sT82yxqhL9rsaPr4cIvJRWj?= =?iso-8859-1?Q?kfxTl56TQh84NcAMCItcbBquH2VD0Oiyvy88xpXfPN7xtE+n3kejSHmsVw?= =?iso-8859-1?Q?Wg8q32qgeu3doHBEI69cUlZmwTp0nc4qcQceHlvm19RUXlpN/feZeBZdq1?= =?iso-8859-1?Q?xpMioHXWKReMjF12ALh6jzxk5ubHeDz6WCGf7fRwd+e7c2j7I+2JDMO78v?= =?iso-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MwbiZC6MA9ipK47itBQZjuX9P2UxytG8e?= =?iso-8859-1?Q?n4m2HL2SHX098Oz+WPSh7HTLOo0ba346+ZBGxlm7NuekldIRZ/tBVOX7pq?= =?iso-8859-1?Q?r9eh2X14bEav+D8McPHKLTQI9RAAAonYxBXe2XweI/hPSdHUInFdJJTXn0?= =?iso-8859-1?Q?p4HzWm50Rl2yfdaqt0lSMf?= Content-Type: multipart/alternative; boundary="_000_SN6PR05MB48953F1EA859CA6D1046E05EB10B9SN6PR05MB4895namp_" MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR05MB4895.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f47cd39a-c4ec-42b9-9c32-08da02945bf0 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 12:49:04.6319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: N6JJkjlElQ/rtIhE75QxUXf4nqE7P/Leri7GFTL0SGcC730qSzJopHPMwkBnBWHJGilcHWOj9wB8ev7cRBhmUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB6229 X-Mailman-Approved-At: Fri, 11 Mar 2022 09:37:43 +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 --_000_SN6PR05MB48953F1EA859CA6D1046E05EB10B9SN6PR05MB4895namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi , I tried using the UDP GRO feature in DPDK recently and it did not see worki= ng. 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) =3D=3D RTE_PTYPE_L4_TCP) && \ (RTE_ETH_IS_TUNNEL_PKT(ptype) =3D=3D 0)) #define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \ ((ptype & RTE_PTYPE_L4_UDP) =3D=3D RTE_PTYPE_L4_UDP) && \ (RTE_ETH_IS_TUNNEL_PKT(ptype) =3D=3D 0)) So, for a fragmented UDP packet both RTE_PTYPE_L4_TCP & RTE_PTYPE_L4_UDP wo= uld 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_rea= ssemble. Please let me know if I am missing something here. Thanks, Param. --_000_SN6PR05MB48953F1EA859CA6D1046E05EB10B9SN6PR05MB4895namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi , 

I tried using the UDP GRO feature in DPDK recently and it did not see worki= ng. 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               &= nbsp;    0x00000100
#define RTE_PTYPE_L4_UDP             &nb= sp;      0x00000200
#define RTE_PTYPE_L4_FRAG                   0x00000300<= /span>

Below is the check in GRO layer, 

#define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
        ((ptype & RTE_PTYPE_L4_TCP) =3D=3D RTE= _PTYPE_L4_TCP) && \
        (RTE_ETH_IS_TUNNEL_PKT(ptype) =3D=3D 0))

#define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && = \
        ((ptype & RTE_PTYPE_L4_UDP) =3D=3D RTE= _PTYPE_L4_UDP) && \
        (RTE_ETH_IS_TUNNEL_PKT(ptype) =3D=3D 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 ab= le 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 t= ypes 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_reas= semble. 
Pl= ease let me know if I am missing something here. 
Th= anks,
Pa= ram. 
--_000_SN6PR05MB48953F1EA859CA6D1046E05EB10B9SN6PR05MB4895namp_--