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 D0962A00C4; Mon, 14 Feb 2022 09:15:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F4AF40C35; Mon, 14 Feb 2022 09:15:19 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 1D9024068C for ; Mon, 14 Feb 2022 09:15:17 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id c10so2340668pfv.8 for ; Mon, 14 Feb 2022 00:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PX/PBCuZLTy7IgRCfCpLQXFkGuV6QfoLk+3JrY/xX4E=; b=C0bxXF0ZycJcoy/1qcXD2AIDHcnp3CZ0jgQly7c9/TxlACVGYaWfJBu2vsOQiYrcFm RkfAxhKNuJRUcgfxR7Q7RImJ2gW/ZNMhubvsjoop0Iuon+x5JG57VaaLuQfrsOJWkA4W vxaIKcGD/+6BSB0nItyVBg/j7qODEYBx4wtsgoTG5JamG8L8UdXvcKniZfzHL1/VT1L8 4Z3R5E3UE6FLGg7Z811Pu9DmIhdeGmfVMW1zDFIY1D7lodwqmXEnOMXuNCh5ETH48ech c8yf/1KU3uOc7x8Wgd+pjvCcnXzZv86Yw3C/TRWGxFYowuYiFl4O+8MbVuNmXMh3Z+Ma svcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PX/PBCuZLTy7IgRCfCpLQXFkGuV6QfoLk+3JrY/xX4E=; b=WDRXSlnFMpfWOFXi7QxC9fwxaPdo39ii/mZ6gpV3wyJHrSOGFi405hInHgVD4kJ5os kMOOj/qzyEugkP2AGjaKF8bbGh1U6c8SwUNvlqPs4cXfBk1wIUzDcjlyZcpbMdyd4JRP fw7xV7lX+fK3pj2L2aR1xB43pK+P+/p4rkFRAEubHP0hsBi0U7IAmv7ZyGM0VTnl1/im bUAlOYdghF0Zsv4vD/dtqDapc8R/oWOz9qzET931CyjcZZHZtb9a4mCi9xcXLS5HIQQ1 hxHsCsHFIwT4THKomOg+1zmaEChLFyZWk4mlGkDkgDHfoLrOh5lMq2qMDyVl7zOF0XbE xfCQ== X-Gm-Message-State: AOAM532ffY0Lyiv0slXI8OOJcLfWlQ1x6Bk+vGTtp8PC4Xeplo3qi5Vi OOcEiOgMOX6PtwVW8u4Sl3C8oMkFTb1z+0PH X-Google-Smtp-Source: ABdhPJzInEWUYuotaMmbFtKMawXZ91w2iqx7DvIMVJdc1RMmNs/r44JEOsZEiE5HPcCGY5KrvfAx4Q== X-Received: by 2002:a63:6c09:: with SMTP id h9mr11137838pgc.234.1644826516681; Mon, 14 Feb 2022 00:15:16 -0800 (PST) Received: from C02Z10J4LVCK.bytedance.net ([139.177.225.253]) by smtp.gmail.com with ESMTPSA id n42sm35337082pfv.29.2022.02.14.00.15.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Feb 2022 00:15:16 -0800 (PST) From: Wan Junjie To: dev@dpdk.org Cc: Chas Williams , Min Hu , Wan Junjie Subject: [PATCH 1/2] net/bonding: add error hint for invald args Date: Mon, 14 Feb 2022 16:13:43 +0800 Message-Id: <20220214081344.13637-1-wanjunjie@bytedance.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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) { -- 2.33.0