From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70088.outbound.protection.outlook.com [40.107.7.88]) by dpdk.org (Postfix) with ESMTP id 992B9568A for ; Thu, 6 Dec 2018 12:34:40 +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=0HdckX1WGA4ZmuCyBtLa2xAoCzy1KwMRDu7xc4Tmyi8=; b=XioyOJw2Gz999WzYDszofCd4DXIFKi6BY29HxQD4S5AjOn+0/B/GbkQiALyV7KoKAMzfdFIiWwgmnJNJHJB2V1eMtLglMEMmGQjQUtYhMvv9/SxVlAaWVEVCFK8Xz3w8JtaWrf7kZsqrUlKBr8wvKpk9GfXuUmmkEI49K9tKK9s= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4394.eurprd05.prod.outlook.com (52.134.108.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.17; Thu, 6 Dec 2018 11:34:39 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f59c:f6f0:665b:8b16]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f59c:f6f0:665b:8b16%4]) with mapi id 15.20.1361.019; Thu, 6 Dec 2018 11:34:39 +0000 From: Shahaf Shuler To: Dekel Peled , Yongseok Koh CC: "dev@dpdk.org" , Ori Kam , Dekel Peled , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix validation of Rx queue number Thread-Index: AQHUhvtLKTLlC5jOhkmL/tiUbW5wJKVxoTrQ Date: Thu, 6 Dec 2018 11:34:39 +0000 Message-ID: References: <1543396577-60481-1-git-send-email-dekelp@mellanox.com> In-Reply-To: <1543396577-60481-1-git-send-email-dekelp@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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4394; 6:tQ1vAqGOltiyvO1fom2ggx7AotRTq5GgFDgjoj0X7Z/1FDoc02SB8t6jVkkBWzmz2CxSYm6KHybolYTD+7H0ikwMdZ7Uz/F+SgzW/yTV70y9BsSnL3ezGsxgo7sQV1+DRlRmUdE3UYhcZamq6OwF0W11XsYlmB+/yJfVl8o93PSVkWpwgUKHVEz1UtJ5rYLiQWKl4EY5RMfwqtR7CjceWR533Zz0/a52cNTbRut5jiIw4FpYPWLblDcju2yb/rlOxLXw27eygEonSfvLR7Lnd2PL/KilpqAQjB7dsWJnMgy8AOGeGevO58or+s7kx7XD8hDubglDT6SyKnLnAsZJSMTsIP/8JtQbDKKRsRx++Dll70YuqK9GyBYbXNSJO7BasJhrOgIkKQFydDkusJV2Qn1RGqmPSPQJZJ/nTCvK/iQfo0lNy/fcldHm3BFAp+ZHNO+hRdgL2vVDKpMcuFtoSA==; 5:Xd8ewsaj53W+YoWdKDyeeeqkwLm22HN5imUK6oXPP1hfc6p5qX8GtWOTQXmTArVC3Fns3wCR1hvnTtRh5LQkHs4d04+thDsANBjQdtVkZLqmYCWIGElued0hh+B9SURl1DVp6s8sYtX0stTQyk8oNBTxk8notsXnZGqwQzEFrug=; 7:r+DHBhZl4mZSWSR3lArSPLUtPyQkipmBCYpxIgWanK6UnsoMw4WLR36XB6ywp6Q99g1oXNkiPkP7isA41HavjEyg0cBNWW5V4MFnVeiuzc7AAyOhPwy1hdKjJEefEw/K7Smb7EPRfc/C7imoYNrWNw== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: afe37f5b-4013-4082-6b86-08d65b6eced3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4394; x-ms-traffictypediagnostic: DB7PR05MB4394: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231455)(999002)(944501520)(52105112)(10201501046)(3002001)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB4394; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4394; x-forefront-prvs: 087894CD3C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(366004)(136003)(396003)(199004)(189003)(486006)(71190400001)(97736004)(66066001)(476003)(6116002)(3846002)(74316002)(305945005)(6636002)(71200400001)(446003)(102836004)(81166006)(81156014)(8936002)(7736002)(76176011)(106356001)(6506007)(8676002)(68736007)(86362001)(105586002)(256004)(54906003)(110136005)(14444005)(478600001)(2906002)(14454004)(99286004)(53936002)(33656002)(9686003)(6246003)(7696005)(5660300001)(26005)(6436002)(11346002)(186003)(4326008)(316002)(25786009)(229853002)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4394; H:DB7PR05MB4426.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: JzW1byf6IGCmwtYeLvDOxFettAT7QYyuka2Ge0iHFJAzIhfTY+1svUHJRU7vs/AJsai6hIQRIC6UMiwzr/xEw3gpFqQp5ygCK4Hwl1YHt5/Y73j7eX3zZAF8OL+JkLAwtiADOrywcJc1SwHv2/8mvsyNjz8t940Vm3bBw3cecTMUO8CRR/0ispz550tRhx6mkkvC5gnvh0ZFEU3Vh7XX0IIfm2UpVhfznpOhok5j1FSFtY/SezDQyiy6/dLetIu/J6p7d081EWWUcDokgNtqKSjiToCP/AsUBi5ZYsyCA69XBSPMSJLVjXZh5snrdCp1GLN8OUXRUz9Fkd4VoJDyBRyw6YmGOfHD0c9CQji4Jjw= 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: afe37f5b-4013-4082-6b86-08d65b6eced3 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2018 11:34:39.2746 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4394 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix validation of Rx queue number 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: Thu, 06 Dec 2018 11:34:41 -0000 Wednesday, November 28, 2018 11:16 AM, Dekel Peled: > Subject: [dpdk-dev] [PATCH] net/mlx5: fix validation of Rx queue number >=20 > Function mlx5_ctrl_flow_vlan() is used to set the rss rule in > MLX5 PMD, using priv->reta_idx_n as number of Rx queues. > This number is passed to mlx5_flow_validate_action_rss(), which attempts > to access the Rx queues at priv->rxqs. > In case priv->rxqs_n is 0, priv->rxqs is empty, and > mlx5_flow_validate_action_rss() will crash with segmentation fault. >=20 > priv->reta_idx_n can never be 0, even if priv->rxqs_n is set to 0. > But when priv->rxqs_n is set to 0, setting the rss rule is invalid. >=20 > This patch updates mlx5_ctrl_flow_vlan(), if priv->rxqs_n is 0 the functi= on will > fail with EINVAL errno. >=20 > Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow= ") > Cc: nelio.laranjeiro@6wind.com >=20 > Signed-off-by: Dekel Peled Applied to next-net-mlx, thanks.=20