bnxt_en: Return relevant error code when offload fails

The driver returns -ENOSPC when tc_can_offload() check fails. Since that
routine checks for flow parameters that are not supported by the driver,
we should return the more appropriate -EOPNOTSUPP.

Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sriharsha Basavapatna 2019-02-19 05:31:16 -05:00 committed by David S. Miller
parent 0ca12be996
commit b2d69122fd
1 changed files with 1 additions and 1 deletions

View File

@ -1290,7 +1290,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
bnxt_tc_set_flow_dir(bp, flow, src_fid);
if (!bnxt_tc_can_offload(bp, flow)) {
rc = -ENOSPC;
rc = -EOPNOTSUPP;
goto free_node;
}