On Thu, Aug 2, 2018 at 6:03 AM Radu Nicolau <radu.nico...@intel.com> wrote:

> Signed-off-by: Radu Nicolau <radu.nico...@intel.com>
> ---
>  drivers/net/bonding/rte_eth_bond_8023ad.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c
> b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index f8cea4b..730087f 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -917,7 +917,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev
> *bond_dev,
>         };
>
>         char mem_name[RTE_ETH_NAME_MAX_LEN];
> -       int socket_id;
> +       int socket_id, ret;
>         unsigned element_size;
>         uint32_t total_tx_desc;
>         struct bond_tx_queue *bd_tx_q;
> @@ -942,7 +942,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev
> *bond_dev,
>
>         /* use this port as agregator */
>         port->aggregator_port_id = slave_id;
> -       rte_eth_promiscuous_enable(slave_id);
> +
> +       /* try to enable multicast, if fail set promiscuous */
> +       rte_eth_allmulticast_enable(slave_id);
> +       ret = rte_eth_allmulticast_get(slave_id);
>

You should really try to use rte_eth_dev_set_mc_addr_list() first.
Luckily, bonding doesn't implement rte_eth_dev_set_mc_addr_list()
so you don't need to reserve a slot.


> +       if (ret != 1)
> +               rte_eth_promiscuous_enable(slave_id);
>
>         timer_cancel(&port->warning_timer);
>
> --
> 2.7.5
>
>

Reply via email to