From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50084.outbound.protection.outlook.com [40.107.5.84]) by dpdk.org (Postfix) with ESMTP id E973A23A for ; Sun, 6 May 2018 08:06:35 +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=Q9KFzz+WGn9dh/wSxxWUDwIO7C4FhWFOLMog+pMt6kg=; b=QqdNgo4JjMNQRbxDuZ4+r0pkdnmNYaipJqjUDQ1GW2GUSa4Pmjs3O6vQDrDez4ffWZicUm78I+DAnHLFYJM2DUwK7caRJGy6XLu2+B4U3rM0dRUqzOzDhyvW7+tzKBYkW9B4NyusCiULx5WrHENd4LkBL6Z8LYh4EUJH3Bzx1Ug= 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:34 +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:31 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:QXc7gL5HkIGGvgIn7n5aarL2cE0ZYORur6Ed6thKOx1ASEEWSnA5psHYCs1gev1HB4RFYk7ZEd+lLD+hr5alDF718vUaoyGEKdQqVIW92/zYlgFgB3X0SRa7kCH/lyBWzHY5Rq6srymKSy1NG8kDZOoPNHLeKnZ/Cv5AOj5ror0fFCnZhcbfsyjvz/um50VB7NYv4JCTt8rBD8PD61FLg5sGCE2VLITulhcHb0OmDrWwXvx9P15+hbMiW3KZ+3Bt; 25:+QhwI9KzywzLYMD7ym6Yoej7BaQCTPfyEu9Gw2+9M2HaG2WEoqifXoNSrXNtte6adym0zn00fKVIGrK8CFYOKK+Hh3c13iO8qr2XuAY7dBLjRfQudGK+F4UH9cRm7LFnpARJDTIvzPXnTkasmy90gmRTxLaWMchFbIq9XtnDlx71V3EPT7jXMprKdZDsFwNyrpWLRtzMrsCHZsWjGklINOx3aqvK4bKRYDuGe4Fb+MAaiejaM/lRB38qdkPAPMCR9qddoS7GhxVvYe3aoqcNNqyBC3Csy2fi2jDqVVvJedkkoX3F1I3DpRxNmXdGJdZNmIAnsDAx101BGtt3Ouys3Q==; 31:ZrnOJo8tj+qzoH2qhMnVA2oeSqRix1kMdVx7GJzwyKmG/aJW2I5f1VZOh0TGB6ceb4QKbNMkYnYjLBHIKh78L2TbMTbSOgMyW8TD1gtaA6yzzkdePAnUCniF46/28h4W8+1Hjifb9RkdzKOf5rxgs6oEo9VdOSamkv4RDYUebuKKp0RKsoKo9NWisHOBQPI427UL7ziANHd1drg3xmh4W9GDk9bdtyjV5eFXJnFUp9w= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:2Jd47bWViFZDABEd0e93HIFCGlf92asw5flfEFRwgCVi/MoskvRWQEaI7dkNtYP6ccYCO3mImFdEy3A2KoSQbytDPkhpVnEEheOvxBs4fGjC2G3jjIshhVZzP2r82QFMB0DkkcqVFT3HjMN4E9pr+iktgM18C0y/o7nR50HcbXoQMvAlT7ImN3JzTBsvPWTVAHk9mphgQHDfosvBDMd/9BnLcaCE8FtSwJPX5vAAGuJw5qWiHTP65U0o8Hd9IwNeqJEGqq1QtdUzpcdUzMBFAva1fDI3FEApiY0ae5sObHEbrtPcJ1FMzJ+ak0Gma6ZiGTtBJpcZYp8tenujPzicxBdjf19xACsN19GLZCLCoVJcYcy3eQuApasxoZYMwIrD6lk10aq+y3UbPaaBUUmDDn174DJ2mbtMLVIHlv/elJIxyc4NXe2TLm87buL/XeUW3qroT1LIRJTkKjQlm/rAHIpUQthtkMXCXxbt8O84zGBDP9wOqXRY+eCzDqG9hPZu; 4:8/9qXmAwGNyg9dMMPoX8bIhdYcG6F6FjXcS0dxQ6QDy7JiggOHA3S7VaiqdORmkmuEuslr1+LxKxZmNrvcwExlVMYkS02DSexdk6KwVPSFx1gQI0bIsKy3JSMaShuzwWSrCA6I+Im16wgC13NpO04IbbHoyTdRJVFlqb6pYYrSwo3W+Pvhctu+q3XMrwlEfCPy69yFbGHxr9SyThBsyYSkyzhzt1iGEJ0AyAgrXyBq3HLKFzDCc42OxcCVTIu6J8vM3Hit4sk3JogXGWBszvnA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; 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)(979002)(39380400002)(396003)(346002)(39860400002)(376002)(366004)(189003)(199004)(59450400001)(386003)(69596002)(16526019)(26005)(186003)(956004)(97736004)(25786009)(486006)(50466002)(476003)(2616005)(5660300001)(6666003)(76176011)(11346002)(446003)(52116002)(23676004)(7696005)(478600001)(21086003)(6916009)(118296001)(6116002)(3846002)(106356001)(66066001)(8936002)(8676002)(105586002)(2361001)(86362001)(316002)(53936002)(2351001)(4326008)(68736007)(305945005)(81166006)(7736002)(81156014)(2906002)(55016002)(36756003)(47776003)(50226002)(2870700001)(969003)(989001)(999001)(1009001)(1019001); 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: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOmFRbG1ianhoQmtMMGtveDZLQjlncXRGa09T?= =?utf-8?B?cnNZa3NpUWNZcHNQOWNFSFBMQWgrOWNvZUx3cWIxTzZ2VzB6dUU5bTViYy9X?= =?utf-8?B?MGV6OEV3TCtJeWRUMERzSnkxWE4vejlPU05BVnpZeVQ4RlVqTGNjeGpCMVpX?= =?utf-8?B?T256MnFiU0RJeEkxTUdnbVRjemJSUXNwYlhTYWhtbXZTQmloRDRYSTNJcE9x?= =?utf-8?B?SEJCbzZtbXZQVXJvVnh5K1ROSTl3NGZoaHFuenlPdk1raThKM2RXTWM5QTJP?= =?utf-8?B?Qjl5OHVydk1rd1VyZGJrYmlFWXhENjZRa3FZa1JIeGIrK09uUU5PdWVYZEUv?= =?utf-8?B?WU96U2pqTlhCKy9Bd0RvTWE1NFNvdElFeFlUc25nK2pab1ZLc0xKZ1NtblM5?= =?utf-8?B?UTlPVUxoNHNIVTJTOHAxbU9DOU9uM3FjdHp0ckd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xlJ3nFxGAh9aTmpicQAtzREregIe7NN3fDs/LqljvrQiS59/5N6C33CeCLD6YgYYbiHO4xWqPmd/CyxUf3Ge2eq7B4zdkc06DOkjZb/rLAy2Oys965qigY2zCdW1Tn9D5jMWET5tGKH2kOFLyE26ObLwq28kGjTbPRY2lfORZjVbPmOSx7lr6ngXhknnENKDYI8idKfhUdliE4/Fbc9JN4FzEsHGIOautMXRJSHQOsfQTS0iQlh/LyQITVFBKBjIW5CvvYiHTN2Ac/+bUF9bol6ZRyupS0YtburJMIyHjvF9wg==; 5:ud4V2nAR5EumBSAqeFmcnLlfPMbD5KC1GtyvLfNLTQFlIkuwL4kNqZEt5rXjZwN8qseVXWy5feN19RwnU9ihD5GiVkTWzqS1S0+qFxhxQcNfxPGVg9c1YmJJy8IPhjZvovqo7ozJ09Z8MZXpbhp1uHbv1iGo6a7mhOWS2E1EUx4=; 24:Ld/DctuV+wnT9nt6VdakOUQ3xomiTN/nDroanpQENUUG8jwwH6n5S3GKUGugfjvw+IreVV9oWqBb7SQdfFNnPjy44WtQkWV0YgBKzRxZpWY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:4Mgi/BYLbBaUlHVRgALp6X31DUxIPuvxQLzFoE1VVj09nynUCAu5gNvQmiZ6Akn5eT6G+HXUj13GnYzyKvU+JvBM42QZutAye0XWXpt8jUdep3rcONRIfcIzizX68RdHNmVDi5gO2327eaDwyUM959qevVKGVI+tHl8/U0GVYchWHgt6MFNz3HA6bNOoAoaXfTmXnkv9vwCMgOLoKK0jjk3OEEyBPrcXUFq+/iMOMh89Qbn3IXhFmfGXhhfN4KdX X-MS-Office365-Filtering-Correlation-Id: 8b09284c-9c3e-4de2-a71a-08d5b317857d X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:34.2548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b09284c-9c3e-4de2-a71a-08d5b317857d 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 02/33] net/mlx5: fix flow creation with a single target queue 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:36 -0000 From: NĂ©lio Laranjeiro [ upstream commit c55a1667950f43be515c976269749a2a00c7268d ] Adding a pattern targeting a single queues wrongly behaves as it is an RSS request, ending by creating several Verbs flows rules to match the RSS configuration. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_flow.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 26002c4b9f..bf718f8947 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -912,6 +912,16 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser) unsigned int i; (void)priv; + /* Remove any other flow not matching the pattern. */ + if (parser->queues_n == 1) { + for (i = 0; i != hash_rxq_init_n; ++i) { + if (i == HASH_RXQ_ETH) + continue; + rte_free(parser->queue[i].ibv_attr); + parser->queue[i].ibv_attr = NULL; + } + return; + } if (parser->layer == HASH_RXQ_ETH) { goto fill; } else { @@ -1758,6 +1768,7 @@ priv_flow_create_action_queue(struct priv *priv, { int err = 0; unsigned int i; + unsigned int flows_n = 0; assert(priv->pd); assert(priv->ctx); @@ -1782,11 +1793,17 @@ priv_flow_create_action_queue(struct priv *priv, err = ENOMEM; goto error; } + ++flows_n; DEBUG("%p type %d QP %p ibv_flow %p", (void *)flow, i, (void *)flow->frxq[i].hrxq, (void *)flow->frxq[i].ibv_flow); } + if (!flows_n) { + rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, + NULL, "internal error in flow creation"); + goto error; + } for (i = 0; i != parser->queues_n; ++i) { struct mlx5_rxq_data *q = (*priv->rxqs)[parser->queues[i]]; -- 2.12.0