From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20077.outbound.protection.outlook.com [40.107.2.77]) by dpdk.org (Postfix) with ESMTP id AF6A44F94 for ; Wed, 24 Oct 2018 15:47:12 +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=1a7uLwIandUjlWLjlEb3q4SCl5G6uOkOrXPpa0oFkEI=; b=CMVodRU2eX/uVK3BoQNpjBIwIXqO+Vu3aMLYAAgH/mKJ7lmXNsO9O4FvY8v3ZkSLdcSZbIrFXj96a9AaKP09coLqT8vaC28n6aJEaAXbGVjtLfXjE510i9SlCUzh/5cjo2x0z8U5SlaXAyZQ1zbB8cfNrkA3u+vi0yxS7xnoGUQ= Received: from VI1PR05MB3440.eurprd05.prod.outlook.com (10.170.239.18) by VI1PR05MB3455.eurprd05.prod.outlook.com (10.170.239.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.22; Wed, 24 Oct 2018 13:47:11 +0000 Received: from VI1PR05MB3440.eurprd05.prod.outlook.com ([fe80::fcd0:7d8f:ee3e:3a8d]) by VI1PR05MB3440.eurprd05.prod.outlook.com ([fe80::fcd0:7d8f:ee3e:3a8d%4]) with mapi id 15.20.1250.028; Wed, 24 Oct 2018 13:47:11 +0000 From: Ori Kam To: Dekel Peled , Yongseok Koh , Shahaf Shuler CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/2] net/mlx5: add NVGRE encap decap to Direct Verbs Thread-Index: AQHUa4oIlbfbkxx3Fkec/S6hFEYG9qUuXDCA Date: Wed, 24 Oct 2018 13:47:11 +0000 Message-ID: References: <1540379299-23764-1-git-send-email-dekelp@mellanox.com> <1540379299-23764-3-git-send-email-dekelp@mellanox.com> In-Reply-To: <1540379299-23764-3-git-send-email-dekelp@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=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB3455; 6:11y+Z/0uh0ZQb9fhcCKY16JsJhrItL/rPsUCTIYJLWUVGS5OQpFMyJDJDjehj2H46E8s8yVINJmxSwiainTiAv2CNN1Wp9amq2Owf30Q/PIH590a27F8u8KIzVogweowqKvS8oqK5u7SOh05W7SWqNRPHnBch1BdEiF6d0+aTCagBahLEDly3MfCDb2WM/5oeacJzriOKU0RXjfzYs5tB1cJ/YEtVPU82FwWFoGcakIGLKKenIdxHaDrFosma4fUH8Qzp54w8GUqwmo1/A7BlexHg5fslNMiA6UUfmUP24UsbZwOEE0Ze+Q6s48zU/tbTfRjXsdz/GXdjbtm5nv7rcBCKZ6ew5NlhKAqNxoHxiUl5/AFMwz1HiMExTaXEVtr2573padnGpVSp3x6Zp655QwW709Fzmrdrnt7+XQstToTXJgYUxot7LJrhGgeG22gIpW3ApdzO/hNHq8grzQWmw==; 5:aOCGFJqZzijWVwMcAkmk1pYjo9ouc2aFi0FpTJEnHkUw4UzwGHVXVbXtDaq/J8MWkn/sU2nVnN7xnTzKhVQd0vjxfKnUu67dQS9dLbkx8TFdh9VGgRgKLx5CIUentuL2Pth2hzyh0YTo6d19JvRZPPWhxlENm4z/iFTAyxvjy8U=; 7:GdadVEGwAZCshADFu+9BfWC5mgDBvhDF1AFeOBarmETwWc2nEwiLUmfdyQ25/fXZMB3n3dBtlGWHi+2kf+syY6i3m69QevThV09FYr2fMEZTlXoR+VQ/FioNV/S6J4t6aL29U3sqONm/Rl9/bHaWiVRC1bhnawDuZqv3y+VWPYWVIQwKIeAm1onoQp7WstILmK8ZHzYP45B0e+sMVTBtF4eClWTpq07+jpK0RQKW/KUsXOaM2BlhNLWBGwn+b1WE x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: ee691caf-4301-4c5a-eba8-08d639b732c3 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:VI1PR05MB3455; x-ms-traffictypediagnostic: VI1PR05MB3455: 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)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR05MB3455; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB3455; x-forefront-prvs: 083526BF8A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(136003)(346002)(39860400002)(13464003)(199004)(189003)(3846002)(2906002)(186003)(5660300001)(81166006)(105586002)(25786009)(4744004)(26005)(6436002)(81156014)(229853002)(8936002)(14444005)(99286004)(53936002)(4326008)(110136005)(102836004)(6506007)(6246003)(256004)(7696005)(53546011)(86362001)(11346002)(5250100002)(446003)(71190400001)(305945005)(33656002)(316002)(71200400001)(2900100001)(486006)(9686003)(97736004)(7736002)(76176011)(478600001)(476003)(14454004)(74316002)(106356001)(68736007)(6636002)(55016002)(6116002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3455; H:VI1PR05MB3440.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: 9pqe5BA5aI2xJS6GTBwqORZO0ZSN0mqt1mBSrPZ1Gc6SkFrX7821hcgCcS9MMNAdP4sZlRa2TBmNphsbOCxTvM7K5mHSW49YXMnl9ccAP1/clw1qBurlVrwE3eYLb3dsH+XRPSVhyHHu3m18lwyYzvK8h3lUGqDbIAo/8Pq+lRWRg1Ht92WwbbvgOQ0MvMtpb8YZJbi7pHpwUdVF9xhLaqoqcrRmmqwxFvUnaWE2IAXVrZ5S0bUFo+YTIwd7cYmOA6ldN8nryUmN5K7UfoF3jBYykqivo/1zEOvwArUR6hMhUOnYo9mo+sC6TeU2lOZjPksHw6cBd4Xkm1INOtqfvtfHg43aPm3fDA3k1ys3j/c= 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: ee691caf-4301-4c5a-eba8-08d639b732c3 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2018 13:47:11.1752 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3455 Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: add NVGRE encap decap to Direct Verbs 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, 24 Oct 2018 13:47:12 -0000 > -----Original Message----- > From: dev On Behalf Of Dekel Peled > Sent: Wednesday, October 24, 2018 2:08 PM > To: Yongseok Koh ; Shahaf Shuler > > Cc: dev@dpdk.org; Ori Kam > Subject: [dpdk-dev] [PATCH 2/2] net/mlx5: add NVGRE encap decap to Direct > Verbs >=20 > This patch adds support for NVGRE encap and decap operations, in > Direct Verbs flow. >=20 > Signed-off-by: Dekel Peled > --- > drivers/net/mlx5/mlx5_flow.h | 2 + > drivers/net/mlx5/mlx5_flow_dv.c | 144 ++++++++++++++++++++++++----------= -- > ---- > 2 files changed, 89 insertions(+), 57 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 9c28e50..dd7c3db 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -94,6 +94,8 @@ > #define MLX5_FLOW_ACTION_SET_MAC_DST (1u << 21) > #define MLX5_FLOW_ACTION_VXLAN_ENCAP (1u << 22) > #define MLX5_FLOW_ACTION_VXLAN_DECAP (1u << 23) > +#define MLX5_FLOW_ACTION_NVGRE_ENCAP (1u << 24) > +#define MLX5_FLOW_ACTION_NVGRE_DECAP (1u << 25) >=20 > #define MLX5_FLOW_FATE_ACTIONS \ > (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | > MLX5_FLOW_ACTION_RSS) > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index 06ecabf..ca87ae8 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -43,7 +43,7 @@ > * Encap buf length, max: > * Eth:14/VLAN:8/IPv6:40/TCP:36/TUNNEL:20/Eth:14 > */ > -#define MLX5_ENCAP_LEN 132 > +#define MLX5_ENCAP_MAX_LEN 132 >=20 > /** > * Validate META item. > @@ -107,7 +107,8 @@ > } >=20 > /** > - * Validate the vxlan encap action. > + * Validate the L2 encap action. > + * Used for VXLAN and NVGRE encap actions. > * > * @param[in] action_flags > * Holds the actions detected until now. > @@ -122,14 +123,12 @@ > * 0 on success, a negative errno value otherwise and rte_errno is set= . > */ > static int > -flow_dv_validate_action_vxlan_encap(uint64_t action_flags, > - const struct rte_flow_action *action, > - const struct rte_flow_attr *attr, > - struct rte_flow_error *error) > +flow_dv_validate_action_l2_encap(uint64_t action_flags, > + const struct rte_flow_action *action, > + const struct rte_flow_attr *attr, > + struct rte_flow_error *error) > { > - const struct rte_flow_action_vxlan_encap *vxlan_encap =3D action->conf; > - > - if (!vxlan_encap) > + if (!(action->conf)) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > action, > "configuration cannot be null"); > @@ -137,11 +136,14 @@ > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and encap in same flow"); > - if (action_flags & MLX5_FLOW_ACTION_VXLAN_ENCAP) > + if (action_flags & (MLX5_FLOW_ACTION_VXLAN_ENCAP | > + MLX5_FLOW_ACTION_VXLAN_DECAP | > + MLX5_FLOW_ACTION_NVGRE_ENCAP | > + MLX5_FLOW_ACTION_NVGRE_DECAP)) Can this be changed to a define or 2 defines? > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > - "can't have 2 encap actions in same" > - " flow"); > + "can have a single encap or decap" > + " action in a flow"); > if (attr->ingress) > return rte_flow_error_set(error, ENOTSUP, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > @@ -152,7 +154,8 @@ > } >=20 > /** > - * Validate the vxlan decap action. > + * Validate the L2 decap action. > + * Used for VXLAN and NVGRE decap actions. > * > * @param[in] action_flags > * Holds the actions detected until now. > @@ -167,7 +170,7 @@ > * 0 on success, a negative errno value otherwise and rte_errno is set= . > */ > static int > -flow_dv_validate_action_vxlan_decap(uint64_t action_flags, > +flow_dv_validate_action_l2_decap(uint64_t action_flags, > const struct rte_flow_action *action __rte_unused, > const struct rte_flow_attr *attr, > struct rte_flow_error *error) > @@ -176,10 +179,14 @@ > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and decap in same flow"); > - if (action_flags & MLX5_FLOW_ACTION_VXLAN_ENCAP) > + if (action_flags & (MLX5_FLOW_ACTION_VXLAN_ENCAP | > + MLX5_FLOW_ACTION_VXLAN_DECAP | > + MLX5_FLOW_ACTION_NVGRE_ENCAP | > + MLX5_FLOW_ACTION_NVGRE_DECAP)) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > - "can't encap and decap in same > flow"); > + "can have a single encap or decap" > + " action in a flow"); > if (attr->egress) > return rte_flow_error_set(error, ENOTSUP, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > @@ -190,18 +197,18 @@ > } >=20 > static size_t item_len[] =3D { > - [RTE_FLOW_ITEM_TYPE_VOID] =3D 0, > - [RTE_FLOW_ITEM_TYPE_ETH] =3D sizeof(struct rte_flow_item_eth), > - [RTE_FLOW_ITEM_TYPE_VLAN] =3D sizeof(struct rte_flow_item_vlan), > - [RTE_FLOW_ITEM_TYPE_IPV4] =3D sizeof(struct rte_flow_item_ipv4), > - [RTE_FLOW_ITEM_TYPE_IPV6] =3D sizeof(struct rte_flow_item_ipv6), > - [RTE_FLOW_ITEM_TYPE_UDP] =3D sizeof(struct rte_flow_item_udp), > - [RTE_FLOW_ITEM_TYPE_TCP] =3D sizeof(struct rte_flow_item_tcp), > - [RTE_FLOW_ITEM_TYPE_VXLAN] =3D sizeof(struct rte_flow_item_vxlan), > - [RTE_FLOW_ITEM_TYPE_GRE] =3D sizeof(struct rte_flow_item_gre), > - [RTE_FLOW_ITEM_TYPE_NVGRE] =3D sizeof(struct rte_flow_item_gre), > + [RTE_FLOW_ITEM_TYPE_VOID] =3D 0, > + [RTE_FLOW_ITEM_TYPE_ETH] =3D sizeof(struct rte_flow_item_eth), > + [RTE_FLOW_ITEM_TYPE_VLAN] =3D sizeof(struct rte_flow_item_vlan), > + [RTE_FLOW_ITEM_TYPE_IPV4] =3D sizeof(struct rte_flow_item_ipv4), > + [RTE_FLOW_ITEM_TYPE_IPV6] =3D sizeof(struct rte_flow_item_ipv6), > + [RTE_FLOW_ITEM_TYPE_UDP] =3D sizeof(struct rte_flow_item_udp), > + [RTE_FLOW_ITEM_TYPE_TCP] =3D sizeof(struct rte_flow_item_tcp), > + [RTE_FLOW_ITEM_TYPE_VXLAN] =3D sizeof(struct > rte_flow_item_vxlan), > + [RTE_FLOW_ITEM_TYPE_GRE] =3D sizeof(struct rte_flow_item_gre), > + [RTE_FLOW_ITEM_TYPE_NVGRE] =3D sizeof(struct > rte_flow_item_nvgre), > [RTE_FLOW_ITEM_TYPE_VXLAN_GPE] =3D sizeof(struct > rte_flow_item_vxlan_gpe), > - [RTE_FLOW_ITEM_TYPE_MPLS] =3D sizeof(struct rte_flow_item_mpls), > + [RTE_FLOW_ITEM_TYPE_MPLS] =3D sizeof(struct > rte_flow_item_mpls), > }; Same comments as in previous patch I think this is error prone, also there is coding style issue. >=20 > /** > @@ -222,8 +229,9 @@ > * 0 on success, a negative errno value otherwise and rte_errno is set= . > */ > static int > -flow_dv_convert_encap(struct rte_flow_item *item, uint8_t *buf, size_t *= size, > - struct rte_flow_error *error, uint16_t l3_type) > +flow_dv_convert_encap(const struct rte_flow_item *item, uint8_t *buf, > + size_t *size, struct rte_flow_error *error, > + uint16_t l3_type) Coding style issue. > { > struct ether_hdr *eth =3D NULL; > struct vlan_hdr *vlan =3D NULL; > @@ -237,9 +245,8 @@ > assert(item); > *size =3D 0; > for (; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) { > - /* TODO: variable length handling: raw, vxlan and nvgre. */ > len =3D item_len[item->type]; > - if (len + *size > MLX5_ENCAP_LEN) > + if (len + *size > MLX5_ENCAP_MAX_LEN) > return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ACTION, > (void *)item->type, > @@ -361,7 +368,8 @@ > } >=20 > /** > - * Convert VXLAN encap action to DV specification. > + * Convert L2 encap action to DV specification. > + * Used for VXLAN and NVGRE encap actions. > * > * @param[in] dev > * Pointer to rte_eth_dev structure. > @@ -374,20 +382,25 @@ > * Pointer to action on success, NULL otherwise and rte_errno is set. > */ > static struct ibv_flow_action * > -flow_dv_create_vxlan_encap(struct rte_eth_dev *dev, > - const struct rte_flow_action *action, > - struct rte_flow_error *error) > +flow_dv_create_l2_encap(struct rte_eth_dev *dev, > + const struct rte_flow_action *action, > + struct rte_flow_error *error) Coding style issue. > { > struct ibv_flow_action *encap_verb =3D NULL; > - const struct rte_flow_action_vxlan_encap *encap_data; > + const struct rte_flow_item *encap_data; > struct priv *priv =3D dev->data->dev_private; > - uint8_t buf[MLX5_ENCAP_LEN]; > + uint8_t buf[MLX5_ENCAP_MAX_LEN]; > size_t size =3D 0; > int convert_result; >=20 > - encap_data =3D (const struct rte_flow_action_vxlan_encap *)action- > >conf; > - convert_result =3D flow_dv_convert_encap(encap_data->definition, > - buf, &size, error, 0); > + if (action->type =3D=3D RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP) > + encap_data =3D ((const struct rte_flow_action_vxlan_encap *) > + action->conf)->definition; > + else > + encap_data =3D ((const struct rte_flow_action_nvgre_encap *) > + action->conf)->definition; Coding style issue. > + convert_result =3D flow_dv_convert_encap(encap_data, buf, &size, > + error, 0); > if (convert_result) > return NULL; > encap_verb =3D mlx5_glue->dv_create_flow_action_packet_reformat > @@ -396,12 +409,13 @@ > MLX5DV_FLOW_TABLE_TYPE_NIC_TX); > if (!encap_verb) > rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > - NULL, "cannot create vxlan encap action"); > + NULL, "cannot create L2 encap action"); > return encap_verb; > } >=20 > /** > - * Convert VXLAN decap action to DV specification. > + * Convert L2 decap action to DV specification. > + * Used for VXLAN and NVGRE decap actions. > * > * @param[in] dev > * Pointer to rte_eth_dev structure. > @@ -414,9 +428,9 @@ > * Pointer to action on success, NULL otherwise and rte_errno is set. > */ > static struct ibv_flow_action * > -flow_dv_create_vxlan_decap(struct rte_eth_dev *dev, > - const struct rte_flow_action *action __rte_unused, > - struct rte_flow_error *error) > +flow_dv_create_l2_decap(struct rte_eth_dev *dev, > + const struct rte_flow_action *action __rte_unused, > + struct rte_flow_error *error) Coding style issue. > { > struct ibv_flow_action *decap_verb =3D NULL; > struct priv *priv =3D dev->data->dev_private; > @@ -683,21 +697,29 @@ > ++actions_n; > break; > case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP: > - ret =3D > flow_dv_validate_action_vxlan_encap(action_flags, > - actions, attr, > - error); > + case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP: > + ret =3D flow_dv_validate_action_l2_encap(action_flags, > + actions, attr, > + error); > if (ret < 0) > return ret; > - action_flags |=3D MLX5_FLOW_ACTION_VXLAN_ENCAP; > + action_flags |=3D (actions->type =3D=3D > + > RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP) ? > + Coding style issue. > MLX5_FLOW_ACTION_VXLAN_ENCAP : > + > MLX5_FLOW_ACTION_NVGRE_ENCAP; > ++actions_n; > break; > case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP: > - ret =3D > flow_dv_validate_action_vxlan_decap(action_flags, > - actions, attr, > - error); > + case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP: > + ret =3D flow_dv_validate_action_l2_decap(action_flags, > + actions, attr, > + error); > if (ret < 0) > return ret; > - action_flags |=3D MLX5_FLOW_ACTION_VXLAN_DECAP; > + action_flags |=3D (actions->type =3D=3D > + > RTE_FLOW_ACTION_TYPE_VXLAN_DECAP) ? > + > MLX5_FLOW_ACTION_VXLAN_DECAP : > + Coding style issue. > MLX5_FLOW_ACTION_NVGRE_DECAP; > ++actions_n; > break; > default: > @@ -1473,27 +1495,35 @@ > flow->actions |=3D MLX5_FLOW_ACTION_RSS; > break; > case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP: > + case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP: > dev_flow->dv.actions[actions_n].type =3D > MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION; > dev_flow->dv.actions[actions_n].action =3D > - flow_dv_create_vxlan_encap(dev, action, > error); > + flow_dv_create_l2_encap(dev, action, error); > if (!(dev_flow->dv.actions[actions_n].action)) > return -rte_errno; > dev_flow->dv.encap_verb =3D > dev_flow->dv.actions[actions_n].action; > - flow->actions |=3D MLX5_FLOW_ACTION_VXLAN_ENCAP; > + flow->actions |=3D > + (action->type =3D=3D > RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP ? > + MLX5_FLOW_ACTION_VXLAN_ENCAP > : > + Incorrect brackets. > MLX5_FLOW_ACTION_NVGRE_ENCAP); > actions_n++; > break; > case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP: > + case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP: > dev_flow->dv.actions[actions_n].type =3D > MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION; > dev_flow->dv.actions[actions_n].action =3D > - flow_dv_create_vxlan_decap(dev, action, > error); > + flow_dv_create_l2_decap(dev, action, error); > if (!(dev_flow->dv.actions[actions_n].action)) > return -rte_errno; > dev_flow->dv.decap_verb =3D > dev_flow->dv.actions[actions_n].action; > - flow->actions |=3D MLX5_FLOW_ACTION_VXLAN_DECAP; > + flow->actions |=3D > + (action->type =3D=3D > RTE_FLOW_ACTION_TYPE_VXLAN_DECAP ? > + MLX5_FLOW_ACTION_VXLAN_DECAP > : > + Incorrect brackets > MLX5_FLOW_ACTION_NVGRE_DECAP); > actions_n++; > break; > default: > -- > 1.8.3.1