From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0063.outbound.protection.outlook.com [104.47.0.63]) by dpdk.org (Postfix) with ESMTP id CB9031E2F for ; Mon, 29 Oct 2018 17:26:10 +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=QHT5KvZJ1eTHNlmpD/rdFu2/Zxx52wJEjZ6jFQC16hQ=; b=ut4VHZDTeME29zJJeJNjrbH6fNijuHsXknWkEsz8JIgFpepnPjig6i/lNtNuBPIUK0AbNPDiokdcCFWNzggaMI9gl50JfPO2aMg6GD7SLX2NC33BX9LDi8kGtHIgowSnzusyYXMrkWbHAXPlXBIIwYXJKf8KuShJuIgPQkVGoes= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1SPR01MB333.eurprd05.prod.outlook.com (52.134.27.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.27; Mon, 29 Oct 2018 16:26:09 +0000 Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::fd5f:be55:2063:d2de]) by VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::fd5f:be55:2063:d2de%3]) with mapi id 15.20.1273.027; Mon, 29 Oct 2018 16:26:09 +0000 From: Ophir Munk To: Yongseok Koh CC: "dev@dpdk.org" , Asaf Penso , Shahaf Shuler , Thomas Monjalon , Olga Shern Thread-Topic: [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS Thread-Index: AQHUWz/ESBH47HIm1UmG4BuA5+cC8KUN3w0AgCix5KA= Date: Mon, 29 Oct 2018 16:26:08 +0000 Message-ID: References: <1538588246-21436-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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1SPR01MB333; 6:GeqMbOF6562jOdbO6rDpIc89FvdzwJIV4Sh6p+SPh+/2lxWh+uc4uwMvCFec6e+xGaZ+e34HIvipXdjrHYdQbRQsmMjC6zxOyePSnO46NWYZFnzaeBacyF1s1xTxpR2nTGwMuM/nYZWMtuoGAlxpABxvyl5PeimrLCSrUKmC/nEs1AUH+1JF03TLOY8llfoEf56dV9gULzQ2msL6P/hIsXI/DDcmxhe72InjfUjgRUAmsga2SQPmonWKoqRVvOLwmQmBkx38JKuKSID5KczkPVjFShzzp8FoZbPv+io/tHQYsluCvXCYO+/hcGrU/1IKR8Sifhkp0//lquUlWutt8IPnsAY/DhbMoCkVnr1nk1qcUJs8vMwGPN2CzX7BAfpUh/7/Pa2BbVre01Kb7YwnwnEj4UadkMQSXYLuCv5MHDTFSCST2IapDSxExI1P3LwWubTmZcvSwlnSuQAxt0aQAQ==; 5:MQbLOIftp5jcgQMb1Sgm9NTKKdwGlqsQQD/5WB7pZT+MiG/7cezpAre9DHkX/6PWVatXQS4qXZuCb4+FnxfsH4zMmYGBxBT0GiRcC2gcwZxSeZGi8umDrHaiobCE3wfraLE/AGOd+pbsOsxedD900DvVD1DzmGDYZ4rS6Jh+GTM=; 7:KwQJm3aPUf37JG1mtneER3zuvfYHT0opCXFOn34kt8xc98y1VixsyftoXdpK9KmK1JoZqzHrsu0N81lqZKiod6XqO+WVasPu6tSsai0lLXKfOtLXOCBvvCMe3exDCSEyEgFFZOPhwlgkpnqAdadVuQ== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 9e295b5a-9451-42e8-8b19-08d63dbb3bc8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1SPR01MB333; x-ms-traffictypediagnostic: VI1SPR01MB333: 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)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:VI1SPR01MB333; BCL:0; PCL:0; RULEID:; SRVR:VI1SPR01MB333; x-forefront-prvs: 084080FC15 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(376002)(346002)(136003)(189003)(199004)(13464003)(54906003)(7696005)(6436002)(99286004)(66066001)(5660300001)(76176011)(256004)(71200400001)(107886003)(71190400001)(6246003)(478600001)(4326008)(86362001)(25786009)(14454004)(6862004)(9686003)(55016002)(68736007)(6116002)(316002)(8936002)(6506007)(486006)(26005)(7736002)(53936002)(6636002)(8676002)(229853002)(81156014)(81166006)(5250100002)(74316002)(305945005)(446003)(2906002)(2900100001)(97736004)(3846002)(105586002)(102836004)(33656002)(106356001)(186003)(53546011)(476003)(11346002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1SPR01MB333; 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: NYxtg0+zFMkS3oFsAkE0D/TNlPFSo7RZuPJrUcRO4WJ9ravTyTkWM5wr0xdOdXa4UtrlIerSFOFfFNU6G3VzBCnrJI21BwXs5e8yvheseZ6pugLFyzdOhz3BgAMdxYwfw6HP1Wd16O/6csCIfXzJjS7VPXqQGLz1IFkg9DuVOgqw2/elTGv+4egRNeSuOfGteMvXtRKmJM/Ld2opd9greQIrTAeAYttEXGzcwx5XBtDZkJPW3rM49ZRKI32viCifTF3gHku+ulRL7KytopKojMIeR6TF2kn3jrNzjpCQzKTUftM0mOUuohE0JehGORGhl5VYpDo2DkyMJBWI6JoQ7Y/Bj6px8snF3Yx+AtlXuvk= 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: 9e295b5a-9451-42e8-8b19-08d63dbb3bc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2018 16:26:08.7368 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR01MB333 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: set RSS key len 0 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: Mon, 29 Oct 2018 16:26:11 -0000 Please find comments inline. > -----Original Message----- > From: Yongseok Koh > Sent: Wednesday, October 03, 2018 9:56 PM > To: Ophir Munk > Cc: dev@dpdk.org; Asaf Penso ; Shahaf Shuler > ; Thomas Monjalon ; > Olga Shern > Subject: Re: [PATCH] net/mlx5: set RSS key len 0 to indicate default RSS >=20 >=20 > > On Oct 3, 2018, at 10:37 AM, Ophir Munk > wrote: > > > > Applications which add an RSS flow must supply an RSS key table and an > > RSS key length. If an application needs to add the default RSS flow it > > should not care about the exact RSS default key table and its length. > > By setting key length to 0 - the PMD will know that it should use the > > default RSS key table and length. > > > > Signed-off-by: Ophir Munk > > --- > > drivers/net/mlx5/mlx5_flow.c | 7 ++++--- >=20 > Please rebase the code on top of the latest dpdk-next-net-mlx. > Actually, it is better to rebase on top of PR#878. >=20 > Thanks, > Yongseok I have rebased the code on master branch dated 18.11 28-Oct-18. After the rebase I have discovered more seg fault scenarios which are fixed= in V2. >=20 > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > b/drivers/net/mlx5/mlx5_flow.c index 3f548a9..18eacf5 100644 > > --- a/drivers/net/mlx5/mlx5_flow.c > > +++ b/drivers/net/mlx5/mlx5_flow.c > > @@ -2062,7 +2062,8 @@ struct mlx5_flow_tunnel_info { > > > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > > &rss->level, > > "tunnel RSS is not supported"); > > - if (rss->key_len < MLX5_RSS_HASH_KEY_LEN) > > + /* key_len 0 means using default RSS key */ > > + if (rss->key_len > 0 && rss->key_len < MLX5_RSS_HASH_KEY_LEN) > > return rte_flow_error_set(error, ENOTSUP, > > > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > > &rss->key_len, > > @@ -2106,7 +2107,7 @@ struct mlx5_flow_tunnel_info { > > 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); > > + memcpy(flow->key, rss->key, rss->key_len); > > flow->rss.types =3D rss->types; > > flow->rss.level =3D rss->level; > > flow->fate |=3D MLX5_FLOW_FATE_RSS; > > @@ -2948,7 +2949,7 @@ struct mlx5_flow_tunnel_info { > > flow->rss.queue_num); > > if (!hrxq) > > hrxq =3D mlx5_hrxq_new(dev, flow->key, > > - > MLX5_RSS_HASH_KEY_LEN, > > + flow->rss.key_len, > > verbs->hash_fields, > > (*flow->queue), > > flow->rss.queue_num, > > -- > > 1.8.3.1 > >