Lines Matching refs:sk_buff

274 			 SKB_DATA_ALIGN(sizeof(struct sk_buff)) +	\
341 struct sk_buff *next;
342 struct sk_buff *prev;
349 struct sk_buff;
536 void (*complete)(struct sk_buff *, struct ubuf_info *,
539 int (*link_skb)(struct sk_buff *skb, struct ubuf_info *uarg);
605 struct sk_buff *frag_list;
883 struct sk_buff { struct
887 struct sk_buff *next; argument
888 struct sk_buff *prev;
921 void (*destructor)(struct sk_buff *skb); argument
948 #define CLONED_OFFSET offsetof(struct sk_buff, __cloned_offset) argument
1109 #define PKT_TYPE_OFFSET offsetof(struct sk_buff, __pkt_type_offset) argument
1122 #define SKB_BF_MONO_TC_OFFSET offsetof(struct sk_buff, __mono_tc_offset)
1137 static inline bool skb_pfmemalloc(const struct sk_buff *skb) in skb_pfmemalloc()
1155 static inline struct dst_entry *skb_dst(const struct sk_buff *skb) in skb_dst()
1174 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set()
1190 static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set_noref()
1201 static inline bool skb_dst_is_noref(const struct sk_buff *skb) in skb_dst_is_noref()
1219 static inline unsigned int skb_napi_id(const struct sk_buff *skb) in skb_napi_id()
1228 static inline bool skb_wifi_acked_valid(const struct sk_buff *skb) in skb_wifi_acked_valid()
1243 static inline bool skb_unref(struct sk_buff *skb) in skb_unref()
1255 static inline bool skb_data_unref(const struct sk_buff *skb, in skb_data_unref()
1273 void __fix_address sk_skb_reason_drop(struct sock *sk, struct sk_buff *skb,
1277 kfree_skb_reason(struct sk_buff *skb, enum skb_drop_reason reason) in kfree_skb_reason()
1286 static inline void kfree_skb(struct sk_buff *skb) in kfree_skb()
1291 void skb_release_head_state(struct sk_buff *skb);
1292 void kfree_skb_list_reason(struct sk_buff *segs,
1294 void skb_dump(const char *level, const struct sk_buff *skb, bool full_pkt);
1295 void skb_tx_error(struct sk_buff *skb);
1297 static inline void kfree_skb_list(struct sk_buff *segs) in kfree_skb_list()
1303 void consume_skb(struct sk_buff *skb);
1305 static inline void consume_skb(struct sk_buff *skb) in consume_skb()
1311 void __consume_stateless_skb(struct sk_buff *skb);
1312 void __kfree_skb(struct sk_buff *skb);
1314 void kfree_skb_partial(struct sk_buff *skb, bool head_stolen);
1315 bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
1318 struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
1320 struct sk_buff *__build_skb(void *data, unsigned int frag_size);
1321 struct sk_buff *build_skb(void *data, unsigned int frag_size);
1322 struct sk_buff *build_skb_around(struct sk_buff *skb,
1324 void skb_attempt_defer_free(struct sk_buff *skb);
1327 struct sk_buff *napi_build_skb(void *data, unsigned int frag_size);
1328 struct sk_buff *slab_build_skb(void *data);
1337 static inline struct sk_buff *alloc_skb(unsigned int size, in alloc_skb()
1343 struct sk_buff *alloc_skb_with_frags(unsigned long header_len,
1348 struct sk_buff *alloc_skb_for_msg(struct sk_buff *first);
1352 struct sk_buff skb1;
1354 struct sk_buff skb2;
1369 const struct sk_buff *skb) in skb_fclone_busy()
1387 static inline struct sk_buff *alloc_skb_fclone(unsigned int size, in alloc_skb_fclone()
1393 struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
1394 void skb_headers_offset_update(struct sk_buff *skb, int off);
1395 int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
1396 struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority);
1397 void skb_copy_header(struct sk_buff *new, const struct sk_buff *old);
1398 struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t priority);
1399 struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb, int headroom,
1401 static inline struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, in __pskb_copy()
1407 int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask);
1408 struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
1410 struct sk_buff *skb_expand_head(struct sk_buff *skb, unsigned int headroom);
1411 struct sk_buff *skb_copy_expand(const struct sk_buff *skb, int newheadroom,
1413 int __must_check skb_to_sgvec_nomark(struct sk_buff *skb, struct scatterlist *sg,
1415 int __must_check skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg,
1417 int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer);
1418 int __skb_pad(struct sk_buff *skb, int pad, bool free_on_error);
1431 static inline int skb_pad(struct sk_buff *skb, int pad) in skb_pad()
1437 int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
1445 struct sk_buff *root_skb;
1446 struct sk_buff *cur_skb;
1451 void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
1458 unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
1494 static inline void skb_clear_hash(struct sk_buff *skb) in skb_clear_hash()
1501 static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb) in skb_clear_hash_if_not_l4()
1508 __skb_set_hash(struct sk_buff *skb, __u32 hash, bool is_sw, bool is_l4) in __skb_set_hash()
1516 skb_set_hash(struct sk_buff *skb, __u32 hash, enum pkt_hash_types type) in skb_set_hash()
1523 __skb_set_sw_hash(struct sk_buff *skb, __u32 hash, bool is_l4) in __skb_set_sw_hash()
1528 u32 __skb_get_hash_symmetric_net(const struct net *net, const struct sk_buff *skb);
1530 static inline u32 __skb_get_hash_symmetric(const struct sk_buff *skb) in __skb_get_hash_symmetric()
1535 void __skb_get_hash_net(const struct net *net, struct sk_buff *skb);
1536 u32 skb_get_poff(const struct sk_buff *skb);
1537 u32 __skb_get_poff(const struct sk_buff *skb, const void *data,
1539 __be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto,
1551 const struct sk_buff *skb,
1556 static inline bool skb_flow_dissect(const struct sk_buff *skb, in skb_flow_dissect()
1564 static inline bool skb_flow_dissect_flow_keys(const struct sk_buff *skb, in skb_flow_dissect_flow_keys()
1575 const struct sk_buff *skb, in skb_flow_dissect_flow_keys_basic()
1585 void skb_flow_dissect_meta(const struct sk_buff *skb,
1594 skb_flow_dissect_ct(const struct sk_buff *skb,
1600 skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
1604 void skb_flow_dissect_hash(const struct sk_buff *skb,
1608 static inline __u32 skb_get_hash_net(const struct net *net, struct sk_buff *skb) in skb_get_hash_net()
1616 static inline __u32 skb_get_hash(struct sk_buff *skb) in skb_get_hash()
1624 static inline __u32 skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6) in skb_get_hash_flowi6()
1636 __u32 skb_get_hash_perturb(const struct sk_buff *skb,
1639 static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) in skb_get_hash_raw()
1644 static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from) in skb_copy_hash()
1651 static inline int skb_cmp_decrypted(const struct sk_buff *skb1, in skb_cmp_decrypted()
1652 const struct sk_buff *skb2) in skb_cmp_decrypted()
1661 static inline bool skb_is_decrypted(const struct sk_buff *skb) in skb_is_decrypted()
1670 static inline void skb_copy_decrypted(struct sk_buff *to, in skb_copy_decrypted()
1671 const struct sk_buff *from) in skb_copy_decrypted()
1679 static inline unsigned char *skb_end_pointer(const struct sk_buff *skb) in skb_end_pointer()
1684 static inline unsigned int skb_end_offset(const struct sk_buff *skb) in skb_end_offset()
1689 static inline void skb_set_end_offset(struct sk_buff *skb, unsigned int offset) in skb_set_end_offset()
1694 static inline unsigned char *skb_end_pointer(const struct sk_buff *skb) in skb_end_pointer()
1699 static inline unsigned int skb_end_offset(const struct sk_buff *skb) in skb_end_offset()
1704 static inline void skb_set_end_offset(struct sk_buff *skb, unsigned int offset) in skb_set_end_offset()
1718 struct sk_buff *skb, struct iov_iter *from,
1721 int zerocopy_fill_skb_from_iter(struct sk_buff *skb,
1724 static inline int skb_zerocopy_iter_dgram(struct sk_buff *skb, in skb_zerocopy_iter_dgram()
1730 int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb,
1737 static inline struct skb_shared_hwtstamps *skb_hwtstamps(struct sk_buff *skb) in skb_hwtstamps()
1742 static inline struct ubuf_info *skb_zcopy(struct sk_buff *skb) in skb_zcopy()
1749 static inline bool skb_zcopy_pure(const struct sk_buff *skb) in skb_zcopy_pure()
1754 static inline bool skb_zcopy_managed(const struct sk_buff *skb) in skb_zcopy_managed()
1759 static inline bool skb_pure_zcopy_same(const struct sk_buff *skb1, in skb_pure_zcopy_same()
1760 const struct sk_buff *skb2) in skb_pure_zcopy_same()
1770 static inline void skb_zcopy_init(struct sk_buff *skb, struct ubuf_info *uarg) in skb_zcopy_init()
1776 static inline void skb_zcopy_set(struct sk_buff *skb, struct ubuf_info *uarg, in skb_zcopy_set()
1788 static inline void skb_zcopy_set_nouarg(struct sk_buff *skb, void *val) in skb_zcopy_set_nouarg()
1794 static inline bool skb_zcopy_is_nouarg(struct sk_buff *skb) in skb_zcopy_is_nouarg()
1799 static inline void *skb_zcopy_get_nouarg(struct sk_buff *skb) in skb_zcopy_get_nouarg()
1821 static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy_success) in skb_zcopy_clear()
1833 void __skb_zcopy_downgrade_managed(struct sk_buff *skb);
1835 static inline void skb_zcopy_downgrade_managed(struct sk_buff *skb) in skb_zcopy_downgrade_managed()
1842 static inline bool skb_frags_readable(const struct sk_buff *skb) in skb_frags_readable()
1847 static inline void skb_mark_not_on_list(struct sk_buff *skb) in skb_mark_not_on_list()
1852 static inline void skb_poison_list(struct sk_buff *skb) in skb_poison_list()
1864 static inline void skb_list_del_init(struct sk_buff *skb) in skb_list_del_init()
1878 return list->next == (const struct sk_buff *) list; in skb_queue_empty()
1890 return READ_ONCE(list->next) == (const struct sk_buff *) list; in skb_queue_empty_lockless()
1902 const struct sk_buff *skb) in skb_queue_is_last()
1904 return skb->next == (const struct sk_buff *) list; in skb_queue_is_last()
1915 const struct sk_buff *skb) in skb_queue_is_first()
1917 return skb->prev == (const struct sk_buff *) list; in skb_queue_is_first()
1928 static inline struct sk_buff *skb_queue_next(const struct sk_buff_head *list, in skb_queue_next()
1929 const struct sk_buff *skb) in skb_queue_next()
1946 static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list, in skb_queue_prev()
1947 const struct sk_buff *skb) in skb_queue_prev()
1963 static inline struct sk_buff *skb_get(struct sk_buff *skb) in skb_get()
1981 static inline int skb_cloned(const struct sk_buff *skb) in skb_cloned()
1987 static inline int skb_unclone(struct sk_buff *skb, gfp_t pri) in skb_unclone()
2003 int __skb_unclone_keeptruesize(struct sk_buff *skb, gfp_t pri);
2004 static inline int skb_unclone_keeptruesize(struct sk_buff *skb, gfp_t pri) in skb_unclone_keeptruesize()
2020 static inline int skb_header_cloned(const struct sk_buff *skb) in skb_header_cloned()
2032 static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri) in skb_header_unclone()
2048 static inline void __skb_header_release(struct sk_buff *skb) in __skb_header_release()
2062 static inline int skb_shared(const struct sk_buff *skb) in skb_shared()
2080 static inline struct sk_buff *skb_share_check(struct sk_buff *skb, gfp_t pri) in skb_share_check()
2084 struct sk_buff *nskb = skb_clone(skb, pri); in skb_share_check()
2115 static inline struct sk_buff *skb_unshare(struct sk_buff *skb, in skb_unshare()
2120 struct sk_buff *nskb = skb_copy(skb, pri); in skb_unshare()
2145 static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_) in skb_peek()
2147 struct sk_buff *skb = list_->next; in skb_peek()
2149 if (skb == (struct sk_buff *)list_) in skb_peek()
2160 static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_) in __skb_peek()
2174 static inline struct sk_buff *skb_peek_next(struct sk_buff *skb, in skb_peek_next()
2177 struct sk_buff *next = skb->next; in skb_peek_next()
2179 if (next == (struct sk_buff *)list_) in skb_peek_next()
2197 static inline struct sk_buff *skb_peek_tail(const struct sk_buff_head *list_) in skb_peek_tail()
2199 struct sk_buff *skb = READ_ONCE(list_->prev); in skb_peek_tail()
2201 if (skb == (struct sk_buff *)list_) in skb_peek_tail()
2242 list->prev = list->next = (struct sk_buff *)list; in __skb_queue_head_init()
2273 static inline void __skb_insert(struct sk_buff *newsk, in __skb_insert()
2274 struct sk_buff *prev, struct sk_buff *next, in __skb_insert()
2288 struct sk_buff *prev, in __skb_queue_splice()
2289 struct sk_buff *next) in __skb_queue_splice()
2291 struct sk_buff *first = list->next; in __skb_queue_splice()
2292 struct sk_buff *last = list->prev; in __skb_queue_splice()
2310 __skb_queue_splice(list, (struct sk_buff *) head, head->next); in skb_queue_splice()
2326 __skb_queue_splice(list, (struct sk_buff *) head, head->next); in skb_queue_splice_init()
2341 __skb_queue_splice(list, head->prev, (struct sk_buff *) head); in skb_queue_splice_tail()
2358 __skb_queue_splice(list, head->prev, (struct sk_buff *) head); in skb_queue_splice_tail_init()
2376 struct sk_buff *prev, in __skb_queue_after()
2377 struct sk_buff *newsk) in __skb_queue_after()
2382 void skb_append(struct sk_buff *old, struct sk_buff *newsk,
2386 struct sk_buff *next, in __skb_queue_before()
2387 struct sk_buff *newsk) in __skb_queue_before()
2403 struct sk_buff *newsk) in __skb_queue_head()
2405 __skb_queue_after(list, (struct sk_buff *)list, newsk); in __skb_queue_head()
2407 void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);
2420 struct sk_buff *newsk) in __skb_queue_tail()
2422 __skb_queue_before(list, (struct sk_buff *)list, newsk); in __skb_queue_tail()
2424 void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
2430 void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list);
2431 static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) in __skb_unlink()
2433 struct sk_buff *next, *prev; in __skb_unlink()
2451 static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) in __skb_dequeue()
2453 struct sk_buff *skb = skb_peek(list); in __skb_dequeue()
2458 struct sk_buff *skb_dequeue(struct sk_buff_head *list);
2468 static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) in __skb_dequeue_tail()
2470 struct sk_buff *skb = skb_peek_tail(list); in __skb_dequeue_tail()
2475 struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
2478 static inline bool skb_is_nonlinear(const struct sk_buff *skb) in skb_is_nonlinear()
2483 static inline unsigned int skb_headlen(const struct sk_buff *skb) in skb_headlen()
2488 static inline unsigned int __skb_pagelen(const struct sk_buff *skb) in __skb_pagelen()
2497 static inline unsigned int skb_pagelen(const struct sk_buff *skb) in skb_pagelen()
2540 static inline void skb_len_add(struct sk_buff *skb, int delta) in skb_len_add()
2560 static inline void __skb_fill_netmem_desc(struct sk_buff *skb, int i, in __skb_fill_netmem_desc()
2583 static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, in __skb_fill_page_desc()
2589 static inline void skb_fill_netmem_desc(struct sk_buff *skb, int i, in skb_fill_netmem_desc()
2610 static inline void skb_fill_page_desc(struct sk_buff *skb, int i, in skb_fill_page_desc()
2627 static inline void skb_fill_page_desc_noacc(struct sk_buff *skb, int i, in skb_fill_page_desc_noacc()
2637 void skb_add_rx_frag_netmem(struct sk_buff *skb, int i, netmem_ref netmem,
2640 static inline void skb_add_rx_frag(struct sk_buff *skb, int i, in skb_add_rx_frag()
2648 void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size,
2654 static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) in skb_tail_pointer()
2659 static inline void skb_reset_tail_pointer(struct sk_buff *skb) in skb_reset_tail_pointer()
2664 static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) in skb_set_tail_pointer()
2671 static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) in skb_tail_pointer()
2676 static inline void skb_reset_tail_pointer(struct sk_buff *skb) in skb_reset_tail_pointer()
2681 static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) in skb_set_tail_pointer()
2688 static inline void skb_assert_len(struct sk_buff *skb) in skb_assert_len()
2697 void skb_might_realloc(struct sk_buff *skb);
2699 static inline void skb_might_realloc(struct sk_buff *skb) {} in skb_might_realloc()
2705 void *pskb_put(struct sk_buff *skb, struct sk_buff *tail, int len);
2706 void *skb_put(struct sk_buff *skb, unsigned int len);
2707 static inline void *__skb_put(struct sk_buff *skb, unsigned int len) in __skb_put()
2716 static inline void *__skb_put_zero(struct sk_buff *skb, unsigned int len) in __skb_put_zero()
2724 static inline void *__skb_put_data(struct sk_buff *skb, const void *data, in __skb_put_data()
2733 static inline void __skb_put_u8(struct sk_buff *skb, u8 val) in __skb_put_u8()
2738 static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len) in skb_put_zero()
2747 static inline void *skb_put_data(struct sk_buff *skb, const void *data, in skb_put_data()
2757 static inline void skb_put_u8(struct sk_buff *skb, u8 val) in skb_put_u8()
2762 void *skb_push(struct sk_buff *skb, unsigned int len);
2763 static inline void *__skb_push(struct sk_buff *skb, unsigned int len) in __skb_push()
2772 void *skb_pull(struct sk_buff *skb, unsigned int len);
2773 static inline void *__skb_pull(struct sk_buff *skb, unsigned int len) in __skb_pull()
2789 static inline void *skb_pull_inline(struct sk_buff *skb, unsigned int len) in skb_pull_inline()
2794 void *skb_pull_data(struct sk_buff *skb, size_t len);
2796 void *__pskb_pull_tail(struct sk_buff *skb, int delta);
2799 pskb_may_pull_reason(struct sk_buff *skb, unsigned int len) in pskb_may_pull_reason()
2816 static inline bool pskb_may_pull(struct sk_buff *skb, unsigned int len) in pskb_may_pull()
2821 static inline void *pskb_pull(struct sk_buff *skb, unsigned int len) in pskb_pull()
2830 void skb_condense(struct sk_buff *skb);
2838 static inline unsigned int skb_headroom(const struct sk_buff *skb) in skb_headroom()
2849 static inline int skb_tailroom(const struct sk_buff *skb) in skb_tailroom()
2861 static inline int skb_availroom(const struct sk_buff *skb) in skb_availroom()
2877 static inline void skb_reserve(struct sk_buff *skb, int len) in skb_reserve()
2895 static inline void skb_tailroom_reserve(struct sk_buff *skb, unsigned int mtu, in skb_tailroom_reserve()
2910 static inline void skb_set_inner_protocol(struct sk_buff *skb, in skb_set_inner_protocol()
2917 static inline void skb_set_inner_ipproto(struct sk_buff *skb, in skb_set_inner_ipproto()
2924 static inline void skb_reset_inner_headers(struct sk_buff *skb) in skb_reset_inner_headers()
2931 static inline int skb_mac_header_was_set(const struct sk_buff *skb) in skb_mac_header_was_set()
2936 static inline void skb_reset_mac_len(struct sk_buff *skb) in skb_reset_mac_len()
2946 static inline unsigned char *skb_inner_transport_header(const struct sk_buff in skb_inner_transport_header()
2952 static inline int skb_inner_transport_offset(const struct sk_buff *skb) in skb_inner_transport_offset()
2957 static inline void skb_reset_inner_transport_header(struct sk_buff *skb) in skb_reset_inner_transport_header()
2965 static inline void skb_set_inner_transport_header(struct sk_buff *skb, in skb_set_inner_transport_header()
2972 static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb) in skb_inner_network_header()
2977 static inline void skb_reset_inner_network_header(struct sk_buff *skb) in skb_reset_inner_network_header()
2985 static inline void skb_set_inner_network_header(struct sk_buff *skb, in skb_set_inner_network_header()
2992 static inline bool skb_inner_network_header_was_set(const struct sk_buff *skb) in skb_inner_network_header_was_set()
2997 static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb) in skb_inner_mac_header()
3002 static inline void skb_reset_inner_mac_header(struct sk_buff *skb) in skb_reset_inner_mac_header()
3010 static inline void skb_set_inner_mac_header(struct sk_buff *skb, in skb_set_inner_mac_header()
3016 static inline bool skb_transport_header_was_set(const struct sk_buff *skb) in skb_transport_header_was_set()
3021 static inline unsigned char *skb_transport_header(const struct sk_buff *skb) in skb_transport_header()
3027 static inline void skb_reset_transport_header(struct sk_buff *skb) in skb_reset_transport_header()
3035 static inline void skb_set_transport_header(struct sk_buff *skb, in skb_set_transport_header()
3042 static inline unsigned char *skb_network_header(const struct sk_buff *skb) in skb_network_header()
3047 static inline void skb_reset_network_header(struct sk_buff *skb) in skb_reset_network_header()
3055 static inline void skb_set_network_header(struct sk_buff *skb, const int offset) in skb_set_network_header()
3061 static inline unsigned char *skb_mac_header(const struct sk_buff *skb) in skb_mac_header()
3067 static inline int skb_mac_offset(const struct sk_buff *skb) in skb_mac_offset()
3072 static inline u32 skb_mac_header_len(const struct sk_buff *skb) in skb_mac_header_len()
3078 static inline void skb_unset_mac_header(struct sk_buff *skb) in skb_unset_mac_header()
3083 static inline void skb_reset_mac_header(struct sk_buff *skb) in skb_reset_mac_header()
3091 static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) in skb_set_mac_header()
3097 static inline void skb_pop_mac_header(struct sk_buff *skb) in skb_pop_mac_header()
3102 static inline void skb_probe_transport_header(struct sk_buff *skb) in skb_probe_transport_header()
3114 static inline void skb_mac_header_rebuild(struct sk_buff *skb) in skb_mac_header_rebuild()
3128 static inline void skb_mac_header_rebuild_full(struct sk_buff *skb, u32 full_mac_len) in skb_mac_header_rebuild_full()
3139 static inline int skb_checksum_start_offset(const struct sk_buff *skb) in skb_checksum_start_offset()
3144 static inline unsigned char *skb_checksum_start(const struct sk_buff *skb) in skb_checksum_start()
3149 static inline int skb_transport_offset(const struct sk_buff *skb) in skb_transport_offset()
3154 static inline u32 skb_network_header_len(const struct sk_buff *skb) in skb_network_header_len()
3160 static inline u32 skb_inner_network_header_len(const struct sk_buff *skb) in skb_inner_network_header_len()
3165 static inline int skb_network_offset(const struct sk_buff *skb) in skb_network_offset()
3170 static inline int skb_inner_network_offset(const struct sk_buff *skb) in skb_inner_network_offset()
3176 pskb_network_may_pull_reason(struct sk_buff *skb, unsigned int len) in pskb_network_may_pull_reason()
3181 static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) in pskb_network_may_pull()
3234 int ___pskb_trim(struct sk_buff *skb, unsigned int len);
3236 static inline void __skb_set_length(struct sk_buff *skb, unsigned int len) in __skb_set_length()
3244 static inline void __skb_trim(struct sk_buff *skb, unsigned int len) in __skb_trim()
3249 void skb_trim(struct sk_buff *skb, unsigned int len);
3251 static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) in __pskb_trim()
3259 static inline int pskb_trim(struct sk_buff *skb, unsigned int len) in pskb_trim()
3274 static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len) in pskb_trim_unique()
3280 static inline int __skb_grow(struct sk_buff *skb, unsigned int len) in __skb_grow()
3302 static inline void skb_orphan(struct sk_buff *skb) in skb_orphan()
3322 static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) in skb_orphan_frags()
3332 static inline int skb_orphan_frags_rx(struct sk_buff *skb, gfp_t gfp_mask) in skb_orphan_frags_rx()
3351 struct sk_buff *skb; in __skb_queue_purge_reason()
3394 struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length,
3410 static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, in netdev_alloc_skb()
3417 static inline struct sk_buff *__dev_alloc_skb(unsigned int length, in __dev_alloc_skb()
3424 static inline struct sk_buff *dev_alloc_skb(unsigned int length) in dev_alloc_skb()
3430 static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev, in __netdev_alloc_skb_ip_align()
3433 struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp); in __netdev_alloc_skb_ip_align()
3440 static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, in netdev_alloc_skb_ip_align()
3465 struct sk_buff *napi_alloc_skb(struct napi_struct *napi, unsigned int length);
3466 void napi_consume_skb(struct sk_buff *skb, int budget);
3468 void napi_skb_free_stolen_head(struct sk_buff *skb);
3469 void __napi_kfree_skb(struct sk_buff *skb, enum skb_drop_reason reason);
3545 struct sk_buff *skb) in skb_propagate_pfmemalloc()
3638 int skb_pp_cow_data(struct page_pool *pool, struct sk_buff **pskb,
3640 int skb_cow_data_for_xdp(struct page_pool *pool, struct sk_buff **pskb,
3728 static inline struct sk_buff *pskb_copy(struct sk_buff *skb, in pskb_copy()
3735 static inline struct sk_buff *pskb_copy_for_clone(struct sk_buff *skb, in pskb_copy_for_clone()
3750 static inline int skb_clone_writable(const struct sk_buff *skb, unsigned int len) in skb_clone_writable()
3756 static inline int skb_try_make_writable(struct sk_buff *skb, in skb_try_make_writable()
3763 static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, in __skb_cow()
3789 static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) in skb_cow()
3804 static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) in skb_cow_head()
3819 static inline int skb_padto(struct sk_buff *skb, unsigned int len) in skb_padto()
3838 static inline int __must_check __skb_put_padto(struct sk_buff *skb, in __skb_put_padto()
3863 static inline int __must_check skb_put_padto(struct sk_buff *skb, unsigned int len) in skb_put_padto()
3871 static inline bool skb_can_coalesce(struct sk_buff *skb, int i, in skb_can_coalesce()
3885 static inline int __skb_linearize(struct sk_buff *skb) in __skb_linearize()
3897 static inline int skb_linearize(struct sk_buff *skb) in skb_linearize()
3909 static inline bool skb_has_shared_frag(const struct sk_buff *skb) in skb_has_shared_frag()
3922 static inline int skb_linearize_cow(struct sk_buff *skb) in skb_linearize_cow()
3929 __skb_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len, in __skb_postpull_rcsum()
3950 static inline void skb_postpull_rcsum(struct sk_buff *skb, in skb_postpull_rcsum()
3962 __skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len, in __skb_postpush_rcsum()
3979 static inline void skb_postpush_rcsum(struct sk_buff *skb, in skb_postpush_rcsum()
3985 void *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
3998 static inline void *skb_push_rcsum(struct sk_buff *skb, unsigned int len) in skb_push_rcsum()
4005 int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len);
4016 static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) in pskb_trim_rcsum()
4024 static inline int __skb_trim_rcsum(struct sk_buff *skb, unsigned int len) in __skb_trim_rcsum()
4032 static inline int __skb_grow_rcsum(struct sk_buff *skb, unsigned int len) in __skb_grow_rcsum()
4039 #define rb_to_skb(rb) rb_entry_safe(rb, struct sk_buff, rbnode)
4047 skb != (struct sk_buff *)(queue); \
4052 skb != (struct sk_buff *)(queue); \
4056 for (; skb != (struct sk_buff *)(queue); \
4073 skb != (struct sk_buff *)(queue); \
4078 skb != (struct sk_buff *)(queue); \
4083 skb != (struct sk_buff *)(queue); \
4088 skb != (struct sk_buff *)(queue); \
4091 static inline bool skb_has_frag_list(const struct sk_buff *skb) in skb_has_frag_list()
4096 static inline void skb_frag_list_init(struct sk_buff *skb) in skb_frag_list_init()
4107 const struct sk_buff *skb);
4108 struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
4112 struct sk_buff **last);
4113 struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
4116 struct sk_buff **last);
4117 struct sk_buff *__skb_recv_datagram(struct sock *sk,
4120 struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned int flags, int *err);
4123 int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
4125 static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, in skb_copy_datagram_msg()
4130 int skb_copy_and_csum_datagram_msg(struct sk_buff *skb, int hlen,
4132 int skb_copy_and_hash_datagram_iter(const struct sk_buff *skb, int offset,
4135 int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,
4137 int zerocopy_sg_from_iter(struct sk_buff *skb, struct iov_iter *frm);
4138 void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
4139 int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
4140 int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
4141 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
4142 __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
4144 int skb_splice_bits(struct sk_buff *skb, struct sock *sk, unsigned int offset,
4147 int skb_send_sock_locked(struct sock *sk, struct sk_buff *skb, int offset,
4149 int skb_send_sock(struct sock *sk, struct sk_buff *skb, int offset, int len);
4150 void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
4151 unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
4152 int skb_zerocopy(struct sk_buff *to, struct sk_buff *from,
4154 void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len);
4155 int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
4156 void skb_scrub_packet(struct sk_buff *skb, bool xnet);
4157 struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features);
4158 struct sk_buff *skb_segment_list(struct sk_buff *skb, netdev_features_t features,
4160 struct sk_buff *skb_vlan_untag(struct sk_buff *skb);
4161 int skb_ensure_writable(struct sk_buff *skb, unsigned int write_len);
4162 int skb_ensure_writable_head_tail(struct sk_buff *skb, struct net_device *dev);
4163 int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci);
4164 int skb_vlan_pop(struct sk_buff *skb);
4165 int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
4166 int skb_eth_pop(struct sk_buff *skb);
4167 int skb_eth_push(struct sk_buff *skb, const unsigned char *dst,
4169 int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto,
4171 int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len,
4173 int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse);
4174 int skb_mpls_dec_ttl(struct sk_buff *skb);
4175 struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy,
4195 __wsum __skb_checksum(const struct sk_buff *skb, int offset, int len,
4197 __wsum skb_checksum(const struct sk_buff *skb, int offset, int len,
4201 __skb_header_pointer(const struct sk_buff *skb, int offset, int len, in __skb_header_pointer()
4214 skb_header_pointer(const struct sk_buff *skb, int offset, int len, void *buffer) in skb_header_pointer()
4221 skb_pointer_if_linear(const struct sk_buff *skb, int offset, int len) in skb_pointer_if_linear()
4238 static inline bool skb_needs_linearize(struct sk_buff *skb, in skb_needs_linearize()
4246 static inline void skb_copy_from_linear_data(const struct sk_buff *skb, in skb_copy_from_linear_data()
4253 static inline void skb_copy_from_linear_data_offset(const struct sk_buff *skb, in skb_copy_from_linear_data_offset()
4260 static inline void skb_copy_to_linear_data(struct sk_buff *skb, in skb_copy_to_linear_data()
4267 static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb, in skb_copy_to_linear_data_offset()
4277 static inline ktime_t skb_get_ktime(const struct sk_buff *skb) in skb_get_ktime()
4291 static inline void skb_get_timestamp(const struct sk_buff *skb, in skb_get_timestamp()
4297 static inline void skb_get_new_timestamp(const struct sk_buff *skb, in skb_get_new_timestamp()
4306 static inline void skb_get_timestampns(const struct sk_buff *skb, in skb_get_timestampns()
4315 static inline void skb_get_new_timestampns(const struct sk_buff *skb, in skb_get_new_timestampns()
4324 static inline void __net_timestamp(struct sk_buff *skb) in __net_timestamp()
4335 static inline void skb_set_delivery_time(struct sk_buff *skb, ktime_t kt, in skb_set_delivery_time()
4346 static inline void skb_set_delivery_type_by_clockid(struct sk_buff *skb, in skb_set_delivery_type_by_clockid()
4373 static inline void skb_clear_delivery_time(struct sk_buff *skb) in skb_clear_delivery_time()
4384 static inline void skb_clear_tstamp(struct sk_buff *skb) in skb_clear_tstamp()
4392 static inline ktime_t skb_tstamp(const struct sk_buff *skb) in skb_tstamp()
4400 static inline ktime_t skb_tstamp_cond(const struct sk_buff *skb, bool cond) in skb_tstamp_cond()
4411 static inline u8 skb_metadata_len(const struct sk_buff *skb) in skb_metadata_len()
4416 static inline void *skb_metadata_end(const struct sk_buff *skb) in skb_metadata_end()
4421 static inline bool __skb_metadata_differs(const struct sk_buff *skb_a, in __skb_metadata_differs()
4422 const struct sk_buff *skb_b, in __skb_metadata_differs()
4460 static inline bool skb_metadata_differs(const struct sk_buff *skb_a, in skb_metadata_differs()
4461 const struct sk_buff *skb_b) in skb_metadata_differs()
4473 static inline void skb_metadata_set(struct sk_buff *skb, u8 meta_len) in skb_metadata_set()
4478 static inline void skb_metadata_clear(struct sk_buff *skb) in skb_metadata_clear()
4483 struct sk_buff *skb_clone_sk(struct sk_buff *skb);
4487 void skb_clone_tx_timestamp(struct sk_buff *skb);
4488 bool skb_defer_rx_timestamp(struct sk_buff *skb);
4492 static inline void skb_clone_tx_timestamp(struct sk_buff *skb) in skb_clone_tx_timestamp()
4496 static inline bool skb_defer_rx_timestamp(struct sk_buff *skb) in skb_defer_rx_timestamp()
4515 void skb_complete_tx_timestamp(struct sk_buff *skb,
4518 void __skb_tstamp_tx(struct sk_buff *orig_skb, const struct sk_buff *ack_skb,
4533 void skb_tstamp_tx(struct sk_buff *orig_skb,
4548 static inline void skb_tx_timestamp(struct sk_buff *skb) in skb_tx_timestamp()
4562 void skb_complete_wifi_ack(struct sk_buff *skb, bool acked);
4564 __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len);
4565 __sum16 __skb_checksum_complete(struct sk_buff *skb);
4567 static inline int skb_csum_unnecessary(const struct sk_buff *skb) in skb_csum_unnecessary()
4591 static inline __sum16 skb_checksum_complete(struct sk_buff *skb) in skb_checksum_complete()
4597 static inline void __skb_decr_checksum_unnecessary(struct sk_buff *skb) in __skb_decr_checksum_unnecessary()
4607 static inline void __skb_incr_checksum_unnecessary(struct sk_buff *skb) in __skb_incr_checksum_unnecessary()
4618 static inline void __skb_reset_checksum_unnecessary(struct sk_buff *skb) in __skb_reset_checksum_unnecessary()
4631 static inline bool __skb_checksum_validate_needed(struct sk_buff *skb, in __skb_checksum_validate_needed()
4655 static inline void skb_checksum_complete_unset(struct sk_buff *skb) in skb_checksum_complete_unset()
4670 static inline __sum16 __skb_checksum_validate_complete(struct sk_buff *skb, in __skb_checksum_validate_complete()
4694 static inline __wsum null_compute_pseudo(struct sk_buff *skb, int proto) in null_compute_pseudo()
4736 static inline bool __skb_checksum_convert_check(struct sk_buff *skb) in __skb_checksum_convert_check()
4741 static inline void __skb_checksum_convert(struct sk_buff *skb, __wsum pseudo) in __skb_checksum_convert()
4753 static inline void skb_remcsum_adjust_partial(struct sk_buff *skb, void *ptr, in skb_remcsum_adjust_partial()
4766 static inline void skb_remcsum_process(struct sk_buff *skb, void *ptr, in skb_remcsum_process()
4787 static inline struct nf_conntrack *skb_nfct(const struct sk_buff *skb) in skb_nfct()
4796 static inline unsigned long skb_get_nfct(const struct sk_buff *skb) in skb_get_nfct()
4805 static inline void skb_set_nfct(struct sk_buff *skb, unsigned long nfct) in skb_set_nfct()
4851 void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id,
4853 void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id);
4854 void __skb_ext_del(struct sk_buff *skb, enum skb_ext_id id);
4857 static inline void skb_ext_put(struct sk_buff *skb) in skb_ext_put()
4863 static inline void __skb_ext_copy(struct sk_buff *dst, in __skb_ext_copy()
4864 const struct sk_buff *src) in __skb_ext_copy()
4876 static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *src) in skb_ext_copy()
4887 static inline bool skb_ext_exist(const struct sk_buff *skb, enum skb_ext_id id) in skb_ext_exist()
4892 static inline void skb_ext_del(struct sk_buff *skb, enum skb_ext_id id) in skb_ext_del()
4898 static inline void *skb_ext_find(const struct sk_buff *skb, enum skb_ext_id id) in skb_ext_find()
4909 static inline void skb_ext_reset(struct sk_buff *skb) in skb_ext_reset()
4917 static inline bool skb_has_extensions(struct sk_buff *skb) in skb_has_extensions()
4922 static inline void skb_ext_put(struct sk_buff *skb) {} in skb_ext_put()
4923 static inline void skb_ext_reset(struct sk_buff *skb) {} in skb_ext_reset()
4924 static inline void skb_ext_del(struct sk_buff *skb, int unused) {} in skb_ext_del()
4925 static inline void __skb_ext_copy(struct sk_buff *d, const struct sk_buff *s) {} in __skb_ext_copy()
4926 static inline void skb_ext_copy(struct sk_buff *dst, const struct sk_buff *s) {} in skb_ext_copy()
4927 static inline bool skb_has_extensions(struct sk_buff *skb) { return false; } in skb_has_extensions()
4930 static inline void nf_reset_ct(struct sk_buff *skb) in nf_reset_ct()
4938 static inline void nf_reset_trace(struct sk_buff *skb) in nf_reset_trace()
4945 static inline void ipvs_reset(struct sk_buff *skb) in ipvs_reset()
4953 static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src, in __nf_copy()
4966 static inline void nf_copy(struct sk_buff *dst, const struct sk_buff *src) in nf_copy()
4976 static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) in skb_copy_secmark()
4981 static inline void skb_init_secmark(struct sk_buff *skb) in skb_init_secmark()
4986 static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) in skb_copy_secmark()
4989 static inline void skb_init_secmark(struct sk_buff *skb) in skb_init_secmark()
4993 static inline int secpath_exists(const struct sk_buff *skb) in secpath_exists()
5002 static inline bool skb_irq_freeable(const struct sk_buff *skb) in skb_irq_freeable()
5011 static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) in skb_set_queue_mapping()
5016 static inline u16 skb_get_queue_mapping(const struct sk_buff *skb) in skb_get_queue_mapping()
5021 static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_buff *from) in skb_copy_queue_mapping()
5026 static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) in skb_record_rx_queue()
5031 static inline u16 skb_get_rx_queue(const struct sk_buff *skb) in skb_get_rx_queue()
5036 static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) in skb_rx_queue_recorded()
5041 static inline void skb_set_dst_pending_confirm(struct sk_buff *skb, u32 val) in skb_set_dst_pending_confirm()
5046 static inline bool skb_get_dst_pending_confirm(const struct sk_buff *skb) in skb_get_dst_pending_confirm()
5051 static inline struct sec_path *skb_sec_path(const struct sk_buff *skb) in skb_sec_path()
5060 static inline bool skb_is_gso(const struct sk_buff *skb) in skb_is_gso()
5066 static inline bool skb_is_gso_v6(const struct sk_buff *skb) in skb_is_gso_v6()
5072 static inline bool skb_is_gso_sctp(const struct sk_buff *skb) in skb_is_gso_sctp()
5078 static inline bool skb_is_gso_tcp(const struct sk_buff *skb) in skb_is_gso_tcp()
5083 static inline void skb_gso_reset(struct sk_buff *skb) in skb_gso_reset()
5106 void __skb_warn_lro_forwarding(const struct sk_buff *skb);
5108 static inline bool skb_warn_if_lro(const struct sk_buff *skb) in skb_warn_if_lro()
5122 static inline void skb_forward_csum(struct sk_buff *skb) in skb_forward_csum()
5137 static inline void skb_checksum_none_assert(const struct sk_buff *skb) in skb_checksum_none_assert()
5142 bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off);
5144 int skb_checksum_setup(struct sk_buff *skb, bool recalculate);
5145 struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
5147 __sum16(*skb_chkf)(struct sk_buff *skb));
5158 static inline bool skb_head_is_locked(const struct sk_buff *skb) in skb_head_is_locked()
5172 static inline __wsum lco_csum(struct sk_buff *skb) in lco_csum()
5188 static inline bool skb_is_redirected(const struct sk_buff *skb) in skb_is_redirected()
5193 static inline void skb_set_redirected(struct sk_buff *skb, bool from_ingress) in skb_set_redirected()
5203 static inline void skb_reset_redirect(struct sk_buff *skb) in skb_reset_redirect()
5208 static inline void skb_set_redirected_noclear(struct sk_buff *skb, in skb_set_redirected_noclear()
5217 static inline bool skb_csum_is_sctp(struct sk_buff *skb) in skb_csum_is_sctp()
5226 static inline void skb_reset_csum_not_inet(struct sk_buff *skb) in skb_reset_csum_not_inet()
5234 static inline void skb_set_kcov_handle(struct sk_buff *skb, in skb_set_kcov_handle()
5242 static inline u64 skb_get_kcov_handle(struct sk_buff *skb) in skb_get_kcov_handle()
5251 static inline void skb_mark_for_recycle(struct sk_buff *skb) in skb_mark_for_recycle()
5258 ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter,