From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10050.outbound.protection.outlook.com [40.107.1.50]) by dpdk.org (Postfix) with ESMTP id 0DC13239 for ; Sun, 4 Nov 2018 11:08:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5CpPlG0G8VTsrCJOx47S4LCSSm+cq7cPfHNZ168B8Xg=; b=x5Z+yYVRLSvxqOpsR/JpyZmSR150wOntDLMRqlRGazXCSxQRxpKvcizCqyn3oKphf4yKeaEXjkmhL2Zx/P+NFuKf64HtUoC9AGoov0tUZuHzIHf8nYDwAgmNQdx3c0D1WDN88tUV3uXc1prr06Z+Vaaho4tS3c8BW8NbsqDqJj8= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1PR0502MB3007.eurprd05.prod.outlook.com (10.175.21.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Sun, 4 Nov 2018 10:08:31 +0000 Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::84d3:8812:d45c:98e4]) by VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::84d3:8812:d45c:98e4%4]) with mapi id 15.20.1294.028; Sun, 4 Nov 2018 10:08:31 +0000 From: Ophir Munk To: Shahaf Shuler , Yongseok Koh , "dev@dpdk.org" CC: Asaf Penso , Thomas Monjalon , Olga Shern Thread-Topic: [PATCH v4] net/mlx5: set RSS key to NULL to indicate default RSS Thread-Index: AQHUc5w1kPPZXZZPOE6fLC27YFZmnaU/KAAAgAA7ttA= Date: Sun, 4 Nov 2018 10:08:31 +0000 Message-ID: References: <1541260115-4368-1-git-send-email-ophirmu@mellanox.com> <1541266779-10519-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0502MB3007; 6:8xiOHBRTRB65As7pCE00HbwYtLiXYUg8vohFCPmO8XWDgriNRB5so2JnXiCC2wgdOHXdlhECr5FEygJtoERRtYuTlJTcQhPZ829Q3xVr4h40ube1hl9rGC5MN7zwNE2I2OYOG7JjMx6R5TKjwsFEUY0ygQ+aLEwTp0BDAW+b7sZx+O98PiE7bR6urxEqkk+l74xz4ZO284nFEsdHOmUCvgQ/pHj2Ct2Hz8n4VGwKiawxWEvxD2n3n7qmcr+CQeKfRR30J0/t0ml7LHztV2m0e6Mfonp26CcAd+JFX6XJnpNehEqHbc87yVwjA8ZtaxyI0wQmAwUuWaaI1Cy+z78DEBOBoLPBU8hDyruVKi8k/D1dzoqwJbZKpVp20Gu/5mSAwdxiOCyPG1HYzmSP0cOCBhz4sbx59qBB3AO4Iny9odJfJ+kk1klXaiCs4Wq7It15P0QmqxU5+NVyuG848gzujQ==; 5:qf8OeSlNAaGI6zHLp7ZrDS/EwKT9ShauOiLq+QLLPZWVp/OX3QTvgWIU5m4fvR1AvLFy2E/iniC4p7bHBOCrajIkcYPxuIEix3jm/nwlUQoCvsZvaUXOnvcS6ac+VOHv+1vE1ivPoIsMfowV/+n/geG04I4x5IJSLg/FYWlnH/Y=; 7:3jwkNulsnn84n4rgetbQ+M1/HIOceBqk4POB3hZ98MfRin2Ug6hT//HigV9h4TNwLzcU1gKGheADp7IzMMmPnxfb3flB1l3bAxTw/QYZEJYlVKDf12NbxHQK3y15aeK6qEE1Fp6EIj3VVMIpgsHHMg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 2bbced1e-e651-4834-2ede-08d6423d796a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR0502MB3007; x-ms-traffictypediagnostic: VI1PR0502MB3007: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0502MB3007; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3007; x-forefront-prvs: 084674B2CF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(396003)(136003)(366004)(376002)(346002)(39860400002)(13464003)(189003)(199004)(966005)(7696005)(8676002)(107886003)(478600001)(5660300001)(74316002)(6436002)(4326008)(71190400001)(71200400001)(81166006)(81156014)(2906002)(6246003)(186003)(53546011)(6506007)(99286004)(7736002)(256004)(3846002)(66066001)(102836004)(76176011)(6116002)(86362001)(14454004)(305945005)(316002)(25786009)(68736007)(11346002)(110136005)(53936002)(54906003)(229853002)(6306002)(9686003)(26005)(486006)(33656002)(2501003)(97736004)(105586002)(2900100001)(476003)(55016002)(446003)(106356001)(8936002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3007; H:VI1PR0502MB3743.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: WYfWkvFFkNHEMpOrYXtcfX79PYXkCOdj9Ob08Rt2XCSza4Y4gcUZcn/4Kumu7ERAkr2YXmPAnkr0kUqul3TCr6xRQSDew/qEMzKI+F1zsQ36SwWzSh+IoQpZCjKdV8nUYxQmsIjyVxorOwwElN85fFAx4I8DV3+FtgT6grfxV1VE6J5oaH555/penRHconMhRuPQzpG6OijCDDzrB8XT+W2enCPrhiJImkBMV2FKOR4BlDxjP3vreLtD69/l2tK+pZZYY+oP4LBHrLIkvHQ1E2f/iZDD2qANz2wUD7/pucy7dm/6Jwf6In/aFIyE4Dp5aDAVX0pikIngpv7miOMA6TQHnnq6ID6IzCVZQdFcCwE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bbced1e-e651-4834-2ede-08d6423d796a X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2018 10:08:31.6319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3007 Subject: Re: [dpdk-dev] [PATCH v4] net/mlx5: set RSS key to NULL to indicate default RSS 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: , X-List-Received-Date: Sun, 04 Nov 2018 10:08:33 -0000 > -----Original Message----- > From: Shahaf Shuler > Sent: Sunday, November 04, 2018 8:29 AM > To: Ophir Munk ; Yongseok Koh > ; dev@dpdk.org > Cc: Asaf Penso ; Thomas Monjalon > ; Olga Shern > Subject: RE: [PATCH v4] net/mlx5: set RSS key to NULL to indicate default > RSS >=20 > Hi Ophir, >=20 > Saturday, November 3, 2018 7:40 PM, Ophir Munk > > Subject: [PATCH v4] net/mlx5: set RSS key to NULL to indicate default > > RSS > > > > Applications which add RSS rules must supply an RSS key and length. > > If an application is only interested in default RSS operation it > > should not care about the exact RSS key. > > By setting the key to NULL - the PMD will use the default RSS key. > > In addition if the application does not care about the RSS type it can > > set it to 0 and the PMD will use the default type (ETH_RSS_IP). > > > > Signed-off-by: Ophir Munk > > --- > > v1: > > Initial release > > > > v2, v3: > > Rebase + following code review > > > > v4: > > Avoid sgementation faulut by not allowing in cation validation > > key=3DNULL ane > > key_len!=3D0 See https://patches.dpdk.org/patch/47645/ > > > > > > doc/guides/nics/mlx5.rst | 1 + > > drivers/net/mlx5/mlx5_flow.c | 8 +++++++- > > drivers/net/mlx5/mlx5_flow_dv.c | 7 +++++-- > > drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++++-- > > drivers/net/mlx5/mlx5_rxq.c | 18 ++++-------------- > > 5 files changed, 23 insertions(+), 19 deletions(-) > > > > diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > > b/drivers/net/mlx5/mlx5_flow_dv.c index c11ecd4..cdf3377 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -1758,8 +1758,11 @@ > > memcpy((*flow->queue), rss->queue, > > rss->queue_num * sizeof(uint16_t)); > > flow->rss.queue_num =3D rss->queue_num; > > - memcpy(flow->key, rss->key, MLX5_RSS_HASH_KEY_LEN); > > - flow->rss.types =3D rss->types; > > + /* NULL RSS key indicates default RSS key. */ > > + rss_key =3D !rss->key ? rss_hash_default_key : rss->key; >=20 > Getting compilation error: > error: 'rss_key' undeclared (first use in this function) > rss_key =3D !rss->key ? rss_hash_default_key : rss->key; >=20 > please address. Most of the code in file mlx5_flow_dv.c is under #ifdef HAVE_IBV_FLOW_DV_SU= PPORT In my case this macro is not defined so most of the code is not compiled... Please note mlx5 Makefile: $Q sh -- '$<' '$@' \ HAVE_IBV_FLOW_DV_SUPPORT \ infiniband/mlx5dv.h \ func mlx5dv_create_flow_action_packet_reformat \ $(AUTOCONF_OUTPUT) =20 I will issue v5 with a fix > Other than that, no more comments. You can put my ack when on the next > version. >=20 >=20 > > + memcpy(flow->key, rss_key, MLX5_RSS_HASH_KEY_LEN);