From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A1C1A0C53; Wed, 3 Nov 2021 15:39:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E67A41134; Wed, 3 Nov 2021 15:39:07 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) by mails.dpdk.org (Postfix) with ESMTP id DAD3C40E5A for ; Wed, 3 Nov 2021 15:39:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mw0n0RTEKjjcm9Y/aRy9z1F82RhfXknXwXO4Du5I7fnVSbx8dmVbRkzcTG6eAkGK1OvLbBR9Pn2q1XEzaoS1liKVSMIPbnKVOdFJPxboy839U5UTq5vZo3WZpl9+jaydz4p+4quyNLAhFlxb4ph08cb7124OIOstrN4Gamc0STq5bR8Csvld38QIhyywlKobm52gGiUpzSBvOUuE/KvZtE/DapdSh3md4mxC7jxsZz6dDYSQ/3Gy7jTukNt+pKjRSrzfrX/lt9/EUdJNvPT7KgrN+aCFZejrdIVIL5Bw6Fjywv0VXee+lbuYzAF/Uhm/pOz2XGQgyXjhwUBvlwD6jg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=opBoXxMc/FeCy6bM92LuqrSxMKWZWKyLuq9E47I3ILY=; b=nWB7CwnkuQbHjPZhoEAuNkA6SYA2FVfP5nMD+BcZLpf1lXpPebmWdrjyLbCasTLttCtuv0HIUS/1SCneJNWPAP/OLlI1zwYqCiyeJz7cLHenY6BnFQ1gy/m5nld3jYnwzAnurEufisY/TewXIOZLPK3lHh8JQ5UJ/mLO3ihv+yVupr3NpBkjQOyttgm2CzuL0uKdfNBuVWxfprQQTY7qeZszuQNe3I4MpvqVgK3k6lH7ohmKMvQMPdS2D0x/3aigqdK0wP7el5qTIRvFQ9eBZ8TTbUdHn3zPVprqHE07Jg2Q2R1qFltavB4mAhu8YXc9/WFuvY9eHgBhYd/fAgqHcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=opBoXxMc/FeCy6bM92LuqrSxMKWZWKyLuq9E47I3ILY=; b=KNmaNCqX70sYrfQYNF1egY9293UVsZc3PEfSaUGyyi53x0RPdoPve0dKwqV/q0MW6s8MnLUKHP3Ts+/w9dHNMOQq7fZNBqTeMWSz4NyEflq+TFVRxMeZlpSiFCiQPEifZ6R1XYLOzxt0MrliHILIdvzWKKNzqomLs+tsDTqZx6K60iRlax+BNAzW6+e2fU+lWne3iRYaXIyj8H/ualrR9Q9pS/+WI2rhYXb1JXfyEOSOc+CRH7mYlml1DurCl9BtthDn5ZFzUEv8tE2tIEThWnzXMeiTcsHDuordyhABUFLxaLkb8IY39i6+3YrRS3bs12JZoKEo+01BXu/2z9KMhw== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM4PR12MB5053.namprd12.prod.outlook.com (2603:10b6:5:388::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 3 Nov 2021 14:38:58 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%5]) with mapi id 15.20.4649.019; Wed, 3 Nov 2021 14:38:58 +0000 From: Ori Kam To: NBU-Contact-Thomas Monjalon , Ivan Malov , Andrew Rybchenko CC: "dev@dpdk.org" , David Marchand , Ferruh Yigit Thread-Topic: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick transfer proxy API Thread-Index: AQHXyxESB97tXInd/0i/f808T2RPAqvucwaAgAH4PYCAAX99EA== Date: Wed, 3 Nov 2021 14:38:58 +0000 Message-ID: References: <20211027090003.14556-1-ivan.malov@oktetlabs.ru> <32956056-8804-046c-da59-119a6c378dd3@oktetlabs.ru> <2115605.bGoMZ7lrYc@thomas> In-Reply-To: <2115605.bGoMZ7lrYc@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 70c17e18-b23c-4ebc-5e8c-08d99ed7ab73 x-ms-traffictypediagnostic: DM4PR12MB5053: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HzU2pZ0PWOXcuR/GyggsPX7sYYojzxdsyi3O+PyAwcNYl1JRTXf954PX8ibuR3NPQiW30EmgNVVjPi0J3DJHD2by001Zh1t/s7YsFTjYHCHQuo2NaL5spCSLQfWoO/PT7nFg9F3Wb3G/S8rv8TfOaPiVSujV9oA5FKFeSHlT51BC6tVO3If9/lLV7At6cpI2wVMswRnYhdn5uNX6u5MbzSDkoPAWNHkHcm8xZ6szePHhdDbOK3xTqXVTFXOH3YQmIjMJODeiQrGea/AhE6FhDMMVywvHD/tZuDuCrxfm6ku1trzLrNSaQhc5SuY3S3HkYs/0YQtS/Cf12u3kLV6TPb59+1DRQFmfFQS5lnx2//hCcC82W9CYIkrlZFSh8in1QZ5iKpsp+9VIKrpMXiD+Ou36qS7lXwBOn1rGMdfxePL6IS8dvTmp5CkBHFdrIsI9h6e/1y7gjaby0nKW36JbmycNMDXg/VV3LQUPfjw7N1Y/48oDpcsB+brhbt96izqrvfjgv/U3wiZmbBiAaTIxIJuIpotXaNCZMQK0KQi3kZ5691HN2kmJfukG8NCsLQrFAQpR1i5UXh5hdDYrVYiUOw6QYeeiAYjdBVd5p2/KhZzIcRo31jhh/EriBTYxBBcp+5fWRlmU1LZFrhiiqOlP4lPPmYLN1UQ8gRmpsGSFlXH0LJK5UtfpZpnO99InjsXyTOqXTzYis6n0kPPFeUc/Aw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38100700002)(508600001)(66946007)(9686003)(2906002)(110136005)(76116006)(55016002)(54906003)(86362001)(6506007)(53546011)(5660300002)(186003)(26005)(66446008)(64756008)(66556008)(66476007)(52536014)(7696005)(83380400001)(316002)(8936002)(38070700005)(71200400001)(4326008)(33656002)(122000001)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xKcDawRh46VJKYC5SJIThQlcbItiDRm43CgR6tMc/07PTqtceuv9pK9oUpRO?= =?us-ascii?Q?8pjKTUInaprah2QpPa/KStIAhiCLgckkQ+VMvSELqdk9UHDWLRFZHN645FSM?= =?us-ascii?Q?ZX/B5PGT4d61MnCDx8LHbuFaH1MuYXcTnkGI/P29kHDVLLZBItzr5hD82qP7?= =?us-ascii?Q?YGs4jrBP6wpLHBL+HF4Q91KggZO6WA98QJXWKnVOyOJwLekho+iM7gvTrtRV?= =?us-asc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ZtOCdErANabzW/5qacWLi0ZfDFdGlScMbvF6HRhB?= =?us-ascii?Q?4fCylTOEt2Z91Tbn26qmXwhugTs9oD7ENXJ1EGfTEelV/6V+K7SgllesrH3w?= =?us-ascii?Q?WN+82MMIbxrQbwgnoQ6zKQe9IR9ZP3Q6E2og7qBVl/ztzJ5oMS4S5UXsHeYq?= =?us-ascii?Q?+xwYdR+xSsZVB3LhXlm4aE/XMBsf7PHZVBkoxlq7UKDQi18e7yqN4YDyfI3H?= =?us-ascii?Q?OqTUzcPT+EiUTn0WSKgPIC7ryO2O9+V8T35k4C69TJvxbVHudnprOxF4qbSG?= =?us-ascii?Q?NL5GC6cFS9Z3d5bHPNby089raKy7QqQFmNgeB9Jbv8HRa9tfOHa60e47ibLf?= =?us-ascii?Q?kOiwcszrC24AirJeHcKZhlBZAKzR1fwGmr3Aa89cBtFhqLPQB1gs/nQqzvii?= =?us-ascii?Q?JcQyXyMLV6YJ29ZCbCOP0ohD93OGw87w1Dmd54k5xxinNUMEIJuTLa2GhoHn?= =?us-ascii?Q?Vd6tpDXPxdzONjtjI/ogidElmSKjCzYmgYT2a+m8k39+KeZhWaLUUSLcQNoq?= =?us-ascii?Q?og=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70c17e18-b23c-4ebc-5e8c-08d99ed7ab73 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2021 14:38:58.0770 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fE8StTbaQ/eO1/RitpbBYUQ9vTDUlVUpRxoMzlTLRXDZZs3u74IEJEFLtD7jZT2UMVL0heH0X/Qrf/KvDOwpyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5053 Subject: Re: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick transfer proxy API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: dev On Behalf Of Thomas Monjalon > Sent: Tuesday, November 2, 2021 5:46 PM > To: Ivan Malov ; Andrew Rybchenko > Cc: dev@dpdk.org; David Marchand ; Ferruh Yigi= t > ; Ori Kam > Subject: Re: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick= transfer proxy API >=20 > 01/11/2021 10:41, Andrew Rybchenko: > > On 10/27/21 12:00 PM, Ivan Malov wrote: > > > There are PMDs which do not support flow offloads at all. > > > In such cases, the API in question returns ENOTSUP. This > > > is too loud. Restructure the code to avoid spamming logs. > > > > > > Fixes: 1179f05cc9a0 ("ethdev: query proxy port to manage transfer flo= ws") > > > > > > Signed-off-by: Ivan Malov > > > --- > > > lib/ethdev/rte_flow.c | 5 +---- > > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > > > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c > > > index d268784532..9d98d2d716 100644 > > > --- a/lib/ethdev/rte_flow.c > > > +++ b/lib/ethdev/rte_flow.c > > > @@ -1335,10 +1335,7 @@ rte_flow_pick_transfer_proxy(uint16_t port_id,= uint16_t > *proxy_port_id, > > > const struct rte_flow_ops *ops =3D rte_flow_ops_get(port_id, error= ); > > > struct rte_eth_dev *dev; > > > > > > - if (unlikely(ops =3D=3D NULL)) > > > - return -rte_errno; > > > - > > > - if (ops->pick_transfer_proxy =3D=3D NULL) { > > > + if (ops =3D=3D NULL || ops->pick_transfer_proxy =3D=3D NULL) { > > > > First of all I think that the patch is wrong and origin code is better. > > If flow API is not supported at all (ops =3D=3D NULL), what's the point > > to return some proxy port? > > > > > *proxy_port_id =3D port_id; > > > return 0; > > > } > > > > > > > IMHO, spamming of testpmd logs in described case should be fixed > > in testpmd itself to avoid logs in the case of ENOTSUP. That's it. >=20 > I think we should not call this API in testpmd > if not doing rte_flow transfer rule. >=20 +1 too the two points above. Best, Ori