From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0059.outbound.protection.outlook.com [104.47.0.59]) by dpdk.org (Postfix) with ESMTP id 5E52F3195 for ; Sun, 6 May 2018 08:06:58 +0200 (CEST) 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; bh=z1skpzMSXi+6T3RU7oT+y8vy2KBPkTbHt8x5g0EEa0Q=; b=oC4P8kQHZyyJNElS5ZcTRl2tJba1PQZeEKQrMGurnoUafPVK1yfdM5gMqYthtUDuMYW9kYfNmmX8LCe7r6r43mQ9wpPCRZWxIMuqwKYdMchczOmAloRvZgdfzMRboJSY2eqZD63va2zxnsjed00wvWX3zhmYJM3RkBcfQaC2j5k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Sun, 6 May 2018 06:06:56 +0000 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Date: Sun, 6 May 2018 09:05:55 +0300 Message-Id: <7fd5e37f1d738c29c2845e4a1aa2418408537040.1525586526.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: LO2P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::20) To AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4422; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 3:GuOsBBGOo/vLlepXHhOsokRsa44wCAFQifcHzbm7XVByXDqkKACZ1PDo51zSd8YLNd+t3jWdxA3qvvlrFWm4cedPNRIrBeYVFmzZxVMGn/V0/qNZHCjQ7ft2FbahIBW2QPucxTly7e3JqoD8j7bzewNdvO2IyURb4bZdRBMrpg+k3k5b1SKL5pWJqtl7+PO3r2Cb7kGDr7fpdB9zrsQhRy/5tzXOI6xFpevmKH8xm0ZOFzGS9eddLfEpN0+VTsDp; 25:aEqdd36f9gtKwFPJcFIigwjg9zQsypSXut9ikr0nGQQn78uO2FuiHrWL+OoeproGMEsTz7PQKMjtzOWFJmLG/589zsHzVZLaV0nYzWtMq3LuRllnLFqlKsG2BDeTWuiKwDtKaCUC88YjW21iWPwsL5piCE9XMBNx2+n6SMKz5FfJIlxyO2dH/GiRc19nMrl2LCQz6n6qxmGjfPZgYGuVxPampDRiPY3ra1cTpjRkUCi86/EGAHk2JMpp4UYnHTA6A4jACJVcRmo8zXGauCXdPE9ul/GVfHZU/Qxm8JREdZOK1tlmFMA1EMFP1c7lNuQOnjK2WYreNX/D5J4XkOtIUQ==; 31:YobSlo+2eMOuCHPKOnpdK+8hJ9pAHV+LvBrVc3K+xNQI5l9k6g4gi7p3OsC4+mWALJoryvujpcsVPjpNwxmSz5jYJtaNH/OZvgs+ROWX8Gfx8NELr9t7mjhNLS8SIVeq5qLYQ3EYiV3hxLkzRWxrrJXf66srTvY3M8c/rTrTNLqYXJ827904STiBZBCmF/5gkbuq8HWTOQV7k3Ety5Pa1HrpmeDOIgysNH9ygT08Yo8= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:zAoLzaXG9zM+uzykXr61cK5qsE3SuRY/ArUCxZ6ugF4gRPd9vz7eYFwtwTcybpRCjduL8S/vMh9wyrSci+i54RxT9HULaJTjbriQWgq/FayCFEhaMyQKysKt49z7fF4Zm31jOTScflFBWLYomtg1GRaAAf/ErVdIv9FmpK6y3AS6ycr9N1oR7Q9vTiM32rYOJjUfrzb/lIMQj4HzZTu5vZIQIF7KwsB00yt5tzbZvGwBosQQ4j94uivr2K1LB7XF5wsXyutJ2S7toTAboMXMa8goikLbr0dpneZ42/0SwCFxfY/TgNUL7258q8Phota3La3Kfj4q5Y2YoNZK39iyFNVVg12C69FOpBHb3Dz7oSzaKnZ8pBVG8zK1SdMRXdIDw0R7nn2cPb+FPXJv8Wfo7C02qzZCmMg6cH4IRmwisDEgh9mZMzxKF/lWAH2h13sVhUgfr7m4phqBlCNhlDRONNx+B4O/RjIriYa3j9Qqy43gkswMDDJLSkVRb2YmOYVR; 4:ACW/aM+vucv318/W4jvS0txnCNZ5OO4hpP1apKq0t3r1/TlzhaRDdVXngI8z8mGDorQmSbEte44M0Oz066yp+UASz7kUR5LUKbuH52ZkRD2pvXM0V5iKpYbyQFtFTZ5w9LWj7m14dXvbHteLhaxot0/AuicirM30jGgPYHz0798OEXWybzCL19puX1+Y4TkZcYqEfZ/UgknCHaUeQxjQsFzYezR+96noLAyBFjeefYHtRw7myNpAI3IcTL56PxfMUmUgxTZo7Y/MQX51C04HeEdVzJNGNRBHYitwPJFzB9Y8dqMQRJvpKlMiRof502qC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR05MB4422; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4422; X-Forefront-PRVS: 06640999CA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(16586007)(8936002)(316002)(2351001)(53936002)(86362001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(48376002)(69596002)(16526019)(26005)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(6916009)(21086003)(51416003)(446003)(11346002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4422; H:mellanox.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-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4422; 23:Z5SX1/EOzc0Af2IRjjwwcQej0zGEv3CPZxQ/bapm0?= =?us-ascii?Q?L0DK//djUfgKbOIqMIbhmSyC16pkIJgKU+hbJ0B3wprF5UXVMgiv0rnyAm7C?= =?us-ascii?Q?2UPaiXkEbguxJVC0Lkfw1Pav0Ut/yFBaOcwZtpNj0fanXSRa/vgYqCLwM91M?= =?us-ascii?Q?VZC2rnn9dDHpdQVlFj23MfHRtf3XkhkaGY9boBBGq/RtVKT+0IyemV4S4Oxa?= =?us-ascii?Q?d+pOjQBI1ED0isEWis74l6aTvCWvkvHxSyH6WCqD46kikDTITyYkq+D79nQW?= =?us-ascii?Q?Ek0ekrF3YMf6f7BMgFxdHVDhgUDwQu2K9wn5ujKMA3sM8v0I079J7QBWiEio?= =?us-ascii?Q?aOXkOUz1+nCV61FKlrifAFY1ZO8f+VUARaHpBTz7R8q+ZWaDwEtJmnN+IDs9?= =?us-ascii?Q?VSwEbJ5TSY7jABMlwHSshZPivcS2dC3zhKu9041LAcjjo+CQRohpacBwTk/E?= =?us-ascii?Q?Q4XpqRv48kOLS2+KjzNCjmwHAkLY+ryQ3YB9x5mVovlkeW75pnPfcyxQ57jB?= =?us-ascii?Q?/9L7A19LmcQz9vO+AbCsJorVTP8RcInwPI3T83y34WA3eQCIATZLGQORdHsv?= =?us-ascii?Q?sDbx7Cp9mkTQadywS7KgFaIaxgInV7PQJ6k/QArFLqX77+L1wsga0J29Cbh6?= =?us-ascii?Q?VkFvB3nHsKZ39xS4RfLu225DyQCMeGvz+DYLZc//TWSJ86iTsQSK+CCKpoR0?= =?us-ascii?Q?1VLQJl2l2g5SHA9jnlSAYEpoxyXwGXn4uETQMF47vQKs8xqWc7dBCW+Zzl+L?= =?us-ascii?Q?X4xokGRIzmYkJOaEFbmiItTq1Jkqqph64qPTOdaBgQFfRCS9sx3zbo03m9Kh?= =?us-ascii?Q?32hCt6dqoMQrmI0sxfQjvUzXPFLeb1d6DarX8NJ3fTr95s1flhFNZbZlB7MH?= =?us-ascii?Q?JWPatJdmjuDSs91eBiTTnpydWXEsGACSTPYuziEv4Zx/55wUU+ZBsieVTnEI?= =?us-ascii?Q?r5Qxjxmw5fOZWZklwKuDD10vHcW1njTG90mFmo3ALAsfdLOo2IjWUgg2jhVv?= =?us-ascii?Q?CPh3g/R3U4EJinarrLwSkwXUxosfdf6enTCoVwBE0hinZroTXtCCFuQHSYPs?= =?us-ascii?Q?F5iLfNy8j1qO6Ck+76ssqk37qS+WeuEqRfevY3XyWjFb/5LkrUiv2GZrgdlw?= =?us-ascii?Q?GXHnLUmwxjhS7QfTBqpPSf8T2rkuCHPcsFUr/fS3lThI3hLf8C7YqG9y/xOQ?= =?us-ascii?Q?8j0KzaY8lpzujGFRqflLCRz0aKc5lZZNPoxor7+z187IxRsLpeaeLhr3RIrO?= =?us-ascii?Q?cUHKNNDwmzIKqqyt64=3D?= X-Microsoft-Antispam-Message-Info: Ee4hy44aMrKAWG96Yfq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zg0HqbUD5QfnhS15epXu7roOPT1FG7k6tnRLPVT1WkbEDI/2vh+NBkf8WhBv3gKoa9hF3paXrUK5X2fz79dQhXMu9T77dJowmDa1Z8nY/R64QNYjySQDjtLXlld9HIzXvjSgjYnA8ON2K3FLyuFUUG1t4DUfKkDfqndBstobP/qmoNzKmeBEBKUCCLSwdHak0hC4YSz9oRqFbcKq31wNQA54d4Q5qRJ7FoPlzG4wf4WI X-MS-Office365-Filtering-Correlation-Id: 5f8af8b4-41d1-420b-886b-08d5b31792a6 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:56.3487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f8af8b4-41d1-420b-886b-08d5b31792a6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4422 Subject: [dpdk-stable] [PATCH 26/33] net/mlx5: fix RSS flow action bounds check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:06:58 -0000 From: Adrien Mazarguil [ upstream commit e68744e53ed209c0419925171c5aa510f6643adb ] The number of queues provided by the application is not checked against parser's supported maximum. Fixes: 3d821d6fea40 ("net/mlx5: support RSS action flow rule") Cc: stable@dpdk.org Signed-off-by: Adrien Mazarguil Acked-by: Nelio Laranjeiro Acked-by: Ferruh Yigit --- drivers/net/mlx5/mlx5_flow.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 30b85731b0..48e9451313 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -16,6 +16,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include #include #include #include @@ -707,6 +708,14 @@ mlx5_flow_convert_actions(struct rte_eth_dev *dev, return -rte_errno; } } + if (rss->num > RTE_DIM(parser->queues)) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + actions, + "too many queues for RSS" + " context"); + return -rte_errno; + } for (n = 0; n < rss->num; ++n) { if (rss->queue[n] >= priv->rxqs_n) { rte_flow_error_set(error, EINVAL, -- 2.12.0