From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) by dpdk.org (Postfix) with ESMTP id 9BC3B1B5B5; Sun, 5 Aug 2018 08:24:40 +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=ViSWSQ4rXuJycAPRHqmJddkQ51ccGpWPiP6Ci5wRx5k=; b=I2edWL1X0HyIxN9tRbhDGozZ+ZQuZem5ptQq/pUi2v8uvr5aFG0ZA/dNreM8Yx5gps+VTjdpDyn3SLH84P2aortE0cwMBRZDxBY1qPR5H3nQzBbrdC8SIEHWwACGruAXhAavi5/e5HENrir06Kae1VAs6FI1iRiDBMagywPpqWM= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.41.11) by AM0PR0502MB4002.eurprd05.prod.outlook.com (52.133.40.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Sun, 5 Aug 2018 06:24:39 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::9d98:d47f:5b50:1f49]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::9d98:d47f:5b50:1f49%2]) with mapi id 15.20.1017.018; Sun, 5 Aug 2018 06:24:39 +0000 From: Matan Azrad To: Yongseok Koh , Shahaf Shuler CC: "dev@dpdk.org" , Yongseok Koh , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: prohibit wildcard match for GRE protocol Thread-Index: AQHUKqMBbVknVSdGWEusZ9af8ZyWpqSwsPAw Date: Sun, 5 Aug 2018 06:24:39 +0000 Message-ID: References: <20180802205400.10316-1-yskoh@mellanox.com> In-Reply-To: <20180802205400.10316-1-yskoh@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR0502MB4002; 6:Km6ZtBcyDzihT6SGgRQ65rbaj22PL/WXD6OwtuGvP2gJMTWDoEbkZx+QaOLJ3k5JWhlDEjKI75271LOl+Nqlmx3Hfvf6p8bOnSJo+3Mory3c4tet1Yd3DD2Yep0bbM9qnA8wTHZnguDswjTpotcgow+uXhHB1R7scDoUdcZTK5gV9VxE0Qe51vtaIlymcUZv2QH1hu2df493nWguSRflnhmI9/3RZ1E8dqjKdSnWOL7Drr+FiR9lOXA/V4DNo4cnasrhE/kIcw/j5vrqiiCotuerGysxjYwX/qRu2fDawfVHmjzdZZ0NrnWfgX4F3aV2VJnHAKxr4tWYQHfo5JpucI5siqTmS6YCw4pq53WCnTdG8C5h6lQX5l7TOJTaubcnKw08rNx5zc283tqWWtbttCtRfPG/Sj1a5tRmQUI87DYhCONcm30XPbjtUIo5D3s1tB3H3qUOJxAqDGvDt7BIpw==; 5:yN/9QJr/XlAzk1akLPOegbTc7AQ8/42iB5vgN9R0WDpXZd/9pidfLKRCpYWe6Pce7DluqfldNYNDo544T3B1ah2UpDqiMJAyV+UvdKZJba+ETZnV72NbHPwNZSI0qIB8qZdAEVrL4w2QNHQw2F181YtBcQRaYjs/OqoOhoIqR4I=; 7:6xai7bJwxXwwWrVe78uHo84s/l0E4txBrWM5olOnUlSGuroY0YgE7SZEDkN/hSnbGdhVs39F9rpmezuHbm7TPLQVrTarPj+UOmZ/UZrHGFQoqlojSghVitg5fokvUYvbkAX9UX6PSi/09qZG6OHXVyDKA72GK/jbBQmBai+JTfTFCtvwBxslBJr2SxWl9ykO/nMH+2HS+UufWUXdPUT+fmRVuVbIxyjLiTxeN5hEkFAPhvCUvARd3gnF0YRLZCof x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 5a2b0d79-725b-4e0d-e27f-08d5fa9c1faf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB4002; x-ms-traffictypediagnostic: AM0PR0502MB4002: 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR0502MB4002; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0502MB4002; x-forefront-prvs: 0755F54DD9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(346002)(366004)(376002)(136003)(199004)(189003)(81166006)(99286004)(81156014)(7696005)(76176011)(74316002)(476003)(6636002)(6436002)(446003)(4326008)(110136005)(305945005)(54906003)(6506007)(7736002)(26005)(5660300001)(256004)(102836004)(97736004)(9686003)(25786009)(33656002)(55016002)(450100002)(229853002)(53936002)(486006)(106356001)(2900100001)(6246003)(3846002)(6116002)(478600001)(2906002)(105586002)(86362001)(11346002)(14454004)(316002)(66066001)(5250100002)(8936002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB4002; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: S2pU2IYl0wAYWSgyEUq04Yo8jpdor71RwXPu4ZepSPyJnPOnlBu/DWGP8pIiRcvU+DDN/yrus7h5/oFFIH76qqmw2I5M9uwOCVYlP9QIARJ7XuQojGRYFef9XCjCtyKI4ahuMUbAKrpBoWGxK2Jl4kB7SYc2EDACNcRUrx2uXA6tF1qR7dpB9x3TB69cF8GVpjOIJ6n7V8E9tb/m/by/VHEI7+n/QoTPdKJLPWkv/9Kv/T8Hzz/7vn3qIpUlIOGwXsG0gWz7fef2UI5SyeOrT8JPi531kW/By5FZpWG0CjSvfIY+HX4rHwPw0YQgog4HX0PulRt42TpNFug5gnX7KZ+kn72yupBVgTtE8WstHCI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a2b0d79-725b-4e0d-e27f-08d5fa9c1faf X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2018 06:24:39.4844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB4002 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: prohibit wildcard match for GRE protocol 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: Sun, 05 Aug 2018 06:24:40 -0000 Hi Koh From: Yongseok Koh > Currently, driver sets full mask (0xffff) for GRE protocol to device. Unt= il it is > changed, PMD can't support wildcard match. >=20 > Fixes: f4b901a46aec ("net/mlx5: add flow GRE item") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yongseok Koh > --- > drivers/net/mlx5/mlx5_flow.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c = index > b7500ec9d6..83ac6cbb85 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1690,8 +1690,12 @@ mlx5_flow_item_gre(const struct rte_flow_item > *item, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L3 Layer is missing"); > - if (!mask) > - mask =3D &rte_flow_item_gre_mask; > + if (!mask || mask->protocol !=3D 0xffff) Why do you check !mask again, I think it's redundant.. no? I think we can support also mask->protocol =3D 0: In this case we just need to not specify a spec. > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "wildcard match is not supported" > + " for protocol field of GRE"); > ret =3D mlx5_flow_item_acceptable > (item, (const uint8_t *)mask, > (const uint8_t *)&rte_flow_item_gre_mask, > -- > 2.11.0