summaryrefslogtreecommitdiff
path: root/net/core/dev.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-10-09 10:09:53 +0200
committerJakub Kicinski <kuba@kernel.org>2024-10-10 08:30:22 -0700
commitff7d4deb1f3e18b983cb51fc2dcb7af57991d827 (patch)
tree5a079cb0fbf48d9ef3db54a4e3f162767e02246f /net/core/dev.h
parentbf230c497d31ab3bc9beac0df9e186595b351b19 (diff)
net-shapers: implement shaper cleanup on queue deletion
hook into netif_set_real_num_tx_queues() to cleanup any shaper configured on top of the to-be-destroyed TX queues. Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Link: https://patch.msgid.link/6da4ee03cae2b2a757d7b59e88baf09cc94c5ef1.1728460186.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev.h')
-rw-r--r--net/core/dev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/dev.h b/net/core/dev.h
index 13c558874af3..d3ea92949ff3 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -37,8 +37,12 @@ void dev_addr_check(struct net_device *dev);
#if IS_ENABLED(CONFIG_NET_SHAPER)
void net_shaper_flush_netdev(struct net_device *dev);
+void net_shaper_set_real_num_tx_queues(struct net_device *dev,
+ unsigned int txq);
#else
static inline void net_shaper_flush_netdev(struct net_device *dev) {}
+static inline void net_shaper_set_real_num_tx_queues(struct net_device *dev,
+ unsigned int txq) {}
#endif
/* sysctls not referred to from outside net/core/ */