aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skb_array.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-05 15:31:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-05 15:31:59 -0400
commit5518b69b76680a4f2df96b1deca260059db0c2de (patch)
treef33cd1519c8efb4590500f2f9617400be233238c /include/linux/skb_array.h
parent8ad06e56dcbc1984ef0ff8f6e3c19982c5809f73 (diff)
parent0e72582270c07850b92cac351c8b97d4f9c123b9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Reasonably busy this cycle, but perhaps not as busy as in the 4.12 merge window: 1) Several optimizations for UDP processing under high load from Paolo Abeni. 2) Support pacing internally in TCP when using the sch_fq packet scheduler for this is not practical. From Eric Dumazet. 3) Support mutliple filter chains per qdisc, from Jiri Pirko. 4) Move to 1ms TCP timestamp clock, from Eric Dumazet. 5) Add batch dequeueing to vhost_net, from Jason Wang. 6) Flesh out more completely SCTP checksum offload support, from Davide Caratti. 7) More plumbing of extended netlink ACKs, from David Ahern, Pablo Neira Ayuso, and Matthias Schiffer. 8) Add devlink support to nfp driver, from Simon Horman. 9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa Prabhu. 10) Add stack depth tracking to BPF verifier and use this information in the various eBPF JITs. From Alexei Starovoitov. 11) Support XDP on qed device VFs, from Yuval Mintz. 12) Introduce BPF PROG ID for better introspection of installed BPF programs. From Martin KaFai Lau. 13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann. 14) For loads, allow narrower accesses in bpf verifier checking, from Yonghong Song. 15) Support MIPS in the BPF selftests and samples infrastructure, the MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David Daney. 16) Support kernel based TLS, from Dave Watson and others. 17) Remove completely DST garbage collection, from Wei Wang. 18) Allow installing TCP MD5 rules using prefixes, from Ivan Delalande. 19) Add XDP support to Intel i40e driver, from Björn Töpel 20) Add support for TC flower offload in nfp driver, from Simon Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub Kicinski, and Bert van Leeuwen. 21) IPSEC offloading support in mlx5, from Ilan Tayari. 22) Add HW PTP support to macb driver, from Rafal Ozieblo. 23) Networking refcount_t conversions, From Elena Reshetova. 24) Add sock_ops support to BPF, from Lawrence Brako. This is useful for tuning the TCP sockopt settings of a group of applications, currently via CGROUPs" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits) net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap cxgb4: Support for get_ts_info ethtool method cxgb4: Add PTP Hardware Clock (PHC) support cxgb4: time stamping interface for PTP nfp: default to chained metadata prepend format nfp: remove legacy MAC address lookup nfp: improve order of interfaces in breakout mode net: macb: remove extraneous return when MACB_EXT_DESC is defined bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case bpf: fix return in load_bpf_file mpls: fix rtm policy in mpls_getroute net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t net, ax25: convert ax25_route.refcount from atomic_t to refcount_t net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t ...
Diffstat (limited to 'include/linux/skb_array.h')
-rw-r--r--include/linux/skb_array.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index f4dfade428f0..35226cd4efb0 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -97,21 +97,46 @@ static inline struct sk_buff *skb_array_consume(struct skb_array *a)
97 return ptr_ring_consume(&a->ring); 97 return ptr_ring_consume(&a->ring);
98} 98}
99 99
100static inline int skb_array_consume_batched(struct skb_array *a,
101 struct sk_buff **array, int n)
102{
103 return ptr_ring_consume_batched(&a->ring, (void **)array, n);
104}
105
100static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a) 106static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a)
101{ 107{
102 return ptr_ring_consume_irq(&a->ring); 108 return ptr_ring_consume_irq(&a->ring);
103} 109}
104 110
111static inline int skb_array_consume_batched_irq(struct skb_array *a,
112 struct sk_buff **array, int n)
113{
114 return ptr_ring_consume_batched_irq(&a->ring, (void **)array, n);
115}
116
105static inline struct sk_buff *skb_array_consume_any(struct skb_array *a) 117static inline struct sk_buff *skb_array_consume_any(struct skb_array *a)
106{ 118{
107 return ptr_ring_consume_any(&a->ring); 119 return ptr_ring_consume_any(&a->ring);
108} 120}
109 121
122static inline int skb_array_consume_batched_any(struct skb_array *a,
123 struct sk_buff **array, int n)
124{
125 return ptr_ring_consume_batched_any(&a->ring, (void **)array, n);
126}
127
128
110static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a) 129static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a)
111{ 130{
112 return ptr_ring_consume_bh(&a->ring); 131 return ptr_ring_consume_bh(&a->ring);
113} 132}
114 133
134static inline int skb_array_consume_batched_bh(struct skb_array *a,
135 struct sk_buff **array, int n)
136{
137 return ptr_ring_consume_batched_bh(&a->ring, (void **)array, n);
138}
139
115static inline int __skb_array_len_with_tag(struct sk_buff *skb) 140static inline int __skb_array_len_with_tag(struct sk_buff *skb)
116{ 141{
117 if (likely(skb)) { 142 if (likely(skb)) {
@@ -156,6 +181,12 @@ static void __skb_array_destroy_skb(void *ptr)
156 kfree_skb(ptr); 181 kfree_skb(ptr);
157} 182}
158 183
184static inline void skb_array_unconsume(struct skb_array *a,
185 struct sk_buff **skbs, int n)
186{
187 ptr_ring_unconsume(&a->ring, (void **)skbs, n, __skb_array_destroy_skb);
188}
189
159static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp) 190static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp)
160{ 191{
161 return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb); 192 return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb);