From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0066.outbound.protection.outlook.com [104.47.0.66]) by dpdk.org (Postfix) with ESMTP id 32CF623A for ; Sun, 6 May 2018 08:06:59 +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=/ejt9o4luIarubJ2Njk1fhCR3YfpHJkySirPZOnZY90=; b=mLH6q4JazVoUe/p+vUrN0f1ZeY54jDPG9vsGtizun4NS/ZPowKWSgC1wJOUab7ywBpjzmMer4jXH6LnJafUbxIhRp+Xd1d/dCoA62HTqgoOyuw7GlMTpARfsv+r6rLftA0crICjxvzHS+bvpevANWvfaePvTTGE/H30eHJ4TYZU= 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:57 +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:56 +0300 Message-Id: <54a11e10b6b3e8c23fb0be5fec4adcd6ea3de339.1525586526.git.shahafs@mellanox.com> 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:eZUDDOYMGo4EI6xbwswgoIiIVVT4+cRqQ7W1tmgYfgFOdqyyczAzXfMAqqw+3UWpYUQHfCBjmAybPs2t0gDBEcCdos+gGQ8zWVFEjwHWGiIZc+argMpEEu/RAofIEydMxrkKCCb1UFiggiZpv40/78yb7LL3vMKroFZzMrZe00Kll/bnJVZezlJuRaj1aty5Pgc2YCr7Ibl8jvWRTFcQQ4kQR5X+Z4jpbmrwgzxHCezFz3xuP5Wyj5yRKJuJ4eMc; 25:BPwVEmTk5rpxzkGJHRL0cZDBz523e/zK4wCPBTWikU3XggL3uGMC61OrNJIsRLW7KJl6mcLWC9tBUKsOV3frNno8/TW+IIqcog71OyBRenUZCmrFl6bUjJDQvqssaFDXvu2qHFCWTHZfW+pGxpe9E+yzgp1OqLsHLiuA8mMNKG8eKILAJexSz+oDzdTNwZAmGPAgM+mIJ9lfwsUDrRZuaWvZ8iPTyq1McvttGdY8ftYZ3oZ3WEevAh4iFx5J0NQq9oOfG68xE6TlI69p+rPKdsAWHGgNrgqYiirCbBjP9w+LZwyo6nj0Za8CqyDItvKjQI90jS6QwVg+JH6WqX9QUg==; 31:M9OCZOP3fZzoKcklpwBiH0s5dC5zWV+OUKrKcsMyBF9CMSOpj8Eq6iVh0DtxR9DTdgcVdFXu85wqc7G+W/QEUOAd7umBbhlXUhCSVQuP9DL55/fDqnE7tRy6vTvtIKmEjFtFczII12ndLh/4O/0A28Bk+Bqxsy8U+RmlwpIxFb7B1JpIAxJiJgoHavzWmOmk++MCt9wv72fyOOK9wyrkkPZ1fxF89nL26cOtHZGeiD0= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:WqJ9PbvuGxPJwW3De7nVRNvViQ9fgojlUn6rOKbSWmV3DjHmW2EZ/HRjI/F06fSSUYCsA2mfWeVRX1F6Do6PaFIJF4mb+5jnVWRRX2HB6XmC2FztWcudUyUeiuc/+tknNmL9AgCLjBAqDli3wvvHYfyzJrkE9FKzQvmHjtw02Lr9loxrYb1Zo/XFg1OKUvmmT9yM3QBdasMp/EocQBS1djm9hkqaU6v1hsk/vuZDs5Pkua+yGk8WjsEdwGqphE9+1uTU/9crYb/ecNW/FE2g7ntuKjL7Bb9CDB8Y/xq5WX3ArUYM3menTqfQcuvjbEFughU3FtnrgO7w9RYl4CcQv5DmrI3xM1JB/3UiIOvJnkksrU3DbFviRqwsIIaGnvFSheSwVYj34J2piN3ng6/+LT7Ibg0mAoi6Qk9zKd3KJRZtSa3kOCg7b1Fby1/y8kqLm/Ny/aT4MvDa1/Rv1iZGvqLSWMZWUt6kLeVs4f/er625J1pmJPSeT0DDtTYAYSf0; 4:oq6QCEengQhmjM8Ium0mGJ528gA66ONGWmtB8VIeDVANg2d1396NrDG1oukYGnAlaD6+m8kExgPePURdfgCwvTRdMtwJxZC3ozf5OVEiAbT7ToQtjGs5wp6DPirBoUla8pz+C5eu1AVSB+DwY4TDhgr19L/fkBdND74QoeAtwowhDnaJeB1hIGRswd0KKGUTIKU+Bu+DC9rL2h1rK7o12wTAO0qIZ+6dftOFy/m7pHAiDUtCvzZThfp9qD1XHnnF5uyc07B3K88tQS/gdfJh+Q== 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)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(8936002)(316002)(2351001)(53936002)(86362001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(2870700001)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(69596002)(16526019)(26005)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(23676004)(6916009)(21086003)(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: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOm84MjZBQm85dWJFR3htaDZtYkoyTnpMM3M4?= =?utf-8?B?SlRNc1RYSkVmYThTMDZTQmJzNC9lSzFQcklTN1NrOGMvWFYvTW1DSVgwd0Fn?= =?utf-8?B?KzZxRVRpN3VVTkZmRExkdzRjY25VS3dlVkFKR1F2TFFiU2hJZkVqZ3Z2OGpM?= =?utf-8?B?d0grcnNHNnZ4bFNCWWgxbXg1QjhVOUllV3lMVzU3WlplcGJFTUhjMGxBejRN?= =?utf-8?B?VHJSSkNFMmFzUGRVaTRRZ2FpTmM1SXUxdm01WU0xVFhDWmhPZkNSUnRlY2xu?= =?utf-8?B?b3M5QW9Jdmo3c2dkbmRxWGhZYmtvbEpWQnRYWXUxTlE5Rlp6S0MzYmFtd2ll?= =?utf-8?B?Zkl5WWZaank0TWpxT0pjZXFINTdOenArVUhDTi9kSHlBWDlxQzY1TTJDTlh4?= =?utf-8?B?bEFqVEFLOHZNSn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PUvImikQ53JbeKHY19x8pgYbd6/gUdLyxWqDfYuY18BCFPCRPE3dDtOgNwrESCB0hicAw+O7ZTBiOsYA==; 5:vL6htVM9xzsfMiSwEhzcClLL1wv3vfrrYF8nzRafvH6Y+s2zqqpJYI9eQZIqpxNSYo4/uN6c4gWVfwWUqDhSKFzYyw7rR4zLNRxH2lGCsDDmsz6ZefbnUgNUjgab+3u6xS775vlTZv9yzk6DiKdrf7kOCkcw9ZfcunD0kxki0pw=; 24:5FKoc78h+uhmVEuFqdLs5uNWsRHYWoqDjBasfjIzpeJ75XuF8J0EKHOymjfG81xPpTRMgRdE/UOdEcEBLk3qnlfmERgyYslI0HmSqFiA5Bg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:jx37SPuoGPCuXu6vNY1k+x+pe9BRENYeTW16boP0lT1TesiTL/FTTUmVhcP4WGnKDAUaAKqMphrrZWoUUR8O1AFGW612H+IXNsNzLjDDSVZE7LZIG/GNiG6gHkl1caE8Xo797xjRhMxpD0oO+tTOOgecvd5P1iZsTyB2ISv63LWS77idUg60Wwj1eM+snnz2RMc3aUi6zFHy1XOLgVgrn4UteGN1KyWTuu8elVMRGXt1bPgp+xhMedmKebtmCZ9d X-MS-Office365-Filtering-Correlation-Id: e2486293-ec35-451f-1f44-08d5b317933f X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:57.3487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2486293-ec35-451f-1f44-08d5b317933f 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 27/33] net/mlx5: split L3/L4 in flow director 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:59 -0000 From: NĂ©lio Laranjeiro [ backported from upstream commit ca42b8a8b74956d179a25c94ccb7f5a516013da0 ] This will help to bring back the mask handler which was removed when this feature was rewritten on top of rte_flow. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_flow.c | 122 +++++++++++++------------------------- 1 file changed, 42 insertions(+), 80 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 48e9451313..6a7d578cf1 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2650,53 +2650,10 @@ mlx5_fdir_filter_convert(struct rte_eth_dev *dev, return -rte_errno; } attributes->queue.index = fdir_filter->action.rx_queue; + /* Handle L3. */ switch (fdir_filter->input.flow_type) { case RTE_ETH_FLOW_NONFRAG_IPV4_UDP: - attributes->l3.ipv4.hdr = (struct ipv4_hdr){ - .src_addr = input->flow.udp4_flow.ip.src_ip, - .dst_addr = input->flow.udp4_flow.ip.dst_ip, - .time_to_live = input->flow.udp4_flow.ip.ttl, - .type_of_service = input->flow.udp4_flow.ip.tos, - .next_proto_id = input->flow.udp4_flow.ip.proto, - }; - attributes->l4.udp.hdr = (struct udp_hdr){ - .src_port = input->flow.udp4_flow.src_port, - .dst_port = input->flow.udp4_flow.dst_port, - }; - attributes->items[1] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_IPV4, - .spec = &attributes->l3, - .mask = &attributes->l3, - }; - attributes->items[2] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_UDP, - .spec = &attributes->l4, - .mask = &attributes->l4, - }; - break; case RTE_ETH_FLOW_NONFRAG_IPV4_TCP: - attributes->l3.ipv4.hdr = (struct ipv4_hdr){ - .src_addr = input->flow.tcp4_flow.ip.src_ip, - .dst_addr = input->flow.tcp4_flow.ip.dst_ip, - .time_to_live = input->flow.tcp4_flow.ip.ttl, - .type_of_service = input->flow.tcp4_flow.ip.tos, - .next_proto_id = input->flow.tcp4_flow.ip.proto, - }; - attributes->l4.tcp.hdr = (struct tcp_hdr){ - .src_port = input->flow.tcp4_flow.src_port, - .dst_port = input->flow.tcp4_flow.dst_port, - }; - attributes->items[1] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_IPV4, - .spec = &attributes->l3, - .mask = &attributes->l3, - }; - attributes->items[2] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_TCP, - .spec = &attributes->l4, - .mask = &attributes->l4, - }; - break; case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER: attributes->l3.ipv4.hdr = (struct ipv4_hdr){ .src_addr = input->flow.ip4_flow.src_ip, @@ -2712,73 +2669,78 @@ mlx5_fdir_filter_convert(struct rte_eth_dev *dev, }; break; case RTE_ETH_FLOW_NONFRAG_IPV6_UDP: + case RTE_ETH_FLOW_NONFRAG_IPV6_TCP: + case RTE_ETH_FLOW_NONFRAG_IPV6_OTHER: attributes->l3.ipv6.hdr = (struct ipv6_hdr){ .hop_limits = input->flow.udp6_flow.ip.hop_limits, .proto = input->flow.udp6_flow.ip.proto, }; memcpy(attributes->l3.ipv6.hdr.src_addr, - input->flow.udp6_flow.ip.src_ip, + input->flow.ipv6_flow.src_ip, RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); memcpy(attributes->l3.ipv6.hdr.dst_addr, - input->flow.udp6_flow.ip.dst_ip, + input->flow.ipv6_flow.dst_ip, RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); - attributes->l4.udp.hdr = (struct udp_hdr){ - .src_port = input->flow.udp6_flow.src_port, - .dst_port = input->flow.udp6_flow.dst_port, - }; attributes->items[1] = (struct rte_flow_item){ .type = RTE_FLOW_ITEM_TYPE_IPV6, .spec = &attributes->l3, .mask = &attributes->l3, }; + break; + default: + DEBUG("port %u invalid flow type%d", + dev->data->port_id, fdir_filter->input.flow_type); + rte_errno = ENOTSUP; + return -rte_errno; + } + /* Handle L4. */ + switch (fdir_filter->input.flow_type) { + case RTE_ETH_FLOW_NONFRAG_IPV4_UDP: + attributes->l4.udp.hdr = (struct udp_hdr){ + .src_port = input->flow.udp4_flow.src_port, + .dst_port = input->flow.udp4_flow.dst_port, + }; attributes->items[2] = (struct rte_flow_item){ .type = RTE_FLOW_ITEM_TYPE_UDP, .spec = &attributes->l4, .mask = &attributes->l4, }; break; - case RTE_ETH_FLOW_NONFRAG_IPV6_TCP: - attributes->l3.ipv6.hdr = (struct ipv6_hdr){ - .hop_limits = input->flow.tcp6_flow.ip.hop_limits, - .proto = input->flow.tcp6_flow.ip.proto, + case RTE_ETH_FLOW_NONFRAG_IPV4_TCP: + attributes->l4.tcp.hdr = (struct tcp_hdr){ + .src_port = input->flow.tcp4_flow.src_port, + .dst_port = input->flow.tcp4_flow.dst_port, }; - memcpy(attributes->l3.ipv6.hdr.src_addr, - input->flow.tcp6_flow.ip.src_ip, - RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); - memcpy(attributes->l3.ipv6.hdr.dst_addr, - input->flow.tcp6_flow.ip.dst_ip, - RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); + attributes->items[2] = (struct rte_flow_item){ + .type = RTE_FLOW_ITEM_TYPE_TCP, + .spec = &attributes->l4, + .mask = &attributes->l4, + }; + break; + case RTE_ETH_FLOW_NONFRAG_IPV6_UDP: + attributes->l4.udp.hdr = (struct udp_hdr){ + .src_port = input->flow.udp6_flow.src_port, + .dst_port = input->flow.udp6_flow.dst_port, + }; + attributes->items[2] = (struct rte_flow_item){ + .type = RTE_FLOW_ITEM_TYPE_UDP, + .spec = &attributes->l4, + .mask = &attributes->l4, + }; + break; + case RTE_ETH_FLOW_NONFRAG_IPV6_TCP: attributes->l4.tcp.hdr = (struct tcp_hdr){ .src_port = input->flow.tcp6_flow.src_port, .dst_port = input->flow.tcp6_flow.dst_port, }; - attributes->items[1] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_IPV6, - .spec = &attributes->l3, - .mask = &attributes->l3, - }; attributes->items[2] = (struct rte_flow_item){ .type = RTE_FLOW_ITEM_TYPE_TCP, .spec = &attributes->l4, .mask = &attributes->l4, }; break; + case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER: case RTE_ETH_FLOW_NONFRAG_IPV6_OTHER: - attributes->l3.ipv6.hdr = (struct ipv6_hdr){ - .hop_limits = input->flow.ipv6_flow.hop_limits, - .proto = input->flow.ipv6_flow.proto, - }; - memcpy(attributes->l3.ipv6.hdr.src_addr, - input->flow.ipv6_flow.src_ip, - RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); - memcpy(attributes->l3.ipv6.hdr.dst_addr, - input->flow.ipv6_flow.dst_ip, - RTE_DIM(attributes->l3.ipv6.hdr.src_addr)); - attributes->items[1] = (struct rte_flow_item){ - .type = RTE_FLOW_ITEM_TYPE_IPV6, - .spec = &attributes->l3, - .mask = &attributes->l3, - }; break; default: ERROR("invalid flow type%d", fdir_filter->input.flow_type); -- 2.12.0