From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43A96A2EEB for ; Fri, 13 Sep 2019 22:10:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 962051F007; Fri, 13 Sep 2019 22:10:22 +0200 (CEST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790048.outbound.protection.outlook.com [40.107.79.48]) by dpdk.org (Postfix) with ESMTP id BD64B1EFFC for ; Fri, 13 Sep 2019 22:10:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mebGt6MjRPibbXYcW2cs56xp9HZNlRlr5Mh6lNZgPo/UMxuKPbL6oCw2+4UmDhCa3aFwJYfrdnjN++eSDb5W7SQzRa1SDXLlhojX5OCoUwtXRrtrEhZTugOcEaBYGtboJ2R3W4a2rW+215xh4LbAccKu86GdHv3LpDNDAr7rCg5iV8D3P8cVYl6I2QUcly05KORjeRguVRpq7XPiAqVmoMlir/4M2TVIZFxOLloUcnmCzXhEJcoKSXzw2H6B944rslX0hNhazKVUz3bq4ttQ0Kj76lajY9/HaJeNup5+7EqCWv3YKSsFxfoLFzhpMvA6toZ0rUqa3wvvRmwFqj6E5g== 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-SenderADCheck; bh=S6JxlTyzfpR+bTZn6wkSJLU2KNYA8Wz8ctKBtBSDd3Y=; b=hBsgwYXmKO0roYRC92NoN0fDEsuLF+FioWOnboqF/47itPI1PPkKzf+EoNxnfpviNgMrmpUd8HAjUCN3rRDLmASpoORxcyu6R6R/p4yFnpPuEcysgUDANI3eMo3x0H1WYuINlkpe6IDw62AKwgzTIHnp/24MmHaI9tz6Le4cBOr2qZNDZaXu4oyfZ31EhwYy1xHFk6kywq1uH3Ez4KE/R0Co9fBfGOfaKcyf9Xg7fJHVEgkpXhysRoCJXCpqLANtO3oyE7TAiDhQtzh/8mPrL2iTfrs3zM+iUMy3kxeHXu8QBRP9CAYBXGjkhKSCKHxaSIF+pPu6eI83C9QqP8/Wlw== 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=S6JxlTyzfpR+bTZn6wkSJLU2KNYA8Wz8ctKBtBSDd3Y=; b=uHWrqw1fP68ZBtdrojmpV0Xz2YRVTlAYfQbwD/rZzSYqcTNI0MEjyVtR7pgEiHFZGLTqCDyEpLG4mM4Uj1JbQHYJxCq9oufDH55L+unpsbHtGF8bk1VmDjc3QI+k7qAaQ3zyLKJbTumdg781xjONMqKVrMrYzi/RqkpsGl6FilA= Received: from MWHPR05MB3472.namprd05.prod.outlook.com (10.174.248.35) by MWHPR05MB3376.namprd05.prod.outlook.com (10.174.175.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.13; Fri, 13 Sep 2019 20:10:16 +0000 Received: from MWHPR05MB3472.namprd05.prod.outlook.com ([fe80::c9b:28e2:45fe:3cd9]) by MWHPR05MB3472.namprd05.prod.outlook.com ([fe80::c9b:28e2:45fe:3cd9%3]) with mapi id 15.20.2284.009; Fri, 13 Sep 2019 20:10:16 +0000 From: Eduard Serra Miralles To: Yong Wang CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/vmxnet3: fix RSS setting on v4 Thread-Index: AQHVWD6vhhoZIBMDqEGK6fQDVaknr6cpoLwAgACNDws= Date: Fri, 13 Sep 2019 20:10:16 +0000 Message-ID: References: <1566405415-89876-1-git-send-email-eserra@vmware.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eserra@vmware.com; x-originating-ip: [66.170.99.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 40d3c56a-e490-42b3-6e33-08d7388664e4 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MWHPR05MB3376; x-ms-traffictypediagnostic: MWHPR05MB3376:|MWHPR05MB3376: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0159AC2B97 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(346002)(39860400002)(366004)(396003)(199004)(189003)(13464003)(64756008)(66446008)(66946007)(2906002)(52536014)(33656002)(3846002)(6116002)(7736002)(66556008)(66476007)(74316002)(7696005)(76176011)(86362001)(99286004)(486006)(476003)(446003)(478600001)(14454004)(81156014)(8676002)(81166006)(8936002)(26005)(229853002)(6436002)(5660300002)(66066001)(11346002)(76116006)(6636002)(9686003)(54896002)(4326008)(53936002)(256004)(19627235002)(55016002)(186003)(14444005)(53546011)(6246003)(6506007)(6862004)(102836004)(71200400001)(25786009)(71190400001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR05MB3376; H:MWHPR05MB3472.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: vkTJB1Ot5eBEU3/unpBzxnlbnX7CCxr2wy198qONHToVsdD292Wo/Bjpt+P2TYHOpgilQfC63AFtZ4Qwt6HE67Rp8L4qxDHThZr0/fBcJJ12x0mpRWaUb0cpA7tZCEemPPdBOJ7e65hbCeo1Vbb3EW7L6V+GKH5iUaxr0SEJhJ2dEGqrmQESgPzEvwzwbOedz7tWdUkyjZKTMgfURPA9WxwnxRO94nQbGnXCns/iHHMBKIsNwuWBPZtA1WL2GQqH+29W13slcaaE6XijwDowYmdVDkufZyJTchJs77PM4s4vATbsqKp/PblHSnUWL3R4RTbo0ICc1CZ4HyLitamvGWm1POZ30RieCWJ3XEEa2nbttjH91qu8cGilH43eak0AcdFlJ2J/W83d+bv3Bc1xAiAKqbWUAymPeOjvI1dvrLU= MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40d3c56a-e490-42b3-6e33-08d7388664e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2019 20:10:16.4430 (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: AMyUCoTrzBu0mFvkev3/FKLt19dPjNaWGQCijcYbitiBr711woehZrDczQNEIZ0CdNdL4F6xnEsZH0Zs2b70+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR05MB3376 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/vmxnet3: fix RSS setting on v4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I think so too. Apparently however, ESX is mandatorily expecting that under= neath. If not set, config will fail. ________________________________ From: Yong Wang Sent: Friday, September 13, 2019 11:44:38 AM To: Eduard Serra Miralles Cc: dev@dpdk.org Subject: Re: [PATCH] net/vmxnet3: fix RSS setting on v4 -----Original Message----- From: Eduard Serra Miralles Date: Wednesday, August 21, 2019 at 9:37 AM To: Yong Wang Cc: "dev@dpdk.org" Subject: [PATCH] net/vmxnet3: fix RSS setting on v4 When calling to setup RSS on v4 API, ESX will expect IPv4/6 TCP RSS to be set/requested mandatorily. This patch will: - Set IPv4/6 TCP RSS when these have not been set. A warning message is thrown to make sure we warn the application we are setting IPv4/6 TCP RSS when not set. Why we are enforcing TCP RSS? I would think it's up to the user to decide = what to request based on their specific needs and we should support RSS eve= n when it does not request TCP RSS. - An additional check has been added to dodge RSS configuration altogether unless MQ_RSS has been requested, similar to v3. The alternative (returning error) was considered, the intent is to ease the task of setting up and running vmxnet3 in situations where it's supposted to be most strightforward (testpmd, pktgen). Signed-off-by: Eduard Serra --- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++- drivers/net/vmxnet3/vmxnet3_ethdev.h | 4 ++++ drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3= /vmxnet3_ethdev.c index 57feb37..0a7047e 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -769,7 +769,8 @@ vmxnet3_dev_start(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n"); } - if (VMXNET3_VERSION_GE_4(hw)) { + if (VMXNET3_VERSION_GE_4(hw) && + dev->data->dev_conf.rxmode.mq_mode =3D=3D ETH_MQ_RX_RSS) { /* Check for additional RSS */ ret =3D vmxnet3_v4_rss_configure(dev); if (ret !=3D VMXNET3_SUCCESS) { diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3= /vmxnet3_ethdev.h index 8c2b6f8..6e3ce7d 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.h +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h @@ -38,6 +38,10 @@ ETH_RSS_NONFRAG_IPV4_UDP | \ ETH_RSS_NONFRAG_IPV6_UDP) +#define VMXNET3_MANDATORY_V4_RSS ( \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + 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/v= mxnet3_rxtx.c index 7794d74..dd99684 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -1311,6 +1311,14 @@ vmxnet3_v4_rss_configure(struct rte_eth_dev *dev= ) cmdInfo->setRSSFields =3D 0; port_rss_conf =3D &dev->data->dev_conf.rx_adv_conf.rss_conf; + + if ((port_rss_conf->rss_hf & VMXNET3_MANDATORY_V4_RSS) !=3D + VMXNET3_MANDATORY_V4_RSS) { + PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxn= et3 v4 RSS," + "automatically setting it"); + port_rss_conf->rss_hf |=3D VMXNET3_MANDATORY_V4_RSS; + } + rss_hf =3D port_rss_conf->rss_hf & (VMXNET3_V4_RSS_MASK | VMXNET3_RSS_OFFLOAD_ALL); -- 2.7.4