From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00062.outbound.protection.outlook.com [40.107.0.62]) by dpdk.org (Postfix) with ESMTP id 829942952 for ; Wed, 3 Oct 2018 08:06:09 +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=2zMMCAQkLEnu8Ub7QqTcR8Wf6nGbebIkCRMKRW5fQjQ=; b=gTyKaX4ww7r48pJgS9uWRBrKVUM1Co3d5PY9u5gOVrzMeHcrcT9H2CR+N8+/OBl6ZD15LE54hsIyeTXXVzYyjWb2Ih5fHzyqYZzs35V9gaWcKLg0EiWq/V06ECPJNNE5HZ2d9Wrab2Kgfui5GipdW+XSRi1DN4S0SmC9G8Q2wok= Received: from VI1PR05MB4224.eurprd05.prod.outlook.com (52.133.12.13) by VI1PR05MB4272.eurprd05.prod.outlook.com (52.133.12.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Wed, 3 Oct 2018 06:06:08 +0000 Received: from VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b]) by VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b%3]) with mapi id 15.20.1207.018; Wed, 3 Oct 2018 06:06:07 +0000 From: Dekel Peled To: Yongseok Koh CC: "dev@dpdk.org" , Shahaf Shuler , Ori Kam Thread-Topic: [PATCH] net/mlx5: allow flow rule with attribute egress Thread-Index: AQHUV9Y3nnywEO24Dk6IiJn6Z4VHLaUNAoqQ Date: Wed, 3 Oct 2018 06:06:07 +0000 Message-ID: References: <1538058330-34990-1-git-send-email-dekelp@mellanox.com> <20180929092415.GB95127@minint-98vp2qg> In-Reply-To: <20180929092415.GB95127@minint-98vp2qg> 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=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB4272; 6:O32OGCEjLIvi5bW8BJWaxuUGbc/KhHLeVF4LhhqFZs+/gOuVJyM8r5qdHm6YYOIxUiTf9s+ZquBh0Qfd0nNvWrMHQdCjqPI0pr2bbYaaXPgtbZuRvEKHH3wYzSHKZbUG+eAZNQWkpcljTbdV/NecBdfLrm3yfYnIHiHo4mxp1trq6UcD9K6WBu5imLpQsWM3NLowfUgqHhdVWFsKpCTnfbW6MWu94gRdd8eNub8UPe4ES2b8UmOQ41lIaTUdKRVFV5M+L7sB0AhcgkQHf1xi6iCgIJTOZLRI65paLO7MqfE90Gm6CHRg0g9pyxcS0Hazyy8emum85svA7NDx3+8/mzGoVL1UaAVRfNjF3cTUwH5dEU10KwXbV7l95o4W8WnKroO8nR5N094QZYtTqOrQXRn/LkFFl2sP+Xoq/FOp88yBnQZAOWUyjw0P/M279OdoZ977x3WKc6V7hQ8gRPN8oA==; 5:wqzyCit2sn5WqpCw+vXbT/u3IGh087bf+MJOi/9ikQ9ekHWy4K9OlYoFvcss6IFVRAtbe+IlR1lpya9EYWFcYsmAm8aFU01YZwM1fZJwcL07T2awlkerMXA0zdn9JFRBNRF7q0/gUpOcW7yipoQhvALdiWnRWXdFCwrJ2ZzIyv0=; 7:oHmVzeyzzkFD7LoqzuFay/HPk7yxk2vgByOOvk6Xsj5Gfvuk5+AjbzzHLEa0ivBmuy4eqpzUUtH+HP9W9UqlvEpyFumXdfAiZp1E0NfX6NTsJUGiLoajscmalDVVoDp51YacDfqO/23aLYbCu4Ayr8FkkoSXECLAbiCoZNoGnawD0MU47scK/vGwXpm/WV3MHL9iAAtoNWmKZTK3a69QAAfv0SuleQ4lUj9yKpScznQs6mSODciG/B6NEUeoJbQX x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 26595502-d3ca-4e43-f3a6-08d628f64f6d 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:VI1PR05MB4272; x-ms-traffictypediagnostic: VI1PR05MB4272: 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)(3231355)(944501410)(4982022)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:VI1PR05MB4272; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4272; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(39860400002)(376002)(346002)(13464003)(189003)(199004)(51234002)(11346002)(229853002)(14444005)(33656002)(966005)(53936002)(71200400001)(97736004)(6506007)(6246003)(76176011)(4326008)(25786009)(99286004)(3846002)(186003)(53946003)(102836004)(2900100001)(86362001)(486006)(71190400001)(6862004)(53546011)(9686003)(55016002)(6306002)(107886003)(6436002)(6116002)(54906003)(26005)(256004)(105586002)(106356001)(316002)(6636002)(446003)(476003)(8676002)(5250100002)(5660300001)(68736007)(74316002)(2906002)(7696005)(14454004)(81166006)(478600001)(7736002)(4744004)(305945005)(81156014)(8936002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4272; H:VI1PR05MB4224.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: wdVLD9wlxxZJCFXTlOwVjIDboDRCGJTcil34TpjSrScM/ETU0G6c/xpsZSdgDbC2R7ZJkFrYzYW1Mr2J90O2dBqu+FYvRniO4l4WHNBBThxY7xxZvD2s/3kumV3qEy1gRkwT4dw4e06r8zEFClOykd1B9WtsYlZGw4q7luF/0PgysbYbiI0cogfapS8JCw4cQAmF77bK0HDSX3VAcVxdcfBjrorOdV5A7pEbjUwNzCTrTolF5Tbt40Pox0AgLAZRVXWN+TLC072hU1EXZNSnU+QwOBlipGdPZ3FUBKkrDUILRN6W9X/2S/GTExmyOMSO/fUrwSUSAmACu1jXbJQ9r7GNJ5utQ3wm1xLaJwQ9KcI= 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: 26595502-d3ca-4e43-f3a6-08d628f64f6d X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2018 06:06:07.7769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4272 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: allow flow rule with attribute egress 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, 03 Oct 2018 06:06:09 -0000 Thanks, PSB. > -----Original Message----- > From: Yongseok Koh > Sent: Saturday, September 29, 2018 12:24 PM > To: Dekel Peled > Cc: dev@dpdk.org; Shahaf Shuler ; Ori Kam > > Subject: Re: [PATCH] net/mlx5: allow flow rule with attribute egress >=20 > On Thu, Sep 27, 2018 at 05:25:30PM +0300, Dekel Peled wrote: > > This patch complements [1], adding to MLX5 PMD the option to set flow > > rule for egress traffic. > > > > [1] "net/mlx5: support metadata as flow rule criteria" > > http://mails.dpdk.org/archives/dev/2018-September/113275.html > > > > Signed-off-by: Dekel Peled > > --- > > drivers/net/mlx5/mlx5_flow.c | 54 > ++++++++++++++++++++++++++++++++++++++ > > drivers/net/mlx5/mlx5_flow.h | 6 +++++ > > drivers/net/mlx5/mlx5_flow_dv.c | 24 ++++++++++------- > > drivers/net/mlx5/mlx5_flow_verbs.c | 7 ++++- > > 4 files changed, 80 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > b/drivers/net/mlx5/mlx5_flow.c index 9581691..79a06df 100644 > > --- a/drivers/net/mlx5/mlx5_flow.c > > +++ b/drivers/net/mlx5/mlx5_flow.c > > @@ -644,6 +644,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * > > * @param[in] action_flags > > * Bit-fields that holds the actions detected until now. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -652,6 +654,7 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > */ > > int > > mlx5_flow_validate_action_flag(uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) { > > > > @@ -668,6 +671,12 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > > "can't have 2 flag" > > " actions in same flow"); > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, >=20 > These two lines could be one line. Can't do, It exceeds the 80 characters limit. >=20 > > + "flag action not supported for " > > + "egress"); > > return 0; > > } > > > > @@ -678,6 +687,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * Pointer to the queue action. > > * @param[in] action_flags > > * Bit-fields that holds the actions detected until now. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -687,6 +698,7 @@ uint32_t mlx5_flow_adjust_priority(struct > > rte_eth_dev *dev, int32_t priority, int > > mlx5_flow_validate_action_mark(const struct rte_flow_action *action, > > uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) { > > const struct rte_flow_action_mark *mark =3D action->conf; @@ -715,6 > > +727,12 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, > int32_t priority, > > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > > "can't have 2 flag actions in same" > > " flow"); > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, >=20 > Ditto. There are a few more occurrences below. Can't do, It exceeds the 80 characters limit. >=20 > > + "mark action not supported for " > > + "egress"); > > return 0; > > } > > > > @@ -723,6 +741,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * > > * @param[in] action_flags > > * Bit-fields that holds the actions detected until now. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -731,6 +751,7 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > */ > > int > > mlx5_flow_validate_action_drop(uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) { > > if (action_flags & MLX5_ACTION_FLAG) @@ -747,6 +768,12 @@ > uint32_t > > mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, > > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > > "can't have 2 fate actions in" > > " same flow"); > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, > > + "drop action not supported for " > > + "egress"); > > return 0; > > } > > > > @@ -759,6 +786,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * Bit-fields that holds the actions detected until now. > > * @param[in] dev > > * Pointer to the Ethernet device structure. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -769,6 +798,7 @@ uint32_t mlx5_flow_adjust_priority(struct > > rte_eth_dev *dev, int32_t priority, > mlx5_flow_validate_action_queue(const struct rte_flow_action *action, > > uint64_t action_flags, > > struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) > > { > > struct priv *priv =3D dev->data->dev_private; @@ -790,6 +820,12 @@ > > uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t > priority, > > > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > > &queue->index, > > "queue is not configured"); > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, > > + "queue action not supported for " > > + "egress"); > > return 0; > > } > > > > @@ -802,6 +838,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * Bit-fields that holds the actions detected until now. > > * @param[in] dev > > * Pointer to the Ethernet device structure. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -812,6 +850,7 @@ uint32_t mlx5_flow_adjust_priority(struct > > rte_eth_dev *dev, int32_t priority, mlx5_flow_validate_action_rss(cons= t > struct rte_flow_action *action, > > uint64_t action_flags, > > struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) { > > struct priv *priv =3D dev->data->dev_private; @@ -866,6 +905,12 @@ > > uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t > priority, > > (error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > > &rss->queue[i], "queue is not configured"); > > } > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, > > + "rss action not supported for " > > + "egress"); > > return 0; > > } > > > > @@ -874,6 +919,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > * > > * @param[in] dev > > * Pointer to the Ethernet device structure. > > + * @param[in] attr > > + * Attributes of flow that includes this action. > > * @param[out] error > > * Pointer to error structure. > > * > > @@ -882,6 +929,7 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > */ > > int > > mlx5_flow_validate_action_count(struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error) > > { > > struct priv *priv =3D dev->data->dev_private; @@ -890,6 +938,12 @@ > > uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t > priority, > > return rte_flow_error_set(error, ENOTSUP, > > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > > "flow counters are not supported."); > > + if (attr->egress) > > + return rte_flow_error_set(error, ENOTSUP, > > + > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > + NULL, > > + "count action not supported for " > > + "egress"); > > return 0; > > } > > > > diff --git a/drivers/net/mlx5/mlx5_flow.h > > b/drivers/net/mlx5/mlx5_flow.h index d91ae17..a353d07 100644 > > --- a/drivers/net/mlx5/mlx5_flow.h > > +++ b/drivers/net/mlx5/mlx5_flow.h > > @@ -283,21 +283,27 @@ uint64_t mlx5_flow_hashfields_adjust(struct > > mlx5_flow *dev_flow, int tunnel, uint32_t > mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, > > uint32_t subpriority); > > int mlx5_flow_validate_action_count(struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); int > > mlx5_flow_validate_action_drop(uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); int > > mlx5_flow_validate_action_flag(uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); int > > mlx5_flow_validate_action_mark(const struct rte_flow_action *action, > > uint64_t action_flags, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); int > > mlx5_flow_validate_action_queue(const struct rte_flow_action *action, > > uint64_t action_flags, > > struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); int > > mlx5_flow_validate_action_rss(const struct rte_flow_action *action, > > uint64_t action_flags, > > struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > struct rte_flow_error *error); > > int mlx5_flow_validate_attributes(struct rte_eth_dev *dev, > > const struct rte_flow_attr *attributes, diff -- > git > > a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c > > index 2439f5e..1f3fcb8 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -117,21 +117,17 @@ > > > RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY, > > NULL, > > "priority out of range"); > > - if (attributes->egress) > > - return rte_flow_error_set(error, ENOTSUP, > > - > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, > > - NULL, > > - "egress is not supported"); > > if (attributes->transfer) > > return rte_flow_error_set(error, ENOTSUP, > > > RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER, > > NULL, > > "transfer is not supported"); > > - if (!attributes->ingress) > > + if (!(attributes->egress ^ attributes->ingress)) > > return rte_flow_error_set(error, ENOTSUP, > > - > RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > > + RTE_FLOW_ERROR_TYPE_ATTR, > > NULL, > > - "ingress attribute is mandatory"); > > + "must specify exactly one of " > > + "ingress or egress"); > > return 0; > > } > > > > @@ -288,6 +284,7 @@ > > break; > > case RTE_FLOW_ACTION_TYPE_FLAG: > > ret =3D mlx5_flow_validate_action_flag(action_flags, > > + attr, > > error); >=20 > Merge into one line as much as you can. Same comment for the rest. Done. >=20 > > if (ret < 0) > > return ret; > > @@ -297,6 +294,7 @@ > > case RTE_FLOW_ACTION_TYPE_MARK: > > ret =3D mlx5_flow_validate_action_mark(actions, > > action_flags, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -305,6 +303,7 @@ > > break; > > case RTE_FLOW_ACTION_TYPE_DROP: > > ret =3D mlx5_flow_validate_action_drop(action_flags, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -314,6 +313,7 @@ > > case RTE_FLOW_ACTION_TYPE_QUEUE: > > ret =3D mlx5_flow_validate_action_queue(actions, > > action_flags, dev, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -323,6 +323,7 @@ > > case RTE_FLOW_ACTION_TYPE_RSS: > > ret =3D mlx5_flow_validate_action_rss(actions, > > action_flags, dev, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -330,7 +331,7 @@ > > ++actions_n; > > break; > > case RTE_FLOW_ACTION_TYPE_COUNT: > > - ret =3D mlx5_flow_validate_action_count(dev, error); > > + ret =3D mlx5_flow_validate_action_count(dev, attr, > error); > > if (ret < 0) > > return ret; > > action_flags |=3D MLX5_ACTION_COUNT; @@ -1080,6 > +1081,7 @@ > > queue =3D action->conf; > > flow->rss.queue_num =3D 1; > > (*flow->queue)[0] =3D queue->index; > > + flow->actions |=3D MLX5_ACTION_QUEUE; > > break; > > case RTE_FLOW_ACTION_TYPE_RSS: > > rss =3D action->conf; > > @@ -1091,6 +1093,7 @@ > > flow->rss.types =3D rss->types; > > flow->rss.level =3D rss->level; > > /* Added to array only in apply since we need the QP */ > > + flow->actions |=3D MLX5_ACTION_RSS; >=20 > Let's do the same for the rest of actions. Done. >=20 > > break; > > default: > > break; > > @@ -1301,7 +1304,8 @@ > > dv->actions[n].type =3D > MLX5DV_FLOW_ACTION_DEST_IBV_QP; > > dv->actions[n].qp =3D dv->hrxq->qp; > > n++; > > - } else { > > + } else if (flow->actions & > > + (MLX5_ACTION_QUEUE | MLX5_ACTION_RSS)) { >=20 > The previous code is not wrong but definitely error-prone. Can you please > make the same change for the verbs code? You can create a separate patch > for this fix. I will do it. >=20 > > struct mlx5_hrxq *hrxq; > > hrxq =3D mlx5_hrxq_get(dev, flow->key, > > MLX5_RSS_HASH_KEY_LEN, > > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > > b/drivers/net/mlx5/mlx5_flow_verbs.c > > index 05ab5fd..b1aa704 100644 > > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > > @@ -1112,6 +1112,7 @@ > > break; > > case RTE_FLOW_ACTION_TYPE_FLAG: > > ret =3D mlx5_flow_validate_action_flag(action_flags, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -1120,6 +1121,7 @@ > > case RTE_FLOW_ACTION_TYPE_MARK: > > ret =3D mlx5_flow_validate_action_mark(actions, > > action_flags, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -1127,6 +1129,7 @@ > > break; > > case RTE_FLOW_ACTION_TYPE_DROP: > > ret =3D mlx5_flow_validate_action_drop(action_flags, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -1135,6 +1138,7 @@ > > case RTE_FLOW_ACTION_TYPE_QUEUE: > > ret =3D mlx5_flow_validate_action_queue(actions, > > action_flags, dev, > > + attr, > > error); > > if (ret < 0) > > return ret; > > @@ -1143,13 +1147,14 @@ > > case RTE_FLOW_ACTION_TYPE_RSS: > > ret =3D mlx5_flow_validate_action_rss(actions, > > action_flags, dev, > > + attr, > > error); > > if (ret < 0) > > return ret; > > action_flags |=3D MLX5_ACTION_RSS; > > break; > > case RTE_FLOW_ACTION_TYPE_COUNT: > > - ret =3D mlx5_flow_validate_action_count(dev, error); > > + ret =3D mlx5_flow_validate_action_count(dev, attr, > error); > > if (ret < 0) > > return ret; > > action_flags |=3D MLX5_ACTION_COUNT; > > -- > > 1.8.3.1 > >