From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0089.outbound.protection.outlook.com [104.47.0.89]) by dpdk.org (Postfix) with ESMTP id 679EB28F3; Wed, 23 May 2018 12:01:41 +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:X-MS-Exchange-SenderADCheck; bh=/bVXQo1XgZPHTdc/rC0udbs7jAK2ef7JbI6c2YwPeIE=; b=cT9JhvwFj/VV+pSjw6ZP759m6A7/bPvvR5CNPplfgHJt0axbpgYd43zLLR/ATLA6lhgEN12qqGrYejh+52HUT+0LUXTuSUcHxs4qjqGZDPjEz2iOthFvTFmJvlHszFMlUYKl6PJQKPJcMbHW+sn6pYxt/AAH3FCEb6chyBQm79M= Received: from minint-98vp2qg (73.222.116.174) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Wed, 23 May 2018 10:01:36 +0000 Date: Wed, 23 May 2018 03:01:22 -0700 From: Yongseok Koh To: Matan Azrad Cc: Shahaf Shuler , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio?= Laranjeiro , "dev@dpdk.org" , "stable@dpdk.org" Message-ID: <20180523100116.GA11530@minint-98vp2qg> References: <20180523015157.35716-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [73.222.116.174] X-ClientProxiedBy: CO2PR04CA0153.namprd04.prod.outlook.com (2603:10b6:104::31) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:5EPetAl9H37oa5FRLhqPPT5ydixR4CnJ8andowyyBuHAauWK+q/wPxzu+AYDpV8dWbKH815G2aFV4OMqHveThF6kp1C71rB/KkVljAMZDopo5cMlqpHLl+N1gRdjwvpSZGoZ+T+oOQUz6RyrDdhmbXHsW7cG0R5vRecxpkq16e49faiC9BA5Z9rk9VJfF5ym/LBipgtsxIoqyB110Dw1pnYGy1rI4FJN0Zlq51zwCi6lPjQ/aIhmYPX1tESeH9jA; 25:mrssMKzXTc9rITaLMG+xqGkawOY0ULvhvoMs+6NZ9h8YMa4h1C8Fegy+fJiHH3rfnJRZYOXeinhrK6X5KJcHUEubPzoluTQrfjNBbGv8157EIJqfd3x608hVHWT54utqSfEc+fc6QSPV3tbWFxHZRHKb3Hq5LyqfrV6ZU0vpKrVM1661l2lbgqVGPpnTMXxBPqwB927NqhmAISD/qgiC7hOFH4f/mEkklpUVnqtEdT6J3J5YsxoLddq7ZiBUUdHw8JCNwrsXghbUwXwMdR7+am4XRuziu1v9RUWxLvKjDXRZvXuo7PBCGAOMO62ZG6jWrcrP0rTyM4Lk2i1rn3xlkA==; 31:OJ9AIO0ZVd0XjBVYvHyu4VViKTKRvkAbJiYojlfesbyfUrrnZMcAtdMAV7HnsnvStFblAegg37bUoIpKX2ODwPZSZcqrUqm8PLa17UsmCiQcxyAvQgIOa8I8sMqqpdLeEd/GZ+IybLVZ5mMDm0IZsnPmekI/XOuhN8dhynKn5AscVS/r1zHqkxmwyU+3WCckhJ+csP1v1ZrA1mhacLcyXnwUNEx1XS4VhnbMOWjojMI= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:m2QxlNI4Lmi68jCX6riLEawsMGe3TJE/6yzDl1mTmrR3bhFHVYOIpYuuxx4R8MPcMg77nr/ywpY+JZNbGVrOKHzRkmHyyHj3RSDspvOOeE2H44Wbs1wl/+vjolEX0Vwx4iTsYpzuumOHQM6KRyOie1GCN8UoFAAL3TZIrj3nZMRGrFEw55w3E/yvGqePOw0QaKcn3cLdeiVWDml1xAm/a2udtBpnPWW+AjAKr8Vsg6LTjIp3PS/E5kDqjEhA+b4mztiEYnJp916hgLgldTattg7yY98KL5viTUZRlgA5r/6Uer3nJgdYtxy1OKTUgvK0IrsL6zeB3vjGK3BDlejSdoo13TC329RR6WUXtDs+c+gb1QHnEQxXGRblHqpdNJ9N39ugLNWPTTXEiqTWr5nGLm/Dz2TssDJ3/LNyB15HLVwSRpt9l04e/QlsA5fIKjB4SS45SB0XbVq3a/PBy9A+QrXBLQxQgPOTViiwE9ny4oJZKBHPa2qTg9RTjWdfqdIN; 4:1ZeSZjLTaHigHgAuleiSaxrG/I0kKFmFa5UtptV0tl8VMWov6BMyxjoVOw/4SgoPz+WwcP8JMUF7JfumQYen+wA10c46IeG8oDM44DQLTVngnu0Wf7sRktDiDNBAyG8/FjySrsZZuHLwWvAugSGIcirTV3mCTvaM8jOAIaJjxCpUpQazqkXqne4z9YNBLWhZdZNlAZl1kdz0ctXhwEnd9lGCTycxRl2bVGePd3DS97VZtXmg2FnDT8Ii1y/8hVFjnwuZ9cUAV5P1r0ktWDOoEg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 06818431B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(376002)(366004)(346002)(396003)(189003)(199004)(51444003)(47776003)(66066001)(33716001)(486006)(956004)(478600001)(476003)(2906002)(50466002)(11346002)(106356001)(8936002)(105586002)(446003)(97736004)(25786009)(4326008)(5660300001)(54906003)(9686003)(7736002)(76176011)(86362001)(575784001)(55016002)(81156014)(8676002)(16586007)(58126008)(305945005)(81166006)(6862004)(68736007)(229853002)(33656002)(16526019)(53936002)(316002)(1076002)(6636002)(23726003)(6246003)(3846002)(33896004)(52116002)(6116002)(6666003)(6496006)(386003)(26005)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:minint-98vp2qg; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:3; A:3; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2036; 23:AibnOmzLBtCqBJF6ubSnm/hyqkskcAYhmr7/NtY?= =?us-ascii?Q?+ygpCVpCnOW56kFTxVXXArZ0HpcGbpMLKTbtogqKvQz6N4P34sy0cc/M7pJm?= =?us-ascii?Q?3hPLEBhEmElfrdVeETW040VkYbkOQcjM+A9trsgVClb5yogAFaRyznPyVRKI?= =?us-ascii?Q?Xamza0C6cJir2ngz/vWbkjpCs7+6D9KymtpED74rni5vj1GauudW64AAQrlD?= =?us-ascii?Q?2qhN8cgobZqNjW2olB/UDVKHavKKSxsFyARi89TVMUhxzw+Y4sdQwj9iOBj/?= =?us-ascii?Q?eSUPoVtlez/d8EQINpEQnuUKlQC1pSiLK+PELg7LFMfbeplxP8Eu3mFrXIo2?= =?us-ascii?Q?UOOHAPu2SK8Y1cMLfq8OrXeAMOZ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eebUaQ5tltXa63ojoyqqI9IYQ9Lb35TgNaSDlyTkQeAj3zB/QkHBrI2a22HLZ62X/5SDaEqIWYvRi9v3AA03dTSNgsOpY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 7:6hRpROh/f0N1R8q4B+AMt4qtwE+cDZpiWUtCP9EYZtGHfIQzuEmwVBoVQ/yW5SnQW4QJ8WlkWXJuksr556lEg2T2Qg6ADZ4pq+2HsvYA7lvHOCqLTw6ri/qCqHiZRN4DVWWYlhdz/8SWqGTjMR/EY+Pw7b1C6ibBy+vYnvULDdqq8K3obBW6fTSkeON5f2jImigHhfRoGLlLrdKWd2cjdQ096XHIj+FSYoB+bOfjnz7+vQZsve8dyUwYWjIyLLb+ X-MS-Office365-Filtering-Correlation-Id: bb0c4cb2-3b2d-4db7-ebcb-08d5c0942cf3 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2018 10:01:36.8925 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb0c4cb2-3b2d-4db7-ebcb-08d5c0942cf3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix GRE flow rule 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: Wed, 23 May 2018 10:01:41 -0000 On Tue, May 22, 2018 at 10:36:43PM -0700, Matan Azrad wrote: > Hi Yongseok > > From: Yongseok Koh > > Creating a flow having pattern from the middle of a packet is allowed. For > > example, > > > > testpmd> flow create 0 ingress pattern vxlan vni is 20 / end actions ... > > > > Device can parse GRE header but without proper support from library and > > firmware (HAVE_IBV_DEVICE_MPLS_SUPPORT), a field in GRE header can't be > > specified when creating a rule. As a result, the following rule will be > > interpreted as a wildcard rule, which always matches any packet. > > > > testpmd> flow create 0 ingress pattern gre / end actions ... > > Fixes: 96c6c65a10d2 ("net/mlx5: support GRE tunnel flow") > > Fixes: 1f106da2bf7b ("net/mlx5: support MPLS-in-GRE and MPLS-in-UDP") > > Cc: stable@dpdk.org > > > > Signed-off-by: Yongseok Koh > > --- > > drivers/net/mlx5/mlx5_flow.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index > > 994be05be..526fe6b0e 100644 > > --- a/drivers/net/mlx5/mlx5_flow.c > > +++ b/drivers/net/mlx5/mlx5_flow.c > > @@ -330,9 +330,11 @@ static const enum rte_flow_action_type > > valid_actions[] = { static const struct mlx5_flow_items mlx5_flow_items[] = { > > [RTE_FLOW_ITEM_TYPE_END] = { > > .items = ITEMS(RTE_FLOW_ITEM_TYPE_ETH, > > +#ifdef HAVE_IBV_DEVICE_MPLS_SUPPORT > > The GRE item was here even before the MPLSoGRE support Yes, this bug has existed before adding MPLSoGRE support. > so I think that this is not the correct fix and even that it can hurt the > support of GRE for the current customers use it. How can it hurt? Please clarify. > Looks like you must specify at least 1 spec in the GRE to apply it correctly > as you did for VXLAN, Can you try empty vxlan and fully gre (with protocol > field)? That's exactly the reason why I'm taking this out. If you look at the code, it doesn't even set any field for GRE if HAVE_IBV_DEVICE_MPLS_SUPPORT isn't supported. Thus, it is considered as a wildcard (all-matching) rule. But if it has HAVE_IBV_DEVICE_MPLS_SUPPORT, such pattern can be allowed. Having pattern 'vxlan' without vni isn't allowed by mlx5 PMD because zero VNI is never accepted. Thanks, Yongseok > > + RTE_FLOW_ITEM_TYPE_GRE, > > +#endif > > RTE_FLOW_ITEM_TYPE_VXLAN, > > - RTE_FLOW_ITEM_TYPE_VXLAN_GPE, > > - RTE_FLOW_ITEM_TYPE_GRE), > > + RTE_FLOW_ITEM_TYPE_VXLAN_GPE), > > }, > > [RTE_FLOW_ITEM_TYPE_ETH] = { > > .items = ITEMS(RTE_FLOW_ITEM_TYPE_VLAN, > > >