Bug 483
Summary: | Bond 8023ad lacp handshake sometimes fail | ||
---|---|---|---|
Product: | DPDK | Reporter: | Markopeng (iobeyond) |
Component: | ethdev | Assignee: | Markopeng (iobeyond) |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | 3chas3, ajit.khaparde, hongguochun |
Priority: | Normal | ||
Version: | 19.11 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Markopeng
2020-05-21 14:12:01 CEST
Chas - can you please check? Thanks index b77a37d..48242a9 100644 --- a/FStackV1.12/dpdk/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/FStackV1.12/dpdk/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -658,6 +658,25 @@ max_index(uint64_t *a, int n) return max_i; } +static uint16_t +min_index(uint16_t *a, uint16_t n) +{ + if (n <= 0) + return -1; + + int i, min_i = 0; + uint64_t min = a[0]; + + for (i = 1; i < n; ++i) { + if (a[i] < min) { + min = a[i]; + min_i = i; + } + } + + return min_i; +} + /** * Function assigns port to aggregator. * @@ -728,7 +747,11 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id) if (default_slave == slaves_count) new_agg_id = slaves[slave_id]; else - new_agg_id = slaves[default_slave]; + { + //new_agg_id = slaves[default_slave]; + agg_new_idx = min_index(slaves, slaves_count); + new_agg_id = slaves[agg_new_idx]; + } break; default: if (default_slave == slaves_count) This is my patch, It works well for me. Markopeng - can you submit the patch to the mailing list formally? Thnaks Thanks, this works for me. |