Re: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick transfer proxy API
From: Ori Kam <hidden>
Date: 2021-11-03 14:39:08
-----Original Message----- From: dev <redacted> On Behalf Of Thomas Monjalon Sent: Tuesday, November 2, 2021 5:46 PM To: Ivan Malov <redacted>; Andrew Rybchenko <redacted> Cc: dev@dpdk.org; David Marchand <redacted>; Ferruh Yigit [off-list ref]; Ori Kam [off-list ref] Subject: Re: [dpdk-dev] [PATCH] ethdev: fine tune error reporting in pick transfer proxy API 01/11/2021 10:41, Andrew Rybchenko:quoted
On 10/27/21 12:00 PM, Ivan Malov wrote:quoted
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 flows") Signed-off-by: Ivan Malov <redacted> --- 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,quoted
quoted
const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); struct rte_eth_dev *dev; - if (unlikely(ops == NULL)) - return -rte_errno; - - if (ops->pick_transfer_proxy == NULL) { + if (ops == NULL || ops->pick_transfer_proxy == 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 == NULL), what's the point to return some proxy port?quoted
*proxy_port_id = 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.I think we should not call this API in testpmd if not doing rte_flow transfer rule.
+1 too the two points above. Best, Ori