From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1FCB1A0471 for ; Fri, 19 Jul 2019 07:35:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B0BB51B53; Fri, 19 Jul 2019 07:35:13 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40048.outbound.protection.outlook.com [40.107.4.48]) by dpdk.org (Postfix) with ESMTP id 25136152A for ; Fri, 19 Jul 2019 07:35:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPnQ7WbHyBz8L3GCLHL5Tl42brKKYzC7Kli6QyJzsHsSR3GqypqR90EERiKzKpuQ5nD626+pnc8mnfH6QrHKGMknDG9rjrAsVqPh80xN41LN3MxrtUbtGryVSVXE8gokAfvAbaCg+EiBdvoMZRHX9ikyc/3ealPM9kewzSGZdnFlrdtC0PMUShzqgC09IFcmKehew5LVpwLQOnSHju5I0hjaW6aaClsdgP4dfuFfZCIgitUUp+QDyOhmAhkiZ+9cDJw559lLU5/E1kCC6TTmexjLeZvQoLdnuD8mHwtMm9v8W8nLj2ZD1NiRg0oos5OzJnDiF3kKeSEFb32OcYTOew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lyoU/ouAKyjD7p7W3LAS8YjOBs5RLn0YJs/fxrhqBoM=; b=WiB+Egvr/9Z/yswXeXmR3Zr8x25jU2s1y2QQ8smxmpi4EDFQEDFhm8Lh3yRKUo6JiOhK9gH6INAJRC/p5ljY0veVVpaGsX7Pv5yLgi+SPVIeDUyn7NRn/qNODmrzp2wr5nf+m9TpJniHUwdTlazMg4T/EBoIhfifhEota32bVHN8Bsuk8+EM3IKP1P1SbXdx41r/5l1QbZzVcNQKQtRJ5hj8n4/WMigk/P623L6vzo69qWlM0peD6lHwhqYCDcjGPf6DMP319szk8EfYzkBtVbHDmHDfuIqGI7iZPGWaFQFCO0csv4fNwJba3Fy8pQ28o4A8dIMEOtyR9V7+vDu99Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=mellanox.com;dmarc=pass action=none header.from=mellanox.com;dkim=pass header.d=mellanox.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lyoU/ouAKyjD7p7W3LAS8YjOBs5RLn0YJs/fxrhqBoM=; b=fGZ5KWHrdo/V8zB+qsaKIKWymEP15W1f1cO8gyqQUUTyjamjUqNOcVozqOV9QJxbf5d6DOh3355hE0Ke2b43z0V7xo10E3nkIibhRpekDttpnlVhptGUM+tXlbgKp4hEZ8aRRVaAFvhtSYkY/yS+IMPZ8CB7hyn+alCO0WRL3tQ= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB5941.eurprd05.prod.outlook.com (20.179.1.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.14; Fri, 19 Jul 2019 05:35:10 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::496b:bd1c:863a:ed47]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::496b:bd1c:863a:ed47%3]) with mapi id 15.20.2094.011; Fri, 19 Jul 2019 05:35:10 +0000 From: Jack Min To: Dekel Peled CC: Yongseok Koh , Slava Ovsiienko , Shahaf Shuler , Ori Kam , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix setting of item flags bitmap Thread-Index: AQHVPaETZITixmU6g06e0vmv7JuJBqbRbCmA Date: Fri, 19 Jul 2019 05:35:09 +0000 Message-ID: <20190719053501.bypa4agfllmhpbeu@mellanox.com> References: <17e97355b175364266eef4eb3ca959c4688f9a36.1563478206.git.dekelp@mellanox.com> In-Reply-To: <17e97355b175364266eef4eb3ca959c4688f9a36.1563478206.git.dekelp@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0P153CA0037.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::25) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [139.227.41.236] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2ed13f7f-1610-4d75-0c8f-08d70c0add4f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR05MB5941; x-ms-traffictypediagnostic: AM6PR05MB5941: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 01039C93E4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(366004)(376002)(396003)(346002)(136003)(189003)(199004)(478600001)(52116002)(14454004)(76176011)(36756003)(66946007)(229853002)(6862004)(66476007)(66556008)(64756008)(66446008)(99286004)(476003)(5660300002)(25786009)(14444005)(256004)(7736002)(102836004)(305945005)(6636002)(8936002)(186003)(81166006)(81156014)(26005)(446003)(66066001)(2616005)(486006)(4326008)(11346002)(6506007)(386003)(6512007)(86362001)(54906003)(37006003)(6436002)(6486002)(6116002)(8676002)(1076003)(316002)(3846002)(68736007)(53936002)(2906002)(6246003)(71190400001)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5941; H:AM6PR05MB6567.eurprd05.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: PNoc6idn9iZlM35U8NpdAsuoXR1qnTBTpDezG4AiKC1BiyNcudOahTNQHRh2F0ZziYFbkg882NIdMP21/pbu7h6un3xjUgwgZiDKRAE7RlqggUanbKmvBbhqbqBoLb5T4McfRNM6GJvk5X2EWwjelM5a7LD5c6kIBrU3Kbvq9Y4tU9JJRweuryw0WR1GS43XJ6xhdSgGGaR1YimEItI0ekLSdwoTdnimhJuXtEAXFz6+t/qQb8RpxgXhJhXTQEYio14azzTiCQhqUbbTSa00tBJEpVyFUAFLsWuD7TjubvIrEUSFyfIJ4jp87TO7A41489WH9i/WKQf+W/Ch9T/8Y8+4TP8RAXW4Bl9rG0Nl92oJpCKYIZ/Z3wmkKjn/Tr5CgVgYn7HAsWuMkBncuuX2RDW26vzC0XEtl4Tqv9kWKlc= Content-Type: text/plain; charset="us-ascii" Content-ID: <034B5452214021418EBFF758D48EFABB@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ed13f7f-1610-4d75-0c8f-08d70c0add4f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2019 05:35:10.0245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jackmin@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5941 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix setting of item flags bitmap 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" On Thu, 19-07-18, 22:42, Dekel Peled wrote: > In functions flow_dv_translate() and flow_dv_validate(), the flow > items are scanned and each item is marked in item_flags bitmap. > The code handling some of the items was ported from another project, > where items are marked in a slightley different manner. >=20 > This patch fixes the setting of items in bitmap, adapting it to the > required manner. >=20 > Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6") > Fixes: 1242041c5601 ("net/mlx5: match GRE key and present bits") > Fixes: 2e4c987aad91 ("net/mlx5: validate Direct Rule E-Switch") >=20 > Signed-off-by: Dekel Peled Acked-by: Xiaoyu Min > --- > drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c > index 45cd140..7240d3b 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -2883,7 +2883,7 @@ struct field_modify_info modify_tcp[] =3D { > (dev, items, attr, item_flags, error); > if (ret < 0) > return ret; > - last_item |=3D MLX5_FLOW_ITEM_PORT_ID; > + last_item =3D MLX5_FLOW_ITEM_PORT_ID; > break; > case RTE_FLOW_ITEM_TYPE_ETH: > ret =3D mlx5_flow_validate_item_eth(items, item_flags, > @@ -2979,7 +2979,7 @@ struct field_modify_info modify_tcp[] =3D { > (items, item_flags, gre_item, error); > if (ret < 0) > return ret; > - item_flags |=3D MLX5_FLOW_LAYER_GRE_KEY; > + last_item =3D MLX5_FLOW_LAYER_GRE_KEY; > break; > case RTE_FLOW_ITEM_TYPE_VXLAN: > ret =3D mlx5_flow_validate_item_vxlan(items, item_flags, > @@ -3017,7 +3017,7 @@ struct field_modify_info modify_tcp[] =3D { > error); > if (ret < 0) > return ret; > - item_flags |=3D MLX5_FLOW_LAYER_ICMP; > + last_item =3D MLX5_FLOW_LAYER_ICMP; > break; > case RTE_FLOW_ITEM_TYPE_ICMP6: > ret =3D mlx5_flow_validate_item_icmp6(items, item_flags, > @@ -3025,7 +3025,7 @@ struct field_modify_info modify_tcp[] =3D { > error); > if (ret < 0) > return ret; > - item_flags |=3D MLX5_FLOW_LAYER_ICMP6; > + last_item =3D MLX5_FLOW_LAYER_ICMP6; > break; > default: > return rte_flow_error_set(error, ENOTSUP, > @@ -5043,7 +5043,7 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ITEM_TYPE_GRE_KEY: > flow_dv_translate_item_gre_key(match_mask, > match_value, items); > - item_flags |=3D MLX5_FLOW_LAYER_GRE_KEY; > + last_item =3D MLX5_FLOW_LAYER_GRE_KEY; > break; > case RTE_FLOW_ITEM_TYPE_NVGRE: > flow_dv_translate_item_nvgre(match_mask, match_value, > @@ -5073,12 +5073,12 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ITEM_TYPE_ICMP: > flow_dv_translate_item_icmp(match_mask, match_value, > items, tunnel); > - item_flags |=3D MLX5_FLOW_LAYER_ICMP; > + last_item =3D MLX5_FLOW_LAYER_ICMP; > break; > case RTE_FLOW_ITEM_TYPE_ICMP6: > flow_dv_translate_item_icmp6(match_mask, match_value, > items, tunnel); > - item_flags |=3D MLX5_FLOW_LAYER_ICMP6; > + last_item =3D MLX5_FLOW_LAYER_ICMP6; > break; > default: > break; > --=20 > 1.8.3.1 >=20