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 60150A034C; Mon, 2 May 2022 21:48:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D83774283E; Mon, 2 May 2022 21:47:41 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2043.outbound.protection.outlook.com [40.107.93.43]) by mails.dpdk.org (Postfix) with ESMTP id F394E42833 for ; Mon, 2 May 2022 21:47:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ofdXobcsoNXc8ejKvZscj3oV1FC6kZd8oFwkL5Q17muMm1LeCQjO4hHMD8/1alo9hjm+PhhAlet1uxFv5Uwnj/YyNP0BtFrU6SpQa/Bve2uNbp73OhcvlC5VioWpFOaQvp1c+z8MeyqFbTiBaL+1PsOpJR8vBVwMYCOlSQ/JvnCky0RnZXrhHxB111goFk0CvFjiXTs39dnDzBAxhZQ/n7xSJsufEQQ6jpTCN69Hsi2JZPtmAeq+lA13uzORXf1gdYVfEXj3GK/zPXdrQkuRaHGZw2VIHSdQyQt1IyC8IdpFWPZIHFUoeTDF3QFHzgKn6ewVtYcl6Z34Yr4jVpKFnA== 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=nEuCfxDukyY6K+7GUhb0RtlXWfnA3RIsJwJIpqH2uBw=; b=BjqRNpeISJBd3VXBqs5EN3d+8TNYJuFhb/ydbGTJlphzsVMAfVZGOIQaW1/cZPte9Q8f0FECCLcmnW9+5At//Hhh9wBYNQ8Du0uNYpeZFn0XeTrhuwnsg1nnjEBCZVJe5TmwNaERAB0Uguz+aEDCYRcPTakKdQ0Mya7XUf34YP6vqZZ6SM/NaWm/XajodxCbQXz7mwD4X/2qUssPycOQ22YE6UtFrdZgDWds+DkekF0fn1UZPb9PGIL+qUMT3rWKR8TMRUU1/fO32Ixd9Om/lE9c9SD+1QOjNg9K74bBWoONyPinFjOYlRYlRHO7qirGx2wOWSo+n9mnFs2aBglfLw== 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=nEuCfxDukyY6K+7GUhb0RtlXWfnA3RIsJwJIpqH2uBw=; b=s3vEuo7MLHvVedclAwCCKMXV+VL90Fafr1Sj1T0cH2UH7g/m1n4omFGD3a08yCHk0DKIL2YsCmkzK3rvNMRZ7b1O52We4FrMFpkdIWjh06WRPvikqrqzzsaPLX3THJy+J/ZW+S2LcOJJprWEh4znkplkw4N4mWDcjHEbtFzxNuY= 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 MWHPR05MB3294.namprd05.prod.outlook.com (2603:10b6:301:41::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.12; Mon, 2 May 2022 19:47:36 +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; Mon, 2 May 2022 19:47:36 +0000 From: Pankaj Gupta To: jbehrens@vmware.com, yongwang@vmware.com Cc: dev@dpdk.org, pagupta@vmware.com Subject: [PATCH 7/8] vmxnet3: Set packet for fragmented packet Date: Mon, 2 May 2022 15:45:56 -0400 Message-Id: <20220502194557.16016-8-pagupta@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220502194557.16016-1-pagupta@vmware.com> References: <20220502194557.16016-1-pagupta@vmware.com> Content-Type: text/plain X-ClientProxiedBy: BYAPR01CA0049.prod.exchangelabs.com (2603:10b6:a03:94::26) 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: 51d6e249-f63c-4b79-c84b-08da2c7499fb X-MS-TrafficTypeDiagnostic: MWHPR05MB3294: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: VQfcFBC6bM7kvHZds93ACp3KMNG2TpP5Do9y+gpnnN1nnoM57yjwwAITPXNeyGfDFN5bAxDpNGIsp/T/UZkPawUbb3eA0wwN1PyWvLt/t/2KG0x3ESGNqLakn0jLDloVXnjimIFhh0cWX7nmu+ukrlYBrbuFZb6D+Qf/CBDOFvmrYNE6xyFTwj/xyPZ7K82Yw2uyHIdVG0tPO4Upj1uCXzs9sOX3AOsOSPTj/n0CX0kSl1Yi8PjuMPj/hNdSGwODRU87NZ4u7U9PTTCUs42/ph8dGzySQIS/QJPovcIHKHlHLKfAuNwgdJLpAPhy9jc7MDn5nOME7Puq8/hPf+tl0Wxq89l937PrIYWHh5Xu0D3hgMSRqlxfSbdqdsaJ7bwSq5Hahn3ngnUqqfKI/HPg3PBMUgXF0c96wbPODAI2i0Ca0Iq3LkPpGvFe6R5LYvpwzD92QA1kbQ1iPeU6D0bYNEEF/X0BhTGQeIguBK9d6zEeStIShTzM0Gtrhvla42Opl9QgNVOEsdlnKCSYcaME8rQfcvIhJDVwHaRQfC/MiPhg4zdIiX0+IJQic4aLrlEsk9tyvlOqwpFfxCATl1HbXOaEPY9f4YlT9Ar7Pg7K3g9UHP43PTcT8O89RKQqylGBMg8h6or4Jdr+lxdKNviUpfMbf7sgxvtLGLVplw/+YFEt1M/a5gCdY+/kCSvWjT3m3tjyN2DHuDebQglGLjJFHA== 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)(6666004)(1076003)(4326008)(6486002)(508600001)(86362001)(186003)(83380400001)(38350700002)(8676002)(52116002)(6636002)(2616005)(316002)(19627235002)(36756003)(107886003)(66476007)(38100700002)(66556008)(66946007)(8936002)(6506007)(5660300002)(2906002)(26005)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ajPJpm+tizEMvF/1Tha30zfmcxnQrPZhSCATjaNA5P6afI2CMJ4a4nkElX5G?= =?us-ascii?Q?umWSE53YPhzEFMMfwtSiwA0peal4GfkSXK/oLTO13uvUmYHmx2CAErjg8PO0?= =?us-ascii?Q?RpRkfk5sZVhFQlGXEgPCmELBQ291hIbySE1ekn4YqOdfILAD636Wr/4p04QP?= =?us-ascii?Q?ImWN0amc6iMvMNhT+efbbDsijuKpMqQl44Dx5j/6+iIk2ndQBgO3wanT0Nsm?= =?us-ascii?Q?xPvyX74ezyWmW9DQRQJyt2NzcHyK4vVeSArINQ6mxyEYa3Kd8Ditc3Z6snjg?= =?us-ascii?Q?s0zY9Pgks4lNAS0WuxFM/h92BHl9vIPs95biD+JPJieWOLbtvBg1CdhfSR4S?= =?us-ascii?Q?DUWRhawKtu2JL+EClmJ/Z5yYfE4uAi4mpT9LluNwgqgDBMYOlZ8XdTgTPQ/l?= =?us-ascii?Q?nnCbdAQ3pUwoolnv3tb14Au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eJ?= =?us-ascii?Q?5QFOfi+O/eXcjFjlHj849tqUN11leb//GWQyO1S9LmhleTnacd814B3ctdAr?= =?us-ascii?Q?KRDUv/MvpTLjck4Z7DHB19DO8oo5PGTa8xdDeWnDna4tSWb5WS42KpcO674N?= =?us-ascii?Q?wrcraVEOJ9fw1Yj2s/jwSCSP4cHun7PvhdtvZx+wHdDzTJpmAFcpYGb20OdF?= =?us-ascii?Q?dgpD84OOe2FZiM0Yn2T2JXavoeLJTIK6OnT8mUBkY2q8ELGqxj6PuMAwJ3PC?= =?us-ascii?Q?F3wMzHM99bIyYVzZWPApWN3BmUOluDwVAjzIVXF+PR6fskvSiG5Vc35sBDxp?= =?us-ascii?Q?FcFZSH4RNB93QJ99aHEq4XFpCPDAtmWUtV+O/hzBKOqWMJUoXOcf09YDdKU9?= =?us-ascii?Q?TlxVbj0FOH/xFJuRrARXdPouZnoPxDgkutzuyVjSSznccjqM4v0ZJl+kR8tI?= =?us-ascii?Q?0xRFcQ1kVg=3D=3D?= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51d6e249-f63c-4b79-c84b-08da2c7499fb X-MS-Exchange-CrossTenant-AuthSource: BYAPR05MB5624.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2022 19:47:33.8995 (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: E6kpHIVDJTa+AvzRB078MmX+p3UWT3/BXyV3imc6/eJJ46wtWn4CzlFsMo+LZCOQ6/J4kZnQFSoBwmq7d4Rr0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR05MB3294 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 a6665fbf70..5e177400c0 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