diff options
author | Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> | 2019-02-19 05:31:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-19 10:45:14 -0800 |
commit | b2d69122fd627aa3c6c39c99b2b8706703a92634 (patch) | |
tree | b16674d9d3b95118c6e4f2cfa032f2eee07acb21 /drivers | |
parent | 0ca12be99667265ef8100860601d510e78f22cea (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c index 61a3457ed71b..44d6c5743fb9 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c @@ -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; } |