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 F20D8A0501; Fri, 6 May 2022 00:01:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7469E42842; Fri, 6 May 2022 00:00:45 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061.outbound.protection.outlook.com [40.107.237.61]) by mails.dpdk.org (Postfix) with ESMTP id 1A21C4069F for ; Fri, 6 May 2022 00:00:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=erwk3eWnA6oHfre9ikuVpA2ABl4/ZtqkO1QFu4j4/7gpecCx8aFwMPByraW6PSX4MtKAefBTw8hZdh6R3qPTMb6zShvh2Y693dc2XuZwCx8J19BBbnbw+xZpwJ5p1hbJhf4m0InhEumW6wnDpf0PAPpWln6iNFJzBZuA5gtnP7m9Rw/Es5KepLKrXXeL8xynfed+Qy7sp0kTQJA3sPsRS7RwrE+b3KAzMMsp2ZZsUi85yxOm4o2HNqRIOQfBDf607NpIHqj4IQdGjwUJYZrBr48/+SD0/7UxrQaGuB1OAA6DyS/X81MDNXNubBePoNHDX19MZ4jAq/pinPhmoqho2Q== 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=qiGlPiWwTFWRjKydROO4flCwFI/15vBXJ8HAX5j0tnE=; b=FoB51UZjvd9mC+lTzoCNspDUcLU70vzEu9c0GV8oxqGjtBcFu4VGWOfSn++p/p0UGBNACCqgaQ1TzxlGD/SzQ2fnTo31ARY4mP/GoSVYlHJkshHa/F49o1LxsZOuwDlEHZodvpiojSbkgL9B5JEVctt7ubWsn7k036zLfkjliTwXzWCA1hxIbgrQbzT0fEhgmjU9r1zpjqA27rjwhkl4PHDykkX3R+4brhk9uvulE1GwQ39ShiYbavfsKkXRnEkWVYf9weqlM+mH2bhiUHwGT78orY/osUPa2sFZpeBSFSrJQy5fzUqIH20jNQYpgtGTcInJkLrXHL3E30a84pMr2Q== 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=qiGlPiWwTFWRjKydROO4flCwFI/15vBXJ8HAX5j0tnE=; b=d75iVgBJWyYaWbtan2tYx26NQvJbuHyTP5HAgSeGsL4h7L/kNy2dY8L6hM7HCg2piA/R+xVZUFODc6CevtwiHMq/oGh1V4BO/duLLgD32Dp2ESvgvdHRYKU0B8tSCwIDYrj/kBjJe1vshD5woSJSCAS3doGQzfewXLXqosnwCz0= 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 PH0PR05MB7883.namprd05.prod.outlook.com (2603:10b6:510:97::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.9; Thu, 5 May 2022 22:00:35 +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; Thu, 5 May 2022 22:00:35 +0000 From: Pankaj Gupta To: jbehrens@vmware.com, yongwang@vmware.com Cc: dev@dpdk.org, pagupta@vmware.com Subject: [PATCH v4 7/8] net/vmxnet3: set packet type for fragmented packet Date: Thu, 5 May 2022 18:00:18 -0400 Message-Id: <20220505220019.31166-8-pagupta@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220505220019.31166-1-pagupta@vmware.com> References: <20220505220019.31166-1-pagupta@vmware.com> Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0354.namprd03.prod.outlook.com (2603:10b6:a03:39c::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: c511a462-e47a-4cc6-7c10-08da2ee2adf9 X-MS-TrafficTypeDiagnostic: PH0PR05MB7883: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: g16arXVDyZHBE+y8vpgsgQpffrvwh1b4nZjOZk/ZC0vF14bOMtWXtrVwSSqRh648APqXsIB/3xxIXAObK778gAuc/miI4/J1DbecHuiLNa4uhW3qpRMB/LiAZK5ZfuURVLHutHoaXZgK0wOYtNxBrD744jnfcD5BoKsPiMiIERnn/q5n76xaEhQNBXqPjHLj3E4d34rjcgFE6eUeW6rcoycTMZYW9+P/kZez0AaPQtt2GmGI2/DaZCXU9rNEvi9zjaZikLsAyW05cLOCSGc/3WszO8VtsHxDxdsaAeh/2ZZYWYhQKHswCjYLcecEPy2aS9YuTtllNTLcemh21zbFuai7huNGk9B0j2dlbJDGwY3M50D7UKcKfuR+bD1qW7KWK1c/UpcAqRfk7Pxp7rzftDjCX9+RCYu0FpE0/kUQXj4lZPYGILcOC1C5Qr513yYA/1KffJaqAh5HrexiKJnDoypiTvueeFBDIpb0v1qxUx+M/KEUb06Q89tcD5kt32CD3M7JdTzLKVBgGKOLeT4nARdLWS9WNfyM+zCrlcrIIzBmt14ZkIoD+PdNgyHRsfwBFJBWybX3nKauwfvyKkJcqL/etOBZs4Z3TJ/h0nOX0P16hjXEbF8Dixtu+I1Zd6L7lVuVQ1yJl6mvtb/rv36PvGdExbNaUTf2ij9y5oum9tZBMQosI4+V/ipvv7nb98EB188EQm5x+mMeob7Tm/HDYg== 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)(316002)(19627235002)(38100700002)(38350700002)(83380400001)(6666004)(36756003)(26005)(2616005)(6636002)(6512007)(4326008)(52116002)(66946007)(186003)(66556008)(8676002)(66476007)(1076003)(2906002)(508600001)(6486002)(86362001)(5660300002)(6506007)(8936002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?blvG49ijRGjVxOYNCQpuiMB9FpJ6tN39k25Pd5SL/lzGSnVJLivsWUy05s/2?= =?us-ascii?Q?87zpadXSMHVSb08zW5cYDR8V5rP4UMDEn7phsRl9Y6NtrZ7lQMZbxH+MxjTm?= =?us-ascii?Q?+gYjoEZwr3KgbKQzAQgPfx8m00Ki2vSkhiQbzmz3F8W12w/9MSsC7akeVo+F?= =?us-ascii?Q?S6/8R0NoIChRz/SKI1sPuLjEhRBwhjR0xfwOmqvsyJt8HAxiEzSSWC+UBpwC?= =?us-ascii?Q?zRQ5jdFFyapvpvxZJGqrQQWwH7ES+9DK+kZPlM2wvwJdzmfLFJGmdePROYlm?= =?us-ascii?Q?yYE+j+4DtmZqm4UViIMnlfwL4QJB88LaF2cBn+sHxSbbYDF2wzAVOjYEdqRs?= =?us-ascii?Q?vKsD8DBlQC0SDHt6s25FZralO5d4JgxnH7yT6TQkVWXH1P8gexOAwyKQ9Ttf?= =?us-ascii?Q?sobJCdmTag+FkGUXEPzqkabGrFngDwIB7HThJT8rL7LlUtypLgqAex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TXfzumg/RntunLNTdD59MKkp?= =?us-ascii?Q?J8aD/xf+uasFeia7VxE6sdEQvdklt6Y/vF81Ghvn0a45wj7fx6NbsDXSWIfM?= =?us-ascii?Q?OPOjPsggulFU5t9cZF3jLKpTI4pUoHK9Jo7dgG0QgKICAt4G7qXr4x4bSLOZ?= =?us-ascii?Q?SpNoEoMVeAc1cFECFUU62cLierNdD2xko0O7m7RHv5c8DeWRo5nJp+lKahKX?= =?us-ascii?Q?BZZIcL7zujk8yXbkMGh4wZnnOCRRSGYAbDuTrvoETPD0ux+KxOThp/UbimpH?= =?us-ascii?Q?mblxHwO3mBpmVBpe7yWiOfZRpkPGLpoC2XyGbY/dGtSHUzm+HpqT34mtB6bE?= =?us-ascii?Q?cH7TcdlTsvIalrpfmh1fR5LOwLrVSuK4+hvxPISXLOmnZEI3LXS47SEtDf+X?= =?us-ascii?Q?bonvhimGzA=3D=3D?= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: c511a462-e47a-4cc6-7c10-08da2ee2adf9 X-MS-Exchange-CrossTenant-AuthSource: BYAPR05MB5624.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 22:00:34.4204 (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: 8/fBqD8baKJ/ta2Sk+Q2YHAAE3RFvEjtKiseVYTVsJPYyxcIMF0j2WWJCrynhwUt+sTg9SRm1a1O7WfYUU1IjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR05MB7883 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 Reviewed-by: Jochen Behrens --- 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