Skip to content

Commit ed514fc

Browse files
vishalsdkdavem330
authored andcommitted
cxgb4: Don't return EAGAIN when TCAM is full.
During hash filter programming, driver needs to return ENOSPC error intead of EAGAIN when TCAM is full. Signed-off-by: Vishal Kulkarni <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fcf9782 commit ed514fc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,12 +1722,13 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
17221722
break;
17231723

17241724
default:
1725-
dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n",
1726-
__func__, status);
1725+
if (status != CPL_ERR_TCAM_FULL)
1726+
dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n",
1727+
__func__, status);
17271728

17281729
if (ctx) {
17291730
if (status == CPL_ERR_TCAM_FULL)
1730-
ctx->result = -EAGAIN;
1731+
ctx->result = -ENOSPC;
17311732
else
17321733
ctx->result = -EINVAL;
17331734
}

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,8 @@ int cxgb4_tc_flower_replace(struct net_device *dev,
687687

688688
ret = ctx.result;
689689
/* Check if hw returned error for filter creation */
690-
if (ret) {
691-
netdev_err(dev, "%s: filter creation err %d\n",
692-
__func__, ret);
690+
if (ret)
693691
goto free_entry;
694-
}
695692

696693
ch_flower->tc_flower_cookie = cls->cookie;
697694
ch_flower->filter_id = ctx.tid;

0 commit comments

Comments
 (0)