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 <vishal@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vishal Kulkarni 2019-04-08 18:03:49 +05:30 committed by David S. Miller
parent fcf9782573
commit ed514fc561
2 changed files with 5 additions and 7 deletions

View File

@ -1722,12 +1722,13 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
break; break;
default: default:
dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n", if (status != CPL_ERR_TCAM_FULL)
__func__, status); dev_err(adap->pdev_dev, "%s: filter creation PROBLEM; status = %u\n",
__func__, status);
if (ctx) { if (ctx) {
if (status == CPL_ERR_TCAM_FULL) if (status == CPL_ERR_TCAM_FULL)
ctx->result = -EAGAIN; ctx->result = -ENOSPC;
else else
ctx->result = -EINVAL; ctx->result = -EINVAL;
} }

View File

@ -687,11 +687,8 @@ int cxgb4_tc_flower_replace(struct net_device *dev,
ret = ctx.result; ret = ctx.result;
/* Check if hw returned error for filter creation */ /* Check if hw returned error for filter creation */
if (ret) { if (ret)
netdev_err(dev, "%s: filter creation err %d\n",
__func__, ret);
goto free_entry; goto free_entry;
}
ch_flower->tc_flower_cookie = cls->cookie; ch_flower->tc_flower_cookie = cls->cookie;
ch_flower->filter_id = ctx.tid; ch_flower->filter_id = ctx.tid;