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 5029EA00BE; Wed, 4 May 2022 23:23:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69BF14283E; Wed, 4 May 2022 23:23:19 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2046.outbound.protection.outlook.com [40.107.220.46]) by mails.dpdk.org (Postfix) with ESMTP id E5EF74282A for ; Wed, 4 May 2022 23:23:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OBJIuKyAjx2yuJ1XIogtt29pjy4VbyIKhJ9x/VlD7PRrAz0CykSe7oaoDPV5hH8TrtLhOpHY9l/liO7rAZYAfzHE5dnCPxMPld/F2/+guVMizNmLSdqTTAgX6O7YGGtkwSfjtRJBhkB8i5AEEMUKha7o4IJDaF4CwiosY0T5teQjTgY6sCRjbJoXIhft466nD+RxwmnDDz8LTJf/ahWYxeOkCG3lL7yP4bYfuowdMWAoVbFjX2J84fUzoca0GxkXee9owAJvCdXKKPSzblVnJj0M3zabo8CftPwLqQ1eimFhh9J7To5hzviVJkE2WXvhil7CYgjzsD1dk3EMQGgsgQ== 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=RyPoQiFKECjLzePKvZ1PVAzmapyrT6OY7C2pCUcQrxI=; b=RFoGNUTlm2t5n/76fdr+3dm5ZNppL7m/QB7FEIA2DQo2xX7cIt5FKG0+hCsaxWPhC9QkWTj3LK3ozEBi1Yk1bcxdGSgdxvyVaqVrza+s8bhIwJmHxlNpGQMoNGjxOVsj8UXYrkWfHyD+uGyVzzH3rUtok9dvmgor5JrwLhL1rOWrmyd5TZu3D9IC4TdAkLe1fo+0CDiej0itF02JyE8L6hpqzllXanBAteh/Vujo8MQBDLzSIUZDTBw5REoHB7FWqacHPV/8nPka9K6J61Z2K8I9KWP6ASnHd2m/7IP2NxRUEXhM8U5NnaAv7ayoA/yk2mj9lUW9UcA5R42Py0rB1Q== 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=RyPoQiFKECjLzePKvZ1PVAzmapyrT6OY7C2pCUcQrxI=; b=he/qVuw4GPSQnnu5iR6T1k9JTiv3AIBLso6Nm5I6s7632b3S40LJUyDBRtZCFhIdcbOFDc36mpiiFrb8OuRuPAlkaTtw5qyMli0dFgTr91FuPgIQPdIfKP/JhQ0bkdeul6jaAWRfz0D2zcvYHX6UYp7S9/ZcWWmdYDEu6vdRCzk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; Received: from BYAPR05MB5624.namprd05.prod.outlook.com (2603:10b6:a03:1d::13) by BN6PR05MB3313.namprd05.prod.outlook.com (2603:10b6:405:42::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Wed, 4 May 2022 21:23:12 +0000 Received: from BYAPR05MB5624.namprd05.prod.outlook.com ([fe80::5161:a7c5:8c7d:f3b2]) by BYAPR05MB5624.namprd05.prod.outlook.com ([fe80::5161:a7c5:8c7d:f3b2%7]) with mapi id 15.20.5206.024; Wed, 4 May 2022 21:23:11 +0000 From: Pankaj Gupta To: jbehrens@vmware.com, yongwang@vmware.com Cc: dev@dpdk.org, pagupta@vmware.com Subject: [PATCH v2 7/8] net/vmxnet3: set packet type for fragmented packet Date: Wed, 4 May 2022 17:22:51 -0400 Message-Id: <20220504212252.25117-8-pagupta@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220504212252.25117-1-pagupta@vmware.com> References: <20220504212252.25117-1-pagupta@vmware.com> Content-Type: text/plain X-ClientProxiedBy: SJ0P220CA0006.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::29) To BYAPR05MB5624.namprd05.prod.outlook.com (2603:10b6:a03:1d::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16dd9493-8cb8-4c87-ac0c-08da2e1449c7 X-MS-TrafficTypeDiagnostic: BN6PR05MB3313:EE_ 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: 93WO8OtycocDtJ9eXs9ZPZovFL6nfX/4hnxwO8s69r8MYJKntO+jFINvYYrct2pVk3q1RyXTzqy/YrFqpfAqBlM2C83ElV4MCYE9ulyhUPwHjILh2K7E0bhIeTuen/nVs2OtSWgbrONbQadWz0vOEKkfGVe8IYmnQ3xkyemDXuuUbfZfRO+s6EGV/QKRIJQ7OtUlt8q/xUK2xUdxrDJfdkkeI0yROjidYICQwVvvxPq7k4OsD/cV+0j0daFoem8NsZlXsGCwwEhROUYwju1K32leYC2V087uke482ZK8Q1DGqzsH9DLeM+b3nALujENTj39LeegzqdZS41oK3L4mroBdcgL1HpTuByeeNblLhddATBAf7Pve9zRTJDhIlyxCuG+8Ancx6b5JHWX6+1PnBy+Ydye+/P67deGCEhRr4jg/B1YrVuoH3/dOc7FOMsciv3sQS0YX9pPmbost0/VZMuEjrKva6MGif4kMTy0vKcZZw+UUjyWAoY0NHUj7MH8WeEWlv0GY0ZDDrlgYPIMJc0Jj1IjNCmIXC0Mkk10Qrt7cvHVlO0nLUq/bIwkPzwTJmzUoDDHpHzP/wjQMi7eXt6jIktkFUstU/0LV+66iqgwU+0JInwAhwJcEOAT8mp+DTrgs3lbFCaFRyMs3wpO4RvqWB6KFuZKIm/apRlVnZoDZCAnfqWG06AZLJCzDAmcpf+19ovPI7H8URG3TNRvnr17ESl/vTJeVMBzFvduxvvqxCMusYue/+nZXoF5RLJef X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR05MB5624.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(1076003)(86362001)(36756003)(26005)(83380400001)(6636002)(52116002)(508600001)(5660300002)(2616005)(38100700002)(186003)(38350700002)(8936002)(107886003)(6486002)(66556008)(66946007)(8676002)(66476007)(4326008)(2906002)(316002)(19627235002)(6506007)(6666004)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Th+khn+8Y/Cx24/pyJdsniy2nQZh/kmUecvQrycl2V2q6cHJ1OIcBfsH0xDa?= =?us-ascii?Q?BcGjVHF70BvOKEJo4zIaWpFan0xC9MhL1nfbXPE1VtfyKVPV7edpNTAbcDOF?= =?us-ascii?Q?ZrANV8+RBfy5kfCSICWU8CiL4YARcDC8+Q3xkghoYXz7Lj2j/y9Cp8NGTXC2?= =?us-ascii?Q?EORfEf6+D5rRNJvqEDEP9Do0oVoSkIhbMJDikjM+NNatRcZ8mHfaq0PYeizA?= =?us-ascii?Q?nSaaTh0XyVsrsAql8eXHhmaD17iPLc9V4iWaQ7/sniiTB6GVzJwkjnmMM8Ew?= =?us-ascii?Q?B5BAJERWwHgahIsztSJQTDE6XneIrRzm+sucTJJ/iwQxxu1fcnczju9X9v3i?= =?us-ascii?Q?rL4OJhPxR8PAu49KV77J/j1vpD9gyq9dHYKPGbP6uIVi2cDJB4P7s3L+4kcf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2gFpGq6k0ILZyzo1d4eLdqJx+TQqzG?= =?us-ascii?Q?X+zxDlHvCguVvNIEg68LQztIzTTZBVVOxPzjaJ8czWVVaImXcvIEg/Zd2yaQ?= =?us-ascii?Q?ezqitIgPVkPuCWnoTeslftYHiIOmaiOyH2a8LCuOyNactQf5R8HVP14U0UuC?= =?us-ascii?Q?dnruyzNLygOeGN1/XvpbRR0UsbY4pILWfgOgIC9fPh4IWKztb0FGd3xvTysn?= =?us-ascii?Q?uYoGuu4pGpPS2EV6yvZlqvtBEmJykM8zQJyf6gV9k+B8FSqAqsPkF2Kls9aK?= =?us-ascii?Q?EIekyDEhJPCf6NnnzmyattImVBI1qBKFYCjGJpbBNHu/PC8L1NkSWMHpJpv7?= =?us-ascii?Q?iWb6wfx1a/Yzur+oEA3Apka9APBo5HRlQk5DQatOhDbHjP9YL6cwiKyAj7a6?= =?us-ascii?Q?uyuC7qHq1E9mPuC8DDcfw0vYPEvSxpeDeLQsROsCYkpyVZavxuRat5LOi2Dy?= =?us-ascii?Q?9ptbyZhlvw=3D=3D?= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16dd9493-8cb8-4c87-ac0c-08da2e1449c7 X-MS-Exchange-CrossTenant-AuthSource: BYAPR05MB5624.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2022 21:23:09.9954 (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: YatsEVA8n/3Tlv5X8IAneNsJhWhvtv99xmp/LSefXj/UyGfNOHgd5QukEa1g8Jsr1a+TGB6aT0uOhF2Ab1jVUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3313 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 The packet type is set even if it is a fragmented packet Tested, using testpmd, for different hardware versions on ESXi 7.0 Update 2. Signed-off-by: Pankaj Gupta --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index c94e3762e6..a875ffec07 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -759,6 +759,23 @@ vmxnet3_rx_offload(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd, /* Check packet type, checksum errors, etc. */ if (rcd->cnc) { ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; + + if (rcd->v4) { + packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; + if (rcd->tcp) + packet_type |= RTE_PTYPE_L4_TCP; + else if (rcd->udp) + packet_type |= RTE_PTYPE_L4_UDP; + } else if (rcd->v6) { + packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN; + if (rcd->tcp) + packet_type |= RTE_PTYPE_L4_TCP; + else if (rcd->udp) + packet_type |= RTE_PTYPE_L4_UDP; + } else { + packet_type |= RTE_PTYPE_UNKNOWN; + } + } else { if (rcd->v4) { packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN; -- 2.17.1