From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 4BA9F2B94; Fri, 16 Nov 2018 17:48:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2018 08:48:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,240,1539673200"; d="scan'208";a="86499956" Received: from silpixa00399501.ir.intel.com ([10.237.223.69]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2018 08:48:29 -0800 From: Lee Daly To: declan.doherty@intel.com, chas3@att.com Cc: dev@dpdk.org, Lee Daly , stable@dpdk.org Date: Fri, 16 Nov 2018 16:48:02 +0000 Message-Id: <1542386882-144827-1-git-send-email-lee.daly@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542380067-140320-1-git-send-email-lee.daly@intel.com> References: <1542380067-140320-1-git-send-email-lee.daly@intel.com> Subject: [dpdk-dev] [PATCH v2] net/bonding: fix possible silent failure in configuration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 16:48:37 -0000 This patch checks the return value of function rte_eth_bond_8023ad_agg_selection_set() in bond_ethdev_configure for error return value. Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes") Cc: stable@dpdk.org V2: syntax changes. commit message update. Signed-off-by: Lee Daly --- drivers/net/bonding/rte_eth_bond_pmd.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 156f31c..953cee5 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3420,9 +3420,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev) "Failed to parse agg selection mode for bonded device %s", name); } - if (internals->mode == BONDING_MODE_8023AD) - rte_eth_bond_8023ad_agg_selection_set(port_id, - agg_mode); + if (internals->mode == BONDING_MODE_8023AD) { + int ret = rte_eth_bond_8023ad_agg_selection_set(port_id, + agg_mode); + if (ret < 0) { + RTE_BOND_LOG(ERR, + "Invalid args for agg selection set for bonded device %s", + name); + return -1; + } + } } /* Parse/add slave ports to bonded device */ -- 2.7.4