* [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config
@ 2018-11-30 10:43 Lee Daly
2018-11-30 17:53 ` Yongseok Koh
0 siblings, 1 reply; 2+ messages in thread
From: Lee Daly @ 2018-11-30 10:43 UTC (permalink / raw)
To: stable; +Cc: Lee Daly
[ 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config
2018-11-30 10:43 [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config Lee Daly
@ 2018-11-30 17:53 ` Yongseok Koh
0 siblings, 0 replies; 2+ messages in thread
From: Yongseok Koh @ 2018-11-30 17:53 UTC (permalink / raw)
To: Lee Daly; +Cc: stable
> On Nov 30, 2018, at 2:43 AM, Lee Daly <lee.daly@intel.com> wrote:
>
> [ 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>
> ---
Applied to stable/17.11
Thanks,
Yongseok
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-30 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 10:43 [dpdk-stable] [PATCH 17.11] net/bonding: fix possible silent failure in config Lee Daly
2018-11-30 17:53 ` Yongseok Koh
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).