From: Lee Daly <lee.daly@intel.com>
To: stable@dpdk.org
Cc: Lee Daly <lee.daly@intel.com>
Subject: [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config
Date: Fri, 30 Nov 2018 10:43:13 +0000 [thread overview]
Message-ID: <1543574593-40390-1-git-send-email-lee.daly@intel.com> (raw)
[ 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 <lee.daly@intel.com>
---
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
next reply other threads:[~2018-11-30 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 10:43 Lee Daly [this message]
2018-11-30 17:53 ` Yongseok Koh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1543574593-40390-1-git-send-email-lee.daly@intel.com \
--to=lee.daly@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).