From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40043.outbound.protection.outlook.com [40.107.4.43]) by dpdk.org (Postfix) with ESMTP id 760B61B442 for ; Mon, 8 Oct 2018 20:55:36 +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=9kA0lcQCop90VA4nwrBvJJcwTzcPJxSNrKgpEKJ/A4A=; b=lhmpY4ft1jJfw++zYe5hjLV+8/gCkgtkTH9XpuW1GtsThE3kRUHXdrhJlDnHQYrdUX6137Q9Rp9cFKTX8z4wmUYx0xoK7Sq0opUGGgf9lPjj6WumKWqnB0yMmn9YPOP+vupZ5ZyB/hS89w3u1zmYm82hrTo7ykXKbbdkzHeGFR4= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4060.eurprd05.prod.outlook.com (52.134.72.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.26; Mon, 8 Oct 2018 18:55:34 +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; Mon, 8 Oct 2018 18:55:34 +0000 From: Yongseok Koh To: Dekel Peled CC: Shahaf Shuler , "dev@dpdk.org" , Ori Kam Thread-Topic: [PATCH v2] net/mlx5: allow flow rule with attribute egress Thread-Index: AQHUXkaDoVxM3UQeo0S7SKcQVj8eq6UVtGMA Date: Mon, 8 Oct 2018 18:55:33 +0000 Message-ID: <20181008185523.GA7844@mtidpdk.mti.labs.mlnx> References: <1538058330-34990-1-git-send-email-dekelp@mellanox.com> <1538920865-8463-1-git-send-email-dekelp@mellanox.com> In-Reply-To: <1538920865-8463-1-git-send-email-dekelp@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR03CA0004.namprd03.prod.outlook.com (2603:10b6:a02:a8::17) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4060; 6:ZiUAOMU27qfIROtiHBJ5C+5XoDrlkXzP3mHIxvf1I3EY9Bvma61w+YIAxLveVETySVoVCT+JMrlppn8iei6NK3Agyr6kBlLUVV9NRm/ou/TagiUPD1SZwK0p1tgRy+2yOft9+ddd7MlrYUIGsjC5BbumgROw6JSBsPc795apJEy9rQD2Qmvaa5xgcBVhg6xIp+/TLBNNHwv4EpuBp7jvcaNifnrQMQhk/ueubFI3HORIRPHBlf1a70C8e+9rlAoDdzfB3w9H4pbY/yP8pK0a+6jaAO9Y8X4px/gN8pjnGXeMYtz7Hm2uSFZeMtftft6crm38bXq/hxdb0kwLdmlszl6KcnW+RjzITWcRs13H9LZVrtiPNHp4nZ6nDtO9dsQ+VJJrqbkx39p+/PpXeHutDnhHHzW67xIwhWsUMLm/v3dPZRjfdxZBwSCaYL2NufzXHSW2/9mwJGiYEuQGNLvh3w==; 5:PhaToaTO0pffdHstEutKyTO9mCPEAVoiLbcpQ9amLD1lOq2v6BzqGwIGn8rWBPfHWO0SzjIr+yUc6eK7JiMoiReAR584VdWpZSFgsR9Aomfx9i3U3cu37nCZ6eBg01hwvnxYY/b6RzIlMxE2mZrdq+P4W4VgMHIYpWn2OUeHzFA=; 7:7C5zKNGcM9zuS/l07KNYy6hLcMCn16YcbZ60EUIFAuiKUDVgDOCq5sjTPlDNkKl04OGWaq0WBzr9XdjBXHbKfwBglIfIs3fZDeYhaimaEjwT3LcXdLfYWZ6pca7JxVKFHK9qBDP2XxhWCE0vsb9wNgvYdoXUBYhOkegt1YQShenNapey2nvjlFP3d2F5GHbnPF9IVTbFfTr/b9Ab0WSoFnLHqjoGt3aRhcrupJo/b8X2TdCk4k5MacK5xpE3e7Wk x-ms-office365-filtering-correlation-id: e548c46a-c11c-4c3e-a6be-08d62d4fa059 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:DB3PR0502MB4060; x-ms-traffictypediagnostic: DB3PR0502MB4060: 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)(3002001)(93006095)(93001095)(3231355)(944501410)(4982022)(52105095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991055); SRVR:DB3PR0502MB4060; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4060; x-forefront-prvs: 081904387B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(39860400002)(376002)(396003)(366004)(189003)(199004)(51234002)(478600001)(81156014)(8676002)(86362001)(6486002)(229853002)(54906003)(6436002)(6862004)(81166006)(316002)(97736004)(5250100002)(25786009)(6246003)(106356001)(33656002)(68736007)(8936002)(107886003)(105586002)(3846002)(6116002)(4326008)(1076002)(2900100001)(52116002)(6512007)(71200400001)(186003)(446003)(76176011)(476003)(11346002)(33896004)(53936002)(2906002)(66066001)(9686003)(6506007)(14454004)(102836004)(26005)(5660300001)(386003)(305945005)(99286004)(6636002)(966005)(7736002)(4744004)(486006)(71190400001)(256004)(14444005)(6306002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4060; 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: CfALhv+/6BIhxyP+OjxS5961Wf3Z3KPPgFHlrgacTOQ8+BQkpsi5gjUeOjFJj/ZCUosBOXPPll9/UIoypicsOz3q30T9+fN100WN816n+jYnb96xYlJcbBJ4oJS3HSYcHjvaOA7Lkg7rVpcTEm13J0LU+DmCMj6z4z61fAuT8Unh4wM5fknF+NNG92SEqTEy7EYpIoY/HpgxiF/9jUVNxJAPO31iDLS+E/3bleghb7waJzcaJrUnWolbw2z1kLF3zbkAvCi1EPR5bY+R+/9rxK2GxOL0PnEK/ixS6PPoltTaLXjyBYS5/CZYR+Qu/6woJfKglF2sjXyD5zMaSPTvfk6y8v9BZQ+Rox5iyaz7Aao= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <33EDFD5B64686849BBA839E215A89DB3@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e548c46a-c11c-4c3e-a6be-08d62d4fa059 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2018 18:55:33.9202 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4060 Subject: Re: [dpdk-dev] [PATCH v2] 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: Mon, 08 Oct 2018 18:55:36 -0000 On Sun, Oct 07, 2018 at 05:01:05PM +0300, Dekel Peled wrote: > This patch complements [1], adding to MLX5 PMD the option to set > flow rule for egress traffic. >=20 > [1] "net/mlx5: support metadata as flow rule criteria" > http://mails.dpdk.org/archives/dev/2018-September/113275.html >=20 > Signed-off-by: Dekel Peled > --- Acked-by: Yongseok Koh Thanks > V2: > * Rebase on tip. > * Apply code review comments. > --- > drivers/net/mlx5/mlx5_flow.c | 48 ++++++++++++++++++++++++++++++++= ++++++ > drivers/net/mlx5/mlx5_flow.h | 6 +++++ > drivers/net/mlx5/mlx5_flow_dv.c | 36 ++++++++++++++-------------- > drivers/net/mlx5/mlx5_flow_verbs.c | 7 +++++- > 4 files changed, 78 insertions(+), 19 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 6e4a651..1087f67 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -645,6 +645,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. > * > @@ -653,6 +655,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) > { > =20 > @@ -669,6 +672,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *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, > + "flag action not supported for " > + "egress"); > return 0; > } > =20 > @@ -679,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. > * > @@ -688,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; > @@ -716,6 +727,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *dev, int32_t priority, > RTE_FLOW_ERROR_TYPE_ACTION, NULL, > "can't have 2 mark actions in same" > " flow"); > + if (attr->egress) > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL, > + "mark action not supported for " > + "egress"); > return 0; > } > =20 > @@ -724,6 +740,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. > * > @@ -732,6 +750,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_FLOW_ACTION_FLAG) > @@ -747,6 +766,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *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; > } > =20 > @@ -759,6 +783,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 +795,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; > @@ -789,6 +816,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *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; > } > =20 > @@ -801,6 +833,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. > * > @@ -811,6 +845,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev= *dev, int32_t priority, > 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) > { > struct priv *priv =3D dev->data->dev_private; > @@ -864,6 +899,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *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; > } > =20 > @@ -872,6 +912,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. > * > @@ -880,6 +922,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; > @@ -888,6 +931,11 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *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; > } > =20 > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index bfc077d..690c597 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -280,21 +280,27 @@ uint64_t mlx5_flow_hashfields_adjust(struct mlx5_fl= ow *dev_flow, int tunnel, > uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t prio= rity, > 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 3b46edc..80e7b24 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -116,21 +116,16 @@ > 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) > - return rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > - NULL, > - "ingress attribute is mandatory"); > + if (!(attributes->egress ^ attributes->ingress)) > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ATTR, NULL, > + "must specify exactly one of " > + "ingress or egress"); > return 0; > } > =20 > @@ -287,7 +282,7 @@ > break; > case RTE_FLOW_ACTION_TYPE_FLAG: > ret =3D mlx5_flow_validate_action_flag(action_flags, > - error); > + attr, error); > if (ret < 0) > return ret; > action_flags |=3D MLX5_FLOW_ACTION_FLAG; > @@ -296,7 +291,7 @@ > case RTE_FLOW_ACTION_TYPE_MARK: > ret =3D mlx5_flow_validate_action_mark(actions, > action_flags, > - error); > + attr, error); > if (ret < 0) > return ret; > action_flags |=3D MLX5_FLOW_ACTION_MARK; > @@ -304,7 +299,7 @@ > break; > case RTE_FLOW_ACTION_TYPE_DROP: > ret =3D mlx5_flow_validate_action_drop(action_flags, > - error); > + attr, error); > if (ret < 0) > return ret; > action_flags |=3D MLX5_FLOW_ACTION_DROP; > @@ -313,7 +308,7 @@ > case RTE_FLOW_ACTION_TYPE_QUEUE: > ret =3D mlx5_flow_validate_action_queue(actions, > action_flags, dev, > - error); > + attr, error); > if (ret < 0) > return ret; > action_flags |=3D MLX5_FLOW_ACTION_QUEUE; > @@ -322,14 +317,14 @@ > case RTE_FLOW_ACTION_TYPE_RSS: > ret =3D mlx5_flow_validate_action_rss(actions, > action_flags, dev, > - error); > + attr, error); > if (ret < 0) > return ret; > 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); > + ret =3D mlx5_flow_validate_action_count(dev, attr, error); > if (ret < 0) > return ret; > action_flags |=3D MLX5_FLOW_ACTION_COUNT; > @@ -342,7 +337,7 @@ > "action not supported"); > } > } > - if (!(action_flags & MLX5_FLOW_FATE_ACTIONS)) > + if (!(action_flags & MLX5_FLOW_FATE_ACTIONS) && attr->ingress) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, actions, > "no fate action is found"); > @@ -1065,12 +1060,14 @@ > dev_flow->dv.actions[actions_n].tag_value =3D > MLX5_FLOW_MARK_DEFAULT; > actions_n++; > + flow->actions |=3D MLX5_FLOW_ACTION_FLAG; > break; > case RTE_FLOW_ACTION_TYPE_MARK: > dev_flow->dv.actions[actions_n].type =3D MLX5DV_FLOW_ACTION_TAG; > dev_flow->dv.actions[actions_n].tag_value =3D > ((const struct rte_flow_action_mark *) > (action->conf))->id; > + flow->actions |=3D MLX5_FLOW_ACTION_MARK; > actions_n++; > break; > case RTE_FLOW_ACTION_TYPE_DROP: > @@ -1081,6 +1078,7 @@ > queue =3D action->conf; > flow->rss.queue_num =3D 1; > (*flow->queue)[0] =3D queue->index; > + flow->actions |=3D MLX5_FLOW_ACTION_QUEUE; > break; > case RTE_FLOW_ACTION_TYPE_RSS: > rss =3D action->conf; > @@ -1092,6 +1090,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_FLOW_ACTION_RSS; > break; > default: > break; > @@ -1302,7 +1301,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_FLOW_ACTION_QUEUE | MLX5_FLOW_ACTION_RSS)) { > 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_f= low_verbs.c > index 6964476..ad8f7ac 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -1113,6 +1113,7 @@ > break; > case RTE_FLOW_ACTION_TYPE_FLAG: > ret =3D mlx5_flow_validate_action_flag(action_flags, > + attr, > error); > if (ret < 0) > return ret; > @@ -1121,6 +1122,7 @@ > case RTE_FLOW_ACTION_TYPE_MARK: > ret =3D mlx5_flow_validate_action_mark(actions, > action_flags, > + attr, > error); > if (ret < 0) > return ret; > @@ -1128,6 +1130,7 @@ > break; > case RTE_FLOW_ACTION_TYPE_DROP: > ret =3D mlx5_flow_validate_action_drop(action_flags, > + attr, > error); > if (ret < 0) > return ret; > @@ -1136,6 +1139,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; > @@ -1144,13 +1148,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_FLOW_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_FLOW_ACTION_COUNT; > --=20 > 1.8.3.1 >=20