git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bonding: fix LACP system address check
[dpdk.git]
/
drivers
/
net
/
bonding
/
rte_eth_bond_api.c
diff --git
a/drivers/net/bonding/rte_eth_bond_api.c
b/drivers/net/bonding/rte_eth_bond_api.c
index
2cef887
..
17e6ff8
100644
(file)
--- a/
drivers/net/bonding/rte_eth_bond_api.c
+++ b/
drivers/net/bonding/rte_eth_bond_api.c
@@
-6,14
+6,14
@@
#include <rte_mbuf.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_malloc.h>
-#include <
rte_
ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_tcp.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include "rte_eth_bond.h"
#include <rte_tcp.h>
#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include "rte_eth_bond.h"
-#include "
rte_
eth_bond_private.h"
-#include "
rte_
eth_bond_8023ad_private.h"
+#include "eth_bond_private.h"
+#include "eth_bond_8023ad_private.h"
int
check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
int
check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
@@
-129,12
+129,6
@@
deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
RTE_ASSERT(active_count < RTE_DIM(internals->active_slaves));
internals->active_slave_count = active_count;
RTE_ASSERT(active_count < RTE_DIM(internals->active_slaves));
internals->active_slave_count = active_count;
- /* Resetting active_slave when reaches to max
- * no of slaves in active list
- */
- if (internals->active_slave >= active_count)
- internals->active_slave = 0;
-
if (eth_dev->data->dev_started) {
if (internals->mode == BONDING_MODE_8023AD) {
bond_mode_8023ad_start(eth_dev);
if (eth_dev->data->dev_started) {
if (internals->mode == BONDING_MODE_8023AD) {
bond_mode_8023ad_start(eth_dev);
@@
-167,7
+161,7
@@
rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
ret = rte_vdev_init(name, devargs);
if (ret)
ret = rte_vdev_init(name, devargs);
if (ret)
- return
-ENOMEM
;
+ return
ret
;
ret = rte_eth_dev_get_port_by_name(name, &port_id);
RTE_ASSERT(!ret);
ret = rte_eth_dev_get_port_by_name(name, &port_id);
RTE_ASSERT(!ret);
@@
-243,7
+237,12
@@
slave_rte_flow_prepare(uint16_t slave_id, struct bond_dev_private *internals)
uint16_t slave_port_id = internals->slaves[slave_id].port_id;
if (internals->flow_isolated_valid != 0) {
uint16_t slave_port_id = internals->slaves[slave_id].port_id;
if (internals->flow_isolated_valid != 0) {
- rte_eth_dev_stop(slave_port_id);
+ if (rte_eth_dev_stop(slave_port_id) != 0) {
+ RTE_BOND_LOG(ERR, "Failed to stop device on port %u",
+ slave_port_id);
+ return -1;
+ }
+
if (rte_flow_isolate(slave_port_id, internals->flow_isolated,
&ferror)) {
RTE_BOND_LOG(ERR, "rte_flow_isolate failed for slave"
if (rte_flow_isolate(slave_port_id, internals->flow_isolated,
&ferror)) {
RTE_BOND_LOG(ERR, "rte_flow_isolate failed for slave"
@@
-698,6
+697,7
@@
__eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
internals->current_primary_port = internals->slaves[0].port_id;
else
internals->primary_port = 0;
internals->current_primary_port = internals->slaves[0].port_id;
else
internals->primary_port = 0;
+ mac_address_slaves_update(bonded_eth_dev);
}
if (internals->active_slave_count < 1) {
}
if (internals->active_slave_count < 1) {