From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 4/4] net/hns3: return fail if FEC mode not support
Date: Mon, 10 May 2021 21:38:13 +0800 [thread overview]
Message-ID: <1620653893-8988-5-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1620653893-8988-1-git-send-email-humin29@huawei.com>
From: Chengwen Feng <fengchengwen@huawei.com>
If the FEC mode was not supported, it should return error code.
This patch also adds a space when log error info.
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2056a37..0758ef5 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6991,9 +6991,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
return ret;
/* HNS3 PMD driver only support one bit set mode, e.g. 0x1, 0x4 */
- if (!is_fec_mode_one_bit_set(mode))
- hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD,"
+ if (!is_fec_mode_one_bit_set(mode)) {
+ hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
"FEC mode should be only one bit set", mode);
+ return -EINVAL;
+ }
/*
* Check whether the configured mode is within the FEC capability.
--
2.7.4
next prev parent reply other threads:[~2021-05-10 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 1/4] net/hns3: fix unsupported mbx msg id log error Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 2/4] net/hns3: fix secondary process request start/stop Rx/Tx Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 3/4] net/hns3: fix memory barrier incorrectly placed Min Hu (Connor)
2021-05-10 13:38 ` Min Hu (Connor) [this message]
2021-05-11 18:09 ` [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Ferruh Yigit
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=1620653893-8988-5-git-send-email-humin29@huawei.com \
--to=humin29@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/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).