skbuff.h (989a4222c13a3e148772730d362fceb0727852f5) skbuff.h (b5947e5d1e710c35ea281247bd27e6975250285c)
1/*
2 * Definitions for the 'struct sk_buff' memory handlers.
3 *
4 * Authors:
5 * Alan Cox, <gw4pts@gw4pts.ampr.org>
6 * Florian La Roche, <rzsfl@rz.uni-sb.de>
7 *
8 * This program is free software; you can redistribute it and/or

--- 471 unchanged lines hidden (view full) ---

480 refcount_inc(&uarg->refcnt);
481}
482
483void sock_zerocopy_put(struct ubuf_info *uarg);
484void sock_zerocopy_put_abort(struct ubuf_info *uarg);
485
486void sock_zerocopy_callback(struct ubuf_info *uarg, bool success);
487
1/*
2 * Definitions for the 'struct sk_buff' memory handlers.
3 *
4 * Authors:
5 * Alan Cox, <gw4pts@gw4pts.ampr.org>
6 * Florian La Roche, <rzsfl@rz.uni-sb.de>
7 *
8 * This program is free software; you can redistribute it and/or

--- 471 unchanged lines hidden (view full) ---

480 refcount_inc(&uarg->refcnt);
481}
482
483void sock_zerocopy_put(struct ubuf_info *uarg);
484void sock_zerocopy_put_abort(struct ubuf_info *uarg);
485
486void sock_zerocopy_callback(struct ubuf_info *uarg, bool success);
487
488int skb_zerocopy_iter_dgram(struct sk_buff *skb, struct msghdr *msg, int len);
488int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb,
489 struct msghdr *msg, int len,
490 struct ubuf_info *uarg);
491
492/* This data is invariant across clones and lives at
493 * the end of the header data, ie. at skb->end.
494 */
495struct skb_shared_info {

--- 276 unchanged lines hidden (view full) ---

772 __u8 wifi_acked_valid:1;
773 __u8 wifi_acked:1;
774 __u8 no_fcs:1;
775 /* Indicates the inner headers are valid in the skbuff. */
776 __u8 encapsulation:1;
777 __u8 encap_hdr_csum:1;
778 __u8 csum_valid:1;
779
489int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb,
490 struct msghdr *msg, int len,
491 struct ubuf_info *uarg);
492
493/* This data is invariant across clones and lives at
494 * the end of the header data, ie. at skb->end.
495 */
496struct skb_shared_info {

--- 276 unchanged lines hidden (view full) ---

773 __u8 wifi_acked_valid:1;
774 __u8 wifi_acked:1;
775 __u8 no_fcs:1;
776 /* Indicates the inner headers are valid in the skbuff. */
777 __u8 encapsulation:1;
778 __u8 encap_hdr_csum:1;
779 __u8 csum_valid:1;
780
781#ifdef __BIG_ENDIAN_BITFIELD
782#define PKT_VLAN_PRESENT_BIT 7
783#else
784#define PKT_VLAN_PRESENT_BIT 0
785#endif
786#define PKT_VLAN_PRESENT_OFFSET() offsetof(struct sk_buff, __pkt_vlan_present_offset)
787 __u8 __pkt_vlan_present_offset[0];
788 __u8 vlan_present:1;
780 __u8 csum_complete_sw:1;
781 __u8 csum_level:2;
782 __u8 csum_not_inet:1;
783 __u8 dst_pending_confirm:1;
784#ifdef CONFIG_IPV6_NDISC_NODETYPE
785 __u8 ndisc_nodetype:2;
786#endif
789 __u8 csum_complete_sw:1;
790 __u8 csum_level:2;
791 __u8 csum_not_inet:1;
792 __u8 dst_pending_confirm:1;
793#ifdef CONFIG_IPV6_NDISC_NODETYPE
794 __u8 ndisc_nodetype:2;
795#endif
787 __u8 ipvs_property:1;
788
796
797 __u8 ipvs_property:1;
789 __u8 inner_protocol_type:1;
790 __u8 remcsum_offload:1;
791#ifdef CONFIG_NET_SWITCHDEV
792 __u8 offload_fwd_mark:1;
793 __u8 offload_mr_fwd_mark:1;
794#endif
795#ifdef CONFIG_NET_CLS_ACT
796 __u8 tc_skip_classify:1;

--- 939 unchanged lines hidden (view full) ---

1736}
1737
1738/*
1739 * Insert an sk_buff on a list.
1740 *
1741 * The "__skb_xxxx()" functions are the non-atomic ones that
1742 * can only be called with interrupts disabled.
1743 */
798 __u8 inner_protocol_type:1;
799 __u8 remcsum_offload:1;
800#ifdef CONFIG_NET_SWITCHDEV
801 __u8 offload_fwd_mark:1;
802 __u8 offload_mr_fwd_mark:1;
803#endif
804#ifdef CONFIG_NET_CLS_ACT
805 __u8 tc_skip_classify:1;

