From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70043.outbound.protection.outlook.com [40.107.7.43]) by dpdk.org (Postfix) with ESMTP id 083984C94; Fri, 9 Nov 2018 10:38:12 +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=/gL1QOdYL9Nhf0LyAJqEHjTQOOOaC2lwFTCdmtQEzys=; b=x/JLceD0HJhqVMemrotf1Ry65xl1w8qEbclXdqaKPolYXiNdF7Cki9lYtpk+KWsvTHaNGGXlop/TcrEyxbLP8QHZg4SV0aq37UNGcugMSaP43LGKvuxQkGsT46xfS2hnv9R5gQ23va4XCnxUtGRE85266vng9mSDx6wzHZ2JHEw= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1PR0502MB3631.eurprd05.prod.outlook.com (52.134.7.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.28; Fri, 9 Nov 2018 09:38:10 +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.034; Fri, 9 Nov 2018 09:38:10 +0000 From: Ophir Munk To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , "dev@dpdk.org" , Adrien Mazarguil CC: Asaf Penso , Shahaf Shuler , Thomas Monjalon , Olga Shern , Ophir Munk , "stable@dpdk.org" Thread-Topic: [PATCH v2] app/testpmd: revert setting default RSS Thread-Index: AQHUeA/tR7D8kIZ0Skuz9IOTtO1alg== Date: Fri, 9 Nov 2018 09:38:10 +0000 Message-ID: <1541756283-16251-1-git-send-email-ophirmu@mellanox.com> References: <1541754129-26009-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: <1541754129-26009-1-git-send-email-ophirmu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::23) To VI1PR0502MB3743.eurprd05.prod.outlook.com (2603:10a6:803:11::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0502MB3631; 6:AHBm3rtGzH5RJnC96cPkEJzGH3FzdgRMIo8j1MH5wA9A9QS+/g0qda2CO/nM7oi5XxpQjQl6YpHb55Zrt7pxT4kUkcAbFYEQcuYv7Srh1aRdx7Fq4hrC2p2Fp+8iGW+m+tFFb30hKzKKGRyUjIUQ2PWP7no0eZYqc0O6JFtQkVsfryDlErBqUciPq0vDLcoj9t0fJFTV1wSerExxAI2R6e+z0XHf00k/s9ly3J00UZjw5CDJTyTWIvshcQibB1ieDTQnUkPol5Hm3EUokeusTGiXBejSjG/UK4pXDDdV7k5+B2Bhj1KI//lG6fzB33xf/Rghta9ymXk1OjlY9WKp9X6dwczcRlsjRtwxCJytrqDcZKC06/BFklVPnNXTEuNuEpWIuSJvYLJgICuGzEEs6jbb9onSDstoz1RbB1N603oPohAoxJ18wCsIKj84MstBmaa+Bv5S4gHgnpX/IAgLsA==; 5:IjMMWHW6bQ/3uQDDXNlfK8maKRz7pg0V58Oi5AXS6RACvgXjzJOYMppN27//lDApYv2oYZLZMxdpGsd4BVqJkYj3tP4LZez8Gav7OSV9zrXMkDTqgvgGBz3flS19N3yuPNF3FhTYOkcKAwPyhU/ovt68Cg+HXmTtRpjv/Q/2V4Q=; 7:m/wcXrJWIpLXfpYTxbRVhh5NvQ8BItBB7D1IwwnhMIZdDQcobqSc0enhbk+J2OzIeb6qDVUV88MZTmNPPzMxsCjADeUzFGd8jcaHCyRkFkNkQraSO2A3/WiKMZVlykqWhxrrh+f5BZscpa4qmO22fg== x-ms-office365-filtering-correlation-id: c59c6df5-b3d0-41eb-d928-08d646270fe3 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:VI1PR0502MB3631; x-ms-traffictypediagnostic: VI1PR0502MB3631: 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)(3002001)(93006095)(93001095)(10201501046)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:VI1PR0502MB3631; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3631; x-forefront-prvs: 08512C5403 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(376002)(136003)(366004)(189003)(199004)(11346002)(2501003)(68736007)(478600001)(71190400001)(71200400001)(5660300001)(66066001)(6116002)(36756003)(6486002)(2900100001)(97736004)(86362001)(446003)(4326008)(14444005)(3846002)(476003)(486006)(2616005)(256004)(6436002)(105586002)(110136005)(186003)(8676002)(81156014)(305945005)(81166006)(54906003)(25786009)(26005)(6506007)(14454004)(106356001)(8936002)(7736002)(99286004)(2906002)(52116002)(102836004)(316002)(386003)(76176011)(53936002)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3631; 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: +gakUw2ySCtMgeXbYp2D2uXkrhW4rtHvbsc2A9IMArptiPV2VxCRk+kgTDU48+9d0MjZu2ygYohcH4yReQaxKn6RKygyGcCePbMlJcAbyrm2hRVxjQQfNZJFUqqAXtmRVXiaRpLw0LE6CZHBGzx2qnKywvDBaOdo+z5LSpXOFPm/J0gkABvTqJXzR136lpIi+iiN/ZTJnvWjuxHv2xHiKji12D1yvSVTl5+IqRNBCtthTlseJnBiChhSmAWhmEKD1jDUCfofsoElqB3la0qF8wP1xi3k2GEKdwzQiAesvQg83fZdERLdwN7Br0Yrc4+h2Puf5BNG+EkyADYrNvIKIy6PxRIaTHxQeNyTwtqdZ88= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: c59c6df5-b3d0-41eb-d928-08d646270fe3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2018 09:38:10.7669 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3631 Subject: [dpdk-dev] [PATCH v2] app/testpmd: revert setting 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: Fri, 09 Nov 2018 09:38:13 -0000 This reverts the patch that enables default RSS action by setting key=3DNULL and key_len=3D0. In current testpmd implementation a key pointer must exist if key_len!=3D0. For example, the following flow rule will cause a segmentation fault: flow create 0 actions rss queues 0 1 end key_len 40 / end Fixes: a4391f8bae ("app/testpmd: set default RSS key as null") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- v1: Initial version v2: Update commit message (add Cc: stable@dpdk.org) app/test-pmd/cmdline_flow.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 91e2e35..23ea7cc 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3248,15 +3248,26 @@ static int comp_vc_action_rss_queue(struct context = *, const struct token *, .func =3D RTE_ETH_HASH_FUNCTION_DEFAULT, .level =3D 0, .types =3D rss_hf, - .key_len =3D 0, + .key_len =3D sizeof(action_rss_data->key), .queue_num =3D RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM), - .key =3D NULL, + .key =3D action_rss_data->key, .queue =3D action_rss_data->queue, }, + .key =3D "testpmd's default RSS hash key, " + "override it for better balancing", .queue =3D { 0 }, }; for (i =3D 0; i < action_rss_data->conf.queue_num; ++i) action_rss_data->queue[i] =3D i; + if (!port_id_is_invalid(ctx->port, DISABLED_WARN) && + ctx->port !=3D (portid_t)RTE_PORT_ALL) { + struct rte_eth_dev_info info; + + rte_eth_dev_info_get(ctx->port, &info); + action_rss_data->conf.key_len =3D + RTE_MIN(sizeof(action_rss_data->key), + info.hash_key_size); + } action->conf =3D &action_rss_data->conf; return ret; } --=20 1.8.3.1