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 A1EC5A0556; Thu, 20 Feb 2020 13:43:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55CD11C07C; Thu, 20 Feb 2020 13:43:57 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70079.outbound.protection.outlook.com [40.107.7.79]) by dpdk.org (Postfix) with ESMTP id 5C9EA1C07B; Thu, 20 Feb 2020 13:43:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YtYdKNScjbV4kVw2fmu3IxzBWtcStIMx5R+S6FBiVQIulZ4iGqcmUPGC3iiZ4XOlpbJSvjCpHNIF5F9ZdjA9DP05UJo8qX9lVXcTWx5lvCof3My2Ei85avgiJFLxkI5aPApuH85W2U0oT/UD3KuNUVkAL21oeB5/tqGeWymL98l79wfUBTPkDHjNJTH6qlLG5YsUcHXTbbUQ4LoBMMNFsJNwC3dpd6b/jiCu3b9bxHoDyhoWvgj0zQm+j5/KyCGLa1C2sBcsHMjazdF3jy2XqkPCoJbsN3BbPw8bohxNa3oNxZsHjng62WFjVzaEx/Z54aQRKZmHm0Mc9BtuTwNJJA== 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=j8KG7OARl5UQZ0BWge61QXRTui9G24U2G8qrgJ2N8Pg=; b=DawtHSiOk4tPpH9ZRGqzsvVDBxUMlhULuMUSyTsl1lNG8SG1kq6VyR398tkQIpHhbXfUxAPuakOv6vbyrDvklFCZIcRb6ookzznE+zI5VXT2hdetqG0mxpREaF1oid2GlBIU3gyRamCB+p/TGZb3x4ZWJe7UHuqrZoBedx6YTGjSu05eL3r7HcLPazO9LnOanjrWn3lMpJasQnwsO4YHPRjOBhU78jhC52NtoFQdSx1Fmm8OdefFvU2HjpbP6KWKCjacKjXNqVZr+64NVNGgGnNVpSQljri5+H+L/cuUUkcx/90A1YD5LHpZ6x4ZciH8Y17FYHAEos8GZZNgsyE4Fw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j8KG7OARl5UQZ0BWge61QXRTui9G24U2G8qrgJ2N8Pg=; b=pCBEoUQ9J2x2mXzagf/fj5vrGOMOewYBhXf0d+5XWUTNLeTGv50utx8O6zA4u0VLGQV8DTBptCnO7azkEGtaej0nD6/x9EnnMsGS3D7SQAxRqVDWpiOeLGrYMvMoJllAgctDHBxI0YMKH4lMNDyIvyirjIutFiFVLnJDC8lkM6A= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB4754.eurprd05.prod.outlook.com (52.133.59.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.29; Thu, 20 Feb 2020 12:43:54 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9%7]) with mapi id 15.20.2750.016; Thu, 20 Feb 2020 12:43:54 +0000 From: Raslan Darawsheh To: Suanming Mou , Slava Ovsiienko , Matan Azrad CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix VLAN actions in meter Thread-Index: AQHV58HEqgx60mh3FE2B5F1OJtMhcKgkBzQg Date: Thu, 20 Feb 2020 12:43:54 +0000 Message-ID: References: <1582184744-91629-1-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1582184744-91629-1-git-send-email-suanmingm@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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 44cdbf2b-2b21-4286-c63c-08d7b6028b73 x-ms-traffictypediagnostic: AM0PR05MB4754:|AM0PR05MB4754: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:628; x-forefront-prvs: 031996B7EF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(396003)(39850400004)(366004)(189003)(199004)(7696005)(52536014)(66556008)(2906002)(66476007)(53546011)(5660300002)(33656002)(64756008)(478600001)(6506007)(66946007)(30864003)(26005)(186003)(66446008)(450100002)(9686003)(86362001)(6636002)(71200400001)(8676002)(55016002)(54906003)(316002)(76116006)(8936002)(110136005)(81166006)(81156014)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4754; H:AM0PR05MB6707.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: BCL:0; x-microsoft-antispam-message-info: dlJNe9HWIjxDtvQUsA0xyJFg/k9Nb3IOT/zAHSZbBJIWp+fEoVwu/0iIvzRyb3izw9bTqKsG9vW6y+KIQABJZYpgTSpL8vV68S3/f9LItVyiwpZHOY6j7geXlSEgEKkLFxI76rQL7D90tOchjuD+hMHemIhsXuNovPqxSvchEdD5Dw0611VYY1QuIC5c9V3tjCZ7U5A2i0iZNT0coYJ5ivlPwOCpcXzJl8JXbh7DyFVi8Oz433/xVmQQaBBNvKLcWwb1/FkLtV57htavEl+IAauQdfy0c76k7hFvGqVMh+d/SK6iUGH8+VHYanAsC3EVklAw3sdLeOI5LJn0Zxt35kXaf9UIWj0JnaqDacrtlwVQyAwb7HNX91P9Ul74xZmW/lCM3MXdDLTJHl6PlDi5AOeNZgeNVRhGBiyI0bNEIloI0ZOU3G82KC7zsMH32+vL x-ms-exchange-antispam-messagedata: TW9J10Xw04MMn4B5jhUnHCUiwtIlYeMruNIDp7k/8ETabZfAjxAHNpcTDrkv/FygV+qJEt3M9g/qpP2So+5fiOHh6b78pyK9qsaGsS92iUne3MCVR8a6e3SEQbCkLIP/mEOK7M0NccBVJJ+zzcnNRQ== 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: 44cdbf2b-2b21-4286-c63c-08d7b6028b73 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2020 12:43:54.0740 (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: aaHTnk4Jm3E8JB+gLPYpmhTfd37C1tbh0DmWBh2dLDpTwwpjjGqgz555a2GmAFCMpqVJnVkUBg74f+U0oX1kkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4754 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix VLAN actions in meter 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" Hi, > -----Original Message----- > From: Suanming Mou > Sent: Thursday, February 20, 2020 9:46 AM > To: Slava Ovsiienko ; Matan Azrad > > Cc: dev@dpdk.org; Raslan Darawsheh ; > stable@dpdk.org > Subject: [PATCH] net/mlx5: fix VLAN actions in meter >=20 > Meter suffix subflow only has the port id and tag match item, if VLAN > push and set VLAN id actions exist in the suffix subflow, the user > defined VLAN items is required for the actions to set a correct VLAN > id. >=20 > Currently, the VLAN item stays in the meter prefix subflow. Without > the VLAN item, VLAN id or pcp will not be inherited. >=20 > Actions require the VLAN item as below: > RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN > RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID >=20 > Add a private VLAN item to copy the user defined VLAN item to the meter > suffix subflow, so the suffix subflow will have the chance to get the > correct original VLAN id and pcp value from the VLAN item. >=20 > Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Suanming Mou > --- > drivers/net/mlx5/mlx5_flow.c | 153 ++++++++++++++++++----------------= -- > ---- > drivers/net/mlx5/mlx5_flow.h | 4 ++ > drivers/net/mlx5/mlx5_flow_dv.c | 14 ++-- > 3 files changed, 82 insertions(+), 89 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index e5d2e64..2a78c43 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -2664,26 +2664,6 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > } >=20 > /** > - * Get port id item from the item list. > - * > - * @param[in] item > - * Pointer to the list of items. > - * > - * @return > - * Pointer to the port id item if exist, else return NULL. > - */ > -static const struct rte_flow_item * > -find_port_id_item(const struct rte_flow_item *item) > -{ > - MLX5_ASSERT(item); > - for (; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) { > - if (item->type =3D=3D RTE_FLOW_ITEM_TYPE_PORT_ID) > - return item; > - } > - return NULL; > -} > - > -/** > * Get RSS action from the action list. > * > * @param[in] actions > @@ -3502,6 +3482,10 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > * > * @param dev > * Pointer to Ethernet device. > + * @param[in] items > + * Pattern specification (list terminated by the END pattern item). > + * @param[out] sfx_items > + * Suffix flow match items (list terminated by the END pattern item). > * @param[in] actions > * Associated actions (list terminated by the END action). > * @param[out] actions_sfx > @@ -3518,70 +3502,60 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > */ > static int > flow_meter_split_prep(struct rte_eth_dev *dev, > + const struct rte_flow_item items[], > + struct rte_flow_item sfx_items[], > const struct rte_flow_action actions[], > struct rte_flow_action actions_sfx[], > struct rte_flow_action actions_pre[]) > { > struct rte_flow_action *tag_action =3D NULL; > + struct rte_flow_item *tag_item; > struct mlx5_rte_flow_action_set_tag *set_tag; > struct rte_flow_error error; > const struct rte_flow_action_raw_encap *raw_encap; > const struct rte_flow_action_raw_decap *raw_decap; > + struct mlx5_rte_flow_item_tag *tag_spec; > + struct mlx5_rte_flow_item_tag *tag_mask; > uint32_t tag_id; > + bool copy_vlan =3D false; >=20 > /* Prepare the actions for prefix and suffix flow. */ > for (; actions->type !=3D RTE_FLOW_ACTION_TYPE_END; actions++) { > + struct rte_flow_action **action_cur =3D NULL; > + > switch (actions->type) { > case RTE_FLOW_ACTION_TYPE_METER: > /* Add the extra tag action first. */ > tag_action =3D actions_pre; > tag_action->type =3D > MLX5_RTE_FLOW_ACTION_TYPE_TAG; > actions_pre++; > - memcpy(actions_pre, actions, > - sizeof(struct rte_flow_action)); > - actions_pre++; > + action_cur =3D &actions_pre; > break; > case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP: > case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP: > - memcpy(actions_pre, actions, > - sizeof(struct rte_flow_action)); > - actions_pre++; > + action_cur =3D &actions_pre; > break; > case RTE_FLOW_ACTION_TYPE_RAW_ENCAP: > raw_encap =3D actions->conf; > - if (raw_encap->size > > - (sizeof(struct rte_flow_item_eth) + > - sizeof(struct rte_flow_item_ipv4))) { > - memcpy(actions_sfx, actions, > - sizeof(struct rte_flow_action)); > - actions_sfx++; > - } else { > - rte_memcpy(actions_pre, actions, > - sizeof(struct rte_flow_action)); > - actions_pre++; > - } > + if (raw_encap->size < > MLX5_ENCAPSULATION_DECISION_SIZE) > + action_cur =3D &actions_pre; > break; > case RTE_FLOW_ACTION_TYPE_RAW_DECAP: > raw_decap =3D actions->conf; > - /* Size 0 decap means 50 bytes as vxlan decap. */ > - if (raw_decap->size && (raw_decap->size < > - (sizeof(struct rte_flow_item_eth) + > - sizeof(struct rte_flow_item_ipv4)))) { > - memcpy(actions_sfx, actions, > - sizeof(struct rte_flow_action)); > - actions_sfx++; > - } else { > - rte_memcpy(actions_pre, actions, > - sizeof(struct rte_flow_action)); > - actions_pre++; > - } > + if (raw_decap->size > > MLX5_ENCAPSULATION_DECISION_SIZE) > + action_cur =3D &actions_pre; > + break; > + case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: > + case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID: > + copy_vlan =3D true; > break; > default: > - memcpy(actions_sfx, actions, > - sizeof(struct rte_flow_action)); > - actions_sfx++; > break; > } > + if (!action_cur) > + action_cur =3D &actions_sfx; > + memcpy(*action_cur, actions, sizeof(struct > rte_flow_action)); > + (*action_cur)++; > } > /* Add end action to the actions. */ > actions_sfx->type =3D RTE_FLOW_ACTION_TYPE_END; > @@ -3597,6 +3571,42 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > set_tag->data =3D tag_id << MLX5_MTR_COLOR_BITS; > assert(tag_action); > tag_action->conf =3D set_tag; > + /* Prepare the suffix subflow items. */ > + tag_item =3D sfx_items++; > + for (; items->type !=3D RTE_FLOW_ITEM_TYPE_END; items++) { > + int item_type =3D items->type; > + > + switch (item_type) { > + case RTE_FLOW_ITEM_TYPE_PORT_ID: > + memcpy(sfx_items, items, sizeof(*sfx_items)); > + sfx_items++; > + break; > + case RTE_FLOW_ITEM_TYPE_VLAN: > + if (copy_vlan) { > + memcpy(sfx_items, items, > sizeof(*sfx_items)); > + /* > + * Convert to internal match item, it is used > + * for vlan push and set vid. > + */ > + sfx_items->type =3D > MLX5_RTE_FLOW_ITEM_TYPE_VLAN; > + sfx_items++; > + } > + break; > + default: > + break; > + } > + } > + sfx_items->type =3D RTE_FLOW_ITEM_TYPE_END; > + sfx_items++; > + tag_spec =3D (struct mlx5_rte_flow_item_tag *)sfx_items; > + tag_spec->data =3D tag_id << MLX5_MTR_COLOR_BITS; > + tag_spec->id =3D mlx5_flow_get_reg_id(dev, MLX5_MTR_SFX, 0, > &error); > + tag_mask =3D tag_spec + 1; > + tag_mask->data =3D 0xffffff00; > + tag_item->type =3D MLX5_RTE_FLOW_ITEM_TYPE_TAG; > + tag_item->spec =3D tag_spec; > + tag_item->last =3D NULL; > + tag_item->mask =3D tag_mask; > return tag_id; > } >=20 > @@ -4023,7 +4033,6 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > struct rte_flow_action *sfx_actions =3D NULL; > struct rte_flow_action *pre_actions =3D NULL; > struct rte_flow_item *sfx_items =3D NULL; > - const struct rte_flow_item *sfx_port_id_item; > struct mlx5_flow *dev_flow =3D NULL; > struct rte_flow_attr sfx_attr =3D *attr; > uint32_t mtr =3D 0; > @@ -4036,13 +4045,11 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > if (priv->mtr_en) > actions_n =3D flow_check_meter_action(actions, &mtr); > if (mtr) { > - struct mlx5_rte_flow_item_tag *tag_spec; > - struct mlx5_rte_flow_item_tag *tag_mask; > /* The five prefix actions: meter, decap, encap, tag, end. */ > act_size =3D sizeof(struct rte_flow_action) * (actions_n + 5) + > - sizeof(struct rte_flow_action_set_tag); > - /* tag, end. */ > -#define METER_SUFFIX_ITEM 3 > + sizeof(struct mlx5_rte_flow_action_set_tag); > + /* tag, vlan, port id, end. */ > +#define METER_SUFFIX_ITEM 4 > item_size =3D sizeof(struct rte_flow_item) * > METER_SUFFIX_ITEM + > sizeof(struct mlx5_rte_flow_item_tag) * 2; > sfx_actions =3D rte_zmalloc(__func__, (act_size + item_size), > 0); > @@ -4051,9 +4058,12 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, >=20 > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, "no memory to split " > "meter flow"); > + sfx_items =3D (struct rte_flow_item *)((char *)sfx_actions + > + act_size); > pre_actions =3D sfx_actions + actions_n; > - mtr_tag_id =3D flow_meter_split_prep(dev, actions, > sfx_actions, > - pre_actions); > + mtr_tag_id =3D flow_meter_split_prep(dev, items, sfx_items, > + actions, sfx_actions, > + pre_actions); > if (!mtr_tag_id) { > ret =3D -rte_errno; > goto exit; > @@ -4067,29 +4077,6 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > goto exit; > } > dev_flow->mtr_flow_id =3D mtr_tag_id; > - /* Prepare the suffix flow match pattern. */ > - sfx_items =3D (struct rte_flow_item *)((char *)sfx_actions + > - act_size); > - tag_spec =3D (struct mlx5_rte_flow_item_tag *)(sfx_items + > - METER_SUFFIX_ITEM); > - tag_spec->data =3D dev_flow->mtr_flow_id << > MLX5_MTR_COLOR_BITS; > - tag_spec->id =3D mlx5_flow_get_reg_id(dev, MLX5_MTR_SFX, > 0, > - error); > - tag_mask =3D tag_spec + 1; > - tag_mask->data =3D 0xffffff00; > - sfx_items->type =3D MLX5_RTE_FLOW_ITEM_TYPE_TAG; > - sfx_items->spec =3D tag_spec; > - sfx_items->last =3D NULL; > - sfx_items->mask =3D tag_mask; > - sfx_items++; > - sfx_port_id_item =3D find_port_id_item(items); > - if (sfx_port_id_item) { > - memcpy(sfx_items, sfx_port_id_item, > - sizeof(*sfx_items)); > - sfx_items++; > - } > - sfx_items->type =3D RTE_FLOW_ITEM_TYPE_END; > - sfx_items -=3D sfx_port_id_item ? 2 : 1; > /* Setting the sfx group atrr. */ > sfx_attr.group =3D sfx_attr.transfer ? > (MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) : > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 791f3bd..13c8589 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -34,6 +34,7 @@ enum mlx5_rte_flow_item_type { > MLX5_RTE_FLOW_ITEM_TYPE_END =3D INT_MIN, > MLX5_RTE_FLOW_ITEM_TYPE_TAG, > MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE, > + MLX5_RTE_FLOW_ITEM_TYPE_VLAN, > }; >=20 > /* Private (internal) rte flow actions. */ > @@ -328,6 +329,9 @@ enum mlx5_feature_name { > #define MLX5_GENEVE_OPT_LEN_0 14 > #define MLX5_GENEVE_OPT_LEN_1 63 >=20 > +#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct > rte_flow_item_eth) + \ > + sizeof(struct rte_flow_item_ipv4)) > + > enum mlx5_flow_drv_type { > MLX5_FLOW_TYPE_MIN, > MLX5_FLOW_TYPE_DV, > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index 3fac288..2437e55 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -54,8 +54,6 @@ > #define MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL 1 > #endif >=20 > -#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct > rte_flow_item_eth) + \ > - sizeof(struct rte_flow_item_ipv4)) > /* VLAN header definitions */ > #define MLX5DV_FLOW_VLAN_PCP_SHIFT 13 > #define MLX5DV_FLOW_VLAN_PCP_MASK (0x7 << > MLX5DV_FLOW_VLAN_PCP_SHIFT) > @@ -1757,10 +1755,14 @@ struct field_modify_info modify_tcp[] =3D { >=20 > if (items =3D=3D NULL) > return; > - for (; items->type !=3D RTE_FLOW_ITEM_TYPE_END && > - items->type !=3D RTE_FLOW_ITEM_TYPE_VLAN; items++) > - ; > - if (items->type =3D=3D RTE_FLOW_ITEM_TYPE_VLAN) { > + for (; items->type !=3D RTE_FLOW_ITEM_TYPE_END; items++) { > + int type =3D items->type; > + > + if (type =3D=3D RTE_FLOW_ITEM_TYPE_VLAN || > + type =3D=3D MLX5_RTE_FLOW_ITEM_TYPE_VLAN) > + break; > + } > + if (items->type !=3D RTE_FLOW_ITEM_TYPE_END) { > const struct rte_flow_item_vlan *vlan_m =3D items->mask; > const struct rte_flow_item_vlan *vlan_v =3D items->spec; >=20 > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh