summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
diff options
context:
space:
mode:
authorJiri Pirko2017-06-06 17:00:16 +0200
committerDavid S. Miller2017-06-08 15:55:53 +0200
commita5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb (patch)
treed7ad6227c33518bb2339cb2e2190f7db407cebb8 /drivers/net/ethernet/mellanox/mlx5/core/en_main.c
parentMerge branch 'mlx4-drivers-version-update' (diff)
downloadkernel-qcow2-linux-a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb.tar.gz
kernel-qcow2-linux-a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb.tar.xz
kernel-qcow2-linux-a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb.zip
net: propagate tc filter chain index down the ndo_setup_tc call
We need to push the chain index down to the drivers, so they have the information to which chain the rule belongs. For now, no driver supports multichain offload, so only chain 0 is supported. This is needed to prevent chain squashes during offload for now. Later this will be used to implement multichain offload. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index cdff04b2aea1..5afec0f4a658 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2991,13 +2991,17 @@ out:
}
static int mlx5e_ndo_setup_tc(struct net_device *dev, u32 handle,
- __be16 proto, struct tc_to_netdev *tc)
+ u32 chain_index, __be16 proto,
+ struct tc_to_netdev *tc)
{
struct mlx5e_priv *priv = netdev_priv(dev);
if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS))
goto mqprio;
+ if (chain_index)
+ return -EOPNOTSUPP;
+
switch (tc->type) {
case TC_SETUP_CLSFLOWER:
switch (tc->cls_flower->command) {