From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50049.outbound.protection.outlook.com [40.107.5.49]) by dpdk.org (Postfix) with ESMTP id D467A4D3A for ; Tue, 9 Oct 2018 10:05:38 +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=vGJ5px+VSZj1pVIr1rsSgVuIXrMYb3OwRm8QH69GmXI=; b=lerLnj8REpfgXLxR0nv4pjGd4gJKitI7J0Hx+TJAN0k1hnfP7SAAS3o5M6T9bLBAiHbcCRyCcJx7Is+9l6j/cbATJlKI1bRAj8uWzSPuwqiTTSGDBLWLjT9Yctdu0hjroc9NrJKSe3aXw7wutBSo0zOtDTTawrz+MJjboie4xPE= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4073.eurprd05.prod.outlook.com (52.134.68.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.28; Tue, 9 Oct 2018 08:05:37 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1207.024; Tue, 9 Oct 2018 08:05:37 +0000 From: Yongseok Koh To: Ori Kam , Shahaf Shuler CC: "dev@dpdk.org" Thread-Topic: [PATCH 3/7] net/mlx5: rename flow macros Thread-Index: AQHUXzEKUvcEWtYrx0+ccOADEfvbsqUWiLhQgAAGmoA= Date: Tue, 9 Oct 2018 08:05:36 +0000 Message-ID: References: <20181008180150.39273-1-yskoh@mellanox.com> <20181008180150.39273-4-yskoh@mellanox.com> In-Reply-To: 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: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4073; 6:BECP1G0/0uex5LPihJGSj3e3/GZHYyDraQD0weGPIofJxfWvCjegDXU0ljzMtfpTI0aLD/Wvc+Qy0Efq48pDlcSawIligQGqV8ZzM/ZvylecUmwiOAYkgQbXaFzpcOKQHoK8SNQYdkNVvjDOVMdFFber+t21trldK+vt5QfCxwrk6QN8z4USQW7W5eZ7W5D4j2ITH9oCubyzF3qJBX0F7OKHuuXkb6xwOjMgA8/KKRsRwEklpcv/+1f2fsc6FNj0PfBndamV7Hx4XkGi2uXWSLpcGtIIXNU7HlUNJybOv6wsn6w2lq5rjcgQkTSv2K2rBnTAt/FIZksHRCraBRsAUg6ZvtzpB6iTs0LlIYIiZW3Rv9FTfHLwmm9BJrHqtDlblmiVXNiJTLVHyLFmW4o6rMl3LjNq7U+6OExNCLsN+AyRo3QWuLlt7J/68DSIWIenGAnb4nPCAoZwhVT5EZTFDw==; 5:c2w1gcsUto1fTlS4d0qj6W+37uG83NImKz6k9mh3ZmBSzYXpychPslxfO0qdFSfZ3T4tb0lrkvsYQSX4oAlrvpdi7NjwWTtQ3D9mSwI6WgdwGGZh2IRZgnehMEVT2FyU/fN1D0aNk9a3BD4jDWPkzP7uO7uqkuWNpP74fczEcYA=; 7:jX4V1XtuvbwBCLY7eL/+Oy1PRV7YeSmt2a9wXjYM4YGDbTD8/72u8Gr/WHqx22wFhCpYFSda8mRq48DgqlufD5r2sTZAQVg80AcegjuuX/OwdZH7EpcEs+SfPsKJ4L6ffWz4ZMQuNozaTiXsxxSJFxHkd9ViAEvy9TVPvMnZBWmU+AB6wY8RR704KY8v+kKKCDx60pV5gQWcV3AqgnYd+dYRWK+bahCF3a8DGrLUiVAnoqUt/CLXpLPy+Z8rGTdm x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: e908aaa0-07c7-43be-c758-08d62dbdff11 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:DB3PR0502MB4073; x-ms-traffictypediagnostic: DB3PR0502MB4073: 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)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051); SRVR:DB3PR0502MB4073; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4073; x-forefront-prvs: 08200063E9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(376002)(39860400002)(366004)(189003)(199004)(51234002)(13464003)(102836004)(86362001)(476003)(81156014)(81166006)(26005)(6506007)(5660300001)(82746002)(229853002)(53546011)(186003)(68736007)(446003)(7736002)(8936002)(110136005)(2616005)(11346002)(5250100002)(25786009)(85306007)(8676002)(478600001)(14444005)(6486002)(6636002)(99286004)(486006)(36756003)(105586002)(71190400001)(83716004)(316002)(106356001)(53946003)(53936002)(6246003)(76176011)(66066001)(6512007)(305945005)(71200400001)(3846002)(14454004)(2900100001)(2906002)(33656002)(256004)(6436002)(4326008)(4744004)(97736004)(6116002)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4073; H:DB3PR0502MB3980.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-microsoft-antispam-message-info: KTTgjGJI2bRibo6xeLK9cOjIrKzPcmPWQEf8Qhhmxc5UKvFhxyGYo8jZ4KI2vbfVGFSiAbCyj+X7xvCSDyZrqzyn/7AVpizf8LwleBIK0PlTuPSW9jthupWNy8fRVY8mvw5aMJNDR3GVV6+SyB/o0dei1IT8xu07S4Gek4p8oAMj/H+M6egG83gKCZrec13zmCCKR98wff+CvBgj0U22wbrIRJOMO0Rr1wCnf4jfvDVVya6s0oN00F1z30VVTsJ2yOEz5xpEh2ZFZusGQ6O3wzPfwUbm08W7K7K2ZJTehtbmIiMJ+EOu4OFfP/5Sf+jA2kxWjcNtWv+XAyMYzNJHxt9h+ScJSz28FqGovwM75Ak= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <18C631F6EE96EC4C9574FF51883B8A99@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e908aaa0-07c7-43be-c758-08d62dbdff11 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2018 08:05:36.9216 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4073 Subject: Re: [dpdk-dev] [PATCH 3/7] net/mlx5: rename flow macros 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: Tue, 09 Oct 2018 08:05:39 -0000 > On Oct 9, 2018, at 12:43 AM, Ori Kam wrote: >=20 >=20 >=20 >> -----Original Message----- >> From: Yongseok Koh >> Sent: Monday, October 8, 2018 9:02 PM >> To: Shahaf Shuler >> Cc: dev@dpdk.org; Yongseok Koh ; Ori Kam >> >> Subject: [PATCH 3/7] net/mlx5: rename flow macros >>=20 >> MLX5_ACTION_* -> MLX5_FLOW_ACTION_* >> MLX5_VXLAN* -> MLX5_UDP_PORT_VXLAN* >>=20 >> Fixes: 0f8775dd8f1c ("net/mlx5: add support for multiple flow drivers") >> Fixes: edcdef4e5fe4 ("net/mlx5: add Linux TC flower driver for E-Switch = flow") >> Cc: Ori Kam >>=20 > I don't think this is a fix since there is no issue with the implementati= on, > you are just beautify the code. >=20 > Otherwise acked: Right, but I just added the tags for reference. As this doesn't have "Cc: s= table@", it has no effect. Shahaf, I'm okay if you drop the "Fixes:" tag when you merge it. I'll leave it as your choice. Thanks, Yongseok >> Signed-off-by: Yongseok Koh >> --- >> drivers/net/mlx5/mlx5_flow.c | 31 +++++++++++++++------------ >> drivers/net/mlx5/mlx5_flow.h | 28 ++++++++++++------------ >> drivers/net/mlx5/mlx5_flow_dv.c | 24 ++++++++++----------- >> drivers/net/mlx5/mlx5_flow_tcf.c | 26 +++++++++++----------- >> drivers/net/mlx5/mlx5_flow_verbs.c | 44 +++++++++++++++++++-------------= ----- >> - >> 5 files changed, 78 insertions(+), 75 deletions(-) >>=20 >> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c >> index ef5e4684f..69afd4625 100644 >> --- a/drivers/net/mlx5/mlx5_flow.c >> +++ b/drivers/net/mlx5/mlx5_flow.c >> @@ -537,7 +537,7 @@ mlx5_flow_rxq_flags_set(struct rte_eth_dev *dev, >> struct rte_flow *flow) >> { >> struct priv *priv =3D dev->data->dev_private; >> const int mark =3D !!(flow->actions & >> - (MLX5_ACTION_FLAG | MLX5_ACTION_MARK)); >> + (MLX5_FLOW_ACTION_FLAG | >> MLX5_FLOW_ACTION_MARK)); >> const int tunnel =3D !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL); >> unsigned int i; >>=20 >> @@ -581,7 +581,7 @@ mlx5_flow_rxq_flags_trim(struct rte_eth_dev *dev, >> struct rte_flow *flow) >> { >> struct priv *priv =3D dev->data->dev_private; >> const int mark =3D !!(flow->actions & >> - (MLX5_ACTION_FLAG | MLX5_ACTION_MARK)); >> + (MLX5_FLOW_ACTION_FLAG | >> MLX5_FLOW_ACTION_MARK)); >> const int tunnel =3D !!(flow->layers & MLX5_FLOW_LAYER_TUNNEL); >> unsigned int i; >>=20 >> @@ -656,15 +656,15 @@ mlx5_flow_validate_action_flag(uint64_t >> action_flags, >> struct rte_flow_error *error) >> { >>=20 >> - if (action_flags & MLX5_ACTION_DROP) >> + if (action_flags & MLX5_FLOW_ACTION_DROP) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't drop and flag in same flow"); >> - if (action_flags & MLX5_ACTION_MARK) >> + if (action_flags & MLX5_FLOW_ACTION_MARK) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't mark and flag in same flow"); >> - if (action_flags & MLX5_ACTION_FLAG) >> + if (action_flags & MLX5_FLOW_ACTION_FLAG) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't have 2 flag" >> @@ -703,15 +703,15 @@ mlx5_flow_validate_action_mark(const struct >> rte_flow_action *action, >> &mark->id, >> "mark id must in 0 <=3D id < " >>=20 >> RTE_STR(MLX5_FLOW_MARK_MAX)); >> - if (action_flags & MLX5_ACTION_DROP) >> + if (action_flags & MLX5_FLOW_ACTION_DROP) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't drop and mark in same flow"); >> - if (action_flags & MLX5_ACTION_FLAG) >> + if (action_flags & MLX5_FLOW_ACTION_FLAG) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't flag and mark in same flow"); >> - if (action_flags & MLX5_ACTION_MARK) >> + if (action_flags & MLX5_FLOW_ACTION_MARK) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't have 2 flag actions in same" >> @@ -734,16 +734,17 @@ int >> mlx5_flow_validate_action_drop(uint64_t action_flags, >> struct rte_flow_error *error) >> { >> - if (action_flags & MLX5_ACTION_FLAG) >> + if (action_flags & MLX5_FLOW_ACTION_FLAG) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't drop and flag in same flow"); >> - if (action_flags & MLX5_ACTION_MARK) >> + if (action_flags & MLX5_FLOW_ACTION_MARK) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't drop and mark in same flow"); >> if (action_flags & >> - (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | >> MLX5_ACTION_RSS)) >> + (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | >> + MLX5_FLOW_ACTION_RSS)) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't have 2 fate actions in" >> @@ -776,7 +777,8 @@ mlx5_flow_validate_action_queue(const struct >> rte_flow_action *action, >> const struct rte_flow_action_queue *queue =3D action->conf; >>=20 >> if (action_flags & >> - (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | >> MLX5_ACTION_RSS)) >> + (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | >> + MLX5_FLOW_ACTION_RSS)) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't have 2 fate actions in" >> @@ -820,7 +822,8 @@ mlx5_flow_validate_action_rss(const struct >> rte_flow_action *action, >> unsigned int i; >>=20 >> if (action_flags & >> - (MLX5_ACTION_DROP | MLX5_ACTION_QUEUE | >> MLX5_ACTION_RSS)) >> + (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | >> + MLX5_FLOW_ACTION_RSS)) >> return rte_flow_error_set(error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> NULL, >> "can't have 2 fate actions" >> @@ -2304,7 +2307,7 @@ mlx5_flow_query_count(struct rte_flow *flow >> __rte_unused, >> struct rte_flow_error *error) >> { >> #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT >> - if (flow->actions & MLX5_ACTION_COUNT) { >> + if (flow->actions & MLX5_FLOW_ACTION_COUNT) { >> struct rte_flow_query_count *qc =3D data; >> uint64_t counters[2] =3D {0, 0}; >> struct ibv_query_counter_set_attr query_cs_attr =3D { >> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h >> index 1ac871b3a..309e4d4f2 100644 >> --- a/drivers/net/mlx5/mlx5_flow.h >> +++ b/drivers/net/mlx5/mlx5_flow.h >> @@ -67,25 +67,25 @@ >> MLX5_FLOW_LAYER_INNER_L4) >>=20 >> /* Actions */ >> -#define MLX5_ACTION_DROP (1u << 0) >> -#define MLX5_ACTION_QUEUE (1u << 1) >> -#define MLX5_ACTION_RSS (1u << 2) >> -#define MLX5_ACTION_FLAG (1u << 3) >> -#define MLX5_ACTION_MARK (1u << 4) >> -#define MLX5_ACTION_COUNT (1u << 5) >> -#define MLX5_ACTION_PORT_ID (1u << 6) >> -#define MLX5_ACTION_OF_POP_VLAN (1u << 7) >> -#define MLX5_ACTION_OF_PUSH_VLAN (1u << 8) >> -#define MLX5_ACTION_OF_SET_VLAN_VID (1u << 9) >> -#define MLX5_ACTION_OF_SET_VLAN_PCP (1u << 10) >> +#define MLX5_FLOW_ACTION_DROP (1u << 0) >> +#define MLX5_FLOW_ACTION_QUEUE (1u << 1) >> +#define MLX5_FLOW_ACTION_RSS (1u << 2) >> +#define MLX5_FLOW_ACTION_FLAG (1u << 3) >> +#define MLX5_FLOW_ACTION_MARK (1u << 4) >> +#define MLX5_FLOW_ACTION_COUNT (1u << 5) >> +#define MLX5_FLOW_ACTION_PORT_ID (1u << 6) >> +#define MLX5_FLOW_ACTION_OF_POP_VLAN (1u << 7) >> +#define MLX5_FLOW_ACTION_OF_PUSH_VLAN (1u << 8) >> +#define MLX5_FLOW_ACTION_OF_SET_VLAN_VID (1u << 9) >> +#define MLX5_FLOW_ACTION_OF_SET_VLAN_PCP (1u << 10) >>=20 >> #ifndef IPPROTO_MPLS >> #define IPPROTO_MPLS 137 >> #endif >>=20 >> -/* Internent Protocol versions. */ >> -#define MLX5_VXLAN 4789 >> -#define MLX5_VXLAN_GPE 4790 >> +/* UDP port numbers for VxLAN. */ >> +#define MLX5_UDP_PORT_VXLAN 4789 >> +#define MLX5_UDP_PORT_VXLAN_GPE 4790 >>=20 >> /* Priority reserved for default flows. */ >> #define MLX5_FLOW_PRIO_RSVD ((uint32_t)-1) >> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c >> b/drivers/net/mlx5/mlx5_flow_dv.c >> index 5678dc35f..e6c84d444 100644 >> --- a/drivers/net/mlx5/mlx5_flow_dv.c >> +++ b/drivers/net/mlx5/mlx5_flow_dv.c >> @@ -236,7 +236,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const stru= ct >> rte_flow_attr *attr, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_FLAG; >> + action_flags |=3D MLX5_FLOW_ACTION_FLAG; >> ++actions_n; >> break; >> case RTE_FLOW_ACTION_TYPE_MARK: >> @@ -245,7 +245,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const stru= ct >> rte_flow_attr *attr, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_MARK; >> + action_flags |=3D MLX5_FLOW_ACTION_MARK; >> ++actions_n; >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> @@ -253,7 +253,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const stru= ct >> rte_flow_attr *attr, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_DROP; >> + action_flags |=3D MLX5_FLOW_ACTION_DROP; >> ++actions_n; >> break; >> case RTE_FLOW_ACTION_TYPE_QUEUE: >> @@ -262,7 +262,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const stru= ct >> rte_flow_attr *attr, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_QUEUE; >> + action_flags |=3D MLX5_FLOW_ACTION_QUEUE; >> ++actions_n; >> break; >> case RTE_FLOW_ACTION_TYPE_RSS: >> @@ -271,14 +271,14 @@ flow_dv_validate(struct rte_eth_dev *dev, const >> struct rte_flow_attr *attr, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_RSS; >> + action_flags |=3D MLX5_FLOW_ACTION_RSS; >> ++actions_n; >> break; >> case RTE_FLOW_ACTION_TYPE_COUNT: >> ret =3D mlx5_flow_validate_action_count(dev, error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_COUNT; >> + action_flags |=3D MLX5_FLOW_ACTION_COUNT; >> ++actions_n; >> break; >> default: >> @@ -838,8 +838,8 @@ flow_dv_translate_item_vxlan(void *matcher, void >> *key, >> outer_headers); >> headers_v =3D MLX5_ADDR_OF(fte_match_param, key, >> outer_headers); >> } >> - dport =3D item->type =3D=3D RTE_FLOW_ITEM_TYPE_VXLAN ? MLX5_VXLAN : >> - MLX5_VXLAN_GPE; >> + dport =3D item->type =3D=3D RTE_FLOW_ITEM_TYPE_VXLAN ? >> + MLX5_UDP_PORT_VXLAN : MLX5_UDP_PORT_VXLAN_GPE; >> if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) { >> MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, >> 0xFFFF); >> MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, >> dport); >> @@ -978,7 +978,7 @@ flow_dv_create_action(const struct rte_flow_action >> *action, >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> dev_flow->dv.actions[actions_n].type =3D >> MLX5DV_FLOW_ACTION_DROP; >> - flow->actions |=3D MLX5_ACTION_DROP; >> + flow->actions |=3D MLX5_FLOW_ACTION_DROP; >> break; >> case RTE_FLOW_ACTION_TYPE_QUEUE: >> queue =3D action->conf; >> @@ -1195,7 +1195,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct >> rte_flow *flow, >> LIST_FOREACH(dev_flow, &flow->dev_flows, next) { >> dv =3D &dev_flow->dv; >> n =3D dv->actions_n; >> - if (flow->actions & MLX5_ACTION_DROP) { >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) { >> dv->hrxq =3D mlx5_hrxq_drop_new(dev); >> if (!dv->hrxq) { >> rte_flow_error_set >> @@ -1251,7 +1251,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct >> rte_flow *flow, >> LIST_FOREACH(dev_flow, &flow->dev_flows, next) { >> struct mlx5_flow_dv *dv =3D &dev_flow->dv; >> if (dv->hrxq) { >> - if (flow->actions & MLX5_ACTION_DROP) >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) >> mlx5_hrxq_drop_release(dev); >> else >> mlx5_hrxq_release(dev, dv->hrxq); >> @@ -1318,7 +1318,7 @@ flow_dv_remove(struct rte_eth_dev *dev, struct >> rte_flow *flow) >> dv->flow =3D NULL; >> } >> if (dv->hrxq) { >> - if (flow->actions & MLX5_ACTION_DROP) >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) >> mlx5_hrxq_drop_release(dev); >> else >> mlx5_hrxq_release(dev, dv->hrxq); >> diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c >> b/drivers/net/mlx5/mlx5_flow_tcf.c >> index 14376188e..c87046365 100644 >> --- a/drivers/net/mlx5/mlx5_flow_tcf.c >> +++ b/drivers/net/mlx5/mlx5_flow_tcf.c >> @@ -225,7 +225,7 @@ struct flow_tcf_ptoi { >> unsigned int ifindex; /**< Network interface index. */ >> }; >>=20 >> -#define MLX5_TCF_FATE_ACTIONS (MLX5_ACTION_DROP | >> MLX5_ACTION_PORT_ID) >> +#define MLX5_TCF_FATE_ACTIONS (MLX5_FLOW_ACTION_DROP | >> MLX5_FLOW_ACTION_PORT_ID) >>=20 >> /** >> * Retrieve mask for pattern item. >> @@ -668,7 +668,7 @@ flow_tcf_validate(struct rte_eth_dev *dev, >> conf.port_id, >> "missing data to convert port ID to" >> " ifindex"); >> - action_flags |=3D MLX5_ACTION_PORT_ID; >> + action_flags |=3D MLX5_FLOW_ACTION_PORT_ID; >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> if (action_flags & MLX5_TCF_FATE_ACTIONS) >> @@ -676,19 +676,19 @@ flow_tcf_validate(struct rte_eth_dev *dev, >> (error, ENOTSUP, >> RTE_FLOW_ERROR_TYPE_ACTION, >> actions, >> "can't have multiple fate actions"); >> - action_flags |=3D MLX5_ACTION_DROP; >> + action_flags |=3D MLX5_FLOW_ACTION_DROP; >> break; >> case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN: >> - action_flags |=3D MLX5_ACTION_OF_POP_VLAN; >> + action_flags |=3D MLX5_FLOW_ACTION_OF_POP_VLAN; >> break; >> case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: >> - action_flags |=3D MLX5_ACTION_OF_PUSH_VLAN; >> + action_flags |=3D >> MLX5_FLOW_ACTION_OF_PUSH_VLAN; >> break; >> case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: >> - action_flags |=3D MLX5_ACTION_OF_SET_VLAN_VID; >> + action_flags |=3D >> MLX5_FLOW_ACTION_OF_SET_VLAN_VID; >> break; >> case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP: >> - action_flags |=3D MLX5_ACTION_OF_SET_VLAN_PCP; >> + action_flags |=3D >> MLX5_FLOW_ACTION_OF_SET_VLAN_PCP; >> break; >> default: >> return rte_flow_error_set(error, ENOTSUP, >> @@ -809,26 +809,26 @@ flow_tcf_get_actions_and_size(const struct >> rte_flow_action actions[], >> SZ_NLATTR_STRZ_OF("mirred") + >> SZ_NLATTR_NEST + /* TCA_ACT_OPTIONS. */ >> SZ_NLATTR_TYPE_OF(struct tc_mirred); >> - flags |=3D MLX5_ACTION_PORT_ID; >> + flags |=3D MLX5_FLOW_ACTION_PORT_ID; >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> size +=3D SZ_NLATTR_NEST + /* na_act_index. */ >> SZ_NLATTR_STRZ_OF("gact") + >> SZ_NLATTR_NEST + /* TCA_ACT_OPTIONS. */ >> SZ_NLATTR_TYPE_OF(struct tc_gact); >> - flags |=3D MLX5_ACTION_DROP; >> + flags |=3D MLX5_FLOW_ACTION_DROP; >> break; >> case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN: >> - flags |=3D MLX5_ACTION_OF_POP_VLAN; >> + flags |=3D MLX5_FLOW_ACTION_OF_POP_VLAN; >> goto action_of_vlan; >> case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: >> - flags |=3D MLX5_ACTION_OF_PUSH_VLAN; >> + flags |=3D MLX5_FLOW_ACTION_OF_PUSH_VLAN; >> goto action_of_vlan; >> case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: >> - flags |=3D MLX5_ACTION_OF_SET_VLAN_VID; >> + flags |=3D MLX5_FLOW_ACTION_OF_SET_VLAN_VID; >> goto action_of_vlan; >> case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP: >> - flags |=3D MLX5_ACTION_OF_SET_VLAN_PCP; >> + flags |=3D MLX5_FLOW_ACTION_OF_SET_VLAN_PCP; >> goto action_of_vlan; >> action_of_vlan: >> size +=3D SZ_NLATTR_NEST + /* na_act_index. */ >> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c >> b/drivers/net/mlx5/mlx5_flow_verbs.c >> index 076bb39e6..0ecbc8121 100644 >> --- a/drivers/net/mlx5/mlx5_flow_verbs.c >> +++ b/drivers/net/mlx5/mlx5_flow_verbs.c >> @@ -755,7 +755,7 @@ flow_verbs_translate_action_drop(uint64_t >> *action_flags, >> }; >>=20 >> flow_verbs_spec_add(dev_flow, &drop, size); >> - *action_flags |=3D MLX5_ACTION_DROP; >> + *action_flags |=3D MLX5_FLOW_ACTION_DROP; >> } >>=20 >> /** >> @@ -781,7 +781,7 @@ flow_verbs_translate_action_queue(const struct >> rte_flow_action *action, >> if (flow->queue) >> (*flow->queue)[0] =3D queue->index; >> flow->rss.queue_num =3D 1; >> - *action_flags |=3D MLX5_ACTION_QUEUE; >> + *action_flags |=3D MLX5_FLOW_ACTION_QUEUE; >> } >>=20 >> /** >> @@ -811,7 +811,7 @@ flow_verbs_translate_action_rss(const struct >> rte_flow_action *action, >> memcpy(flow->key, rss->key, MLX5_RSS_HASH_KEY_LEN); >> flow->rss.types =3D rss->types; >> flow->rss.level =3D rss->level; >> - *action_flags |=3D MLX5_ACTION_RSS; >> + *action_flags |=3D MLX5_FLOW_ACTION_RSS; >> } >>=20 >> /** >> @@ -838,7 +838,7 @@ flow_verbs_translate_action_flag >> .size =3D size, >> .tag_id =3D mlx5_flow_mark_set(MLX5_FLOW_MARK_DEFAULT), >> }; >> - *action_flags |=3D MLX5_ACTION_MARK; >> + *action_flags |=3D MLX5_FLOW_ACTION_MARK; >> flow_verbs_spec_add(dev_flow, &tag, size); >> } >>=20 >> @@ -898,14 +898,14 @@ flow_verbs_translate_action_mark(const struct >> rte_flow_action *action, >> }; >> struct mlx5_flow_verbs *verbs =3D &dev_flow->verbs; >>=20 >> - if (*action_flags & MLX5_ACTION_FLAG) { >> + if (*action_flags & MLX5_FLOW_ACTION_FLAG) { >> flow_verbs_mark_update(verbs, mark->id); >> size =3D 0; >> } else { >> tag.tag_id =3D mlx5_flow_mark_set(mark->id); >> flow_verbs_spec_add(dev_flow, &tag, size); >> } >> - *action_flags |=3D MLX5_ACTION_MARK; >> + *action_flags |=3D MLX5_FLOW_ACTION_MARK; >> } >>=20 >> /** >> @@ -954,7 +954,7 @@ flow_verbs_translate_action_count(struct rte_eth_dev >> *dev, >> "cannot get counter" >> " context."); >> } >> - *action_flags |=3D MLX5_ACTION_COUNT; >> + *action_flags |=3D MLX5_FLOW_ACTION_COUNT; >> #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT >> counter.counter_set_handle =3D flow->counter->cs->handle; >> flow_verbs_spec_add(dev_flow, &counter, size); >> @@ -1116,7 +1116,7 @@ flow_verbs_validate(struct rte_eth_dev *dev, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_FLAG; >> + action_flags |=3D MLX5_FLOW_ACTION_FLAG; >> break; >> case RTE_FLOW_ACTION_TYPE_MARK: >> ret =3D mlx5_flow_validate_action_mark(actions, >> @@ -1124,14 +1124,14 @@ flow_verbs_validate(struct rte_eth_dev *dev, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_MARK; >> + action_flags |=3D MLX5_FLOW_ACTION_MARK; >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> ret =3D mlx5_flow_validate_action_drop(action_flags, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_DROP; >> + action_flags |=3D MLX5_FLOW_ACTION_DROP; >> break; >> case RTE_FLOW_ACTION_TYPE_QUEUE: >> ret =3D mlx5_flow_validate_action_queue(actions, >> @@ -1139,7 +1139,7 @@ flow_verbs_validate(struct rte_eth_dev *dev, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_QUEUE; >> + action_flags |=3D MLX5_FLOW_ACTION_QUEUE; >> break; >> case RTE_FLOW_ACTION_TYPE_RSS: >> ret =3D mlx5_flow_validate_action_rss(actions, >> @@ -1147,13 +1147,13 @@ flow_verbs_validate(struct rte_eth_dev *dev, >> error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_RSS; >> + action_flags |=3D MLX5_FLOW_ACTION_RSS; >> break; >> case RTE_FLOW_ACTION_TYPE_COUNT: >> ret =3D mlx5_flow_validate_action_count(dev, error); >> if (ret < 0) >> return ret; >> - action_flags |=3D MLX5_ACTION_COUNT; >> + action_flags |=3D MLX5_FLOW_ACTION_COUNT; >> break; >> default: >> return rte_flow_error_set(error, ENOTSUP, >> @@ -1191,27 +1191,27 @@ flow_verbs_get_actions_and_size(const struct >> rte_flow_action actions[], >> break; >> case RTE_FLOW_ACTION_TYPE_FLAG: >> size +=3D sizeof(struct ibv_flow_spec_action_tag); >> - detected_actions |=3D MLX5_ACTION_FLAG; >> + detected_actions |=3D MLX5_FLOW_ACTION_FLAG; >> break; >> case RTE_FLOW_ACTION_TYPE_MARK: >> size +=3D sizeof(struct ibv_flow_spec_action_tag); >> - detected_actions |=3D MLX5_ACTION_MARK; >> + detected_actions |=3D MLX5_FLOW_ACTION_MARK; >> break; >> case RTE_FLOW_ACTION_TYPE_DROP: >> size +=3D sizeof(struct ibv_flow_spec_action_drop); >> - detected_actions |=3D MLX5_ACTION_DROP; >> + detected_actions |=3D MLX5_FLOW_ACTION_DROP; >> break; >> case RTE_FLOW_ACTION_TYPE_QUEUE: >> - detected_actions |=3D MLX5_ACTION_QUEUE; >> + detected_actions |=3D MLX5_FLOW_ACTION_QUEUE; >> break; >> case RTE_FLOW_ACTION_TYPE_RSS: >> - detected_actions |=3D MLX5_ACTION_RSS; >> + detected_actions |=3D MLX5_FLOW_ACTION_RSS; >> break; >> case RTE_FLOW_ACTION_TYPE_COUNT: >> #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT >> size +=3D sizeof(struct ibv_flow_spec_counter_action); >> #endif >> - detected_actions |=3D MLX5_ACTION_COUNT; >> + detected_actions |=3D MLX5_FLOW_ACTION_COUNT; >> break; >> default: >> break; >> @@ -1519,7 +1519,7 @@ flow_verbs_remove(struct rte_eth_dev *dev, struct >> rte_flow *flow) >> verbs->flow =3D NULL; >> } >> if (verbs->hrxq) { >> - if (flow->actions & MLX5_ACTION_DROP) >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) >> mlx5_hrxq_drop_release(dev); >> else >> mlx5_hrxq_release(dev, verbs->hrxq); >> @@ -1578,7 +1578,7 @@ flow_verbs_apply(struct rte_eth_dev *dev, struct >> rte_flow *flow, >>=20 >> LIST_FOREACH(dev_flow, &flow->dev_flows, next) { >> verbs =3D &dev_flow->verbs; >> - if (flow->actions & MLX5_ACTION_DROP) { >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) { >> verbs->hrxq =3D mlx5_hrxq_drop_new(dev); >> if (!verbs->hrxq) { >> rte_flow_error_set >> @@ -1628,7 +1628,7 @@ flow_verbs_apply(struct rte_eth_dev *dev, struct >> rte_flow *flow, >> LIST_FOREACH(dev_flow, &flow->dev_flows, next) { >> verbs =3D &dev_flow->verbs; >> if (verbs->hrxq) { >> - if (flow->actions & MLX5_ACTION_DROP) >> + if (flow->actions & MLX5_FLOW_ACTION_DROP) >> mlx5_hrxq_drop_release(dev); >> else >> mlx5_hrxq_release(dev, verbs->hrxq); >> -- >> 2.11.0 > Acked-by: Ori Kam >=20 > Thanks, > Ori