From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3AD0DA00C5; Tue, 15 Feb 2022 10:13:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9270410F3; Tue, 15 Feb 2022 10:13:03 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 57A9140E78 for ; Tue, 15 Feb 2022 10:13:01 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Jyb1z2g90zccyS; Tue, 15 Feb 2022 17:11:51 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Tue, 15 Feb 2022 17:12:56 +0800 Subject: Re: [PATCH 1/2] net/bonding: add error hint for invald args To: Wan Junjie , CC: Chas Williams References: <20220214081344.13637-1-wanjunjie@bytedance.com> From: "Min Hu (Connor)" Message-ID: <40e522da-2a94-1916-405d-c82cbf9004f3@huawei.com> Date: Tue, 15 Feb 2022 17:12:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20220214081344.13637-1-wanjunjie@bytedance.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi, wan, The headline has spelling errors. ÔÚ 2022/2/14 16:13, Wan Junjie дµÀ: > 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 > --- > 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) { >