Skip to content

Commit

Permalink
cxgb4: Don't return EAGAIN when TCAM is full.
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vishal Kulkarni authored and David S. Miller committed Apr 8, 2019
1 parent fcf9782 commit ed514fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed514fc

Please sign in to comment.