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 B7354A056C; Wed, 4 Mar 2020 03:36:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 151582C16; Wed, 4 Mar 2020 03:36:01 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2083.outbound.protection.outlook.com [40.107.237.83]) by dpdk.org (Postfix) with ESMTP id D12491F1C for ; Wed, 4 Mar 2020 03:35:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MoVVpP3wNh2OLL3Tr0iCINvWm/KCjUJBXC4PT42siniMMFacufNIgVqPuM1xy+yxPvxia13zME4LrI14d8W+nkdSseqijq2l84V2RXS19WumPA8c0YcNIS7i562BOiJg8hna4WT01Uce0wqcvB2ieXFERfpFVuVC+Fcse1+TUND2JOl4QiEs/TmnTfwU9QEhY6BEkzFpjFTHuZzhux6cltx0HlH38sidqvLnrm8pCQPKhvuTxpTKSl3pgxXZbbLlW3X0qWF6m91Upk4SvF6Xqk2f0lcoWZclE7vjGSKLwZMsZl5t/igjOkNC4mWXNi02yVDxVuFH5H1Dz1NOJGxnwQ== 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=Xr/gEUuFksDS+FJVOAUXmaHd9R1tCA3pJnKtg3pMmbs=; b=cvLVtRnX3WzflBEtebSBbxw15lr1uZprAIg3513nnc0K9G1/CJa7DIq6rh420+GIA4nbqpWAhak5voecWwSJkKdzjvDsjtopafr0DLvgPue85vRnXxFlq0OQoAxFbFSS1MWawBN+TEN7qGXP5WV4XK3Jt9z+pSigxt2Ezx8up8xnmgGb+FdmrQoBDIJzMuA1F5hj+FVSbHaX0w0IS/QudCW8cOKEK6MonDiIrysZkole4dGdSCk4WO+mT2gk05cdv1itIQaU0rEXWeLOaGjWdrscOh3BekA2GQmS84pVnq61Uc0qyvT4nGkfjQH4t5VlnQ4isdBe2BV2tRKLyCETnQ== 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=Xr/gEUuFksDS+FJVOAUXmaHd9R1tCA3pJnKtg3pMmbs=; b=KYwxJqGJ+/w+mNWiMdcVqEihldZEiAOsuhs5KEnuV38jarO93xSwElOnl9QXuJUzpMOzjNIdwe+tQ76Me3DIZ6EZbFhZAGjH97UtthWDlF/GSOakTzpiHKbRmfAlARZFTM4ARVvQQnbAzI7IW1X1PD53uawILkaTUqkYuT0vwYg= Received: from BYAPR05MB3989.namprd05.prod.outlook.com (2603:10b6:a02:86::31) by BYAPR05MB6294.namprd05.prod.outlook.com (2603:10b6:a03:cf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11; Wed, 4 Mar 2020 02:35:57 +0000 Received: from BYAPR05MB3989.namprd05.prod.outlook.com ([fe80::f1be:e437:3f14:2f1a]) by BYAPR05MB3989.namprd05.prod.outlook.com ([fe80::f1be:e437:3f14:2f1a%7]) with mapi id 15.20.2793.011; Wed, 4 Mar 2020 02:35:57 +0000 Received: from dev.localdomain (76.14.29.240) by BYAPR06CA0056.namprd06.prod.outlook.com (2603:10b6:a03:14b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2772.19 via Frontend Transport; Wed, 4 Mar 2020 02:35:56 +0000 From: Eduard Serra Miralles To: "dev@dpdk.org" CC: Yong Wang Thread-Topic: [PATCH] [v3] net/vmxnet3: fix RSS setting on v4 Thread-Index: AQHV8c2iKu8d/lmlB0utl71xjtRDoQ== Date: Wed, 4 Mar 2020 02:35:56 +0000 Message-ID: <1583289349-21583-1-git-send-email-eserra@vmware.com> References: <1583268235-61346-1-git-send-email-eserra@vmware.com> In-Reply-To: <1583268235-61346-1-git-send-email-eserra@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR06CA0056.namprd06.prod.outlook.com (2603:10b6:a03:14b::33) To BYAPR05MB3989.namprd05.prod.outlook.com (2603:10b6:a02:86::31) x-originating-ip: [76.14.29.240] authentication-results: spf=none (sender IP is ) smtp.mailfrom=eserra@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d64edf87-ac3f-4e5b-586f-08d7bfe4c483 x-ms-traffictypediagnostic: BYAPR05MB6294:|BYAPR05MB6294: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0332AACBC3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(136003)(366004)(396003)(346002)(199004)(189003)(81166006)(81156014)(66446008)(64756008)(16526019)(966005)(8676002)(36756003)(71200400001)(6512007)(26005)(6506007)(2906002)(6486002)(107886003)(66946007)(66556008)(6916009)(4326008)(66476007)(2616005)(956004)(478600001)(52116002)(5660300002)(8936002)(316002)(86362001)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR05MB6294; H:BYAPR05MB3989.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: BCL:0; x-microsoft-antispam-message-info: aOC6bTgzG7m8aB6w06gm0+/nDg046yi69wbExVpAx5l9MG0QjI6OTy4sFqh61WrLU0WqvOJ6f/hoEplTEtqEr278Fr5XA/ByQKqHHLM7JjJaXuNCE3JfUUuRHkTjTQJPtRxWzFCIktK6osKU0atKNYcDIX4KbOt36mTlWPCCzrDaCxebJhT4UxUgbVtk+2FIdHkFviDYp/TVBRcE1H3KH41TAV8F2gFNdG7p1qOYxOnX3TESE+HDINTF0P4LPgSxnRy98qsdVXsk3avjl6hLpq+m/zQ5CV15FJqoQNwA5IfxL35BYFg28ZzXxBK5uTdHWBxwG4SbLbtlv5Vgbbz7b3TmNCt4mvMt6FEieRdBKx2M1dROjBG4Lk6wIs+HC0eUemnMQVenSyFIPGFacSIkGAKW2zvB133HuHGe1gJe1luDG/jdteaB/Uxt0fJesBqs9jn+IUUeEcrIZYnQXmf3niUz22vOeL4kcB7LTYzxf9dM6m5lH7snGuc9R/k1mQhZfSSsvv6KeBxXxF9DURLqqA== x-ms-exchange-antispam-messagedata: MsKHb7/FKG/I2IPoMF5CZhAnVBqbGRcLqTM11RDD8DKEdy168P3SqoxsgEGC7+SXppYubu89LuDEG2gf4UOWTs8hZE/FqcIjUuEG4BRMMNlNY8eLbUn3BtF6PmQCg1NhxzQLLEsJpnq2W7WPNDktsQ== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: d64edf87-ac3f-4e5b-586f-08d7bfe4c483 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2020 02:35:56.9913 (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: OjRTVJCiNCHKrnqhQr0kAYxzX0pfJtPyjMUhvDkfR+KafLTfmdSwEATcyn/Rf50aJjJLz+UPIGd2/+zbEurTiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB6294 Subject: [dpdk-dev] [PATCH] [v3] 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" 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. - 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). Open bug for this: https://bugs.dpdk.org/show_bug.cgi?id=3D400 Signed-off-by: Eduard Serra Acked-by: Yong Wang Fixes: 643fba770705 ("net/vmxnet3: v4 boot and guest UDP RSS configuration"= ) --- 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/vmx= net3_ethdev.c index 6e6efa9..705e976 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -771,7 +771,8 @@ vmxnet3_dev_start(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n"); } =20 - 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/vmx= net3_ethdev.h index 8c2b6f8..dd685b0 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) =20 +#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/vmxne= t3_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) =20 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 vmxnet3 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); =20 --=20 2.7.4