[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1129938e-2dff-9aed-5a76-f438e3e7ea15@mellanox.com>
Date: Fri, 17 May 2019 22:11:33 +0000
From: Mark Bloch <markb@...lanox.com>
To: "wenxu@...oud.cn" <wenxu@...oud.cn>,
Saeed Mahameed <saeedm@...lanox.com>,
Roi Dayan <roid@...lanox.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2] net/mlx5e: Add bonding device for indr block to
offload the packet received from bonding device
On 5/17/19 2:17 AM, wenxu@...oud.cn wrote:
> From: wenxu <wenxu@...oud.cn>
>
> The mlx5e support the lag mode. When add mlx_p0 and mlx_p1 to bond0.
> packet received from mlx_p0 or mlx_p1 and in the ingress tc flower
> forward to vf0. The tc rule can't be offloaded because there is
> no indr_register_block for the bonding device.
>
> Signed-off-by: wenxu <wenxu@...oud.cn>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> index 91e24f1..134fa0b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
> @@ -796,6 +796,7 @@ static int mlx5e_nic_rep_netdevice_event(struct notifier_block *nb,
> struct net_device *netdev = netdev_notifier_info_to_dev(ptr);
>
> if (!mlx5e_tc_tun_device_to_offload(priv, netdev) &&
> + !netif_is_bond_master(netdev) &&
I'm not that familiar with this code path, but shouldn't you check the mlx5e
netdevices are slaves of the bond device (what if you have multiple
bond devices in the system?)
> !is_vlan_dev(netdev))
> return NOTIFY_OK;
>
>
Mark
Powered by blists - more mailing lists