All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] cxgb4: Don't return EAGAIN when TCAM is full.
@ 2019-04-08 12:33 Vishal Kulkarni
  2019-04-08 17:02 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vishal Kulkarni @ 2019-04-08 12:33 UTC (permalink / raw)
  To: netdev, davem; +Cc: nirranjan, indranil, dt, Vishal Kulkarni

During hash filter programming, driver needs to return ENOSPC error
intead of EAGAIN when TCAM is full.

Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c    | 7 ++++---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 5 +----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index 5afb430..93ad4be 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -1722,12 +1722,13 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
 		break;
 
 	default:
-		dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n",
-			__func__, status);
+		if (status != CPL_ERR_TCAM_FULL)
+			dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n",
+				__func__, status);
 
 		if (ctx) {
 			if (status == CPL_ERR_TCAM_FULL)
-				ctx->result = -EAGAIN;
+				ctx->result = -ENOSPC;
 			else
 				ctx->result = -EINVAL;
 		}
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
index 82a8d19..6e2d800 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
@@ -687,11 +687,8 @@ int cxgb4_tc_flower_replace(struct net_device *dev,
 
 	ret = ctx.result;
 	/* Check if hw returned error for filter creation */
-	if (ret) {
-		netdev_err(dev, "%s: filter creation err %d\n",
-			   __func__, ret);
+	if (ret)
 		goto free_entry;
-	}
 
 	ch_flower->tc_flower_cookie = cls->cookie;
 	ch_flower->filter_id = ctx.tid;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] cxgb4: Don't return EAGAIN when TCAM is full.
  2019-04-08 12:33 [PATCH net-next] cxgb4: Don't return EAGAIN when TCAM is full Vishal Kulkarni
@ 2019-04-08 17:02 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-08 17:02 UTC (permalink / raw)
  To: vishal; +Cc: netdev, nirranjan, indranil, dt

From: Vishal Kulkarni <vishal@chelsio.com>
Date: Mon,  8 Apr 2019 18:03:49 +0530

> During hash filter programming, driver needs to return ENOSPC error
> intead of EAGAIN when TCAM is full.
> 
> Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-08 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 12:33 [PATCH net-next] cxgb4: Don't return EAGAIN when TCAM is full Vishal Kulkarni
2019-04-08 17:02 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.