--- 939 unchanged lines hidden (view full) ---

1745}
1746
1747/*
1748 * Insert an sk_buff on a list.
1749 *
1750 * The "__skb_xxxx()" functions are the non-atomic ones that
1751 * can only be called with interrupts disabled.
1752 */
1744void skb_insert(struct sk_buff *old, struct sk_buff *newsk,
1745 struct sk_buff_head *list);
1746static inline void __skb_insert(struct sk_buff *newsk,
1747 struct sk_buff *prev, struct sk_buff *next,
1748 struct sk_buff_head *list)
1749{
1750 newsk->next = next;
1751 newsk->prev = prev;
1752 next->prev = prev->next = newsk;
1753 list->qlen++;

--- 765 unchanged lines hidden (view full) ---

2519#ifndef NET_SKB_PAD
2520#define NET_SKB_PAD max(32, L1_CACHE_BYTES)
2521#endif
2522
2523int ___pskb_trim(struct sk_buff *skb, unsigned int len);
2524
2525static inline void __skb_set_length(struct sk_buff *skb, unsigned int len)
2526{
1753static inline void __skb_insert(struct sk_buff *newsk,
1754 struct sk_buff *prev, struct sk_buff *next,
1755 struct sk_buff_head *list)
1756{
1757 newsk->next = next;
1758 newsk->prev = prev;
1759 next->prev = prev->next = newsk;
1760 list->qlen++;

--- 765 unchanged lines hidden (view full) ---

2526#ifndef NET_SKB_PAD
2527#define NET_SKB_PAD max(32, L1_CACHE_BYTES)
2528#endif
2529
2530int ___pskb_trim(struct sk_buff *skb, unsigned int len);
2531
2532static inline void __skb_set_length(struct sk_buff *skb, unsigned int len)
2533{
2527 if (unlikely(skb_is_nonlinear(skb))) {
2528 WARN_ON(1);
2534 if (WARN_ON(skb_is_nonlinear(skb)))
2529 return;
2535 return;
2530 }
2531 skb->len = len;
2532 skb_set_tail_pointer(skb, len);
2533}
2534
2535static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
2536{
2537 __skb_set_length(skb, len);
2538}

--- 801 unchanged lines hidden (view full) ---

3340int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
3341__wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
3342 int len, __wsum csum);
3343int skb_splice_bits(struct sk_buff *skb, struct sock *sk, unsigned int offset,
3344 struct pipe_inode_info *pipe, unsigned int len,
3345 unsigned int flags);
3346int skb_send_sock_locked(struct sock *sk, struct sk_buff *skb, int offset,
3347 int len);
2536 skb->len = len;
2537 skb_set_tail_pointer(skb, len);
2538}
2539
2540static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
2541{
2542 __skb_set_length(skb, len);
2543}

--- 801 unchanged lines hidden (view full) ---

3345int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
3346__wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
3347 int len, __wsum csum);
3348int skb_splice_bits(struct sk_buff *skb, struct sock *sk, unsigned int offset,
3349 struct pipe_inode_info *pipe, unsigned int len,
3350 unsigned int flags);
3351int skb_send_sock_locked(struct sock *sk, struct sk_buff *skb, int offset,
3352 int len);
3348int skb_send_sock(struct sock *sk, struct sk_buff *skb, int offset, int len);
3349void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
3350unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
3351int skb_zerocopy(struct sk_buff *to, struct sk_buff *from,
3352 int len, int hlen);
3353void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len);
3354int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
3355void skb_scrub_packet(struct sk_buff *skb, bool xnet);
3356bool skb_gso_validate_network_len(const struct sk_buff *skb, unsigned int mtu);

--- 872 unchanged lines hidden ---
3353void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
3354unsigned int skb_zerocopy_headlen(const struct sk_buff *from);
3355int skb_zerocopy(struct sk_buff *to, struct sk_buff *from,
3356 int len, int hlen);
3357void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len);
3358int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
3359void skb_scrub_packet(struct sk_buff *skb, bool xnet);
3360bool skb_gso_validate_network_len(const struct sk_buff *skb, unsigned int mtu);

--- 872 unchanged lines hidden ---