aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rtnetlink.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-06-13 20:21:50 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-15 14:08:34 -0700
commit1b5c5493e3e68181be344cb51bf9df192d05ffc2 (patch)
tree9c0f004d07c1fe3314b155695a93f2de51a315c6 /include/linux/rtnetlink.h
parenttipc: add neighbor monitoring framework (diff)
downloadlinux-dev-1b5c5493e3e68181be344cb51bf9df192d05ffc2.tar.xz
linux-dev-1b5c5493e3e68181be344cb51bf9df192d05ffc2.zip
net_sched: add the ability to defer skb freeing
qdisc are changed under RTNL protection and often while blocking BH and root qdisc spinlock. When lots of skbs need to be dropped, we free them under these locks causing TX/RX freezes, and more generally latency spikes. This commit adds rtnl_kfree_skbs(), used to queue skbs for deferred freeing. Actual freeing happens right after RTNL is released, with appropriate scheduling points. rtnl_qdisc_drop() can also be used in place of disc_drop() when RTNL is held. qdisc_reset_queue() and __qdisc_reset_queue() get the new behavior, so standard qdiscs like pfifo, pfifo_fast... have their ->reset() method automatically handled. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r--include/linux/rtnetlink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index c006cc900c44..2daece8979f7 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -89,8 +89,9 @@ void net_inc_egress_queue(void);
void net_dec_egress_queue(void);
#endif
-extern void rtnetlink_init(void);
-extern void __rtnl_unlock(void);
+void rtnetlink_init(void);
+void __rtnl_unlock(void);
+void rtnl_kfree_skbs(struct sk_buff *head, struct sk_buff *tail);
#define ASSERT_RTNL() do { \
if (unlikely(!rtnl_is_locked())) { \