From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20047.outbound.protection.outlook.com [40.107.2.47]) by dpdk.org (Postfix) with ESMTP id 5A1A2A49 for ; Sat, 3 Nov 2018 18:18:16 +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=FJkuuVE3bwF1lscMaA8ZNQCjGz4WRUFoA4S8Uh0htXc=; b=aEtkruzfAJY2HB16N843FdUQlPFJiQSzMfeUdp1vXz/OZTPR6qzJSamZcKTN5gO9wMH7VpDl+3Coul6qJ8DxTqgHY33/9E8VU8OfNMCMUijoFmVQNt3Tw4Ruuv0c+743XH6iKMCkmI+1ISdR//NoJTsEz27rLAjj2vVw72/NLgA= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1PR0502MB3632.eurprd05.prod.outlook.com (52.134.7.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.27; Sat, 3 Nov 2018 17:18:14 +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; Sat, 3 Nov 2018 17:18:13 +0000 From: Ophir Munk To: "dev@dpdk.org" , Yongseok Koh CC: Thomas Monjalon , Asaf Penso , Olga Shern Thread-Topic: [PATCH v2] net/mlx5: set RSS key to NULL to indicate default RSS Thread-Index: AQHUccEnLoFSrTYmp0WASea6Fnjxl6U68w6AgAAOR7CAAcT0UIABg3Ew Date: Sat, 3 Nov 2018 17:18:13 +0000 Message-ID: References: <1538588246-21436-1-git-send-email-ophirmu@mellanox.com> <1541062744-25491-1-git-send-email-ophirmu@mellanox.com> 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: [109.186.62.238] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0502MB3632; 6:+yRRXSpju4mEOK6W0fZcl+dQYFf+OhDs7GUiNcLcplYaUJBHQ1gc0H2r3A4jyzeHZNIQX0VBeeB7Ke0nvGLr3kRRGsfTo3kSaLm0cR2vkc5NlOvAWiY0asZFHo5PfiOCQrZo3ktrcGQSrfIuOT1WMuHHd52Fv4h20vrxpZFv6X4l9eznhZspMLltlhThsz2ujOZWUXLgkuk80hZW4r4AO51XmDnBAovYKGCg+CY/DgPWE9tHileCCjhUB4ePN3V3t0EZdH41D/DSrZ3X2CK6gx6+XQlv8JUmMFyvDULvVSlo+4JH6TpMVXEyhpn2A7AZ+efRYTpxhDx8CtjrPU0lgUnl94098BNnNRHZzKAS+tGrDucY3j7ycq1EwgG5zERdDEnKuzI/Fw9J9hD4HLRMVJiqscv2pK9bJoE6N6e7Bbs4dhV0dRXwodFBcb7/zrtHw6yzfjWV16bE0th+PZ8cDQ==; 5:wXbW21shTPmPvT9Kn6DGzAv4065DvOBdv/jSVGuPZVzoq2iERy8vLkZXVMAeGL1EaxyS1romfWymgrTJ2F8yF+53OgGtJKyJ8G6ZUsqBCpYyVKOHnFCTI2aVBpWr7AHpcYa+FxQWgV2DMc+TnpKuR1tNw0cDTKTcizRicjxYqVg=; 7:jOGYa+uypNrkAnyIgM7mC3j9q11pWGki0Yg9i4ik8BqIV1kFFmkTYH+OWX6kya77ImOJEYZMde3b6oHmpJ3lk6YGzjii5Oq9sUERx159J2gUCXUUbqqD46PoDTmwmVEaCyfixzKOopWRcS+GYil2qw== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 49d65c70-5aa0-48bf-28b7-08d641b05670 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:VI1PR0502MB3632; x-ms-traffictypediagnostic: VI1PR0502MB3632: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0502MB3632; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3632; x-forefront-prvs: 08457955C4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(376002)(346002)(39860400002)(366004)(199004)(189003)(13464003)(316002)(68736007)(110136005)(54906003)(26005)(6436002)(2501003)(97736004)(102836004)(486006)(476003)(71200400001)(33656002)(71190400001)(6636002)(229853002)(99286004)(5660300001)(256004)(14444005)(186003)(86362001)(305945005)(66066001)(106356001)(74316002)(7696005)(14454004)(2900100001)(8936002)(446003)(76176011)(7736002)(6246003)(53936002)(4326008)(478600001)(25786009)(107886003)(2906002)(81156014)(81166006)(9686003)(105586002)(53546011)(3846002)(6116002)(6506007)(8676002)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3632; H:VI1PR0502MB3743.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 0bMuHRafiFISQka2Vrr/isO4Dp6YwAGZixws9vQH/4XSHRTsXY0HxaM7b9m4ldEeWYOd/KasplJJWcECZyN6ijEYi3dTf+EQGPNxYSnt0BMEotYWTmpMx1hr/1INbta3OzPvr2GIiaoaeZ+tOB9tEM+ov2ZVus4Eip1IT06OCaQ3rkVLiX3wooAjgIyY3w3I7OXvort2uIGGg1kwdjzFdZ9aK55PQmS2f+SWrQyRBu1qtXOtdL+NFGbOEKITWcQStLQ9PVcqhN+iQ008qhv3dSbisK/XbjGt9xcKdLe260CqMsBRQiyyfGg7OsgzYxID6ke5SjZ2pLDYE7LUohTunTpzYQxFhjo3naw0yxk+FOI= 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: 49d65c70-5aa0-48bf-28b7-08d641b05670 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2018 17:18:13.8025 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3632 Subject: Re: [dpdk-dev] [PATCH v2] 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: Sat, 03 Nov 2018 17:18:16 -0000 Please see comments inline > -----Original Message----- > From: Ophir Munk > Sent: Friday, November 02, 2018 7:55 PM > To: dev@dpdk.org; Yongseok Koh > Cc: Thomas Monjalon ; Asaf Penso > ; Olga Shern ; Ophir Munk > > Subject: FW: [PATCH v2] net/mlx5: set RSS key to NULL to indicate default > RSS >=20 >=20 > > -----Original Message----- > > From: Shahaf Shuler > > Sent: Thursday, November 01, 2018 4:01 PM > > To: Ophir Munk ; dev@dpdk.org; Yongseok Koh > > > > Cc: Thomas Monjalon ; Olga Shern > > ; Asaf Penso > > Subject: RE: [PATCH v2] net/mlx5: set RSS key to NULL to indicate > > default RSS > > > > Hi Ophir, > > >=20 > > > > > + if (rss->key_len =3D=3D 0 && rss->key !=3D NULL) > > > + return rte_flow_error_set(error, ENOTSUP, > > > + > > > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > > > + &rss->key_len, > > > + "RSS hash key length 0"); > > > + if (rss->key_len > 0 && rss->key_len < MLX5_RSS_HASH_KEY_LEN) > > > > Can't you simplify using a single condition: > > If (rss->key && rss->key_len < MLX5_RSS_HASH_KEY_LEN) > > >=20 > Do you mean that if key=3D=3DNULL we do not care about the key_len? > (since if key=3D=3DNULL key_len can have any value? > Wil update in V3 After applying in v3 the reviewed condition code - action validation confir= ms a NULL key with key length 6. But then testpmd crashes when creating the rule. Crash occurs in rte_flow_c= onv_action_conf(). When reverting to v2 condition code action validation is failing (as expect= ed) with error message: Caught error type 15 (action configuration): cause: 0x7fffffffbf18, RSS has= h key too small: Unknown error 95 and flow creation fails with the same error. I will issue v4 with v2 condition code. >=20 > > Same rss->key addition should be for the case the key_len is too large.