From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00055.outbound.protection.outlook.com [40.107.0.55]) by dpdk.org (Postfix) with ESMTP id D4B835B36 for ; Tue, 9 Oct 2018 09:53:02 +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=BvOtgKX0zqftqfmOvi5Cdhj1Aa3K3gSLv9x5jAHsA2M=; b=HQq4OJDbbwA1+WHL4VkgEb56l37ZOFGo2kMH8GfrHp8Oek5r9G7CgY6mot4lIAr7x1lhjcBIT3+AXNeiwwyD2UAI1ezQhBCDRIwE4KG+jRm27DTgYrtu+BxJHXV1LxzE0+sg4nfKb2zfL5Z7RHub1UCP+8nPFyPkyezaZ0lSq94= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3490.eurprd05.prod.outlook.com (10.171.187.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.21; Tue, 9 Oct 2018 07:53:01 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202%4]) with mapi id 15.20.1207.024; Tue, 9 Oct 2018 07:53:01 +0000 From: Ori Kam To: Yongseok Koh , Shahaf Shuler CC: "dev@dpdk.org" Thread-Topic: [PATCH 7/7] net/mlx5: fix errno values for flow engine Thread-Index: AQHUXzEOG6+4h5b8LUuIC8A0Tyam2aUWi6Yg Date: Tue, 9 Oct 2018 07:53:01 +0000 Message-ID: References: <20181008180150.39273-1-yskoh@mellanox.com> <20181008180150.39273-8-yskoh@mellanox.com> In-Reply-To: <20181008180150.39273-8-yskoh@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; AM4PR05MB3490; 6:QD5J0b62i5LYCZzFIHXzLdT+6oddSw6njua0XOYGqVYqyQl1CHWiBUY0pmPYgyyGvNXKFhR8HQFbda+xAPnVbYHPo8PlyEgUNs2clgUP1o3ckcJOLWaS9pvDIfLYYYt4MF3DxyLH6Elj+y7UiSUW/yBB6Xm9gcu0dH14ejq2dpycHbvR8WfrsaL/T8i+IGv0C0NidkK25HZvAQtR0+op5VR+UXBHZgMp0VnKqLKBhVR9l+pWi/sikRP5dWeN6GXBJgOCEb6ihomHw20BYbqWZ8aaY+CFJGTFqHBv639fWw40U+93rYaU16nJoZWDNiaFQnV4X6ovyIWP+6s58zhCnfFojWGeYCUd0rjrVKjVw0VRpu/ApH4Po9+/atUKBgEYUhb0b9L7oI7Zpnz4bMhgmTxxzPZ8plOeCED97ill8iv03tyoVU0XapYBTTUCPCZsWWVZenDfQ3XHRxOZttM38w==; 5:CqmatxsjatjII4v6UYSeTIsVnQDOI+/arPFIno6qIoS9NPpWJwiem5Z9SOqvoyp32S/fXz1qehP1ewkZTMm0zSxy6BYhNMmbYMMN9dZX0ix4phxBHqHdawP1bofvzgz9u7B7WF3DwfT0O25hUwwaa+9RKviGjfSgClNl6RDowq8=; 7:sTPCH+gPx+7raVDxllBcnAYwo1fQkFrWkGCE5W1sGaTs2Ooet0SYAtOXIO5hqNJopGWpOf7AoCLxbmOhV+b8LIP4rMxnnTKZupFljud7FvYu/JeDUPf3/h4dWGHJ6/f9ZJDyC9KFyuX0OrEoB12264tvdUz5wpevvtoG1cZQMmG5kIXsvKGTCsmUFPvXbgNjWnf05+6PNrFYBhsb2GrU7SY2d++NQyAO286updsUIFmcRP9Tm6J0Eg2gNiXls+YS x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 73e7a098-6edd-47c2-1863-08d62dbc3cad 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:AM4PR05MB3490; x-ms-traffictypediagnostic: AM4PR05MB3490: 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)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:AM4PR05MB3490; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3490; x-forefront-prvs: 08200063E9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(39860400002)(346002)(366004)(396003)(136003)(376002)(189003)(199004)(13464003)(476003)(53546011)(966005)(229853002)(5660300001)(99286004)(6636002)(68736007)(2900100001)(6246003)(478600001)(4326008)(6116002)(3846002)(25786009)(86362001)(14444005)(97736004)(256004)(26005)(102836004)(186003)(2906002)(110136005)(4744004)(11346002)(316002)(81156014)(71190400001)(8676002)(81166006)(71200400001)(53936002)(5250100002)(446003)(106356001)(6436002)(105586002)(76176011)(74316002)(66066001)(305945005)(7696005)(33656002)(6506007)(9686003)(486006)(6306002)(55016002)(8936002)(14454004)(7736002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3490; H:AM4PR05MB3425.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: 5iOzWP1R9Ak1H/u3+jAvN32ZgdGKW8inXIxBmke9b8sPNTG9uznMl2TmQJOJYrPvJbzcioDZpkgoWz9GoUuyiw7M3kU2g8woiOpoO+7BqSipn4RODV4lXcw3YHPG12lLkzRLXYZ2d8oiWCFIrKT7mOyX+5cnRHRa7mPG0R/YCA84XoTcms9Alq6Cg9oG/QClLlP3Yjuv7/4i/U157lUjOXn3r7T3jZh0by2yY5XJ5/FEFDVJtfnHz9yUELSY8hK/p7eD4tS2xHSO8zC//rTH3cvboePyIKELi5PJRsY5okqqeuqFWh8FizkgC8P6JGy1xVm8zvwBZaMsZYPh3o5IEd3NtSmuliK81EEEueSivso= 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: 73e7a098-6edd-47c2-1863-08d62dbc3cad X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2018 07:53:01.3332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3490 Subject: Re: [dpdk-dev] [PATCH 7/7] net/mlx5: fix errno values for flow engine 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 07:53:03 -0000 > -----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 7/7] net/mlx5: fix errno values for flow engine >=20 > Fixes: 4f07e13d6af5 ("net/mlx5: split flow validation to dedicated functi= on") > Fixes: f7adfffa3de1 ("net/mlx5: add Direct Verbs validation function") > Fixes: edcdef4e5fe4 ("net/mlx5: add Linux TC flower driver for E-Switch f= low") > Cc: orika@mellanox.com >=20 > Signed-off-by: Yongseok Koh > --- > drivers/net/mlx5/mlx5_flow.c | 70 +++++++++++++++++++-------------= ------ > drivers/net/mlx5/mlx5_flow_dv.c | 2 +- > drivers/net/mlx5/mlx5_flow_tcf.c | 8 ++--- > drivers/net/mlx5/mlx5_flow_verbs.c | 4 +-- > 4 files changed, 42 insertions(+), 42 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 30aa95f14..ed60c40f9 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -452,10 +452,10 @@ mlx5_flow_item_acceptable(const struct > rte_flow_item *item, > } > ret =3D memcmp(spec, last, size); > if (ret !=3D 0) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ITEM, > item, > - "range is not supported"); > + "range is not valid"); > } > return 0; > } > @@ -657,15 +657,15 @@ mlx5_flow_validate_action_flag(uint64_t > action_flags, > { >=20 > if (action_flags & MLX5_FLOW_ACTION_DROP) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and flag in same flow"); > if (action_flags & MLX5_FLOW_ACTION_MARK) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't mark and flag in same flow"); > if (action_flags & MLX5_FLOW_ACTION_FLAG) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't have 2 flag" > " actions in same flow"); > @@ -704,17 +704,17 @@ mlx5_flow_validate_action_mark(const struct > rte_flow_action *action, > "mark id must in 0 <=3D id < " >=20 > RTE_STR(MLX5_FLOW_MARK_MAX)); > if (action_flags & MLX5_FLOW_ACTION_DROP) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and mark in same flow"); > if (action_flags & MLX5_FLOW_ACTION_FLAG) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't flag and mark in same flow"); > if (action_flags & MLX5_FLOW_ACTION_MARK) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > - "can't have 2 flag actions in same" > + "can't have 2 mark actions in same" > " flow"); > return 0; > } > @@ -735,15 +735,15 @@ mlx5_flow_validate_action_drop(uint64_t > action_flags, > struct rte_flow_error *error) > { > if (action_flags & MLX5_FLOW_ACTION_FLAG) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and flag in same flow"); > if (action_flags & MLX5_FLOW_ACTION_MARK) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't drop and mark in same flow"); > if (action_flags & MLX5_FLOW_FATE_ACTIONS) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't have 2 fate actions in" > " same flow"); > @@ -775,7 +775,7 @@ 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_FLOW_FATE_ACTIONS) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't have 2 fate actions in" > " same flow"); > @@ -818,7 +818,7 @@ mlx5_flow_validate_action_rss(const struct > rte_flow_action *action, > unsigned int i; >=20 > if (action_flags & MLX5_FLOW_FATE_ACTIONS) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > "can't have 2 fate actions" > " in same flow"); > @@ -931,7 +931,7 @@ mlx5_flow_validate_attributes(struct rte_eth_dev > *dev, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER, > NULL, "transfer is not supported"); > if (!attributes->ingress) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > NULL, > "ingress attribute is mandatory"); > @@ -1017,11 +1017,11 @@ mlx5_flow_validate_item_vlan(const struct > rte_flow_item *item, > MLX5_FLOW_LAYER_OUTER_VLAN; >=20 > if (item_flags & vlanm) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VLAN layer already configured"); > else if ((item_flags & l34m) !=3D 0) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L2 layer cannot follow L3/L4 layer"); > if (!mask) > @@ -1085,7 +1085,7 @@ mlx5_flow_validate_item_ipv4(const struct > rte_flow_item *item, > "multiple L3 layers not supported"); > else if (item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L4 : > MLX5_FLOW_LAYER_OUTER_L4)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L3 cannot follow an L4 layer."); > if (!mask) > @@ -1141,7 +1141,7 @@ mlx5_flow_validate_item_ipv6(const struct > rte_flow_item *item, > "multiple L3 layers not supported"); > else if (item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L4 : > MLX5_FLOW_LAYER_OUTER_L4)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L3 cannot follow an L4 layer."); > /* > @@ -1192,18 +1192,18 @@ mlx5_flow_validate_item_udp(const struct > rte_flow_item *item, > int ret; >=20 > if (target_protocol !=3D 0xff && target_protocol !=3D IPPROTO_UDP) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "protocol filtering not compatible" > " with UDP layer"); > if (!(item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L3 : > MLX5_FLOW_LAYER_OUTER_L3))) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L3 is mandatory to filter on L4"); > if (item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L4 : > MLX5_FLOW_LAYER_OUTER_L4)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L4 layer is already present"); > if (!mask) > @@ -1243,18 +1243,18 @@ mlx5_flow_validate_item_tcp(const struct > rte_flow_item *item, > int ret; >=20 > if (target_protocol !=3D 0xff && target_protocol !=3D IPPROTO_TCP) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "protocol filtering not compatible" > " with TCP layer"); > if (!(item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L3 : > MLX5_FLOW_LAYER_OUTER_L3))) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L3 is mandatory to filter on L4"); > if (item_flags & (tunnel ? MLX5_FLOW_LAYER_INNER_L4 : > MLX5_FLOW_LAYER_OUTER_L4)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "L4 layer is already present"); > if (!mask) > @@ -1307,7 +1307,7 @@ mlx5_flow_validate_item_vxlan(const struct > rte_flow_item *item, > * https://tools.ietf.org/html/rfc7348 > */ > if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_UDP)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "no outer UDP layer found"); > if (!mask) > @@ -1335,11 +1335,11 @@ mlx5_flow_validate_item_vxlan(const struct > rte_flow_item *item, > * currently refused. > */ > if (!vlan_id) > - return rte_flow_error_set(error, EINVAL, > + return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VXLAN vni cannot be 0"); > if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) > - return rte_flow_error_set(error, EINVAL, > + return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VXLAN tunnel must be fully > defined"); > return 0; > @@ -1393,7 +1393,7 @@ mlx5_flow_validate_item_vxlan_gpe(const struct > rte_flow_item *item, > * https://tools.ietf.org/html/rfc7348 > */ > if (!(item_flags & MLX5_FLOW_LAYER_OUTER_L4_UDP)) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "no outer UDP layer found"); > if (!mask) > @@ -1407,7 +1407,7 @@ mlx5_flow_validate_item_vxlan_gpe(const struct > rte_flow_item *item, > return ret; > if (spec) { > if (spec->protocol) > - return rte_flow_error_set(error, EINVAL, > + return rte_flow_error_set(error, ENOTSUP, >=20 > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VxLAN-GPE protocol" > @@ -1426,11 +1426,11 @@ mlx5_flow_validate_item_vxlan_gpe(const struct > rte_flow_item *item, > * is currently refused. > */ > if (!vlan_id) > - return rte_flow_error_set(error, EINVAL, > + return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VXLAN-GPE vni cannot be 0"); > if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) > - return rte_flow_error_set(error, EINVAL, > + return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "VXLAN-GPE tunnel must be fully" > " defined"); > @@ -1463,7 +1463,7 @@ mlx5_flow_validate_item_gre(const struct > rte_flow_item *item, > int ret; >=20 > if (target_protocol !=3D 0xff && target_protocol !=3D IPPROTO_GRE) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "protocol filtering not compatible" > " with this GRE layer"); > @@ -1520,7 +1520,7 @@ mlx5_flow_validate_item_mpls(const struct > rte_flow_item *item __rte_unused, > int ret; >=20 > if (target_protocol !=3D 0xff && target_protocol !=3D IPPROTO_MPLS) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > item, > "protocol filtering not compatible" > " with MPLS layer"); > @@ -2336,7 +2336,7 @@ mlx5_flow_query_count(struct rte_flow *flow > __rte_unused, > } > return 0; > } > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, > NULL, > "flow does not have counter"); > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index 2fb1d9ee7..3bb462ceb 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -79,7 +79,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev, > NULL, > "transfer is not supported"); > if (!attributes->ingress) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > NULL, > "ingress attribute is mandatory"); > diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c > b/drivers/net/mlx5/mlx5_flow_tcf.c > index 0406e84f6..91f6ef678 100644 > --- a/drivers/net/mlx5/mlx5_flow_tcf.c > +++ b/drivers/net/mlx5/mlx5_flow_tcf.c > @@ -291,7 +291,7 @@ flow_tcf_item_mask(const struct rte_flow_item *item, > const void *mask_default, > if (item->last && > (((const uint8_t *)item->spec)[i] & mask[i]) !=3D > (((const uint8_t *)item->last)[i] & mask[i])) { > - rte_flow_error_set(error, ENOTSUP, > + rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ITEM_LAST, > item->last, > "range between \"spec\" and > \"last\"" > @@ -383,7 +383,7 @@ flow_tcf_validate_attributes(const struct rte_flow_at= tr > *attr, > attr, > "lowest priority level is 0xfffe"); > if (!attr->ingress) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, EINVAL, >=20 > RTE_FLOW_ERROR_TYPE_ATTR_INGRESS, > attr, "only ingress is supported"); > if (attr->egress) > @@ -655,7 +655,7 @@ flow_tcf_validate(struct rte_eth_dev *dev, > case RTE_FLOW_ACTION_TYPE_PORT_ID: > if (action_flags & MLX5_TCF_FATE_ACTIONS) > return rte_flow_error_set > - (error, ENOTSUP, > + (error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > actions, > "can't have multiple fate actions"); > conf.port_id =3D actions->conf; > @@ -678,7 +678,7 @@ flow_tcf_validate(struct rte_eth_dev *dev, > case RTE_FLOW_ACTION_TYPE_DROP: > if (action_flags & MLX5_TCF_FATE_ACTIONS) > return rte_flow_error_set > - (error, ENOTSUP, > + (error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > actions, > "can't have multiple fate actions"); > action_flags |=3D MLX5_FLOW_ACTION_DROP; > diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c > b/drivers/net/mlx5/mlx5_flow_verbs.c > index 3df467214..696447674 100644 > --- a/drivers/net/mlx5/mlx5_flow_verbs.c > +++ b/drivers/net/mlx5/mlx5_flow_verbs.c > @@ -948,7 +948,7 @@ flow_verbs_translate_action_count(struct rte_eth_dev > *dev, > flow->counter =3D flow_verbs_counter_new(dev, count->shared, > count->id); > if (!flow->counter) > - return rte_flow_error_set(error, ENOTSUP, > + return rte_flow_error_set(error, rte_errno, >=20 > RTE_FLOW_ERROR_TYPE_ACTION, > action, > "cannot get counter" > @@ -1094,7 +1094,7 @@ flow_verbs_validate(struct rte_eth_dev *dev, > if (next_protocol !=3D 0xff && > next_protocol !=3D IPPROTO_MPLS) > return rte_flow_error_set > - (error, ENOTSUP, > + (error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, > items, > "protocol filtering not compatible" > " with MPLS layer"); > -- > 2.11.0 Acked-by: Ori Kam Thanks, Ori Kam