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: add rte prefix to ether structures
[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
e5e1465
..
0fc4c5e
100644
(file)
--- a/
drivers/net/bonding/rte_eth_bond_api.c
+++ b/
drivers/net/bonding/rte_eth_bond_api.c
@@
-76,7
+76,7
@@
void
activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
{
struct bond_dev_private *internals = eth_dev->data->dev_private;
activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
{
struct bond_dev_private *internals = eth_dev->data->dev_private;
- uint
8
_t active_count = internals->active_slave_count;
+ uint
16
_t active_count = internals->active_slave_count;
if (internals->mode == BONDING_MODE_8023AD)
bond_mode_8023ad_activate_slave(eth_dev, port_id);
if (internals->mode == BONDING_MODE_8023AD)
bond_mode_8023ad_activate_slave(eth_dev, port_id);
@@
-129,6
+129,12
@@
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);
@@
-484,10
+490,6
@@
__eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
}
}
}
}
- /* Inherit eth dev link properties from first slave */
- link_properties_set(bonded_eth_dev,
- &(slave_eth_dev->data->dev_link));
-
/* Make primary slave */
internals->primary_port = slave_port_id;
internals->current_primary_port = slave_port_id;
/* Make primary slave */
internals->primary_port = slave_port_id;
internals->current_primary_port = slave_port_id;
@@
-794,7
+796,7
@@
rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
uint16_t len)
{
struct bond_dev_private *internals;
uint16_t len)
{
struct bond_dev_private *internals;
- uint
8
_t i;
+ uint
16
_t i;
if (valid_bonded_port_id(bonded_port_id) != 0)
return -1;
if (valid_bonded_port_id(bonded_port_id) != 0)
return -1;
@@
-838,7
+840,7
@@
rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
int
rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
int
rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
- struct ether_addr *mac_addr)
+ struct
rte_
ether_addr *mac_addr)
{
struct rte_eth_dev *bonded_eth_dev;
struct bond_dev_private *internals;
{
struct rte_eth_dev *bonded_eth_dev;
struct bond_dev_private *internals;