lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 18 May 2019 19:45:58 +0800
From:   wenxu@...oud.cn
To:     saeedm@...lanox.com, roid@...lanox.com, markb@...lanox.com
Cc:     netdev@...r.kernel.org
Subject: [PATCH v3] net/mlx5e: Add bonding device for indr block to offload the packet received from bonding device

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 +
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c  | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 5283e16..883ade4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -813,6 +813,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_lag_master(netdev) &&
 	    !is_vlan_dev(netdev))
 		return NOTIFY_OK;
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 31cd02f..7bf9b3d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2886,6 +2886,9 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
 					if (err)
 						return err;
 				}
+				if (netif_is_lag_master(parse_attr->filter_dev) &&
+				    uplink_upper != parse_attr->filter_dev)
+					return -EOPNOTSUPP;
 
 				if (!mlx5e_eswitch_rep(out_dev))
 					return -EOPNOTSUPP;
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