Skip to content

Commit b2d6912

Browse files
sbasavapatnadavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0ca12be commit b2d6912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
12901290
bnxt_tc_set_flow_dir(bp, flow, src_fid);
12911291

12921292
if (!bnxt_tc_can_offload(bp, flow)) {
1293-
rc = -ENOSPC;
1293+
rc = -EOPNOTSUPP;
12941294
goto free_node;
12951295
}
12961296

0 commit comments

Comments
 (0)