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 A035EA034C; Wed, 21 Dec 2022 11:19:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D14A042D61; Wed, 21 Dec 2022 11:18:12 +0100 (CET) Received: from CO1PR02CU001-vft-obe.outbound.protection.outlook.com (mail-westus2azon11011007.outbound.protection.outlook.com [52.101.47.7]) by mails.dpdk.org (Postfix) with ESMTP id 5304340684 for ; Wed, 21 Dec 2022 05:19:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TaPsxqOJ1yq5GI+HQRpFocUXzS3rBgupzPn+KmuEzu4HE1lLfmhCoCFdz0si63upC3Kh0nBZcpM7/5VrrsaLQz78VagNU3xEVT0oknCBNPWf5wt0UmXf2ARMxbxSQ5k5t8iqIwh9K1ozUx+mTw+RDC/sDm9SZ+yVjsertH2Y+KET7daqR5C3XaTkEEt2vkVzskwuaALH5KKnA80lyU1A08jxuFU/l45tG8izS+OU6V6xBWp0xSr6QWTc6DVJJhB9zMZf1mCqQIy22Eqr6dx696CckAbChGnjyfKpyyg1udcsHsNL4fHYI7gQ/VAaG9gT//I0EbTDXYXx6PRvhPirDg== 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=ZTg9sr/fgDI1BoDxj8RiEsnCjV5w3MyFyL7cu+UK+b8=; b=TQFQVRgu/lQQqCu0WIudEGDtOgL6RFLl7dz7bFwt2iGANrJisyvypUFEzhDbqe9CZ6gwvkhMLcxuJS0wPP3jrz1F5lGCFlj/0iB/gHC7biS83JAvniZsZajf2jXGED0rCBglpurEbQVFu1ZZOs0e2U6fgX+KoZFADFT1Z426CytJveTmOa/EHlVbmyIJCFrhqzh0Pjrc7S6LhMfSKI+9Tj9+E1vd1eu6j0WXkmsivwlhRY+qILRMzuQqGiRICafO7+6+N6yrxiOAD8EI+YuRmfF7inxmVrj9l2bNsXTAsU8hJJzt5dHF3rAmhfN0x+Cn5mYxl4/szAeu84RXD92/3w== 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=ZTg9sr/fgDI1BoDxj8RiEsnCjV5w3MyFyL7cu+UK+b8=; b=ZLIK/kgEu7+I9XMCx4G5lnmVXVp2w1bW2vI8CkJXosjJP+DPCozq7jpY6HkL0mPsmQHXp0zsRjc3UH7yzDFUmj4Bt93/Xkt1ZlpqNr0kH59wcVTi9qz0FO/HywKPcjN+V2EGdbErMIALnAfCaeaD6IQvrzLTqyuBUoVG3tm3QLc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; Received: from SA1PR05MB8390.namprd05.prod.outlook.com (2603:10b6:806:1d5::8) by MN2PR05MB6975.namprd05.prod.outlook.com (2603:10b6:208:18d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Wed, 21 Dec 2022 04:19:34 +0000 Received: from SA1PR05MB8390.namprd05.prod.outlook.com ([fe80::7c4e:648d:4b39:ce84]) by SA1PR05MB8390.namprd05.prod.outlook.com ([fe80::7c4e:648d:4b39:ce84%3]) with mapi id 15.20.5924.016; Wed, 21 Dec 2022 04:19:33 +0000 From: Raghav Roy To: dev@dpdk.org Cc: jbehrens@vmware.com Subject: [PATCH] net/vmxnet3: added checks for TCP for RSS Configuration Date: Tue, 20 Dec 2022 20:19:17 -0800 Message-Id: <20221221041917.29569-1-royra@vmware.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0346.namprd03.prod.outlook.com (2603:10b6:a03:39c::21) To SA1PR05MB8390.namprd05.prod.outlook.com (2603:10b6:806:1d5::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR05MB8390:EE_|MN2PR05MB6975:EE_ X-MS-Office365-Filtering-Correlation-Id: ee3bd283-7f71-4a7a-3193-08dae30a9050 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zYBwmal7AHEbxpkJARfEGYupMqUTFwGjPuWorFQJZFlbCU0YHXn5jEPuGen7LBpPcILGGKbmeSdbDwQBlQZO+D35C2Vff98WAPPoOGR3HOvR0buhfnu3Hkxfw55vaQ8oREEK7z46Lt1kHdccMr059wh29FlSXfI3/0wwI1Kv/I1f9Pd0TpVvDP9ZTACteYIPN5RkBKWGq72dWWy+iw5guE0e7L8vF72CETjZm0bD/7NEtKRUv+hkvqZDrFRwG+c1GRZSSX0lBLRLS9GJVyAREVe/4tFpo+xNlVYIf028E1RgS/Ot2NSIhzWxqp4273dYqmQIQKggIXpoKM+xqEtVnCO+RNQIF0FQEFZjw+gdHKPG/V0T2tIWW/+obn9xirCBMNrFyyeTWJjOuoCgA7Cjz8nIHTbX4YiMfA09I+CtvK8k8UorqxkXvKOUNJnaLl0TpqcUGadEDE93L7d4vHMKrxoy0sdvsl3SRKZXLxHa6B12F+cNECKiyYda6zivS5xlLA/5K7T6UaUSKixJsz0gj2HZR4ccGXwarYez41EjNnSvlNxLF1aJhBId4pSVmSeaUYS4bgBsa0/uQfEFHFKzMyXgeADaSX5FVgUcRNsXa8Ow9iGHtcHaM2G36rblfYWVIkFQ0UAlttpDtnAjZUZy2R5Bqh+/n5K3K8h3ucIxqIfUD0rcap/JCH8NfkDDd62YNjzQFpsY+LcJlvPdbMo0FA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA1PR05MB8390.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(39860400002)(396003)(376002)(366004)(451199015)(8676002)(41300700001)(4326008)(2906002)(5660300002)(6916009)(66946007)(66476007)(66556008)(52116002)(6486002)(478600001)(6666004)(6506007)(107886003)(26005)(6512007)(186003)(83380400001)(86362001)(38100700002)(1076003)(2616005)(36756003)(38350700002)(316002)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/MqaL/bD4NqrEAxl0/3u+PIHC869fXDlTafRHB+6m73+FAbjZa/M+4Pej8s/?= =?us-ascii?Q?Xm050ujPysPxjxxR6/aWOdngcRV4Z8DXcXURmo2BDB3E8Kvf1A/qItkqzet+?= =?us-ascii?Q?6HO5On5w1UMyzTMRCNQHanYn09yQbhJgzF0IlIeuMYkkEwqKcQVSNX1RWftZ?= =?us-ascii?Q?LoX1y6E0UEAzgegBScE1kVwlC3jtFrVNDSGx52bcpiN7VkUcsMP6qpLMApy1?= =?us-ascii?Q?s29SRmzTfZ93tIF/RUOVcY+F3dBIHL9fVz7e7vh33NRv0bSEwKgciBsQ/jX3?= =?us-ascii?Q?KyVoDdEJkX8d4bjr82H8+yX/4Mar8M+LnyZmkMGd7RluD0i3zc6OrJy9/XFo?= =?us-ascii?Q?yKlHPuhiGcAc2llBcVvBMUl0QJcM2baDqey9hxdcaa42vp8mNXUAbmLfkmwd?= =?us-ascii?Q?sJfFNe3DhO+sbIgG6Zl2jJ2dn74oxh7OfvskyBFSZm2Zoi+E7kKYiuKxI4iv?= =?us-ascii?Q?PCCVOmk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Pc9auY?= =?us-ascii?Q?eqT78JuRqAcJLyRXUJI+raumg8aVoMpnFGWpKCaG/Z9YAd8dbwzHXHIJSpSj?= =?us-ascii?Q?ouF6eaO9kmd+/UXzK823W6zXB0UKdP79UonxtHiGZqaYC+bNpNiLav/RUtLM?= =?us-ascii?Q?uUkmNGzHM8R52b1W85kN9QTJL59MzTOCzybs6/WtXLz6wc94eDXyLwG9+mCM?= =?us-ascii?Q?8NBxtGnezy93piTOtjM=3D?= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee3bd283-7f71-4a7a-3193-08dae30a9050 X-MS-Exchange-CrossTenant-AuthSource: SA1PR05MB8390.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 04:19:33.8261 (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: 1a6DvOZKl9RdUCoLfuzynRwiW+1iONzc8FI1RVU4ZkKJk8SdePpwKoABthSILM+O8R7It/17oxU+F3NxAwrFDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR05MB6975 X-Mailman-Approved-At: Wed, 21 Dec 2022 11:17:53 +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 Added checks for TCP in vmxnet3_rss_configure() This check ensures the the hashType for RSS, when enabled just for UDP, is not NONE. Signed-off-by: Raghav Roy --- drivers/net/vmxnet3/vmxnet3_ethdev.h | 3 +++ drivers/net/vmxnet3/vmxnet3_rxtx.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h index 5a303717b1..95ce13dd76 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.h +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h @@ -45,6 +45,9 @@ RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ RTE_ETH_RSS_NONFRAG_IPV6_TCP) +#define VMXNET3_MANDATORY_RSS ( \ + RTE_ETH_RSS_NONFRAG_IPV4_TCP | \ + RTE_ETH_RSS_NONFRAG_IPV6_TCP) /* RSS configuration structure - shared with device through GPA */ typedef struct VMXNET3_RSSConf { uint16_t hashType; diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index a875ffec07..8f5a107169 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -1412,6 +1412,13 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) dev_rss_conf = hw->rss_conf; port_rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf; + if ((port_rss_conf->rss_hf & VMXNET3_MANDATORY_RSS) != + VMXNET3_MANDATORY_RSS) { + PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxnet3 RSS, " + "automatically setting it"); + port_rss_conf->rss_hf |= VMXNET3_MANDATORY_RSS; + } + /* loading hashFunc */ dev_rss_conf->hashFunc = VMXNET3_RSS_HASH_FUNC_TOEPLITZ; /* loading hashKeySize */ @@ -1419,6 +1426,7 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) /* loading indTableSize: Must not exceed VMXNET3_RSS_MAX_IND_TABLE_SIZE (128)*/ dev_rss_conf->indTableSize = (uint16_t)((MAX_RX_QUEUES(hw)) * 4); + if (port_rss_conf->rss_key == NULL) { /* Default hash key */ port_rss_conf->rss_key = rss_intel_key; @@ -1446,6 +1454,5 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev) dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_IPV6; if (rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP) dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_TCP_IPV6; - return VMXNET3_SUCCESS; } -- 2.17.1