From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 736261B1F4 for ; Fri, 30 Nov 2018 11:43:17 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2018 02:43:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,298,1539673200"; d="scan'208";a="254916410" Received: from silpixa00399501.ir.intel.com ([10.237.223.69]) by orsmga004.jf.intel.com with ESMTP; 30 Nov 2018 02:43:15 -0800 From: Lee Daly To: stable@dpdk.org Cc: Lee Daly Date: Fri, 30 Nov 2018 10:43:13 +0000 Message-Id: <1543574593-40390-1-git-send-email-lee.daly@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2018 10:43:17 -0000 [ backported from upstream commit 6d72657ce379e159b745be27edcad72ac0266aac] This patch checks the return value of function rte_eth_bond_8023ad_agg_selection_set() in bond_ethdev_configure for error return value. Signed-off-by: Lee Daly --- drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fe23289..60d958b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2910,9 +2910,16 @@ bond_probe(struct rte_vdev_device *dev) goto parse_error; } - if (internals->mode == BONDING_MODE_8023AD) - rte_eth_bond_8023ad_agg_selection_set(port_id, + 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; + } + } } else { rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE); } -- 2.7.4