From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10082.outbound.protection.outlook.com [40.107.1.82]) by dpdk.org (Postfix) with ESMTP id B532D1BA03 for ; Thu, 26 Oct 2017 19:42:13 +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=lVROpd+9TIQSnW+H+xJ8FxXeeI3Z1NF74PTk8GMh+Bs=; b=wHvbtME/OVZ2MG86IpKn3GBVJ8STUuc2pxZbKxr5f/2lUPyhp+3Ld1E4Hdx+kwdi7pB8XPEPReAADEWrbTzhn2qjWE+daW4NCvd7EcGa/pdJLX8mefm2r6qoHaUA5arwX6lt7VnpVsQCZc518X+QGc1epzztpPsp2SPJVDxVpDI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3152.eurprd05.prod.outlook.com (2603:10a6:802:1b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Thu, 26 Oct 2017 17:42:10 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org Date: Thu, 26 Oct 2017 20:41:57 +0300 Message-Id: <20171026174157.25384-1-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0602CA0019.eurprd06.prod.outlook.com (2603:10a6:203:a3::29) To VI1PR05MB3152.eurprd05.prod.outlook.com (2603:10a6:802:1b::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4895a42-010f-440a-cfbd-08d51c98e2f3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:VI1PR05MB3152; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3152; 3:NaO8hMC7L9lJd622OHsqhhegWV9ovVxU/weLDw54oqOI8ANR9j1CePEAShpjtVfq+GvvJseDKqxCFm5gPW52/9hXJq/iQqe6zCi3J366p0rjO7VAFjuUU3u8o10ZpBa5bX5c8G/BvcpeK6ogzmDJocOdbXRqiWVMMazXgTzk3rb9wMtEsBNum6geLVKLlRrb6jK6sCPPYNsa0uRBsoRovlvOxm3iRWe0yKcE0A30uBNVk/uXmzBTJFWpICgIFlvG; 25:L6C7aATd5ORaU/T3oWhKgOxOPPrq58llzHxn1BaV/nfq+wFdKuzQwWxu5tTHDKuq7jKmg+iIJR+0AHui8Z+VPomDyVvUPIAhmYgJsF81jVPUHOLzcWokojiCOuNywTiyo+tsAywHad+XISOhOICOiavn1M3F/gEpPJ6olEKyzsM9xvyJu7m4O+LIMqW/Vr8Qbj+kFH02AxHgMWD1hmfGwHFUGolhf7SZUN9qiQir6YTyU73ZAsIzuvd5LFBYQv4eQXQFMIv5BugPONwXZKpHX/2wz3XUsiFE4QAXgX+iXLcYrQiX8QEu4fjowCfRrvOG7zImkpdv4/bcCUAGZLqGcA==; 31:5qqYCne1ZCbyizc5dBPZtMnTqsjxHMAwHrWwr/6UhUdKstN14jXcSpRM60tcX918+ikVJmmDa73YJfbqVA9CeJyaeZ9+WOOW64oRGGbqBLmBTmMyvgjz/2FBTdlSMNnJfg4k564EHlNI+FezrM80Wos768oO3jECYice+wNIzxs04HXgHfkY12EJBstYHi23b7e/q15CDsocZ4ohX3YCpHfR5BLIgo/NsIa+Sphf1CQ= X-MS-TrafficTypeDiagnostic: VI1PR05MB3152: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3152; 20:VZwIwOPPh1qGifLWSoijY7VkhTxZfc5NGcTy4bKWT0oN2gD9etodREiIxbEuy6XiYZsmI5ZWUYyvhwZpejqtB4WW5mVkx5UP29j229yJlJyGwiz/eJUa8Vzb20BUHMem0qhRhiPNzIq76SAckPQ/m2CObXMt+rg9UvQ+etycrb8toaQTBIrsWU1+SAU6d3km0NeorNV3lshTT2xiH751vkMV9JuGomGT85Yz+rBu7SRQ6iSxFmHPA31YcFCke6AWPL/4uHQdEvTdov86QDxzi6b7LIJKREEuRGphMctIXJDLi73JYESZFZ2FJX+CifbZG9izu7HFwNquKn/nSlQZnreTj7NiWTzH9XVehoenrDAcQtt695FvAHB0c+A/6esF8+u2FCxFqkYzS2mOD2J+zbxm7GFEPWcbDdFCfSYXQZ9NMztsO68B7sZtoqwgBkE1CrIhoiEgEvvRgdsvNidGBa8Zr0HM3agVcfZ/XYo6ezOlwb5wxnJDtWe2lfuMJRUb; 4:JM484z8DgSviqmkQQr1fwGto098LxFvvVdxmg9gzPvB5ibLJbDfWGoexZSpJYHFCbG0PHzIGdpT3o/HnOtEF5tlWcfMNW7cNb8SEhciQ9n7S6qD93tsBvVMaEDoNrA9Y7WcTapGQHOMKHy51pDVLv4bA2Dv62p786obeR+ExJws85668H2hAuVNlLpsYSGMw0knwvRQqWqqN751I2IeungwzL6zI09pIwWHA2PmaWwe7F5Cad3jcVg0s7oL2gheJ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(3231020)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3152; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3152; X-Forefront-PRVS: 04724A515E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(189002)(199003)(97736004)(53936002)(7736002)(305945005)(81156014)(55016002)(4326008)(316002)(50226002)(8936002)(25786009)(16586007)(48376002)(2906002)(66066001)(8676002)(50986999)(50466002)(478600001)(101416001)(47776003)(106356001)(105586002)(81166006)(69596002)(86362001)(5660300001)(68736007)(6666003)(33646002)(21086003)(3846002)(1076002)(189998001)(36756003)(16526018)(6116002)(5003940100001)(33026002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3152; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3152; 23:HcG+Z/LsjpeizTGBuwfXhN2xZtJirKO1dWlYcMlPd?= =?us-ascii?Q?UY3ETpwgNXNzvb+gt8boqMF+3mAw5jDAUvgkRT+0ETGaTzBZZp1CfdseCUgB?= =?us-ascii?Q?GFlkuIOAUwaQjSp4f+ngle9rxZmJO9/hbdxCse4ALPFpJFgSN3QBwpQ7wMQ6?= =?us-ascii?Q?/J7jEq0noM1iLxUM82izFgOq9IuxpcBNd6UeWXC9ho2yJaJfWf+gy2SzqpAF?= =?us-ascii?Q?ElLZIp0OAwqIKw059X5r3Ui7IrkE5GW9UihQcrUA6ypCDPyxQrQEV/ANuqli?= =?us-ascii?Q?yy52gEjPZH5JH1NoOY97SM+lQbluZNHYxqSBxIt2YJ55myPcqJn3rYcyEp8S?= =?us-ascii?Q?4JclUJUfCO15usBOjbreVVRODGfoWQCLA5uL/fO7YhGV3WEJvjybhWbCJKU8?= =?us-ascii?Q?a5iZoNcrLpov+hN7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kyUi07tWgJ75rq6OhlzV0QweSXpy8i45TxWk3JapSmNMPzq+g9gmwfe3nzmKNtvbfi1UB0s97mfxAxg9ntVQsskwvRGQsNAWt1uY9+SQ0Vt70mCIgQd0TrgIToBIlhCIpZHQ==; 5:bsMo1jQWU/PkPaNLa6qE4Aun4gvi7n+YuovsqJ+TApmwlrtHqUtKJIun0fGoVRWwXdwC6ie1tGBku+/+3sgHp1GnhExzmf4HQSOU1fyDP5S0tHdlE0QgVKVQQVpX64MQhvlBubbvepuaa0SM8dBfpw==; 24:STwPP8A9IAUHTTgrLlvpIvunEEb99KeuKGomWGS81mJ5MySvW7uQXzkJFtA44G8K+GRYfzdepgMncKuLwq+Ns+MhXOmz0qZiEsuG+e013Tk=; 7:m6FT8hKoTNUx4b7548rQjrPvK3bJ4JXYEiE07RDAyB4tHGsQcH66vc7SXBwqOYMx7GpKApzfsJjfU65Kmd9Y7sYKg0eJWB2s04cVnG1z0xEXQj7LAzpl+Uv9+pTGFY6udNKAN24Lht2TvNXhgr0c5IgkvbSGmQPqbOevtqi6khDSSwmD5aK1/h1DiiVflfQXIGguRUgEU2xXnHtvbA/9b6q9r2MVrzelBHa/HvO1348= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2017 17:42:10.5404 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4895a42-010f-440a-cfbd-08d51c98e2f3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3152 Subject: [dpdk-dev] [PATCH] net/mlx5: fix RSS action for tunneled packets 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, 26 Oct 2017 17:42:14 -0000 The flow engine in mlx5 searches for the most specific layer in the pattern in order to set the flow rule priority properly. Since the RSS can be currently performed only for the outer headers, avoid updating the layer for the inner headers. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Cc: nelio.laranjeiro@6wind.com Signed-off-by: Shahaf Shuler --- drivers/net/mlx5/mlx5_flow.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f392f1f65..020f06395 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1291,7 +1291,9 @@ mlx5_flow_create_eth(const struct rte_flow_item *item, .size = eth_size, }; - parser->layer = HASH_RXQ_ETH; + /* Don't update layer for the inner pattern. */ + if (!parser->inner) + parser->layer = HASH_RXQ_ETH; if (spec) { unsigned int i; @@ -1386,7 +1388,9 @@ mlx5_flow_create_ipv4(const struct rte_flow_item *item, .size = ipv4_size, }; - parser->layer = HASH_RXQ_IPV4; + /* Don't update layer for the inner pattern. */ + if (!parser->inner) + parser->layer = HASH_RXQ_IPV4; if (spec) { if (!mask) mask = default_mask; @@ -1436,7 +1440,9 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item, .size = ipv6_size, }; - parser->layer = HASH_RXQ_IPV6; + /* Don't update layer for the inner pattern. */ + if (!parser->inner) + parser->layer = HASH_RXQ_IPV6; if (spec) { unsigned int i; @@ -1490,10 +1496,13 @@ mlx5_flow_create_udp(const struct rte_flow_item *item, .size = udp_size, }; - if (parser->layer == HASH_RXQ_IPV4) - parser->layer = HASH_RXQ_UDPV4; - else - parser->layer = HASH_RXQ_UDPV6; + /* Don't update layer for the inner pattern. */ + if (!parser->inner) { + if (parser->layer == HASH_RXQ_IPV4) + parser->layer = HASH_RXQ_UDPV4; + else + parser->layer = HASH_RXQ_UDPV6; + } if (spec) { if (!mask) mask = default_mask; @@ -1533,10 +1542,13 @@ mlx5_flow_create_tcp(const struct rte_flow_item *item, .size = tcp_size, }; - if (parser->layer == HASH_RXQ_IPV4) - parser->layer = HASH_RXQ_TCPV4; - else - parser->layer = HASH_RXQ_TCPV6; + /* Don't update layer for the inner pattern. */ + if (!parser->inner) { + if (parser->layer == HASH_RXQ_IPV4) + parser->layer = HASH_RXQ_TCPV4; + else + parser->layer = HASH_RXQ_TCPV6; + } if (spec) { if (!mask) mask = default_mask; -- 2.12.0