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 0ECC6A00C5; Tue, 15 Feb 2022 11:56:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F12BC410F7; Tue, 15 Feb 2022 11:56:48 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id E17F240E78 for ; Tue, 15 Feb 2022 11:56:47 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id h14-20020a17090a130e00b001b88991a305so2378913pja.3 for ; Tue, 15 Feb 2022 02:56:47 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=O5XD+SWldZEqVwdOa8GQI/aHSZ33VBrIlLj1sUWRHxE=; b=iYkOnAvwXNHG1UMR0sdq9D6HlULtij0RjK0ngMS6j1TRjw/zzHqDSVwgMdsTS/Btx+ DbewCUSz/QQ1eIenxDqIS1jAwmvD1062TFFVRQcHP4WJvsFlpZY7yY/PGVsTVBJphY4L dHJKIbJhyy0MDcbDXsSauMYfwMigbpCo1Iw7KiXbXoLeIpeDVAsgKZSFg68PhcGBEx+j EMXV9EnU6OskAmz5TSWDAdmbUFE/SmxvkECCgo0x9nC6xZKihfoawxTCaGB0mwnoSUfJ kj5OTJ5QDwS6qJVyzjv+jgOy2iAgrB62s8LjaS6z66zwigBOcIBEYo5xNrpN/SirtuTb kH2Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=O5XD+SWldZEqVwdOa8GQI/aHSZ33VBrIlLj1sUWRHxE=; b=qk389G1AggpY5wY4q0LnxDaFe6PzEDCpcN0A8ZKzjjNnCFJ7BghEh2kblUoMo2+QSY wli8PfOneN/1xegbdiN5y//IxntoZWWK8++oTSm35O29ntX5liNWFYfqw3N8wetNe/l1 hQOes1RysiY0kGOu30wOJ2qRDo4FamJz+mMlMteodroNu1hLYsx/iCNeeU/wTSbpxjue UVX7E0Zu9Vq8LgOafu/M0OwDbY3B1KGaAb+IbXaSFqhWDdfl3Quu6C4zKdyIDsmc5JBL avhSyCKFPhNyee12HOyT1PRbdGqcb9hTONRpV3Qn5+RVoqV65qivpUdzXiB5GkdBjjCE PpRA== X-Gm-Message-State: AOAM533s+7R5hPhMQLQJValZN9Cwk6o7zsA8EDfWE7AhJQR9JibrGtAl qB70AQDpu1x8hKbbAN8KlnB9hVBy3HYl93Gj X-Google-Smtp-Source: ABdhPJx5feg1ueO9pNMN3uxSgq21/z9zRgzJiBoJCq3TPi2kcB5irJLOyVZt/e18vfJzFnBno6sGtQ== X-Received: by 2002:a17:90a:985:: with SMTP id 5mr3641065pjo.217.1644922606861; Tue, 15 Feb 2022 02:56:46 -0800 (PST) Received: from localhost.localdomain ([139.177.225.244]) by smtp.gmail.com with ESMTPSA id q2sm17149747pjj.32.2022.02.15.02.56.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Feb 2022 02:56:46 -0800 (PST) From: Wan Junjie To: dev@dpdk.org Cc: Chas Williams , Min Hu , Wan Junjie Subject: [PATCH v2 1/2] net/bonding: add error hint for invalid args Date: Tue, 15 Feb 2022 18:56:12 +0800 Message-Id: <20220215105612.59970-1-wanjunjie@bytedance.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220214081344.13637-1-wanjunjie@bytedance.com> References: <20220214081344.13637-1-wanjunjie@bytedance.com> 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 exist, application exits with no error hint. Adding a log message here will help users to know the reason. Signed-off-by: Wan Junjie --- v2: fix typo in commit msg --- 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