Commit d5d006bb authored by Maor Dickman's avatar Maor Dickman Committed by Jakub Kicinski

net/mlx5e: Enable TC offload for ingress MACVLAN over bond

Support offloading of TC rules that filter ingress traffic from a MACVLAN
device, which is attached to bond device.
Signed-off-by: default avatarMaor Dickman <maord@nvidia.com>
Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20230314054234.267365-15-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 244fd698
...@@ -433,6 +433,7 @@ mlx5e_rep_check_indr_block_supported(struct mlx5e_rep_priv *rpriv, ...@@ -433,6 +433,7 @@ mlx5e_rep_check_indr_block_supported(struct mlx5e_rep_priv *rpriv,
{ {
struct mlx5e_priv *priv = netdev_priv(rpriv->netdev); struct mlx5e_priv *priv = netdev_priv(rpriv->netdev);
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
struct net_device *macvlan_real_dev;
if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS && if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS) f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
...@@ -450,7 +451,11 @@ mlx5e_rep_check_indr_block_supported(struct mlx5e_rep_priv *rpriv, ...@@ -450,7 +451,11 @@ mlx5e_rep_check_indr_block_supported(struct mlx5e_rep_priv *rpriv,
return false; return false;
} }
if (macvlan_dev_real_dev(netdev) == rpriv->netdev) macvlan_real_dev = macvlan_dev_real_dev(netdev);
if (macvlan_real_dev == rpriv->netdev)
return true;
if (netif_is_bond_master(macvlan_real_dev))
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment