From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70048.outbound.protection.outlook.com [40.107.7.48]) by dpdk.org (Postfix) with ESMTP id 6DD341B43E for ; Mon, 8 Oct 2018 20:02:20 +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=Qqbe+25eRokTzP8xUCFgmfXdHJOI68rrySLMzr2hXH8=; b=YL9/9nGvG7HJzZEUulnIIpg95A01X69agDG033Z9UMblnus6br1odqchb6T82x+E0iwG2nNp144/TmaI0iaHxqvIfJfbYJWbqb2+psW7tL4N0jjDs4TakerBVdz9cYhJMdUz0zjnxACCdquBSQNtMukDiHyZjOzCs/2S2Qdxs7Y= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3979.eurprd05.prod.outlook.com (52.134.67.155) 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:02:19 +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:02:19 +0000 From: Yongseok Koh To: Shahaf Shuler CC: "dev@dpdk.org" , Yongseok Koh , Ori Kam Thread-Topic: [PATCH 7/7] net/mlx5: fix errno values for flow engine Thread-Index: AQHUXzENNdMZ8oXg90uWPGaOeP92Dg== Date: Mon, 8 Oct 2018 18:02:19 +0000 Message-ID: <20181008180150.39273-8-yskoh@mellanox.com> References: <20181008180150.39273-1-yskoh@mellanox.com> In-Reply-To: <20181008180150.39273-1-yskoh@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR02CA0016.namprd02.prod.outlook.com (2603:10b6:a02:ee::29) 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; DB3PR0502MB3979; 6:3aXhqjWVPFpafTvKS/yy90WCPjep6xofVKx0mcGoNWhPcmbNLG7IbyOixBON9DHxmNys0CEyVjrS9pyim6r6F/PONvbkG2oM41hJFdVnwaMVM2uLx1hQghoC71YB+xAnvXjeg9/sYdxqpphMGCdaVlHFn4PRGfmiejcxbf8DSp/aKAAqPM/y4dR01NZ7s6oeS2yjkL2IAUBVjvkq0d5DzGWvjcYe34s5zgzy+PFaVfrMN49DefHizVu8ymO+SqqWoyhrMpW0WSTc/IbN6HrGaB+W0zEDOyz6w+YViUt3P6DK9kxEjcBKX5MM1BE5dpatB9MNjnwUjQRS8d1aDHpaJmshgqtfc0HG2dxG+J1s8+3/FAftmZ76DFsIAE/ecy/fbmsqacOHiT1t/hOgoLg+IbrQftppyFsX2dLPU2I7e51kGx2bRGi2xwKJpmO6S7Xal6llubLBYL4bY+NDlF09Fw==; 5:UkGpcreDut38aoovloxrmi0s3sFVc4E7WYckA2cjgt51WfKLl91aIhM0pwpqKgw10ZfSO8NP/I7/tlMgMLcRVnfjypFo+1cPv8mtZXc3FmUq4RcDvsWxXeDVP3/QqdW+6buvq1EJi3nSUDKktob5dt1dgjxzUdmX1yhXna6E1kk=; 7:1GXR7Qdbr/vYVkhVB7sg1SIcL3H+fEnSH9NMS4bOnbBGrpwbxNQKHA7D+/QyzOMMmyYq8QZu9cUZxLbD1utfdDk3j9cnGmc3MOWbd/GTvdu+nmaUoArg5Jw/jypOr4nQ+zA7wtJ8FaVoOga5+vRKQRl+GUCRnphHYjtDNXCQd9wWMHRWVOfpj/xwdwplYSArtl2sEPNOHyYv6N/SBFnAJaX7PQtr+NNOeZp2AFtEL1M7c9rrlCVPX8YStmg9DvRb x-ms-office365-filtering-correlation-id: c8ffac86-22a6-4acf-e7cf-08d62d48300c 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:DB3PR0502MB3979; x-ms-traffictypediagnostic: DB3PR0502MB3979: 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)(93006095)(93001095)(3002001)(10201501046)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DB3PR0502MB3979; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3979; x-forefront-prvs: 081904387B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(39860400002)(396003)(366004)(189003)(199004)(8676002)(2616005)(11346002)(8936002)(476003)(4744004)(66066001)(446003)(99286004)(14454004)(71200400001)(105586002)(71190400001)(54906003)(97736004)(316002)(2900100001)(305945005)(106356001)(486006)(186003)(26005)(68736007)(76176011)(81166006)(86362001)(52116002)(5250100002)(81156014)(25786009)(7736002)(36756003)(5660300001)(6116002)(1076002)(256004)(3846002)(14444005)(37006003)(4326008)(6862004)(6506007)(478600001)(386003)(102836004)(53936002)(6512007)(6436002)(966005)(6636002)(6306002)(2906002)(107886003)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3979; 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: VoSRsFNliL4BaTeFC4kPyHmK0UuMRt9qHJ6opoKVn33nG1As0KeQ8aigclrer0suC6u3OL3tGXWxTcOhz+MlRzW6UCCbkYfydRYtN/cuRO14PmgwkbKkEsCgqrE7DtS56tSRVH4RNA1ZzjCGpStpcQUk2e9xagOPYa2+xZu++FP7uKkSDKRBEAAalTXqbSkTjZ4DDj5QnB0ZTrRl9cizBpzISmeQ9rVm042LZPnh/yPyiN7il1UrxntDSooKkypwgyegVKc2asolJyu3UhtCjNw6QDTm6DJa+KyhGhbQMviFzVW3+EKw0fFpm278DH8ig9VFm/0g2aXrPcQn0v9iiStCgXkYU7WeL3Hd+HjruzE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8ffac86-22a6-4acf-e7cf-08d62d48300c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2018 18:02:19.1854 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3979 Subject: [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: Mon, 08 Oct 2018 18:02:21 -0000 Fixes: 4f07e13d6af5 ("net/mlx5: split flow validation to dedicated function= ") Fixes: f7adfffa3de1 ("net/mlx5: add Direct Verbs validation function") Fixes: edcdef4e5fe4 ("net/mlx5: add Linux TC flower driver for E-Switch flo= w") Cc: orika@mellanox.com 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(-) 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, 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 < " 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_a= ction *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_act= ion *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, 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, 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_it= em *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_it= em *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_i= tem *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_i= tem *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_i= tem *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_fl= ow_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_fl= ow_item *item, return ret; if (spec) { if (spec->protocol) - return rte_flow_error_set(error, EINVAL, + return rte_flow_error_set(error, ENOTSUP, 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_ite= m *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_it= em *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_unu= sed, } 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_d= v.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, 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, co= nst 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, 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_attr= *attr, attr, "lowest priority level is 0xfffe"); if (!attr->ingress) - return rte_flow_error_set(error, ENOTSUP, + return rte_flow_error_set(error, EINVAL, 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_flo= w_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 *d= ev, 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, 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"); --=20 2.11.0