diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-06-06 17:00:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-08 15:55:53 +0200 |
commit | a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb (patch) | |
tree | d7ad6227c33518bb2339cb2e2190f7db407cebb8 /net/sched/cls_matchall.c | |
parent | Merge branch 'mlx4-drivers-version-update' (diff) | |
download | linux-a5fcf8a6c968ed8e312ff0b2a55d4c62d821eabb.tar.xz 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 'net/sched/cls_matchall.c')
-rw-r--r-- | net/sched/cls_matchall.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 51859b8edd7e..9dc26c32cf32 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -64,8 +64,9 @@ static int mall_replace_hw_filter(struct tcf_proto *tp, offload.cls_mall->exts = &head->exts; offload.cls_mall->cookie = cookie; - err = dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->protocol, - &offload); + err = dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, + tp->chain->index, + tp->protocol, &offload); if (!err) head->flags |= TCA_CLS_FLAGS_IN_HW; @@ -86,8 +87,8 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp, offload.cls_mall->exts = NULL; offload.cls_mall->cookie = cookie; - dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->protocol, - &offload); + dev->netdev_ops->ndo_setup_tc(dev, tp->q->handle, tp->chain->index, + tp->protocol, &offload); } static void mall_destroy(struct tcf_proto *tp) |