diff options
author | Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> | 2019-05-06 17:24:21 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-07 12:23:40 -0700 |
commit | d6787147e15dffa7b7f3116a5bc3cbe0670bd74f (patch) | |
tree | 6c87638d50d56add45a94827c7abadd4d94a1728 /drivers/net/ethernet/netronome/nfp/flower/qos_conf.c | |
parent | 2e7ae67b5fbbe596cb3e06410970945f975a241a (diff) | |
download | lwn-d6787147e15dffa7b7f3116a5bc3cbe0670bd74f.tar.gz lwn-d6787147e15dffa7b7f3116a5bc3cbe0670bd74f.zip |
net/sched: remove block pointer from common offload structure
Based on feedback from Jiri avoid carrying a pointer to the tcf_block
structure in the tc_cls_common_offload structure. Instead store
a flag in driver private data which indicates if offloads apply
to a shared block at block binding time.
Suggested-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/qos_conf.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/qos_conf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/qos_conf.c b/drivers/net/ethernet/netronome/nfp/flower/qos_conf.c index 1b2ee18d7ff9..86e968cd5ffd 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/qos_conf.c +++ b/drivers/net/ethernet/netronome/nfp/flower/qos_conf.c @@ -76,8 +76,9 @@ nfp_flower_install_rate_limiter(struct nfp_app *app, struct net_device *netdev, return -EOPNOTSUPP; } repr = netdev_priv(netdev); + repr_priv = repr->app_priv; - if (tcf_block_shared(flow->common.block)) { + if (repr_priv->block_shared) { NL_SET_ERR_MSG_MOD(extack, "unsupported offload: qos rate limit offload not supported on shared blocks"); return -EOPNOTSUPP; } @@ -123,7 +124,6 @@ nfp_flower_install_rate_limiter(struct nfp_app *app, struct net_device *netdev, config->cir = cpu_to_be32(rate); nfp_ctrl_tx(repr->app->ctrl, skb); - repr_priv = repr->app_priv; repr_priv->qos_table.netdev_port_id = netdev_port_id; fl_priv->qos_rate_limiters++; if (fl_priv->qos_rate_limiters == 1) |