From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50080.outbound.protection.outlook.com [40.107.5.80]) by dpdk.org (Postfix) with ESMTP id CACA22965 for ; Sat, 27 Oct 2018 01:01:20 +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=Ljcoleem7foWGa8LV/rpVvDION0hx+QVlmyO6xR4KDU=; b=aHs3KjmHm+mbCLXR1WRK1MAesYSunHRV+0EABAimyP1uB3Wo1fqaZzkHLRWAWwT/QOIxaGg2fcm3PoqtH0pPLN26Cx73QruBiaum15XsJhjkp3oljepnbVk8GWuSCzURYAb8+BSxYshAYWV7Y6H3j4R9tH4ZAeCx+QXHIOSxShU= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3946.eurprd05.prod.outlook.com (52.134.71.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.21; Fri, 26 Oct 2018 23:01:19 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::f8a1:fcab:94f0:97cc%4]) with mapi id 15.20.1273.025; Fri, 26 Oct 2018 23:01:19 +0000 From: Yongseok Koh To: Shahaf Shuler CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/2] net/mlx5: fix bit width of flow items Thread-Index: AQHUbEBJ29S8LD9kWEeJ1DJCw6372qUyJxoA Date: Fri, 26 Oct 2018 23:01:19 +0000 Message-ID: References: <20181025085351.15738-1-shahafs@mellanox.com> In-Reply-To: <20181025085351.15738-1-shahafs@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3946; 6:rv28hD98Ht+doeQslD0G7wIPXxcv3/AYgUe2RZyBZFZrbcW93hTJn3WCGyvNmt5CH2poLCHhXHHa+8vILO6UB7AEflpqiTeWqBlWBaqTNvHLjVkLa6UWn/GLo/G60+lyY6jIw6iWfU/id9un5fp2psTbCLAR8vbfYMLpXwB9p2+CJhFoKBrBatBYEBapydqi0v0B6h2pCPtASE2Df33Y0FzQDxKdu050TcqpyziZ44BqB4WuRsF1r0Sy8FZXxMT91IXdiV4/65n8wGhR25rMZUxOnpfXVQX6Tt7+NGgW427HtBLxEtXsyEJx3zLUg5c/rPL77/7EYxdDCoWp6ttzAhIA41H0GganoWoM6MrCyEktOp0859r4fbUrDp9087+xa4yE9j6AaNJUbeb2Hhvrf0wO856iTwg+/Rb4+U1jGscgH8E7L/Tnk41xnHh35GfCSa2qKacjC/hW/o05fuKqsg==; 5:i+iyFLte4YFyWdBO+Okwu+i0z0kFHH0qmqr91tT2lA+t0CckdzVF2jZQ8Rvf0qKVqRWt9eNOw2oGV+3Ta3qu2iavPqcuLU8Qtrvobhqn4CZ5ZSJHbabFjmDzNIRFSfhjanS8i2Y6err7bdAejwFx8E5nuWT8xpdX2icuGXDo+pY=; 7:P62K4kN09hJnmHqVj0drc47jvXy6Y9p21kymXitLov+5/SW0bXQMy5H1LcDiFQxUFMRiu4ppZ+glyYs0QECt48PfewjXHnwKZhWpJTzow7cLxyGPBhICcHCgslfGAokjzPrAQeeIB78/O0yeVC5PYQ== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 8628e1e6-fc06-4969-8005-08d63b96f0fb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB3946; x-ms-traffictypediagnostic: DB3PR0502MB3946: 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)(10201501046)(3231355)(944501410)(52105095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB3946; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3946; x-forefront-prvs: 083751FCA6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(346002)(39860400002)(396003)(199004)(189003)(478600001)(97736004)(6486002)(6636002)(33656002)(36756003)(486006)(6862004)(5250100002)(446003)(2616005)(476003)(11346002)(99286004)(2900100001)(14454004)(4326008)(186003)(66066001)(81166006)(229853002)(105586002)(106356001)(37006003)(86362001)(316002)(53546011)(3846002)(6116002)(5660300001)(26005)(76176011)(25786009)(8936002)(6506007)(53936002)(6246003)(575784001)(102836004)(71200400001)(71190400001)(68736007)(305945005)(6436002)(2906002)(7736002)(256004)(82746002)(83716004)(14444005)(8676002)(81156014)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3946; H:DB3PR0502MB3980.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: Mr8cNLkK0a/wZGPYOOGtCv11OwiDfRZYStzfSlOxdAexn7rcS5jhyDM9bzJtQgFtWlAjStMYa8BdYAiOgWnjV/sLku9dSCKuuD6Fqlr790i+kXCwO4oY8IeFLVe/Pe1O/w4L9a0J+stGmU+LQQ8vmMs6kwhQfhTXs71oLLKpUOuHRHpa48ByxrKMliHYit3gu7E6w2zUwu5UxXnZGm1PP4CxNK7hBb/z/wbauK3sR6G/0aWNp7jLxbyI5zogRN2rAh+0vBJ+ooinNIvEzdPjSwd3T6JfvaWRaeAV7ApobIrKGCuJQUeZ1W/b0OvyvEKyNAt+XlCKU6bINjNiEHgsGwtMt3G941sxokL/OXtu/d0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8628e1e6-fc06-4969-8005-08d63b96f0fb X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2018 23:01:19.3280 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3946 Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix bit width of flow items 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: Fri, 26 Oct 2018 23:01:21 -0000 > On Oct 25, 2018, at 1:53 AM, Shahaf Shuler wrote: >=20 > Apply the changes from commit c744f6b1b969 ("net/mlx5: fix bit width of > item and action flags") in some places that were overlooked. >=20 > Fixes: c744f6b1b969 ("net/mlx5: fix bit width of item and action flags") > Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated functi= on") >=20 > Signed-off-by: Shahaf Shuler > --- Acked-by: Yongseok Koh =20 Thanks > drivers/net/mlx5/mlx5_flow.c | 10 +++++----- > drivers/net/mlx5/mlx5_flow.h | 4 ++-- > 2 files changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 280af0abce..87189a3405 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -275,7 +275,7 @@ static const uint32_t priority_map_5[][MLX5_PRIORITY_= MAP_MAX] =3D { >=20 > /* Tunnel information. */ > struct mlx5_flow_tunnel_info { > - uint32_t tunnel; /**< Tunnel bit (see MLX5_FLOW_*). */ > + uint64_t tunnel; /**< Tunnel bit (see MLX5_FLOW_*). */ > uint32_t ptype; /**< Tunnel Ptype (see RTE_PTYPE_*). */ > }; >=20 > @@ -1079,7 +1079,7 @@ mlx5_flow_validate_item_eth(const struct rte_flow_i= tem *item, > */ > int > mlx5_flow_validate_item_vlan(const struct rte_flow_item *item, > - int64_t item_flags, > + uint64_t item_flags, > struct rte_flow_error *error) > { > const struct rte_flow_item_vlan *spec =3D item->spec; > @@ -1091,11 +1091,11 @@ mlx5_flow_validate_item_vlan(const struct rte_flo= w_item *item, > uint16_t vlan_tag =3D 0; > const int tunnel =3D !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); > int ret; > - const uint32_t l34m =3D tunnel ? (MLX5_FLOW_LAYER_INNER_L3 | > + const uint64_t l34m =3D tunnel ? (MLX5_FLOW_LAYER_INNER_L3 | > MLX5_FLOW_LAYER_INNER_L4) : > (MLX5_FLOW_LAYER_OUTER_L3 | > MLX5_FLOW_LAYER_OUTER_L4); > - const uint32_t vlanm =3D tunnel ? MLX5_FLOW_LAYER_INNER_VLAN : > + const uint64_t vlanm =3D tunnel ? MLX5_FLOW_LAYER_INNER_VLAN : > MLX5_FLOW_LAYER_OUTER_VLAN; >=20 > if (item_flags & vlanm) > @@ -1145,7 +1145,7 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_= item *item, > */ > int > mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, > - int64_t item_flags, > + uint64_t item_flags, > struct rte_flow_error *error) > { > const struct rte_flow_item_ipv4 *mask =3D item->mask; > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 61299d66b3..c24d26ed45 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -336,7 +336,7 @@ int mlx5_flow_validate_item_gre(const struct rte_flow= _item *item, > uint8_t target_protocol, > struct rte_flow_error *error); > int mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item, > - int64_t item_flags, > + uint64_t item_flags, > struct rte_flow_error *error); > int mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item, > uint64_t item_flags, > @@ -355,7 +355,7 @@ int mlx5_flow_validate_item_udp(const struct rte_flow= _item *item, > uint8_t target_protocol, > struct rte_flow_error *error); > int mlx5_flow_validate_item_vlan(const struct rte_flow_item *item, > - int64_t item_flags, > + uint64_t item_flags, > struct rte_flow_error *error); > int mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item, > uint64_t item_flags, > --=20 > 2.12.0 >=20