From patchwork Tue Jan 23 08:05:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?N=C3=A9lio_Laranjeiro?= X-Patchwork-Id: 34297 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 72383A491; Tue, 23 Jan 2018 09:05:25 +0100 (CET) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id CAED57260 for ; Tue, 23 Jan 2018 09:05:24 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id v123so21604165wmd.5 for ; Tue, 23 Jan 2018 00:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=E5xZZ04R2sEr0EwFYypycUTN30Zbjlhy0Zr+vrxoesA=; b=qj1sezD0fN+8Xc6BkakKqiR284rfmLd22d2knqZu1YAS8z8glVbqaV0fevfVd70uuj QJCiLt8WDE8FsGRmXE3Y5MBGq+gi60A6vNdSV/bGrIZp5aP7h0pXDMAYhLZwtZobSf95 mEmmkwV7J/BOh/vN0BsxFn1A+jm2xvEdD2VfQ9jR/QTwVYWJ3T2AY6wjP1jNFziPwswN Kpxh8se+eIwjsPqA90GFIIqvPiJjmed6LvQbJUaVWQ/kqqhE+7ZFu5pe0tWFWW2ZWg7k pYO9JjdGgmBhb4+uyU8bcvXFFQSUhOyTnwce9+dsrOeQKk50KB+8sGuoq/38I19ztqmb 8rdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E5xZZ04R2sEr0EwFYypycUTN30Zbjlhy0Zr+vrxoesA=; b=gqwJTQP5cxMpxRcRBRwMRDzFjPZ8d9Eu5DaZVG6X4rGB0qSU0sBHiIQaYUcb9rrldy dvEp8qhnUra5T1TW8pskdxLK7vU+KY7IbOxG6no5Ydra+lpPV8hiT+yjD4deoVUlCEzY xxxWnRMZA3C0RDqk4lF3NJ9I/LH3zihXnHaz4n7hthD7oqMbjMniCz+ir37CmRSIN1VW 1BJBTBzVSgxtyeobCBaJmtQFEF+JzXgEHoFZH2Wibw2hWFp0WfzsCllKNLNED7vio/Da vhoR4pRBfHD4H+8xL+hrOZCrAWv9fT83dXqP2Tzd8kWnFo6SVR29mWJkBnT2lda3KB3h Ie6A== X-Gm-Message-State: AKwxytc9bF2JafnKm6bxo7K/2v/zl86umNM9zdaacU+BtMJpBSw24gpl LFcgLtt9W0tjaMngiReDnDaGxwUaxg== X-Google-Smtp-Source: AH8x2260doBjuhnEssANET3gxDY8T6h19Pm+52Ab+tCbYXT1J1ktR0y1yr2WnrwiCpTrLOSPLhUPhA== X-Received: by 10.28.169.76 with SMTP id s73mr934622wme.122.1516694724275; Tue, 23 Jan 2018 00:05:24 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 39sm24642999wrz.93.2018.01.23.00.05.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 00:05:23 -0800 (PST) From: Nelio Laranjeiro To: dev@dpdk.org, Shahaf Shuler Cc: Adrien Mazarguil , stable@dpdk.org Date: Tue, 23 Jan 2018 09:05:08 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH 1/3] net/mlx5: fix flow director conversion 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Flow director must provide the same spec and mask to be sure to be validated. Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 13b6483ba..c56ef54cf 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2656,10 +2656,12 @@ priv_fdir_filter_convert(struct priv *priv, 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: @@ -2677,10 +2679,12 @@ priv_fdir_filter_convert(struct priv *priv, 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: @@ -2694,6 +2698,7 @@ priv_fdir_filter_convert(struct priv *priv, attributes->items[1] = (struct rte_flow_item){ .type = RTE_FLOW_ITEM_TYPE_IPV4, .spec = &attributes->l3, + .mask = &attributes->l3, }; break; case RTE_ETH_FLOW_NONFRAG_IPV6_UDP: @@ -2714,10 +2719,12 @@ priv_fdir_filter_convert(struct priv *priv, 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_UDP, .spec = &attributes->l4, + .mask = &attributes->l4, }; break; case RTE_ETH_FLOW_NONFRAG_IPV6_TCP: @@ -2738,10 +2745,12 @@ priv_fdir_filter_convert(struct priv *priv, 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_IPV6_OTHER: @@ -2758,6 +2767,7 @@ priv_fdir_filter_convert(struct priv *priv, attributes->items[1] = (struct rte_flow_item){ .type = RTE_FLOW_ITEM_TYPE_IPV6, .spec = &attributes->l3, + .mask = &attributes->l3, }; break; default: