DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wan Junjie <wanjunjie@bytedance.com>
To: dev@dpdk.org
Cc: Chas Williams <chas3@att.com>, Min Hu <humin29@huawei.com>,
	Wan Junjie <wanjunjie@bytedance.com>
Subject: [PATCH 1/2] net/bonding: add error hint for invald args
Date: Mon, 14 Feb 2022 16:13:43 +0800	[thread overview]
Message-ID: <20220214081344.13637-1-wanjunjie@bytedance.com> (raw)

When invalid args exsit, application exits with no error hint.
Adding a log message here will help users to know the reson.

Signed-off-by: Wan Junjie <wanjunjie@bytedance.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index bfa931098e..aa6519f83c 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3439,8 +3439,10 @@ bond_probe(struct rte_vdev_device *dev)
 
 	kvlist = rte_kvargs_parse(rte_vdev_device_args(dev),
 		pmd_bond_init_valid_arguments);
-	if (kvlist == NULL)
+	if (kvlist == NULL) {
+		RTE_BOND_LOG(ERR, "Invalid args in %s", rte_vdev_device_args(dev));
 		return -1;
+	}
 
 	/* Parse link bonding mode */
 	if (rte_kvargs_count(kvlist, PMD_BOND_MODE_KVARG) == 1) {
-- 
2.33.0


             reply	other threads:[~2022-02-14  8:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  8:13 Wan Junjie [this message]
2022-02-14  8:13 ` [PATCH 2/2] net/bonding: fix slaves initilizing on mtu setting Wan Junjie
2022-02-15  9:26   ` Min Hu (Connor)
2022-02-15 10:32     ` [External] " Wan Junjie
2022-02-15 10:59   ` [PATCH v2 2/2] net/bonding: fix slaves initializing " Wan Junjie
2022-02-16 13:22     ` Ferruh Yigit
2022-02-17  8:55       ` Min Hu (Connor)
2022-02-15  9:12 ` [PATCH 1/2] net/bonding: add error hint for invald args Min Hu (Connor)
2022-02-15  9:50   ` [External] " Wan Junjie
2022-02-15 10:56 ` [PATCH v2 1/2] net/bonding: add error hint for invalid args Wan Junjie
2022-02-15 11:56   ` Ferruh Yigit
2022-02-17 11:57     ` Ferruh Yigit
2022-02-16  0:29   ` Min Hu (Connor)

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=20220214081344.13637-1-wanjunjie@bytedance.com \
    --to=wanjunjie@bytedance.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.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).