From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 5/5] bnxt_en: Return relevant error code when offload fails
Date: Tue, 19 Feb 2019 05:31:16 -0500 [thread overview]
Message-ID: <1550572276-14711-6-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1550572276-14711-1-git-send-email-michael.chan@broadcom.com>
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
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>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 61a3457..44d6c57 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;
}
--
2.5.1
next prev parent reply other threads:[~2019-02-19 10:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 10:31 [PATCH net-next 0/5] bnxt_en: Update for net-next Michael Chan
2019-02-19 10:31 ` [PATCH net-next 1/5] bnxt_en: Update firmware interface spec. to 1.10.0.47 Michael Chan
2019-02-19 10:31 ` [PATCH net-next 2/5] bnxt_en: Add support for BCM957504 Michael Chan
2019-02-19 10:31 ` [PATCH net-next 3/5] bnxt_en: Propagate trusted VF attribute to firmware Michael Chan
2019-02-19 10:31 ` [PATCH net-next 4/5] bnxt_en: Add support for mdio read/write to external PHY Michael Chan
2019-02-19 10:31 ` Michael Chan [this message]
2019-02-19 18:45 ` [PATCH net-next 0/5] bnxt_en: Update for net-next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1550572276-14711-6-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).