aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a38c80e9f91e..5ebc0f869720 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1211,6 +1211,11 @@ static inline bool skb_flow_dissect_flow_keys_buf(struct flow_keys *flow,
1211 data, proto, nhoff, hlen, flags); 1211 data, proto, nhoff, hlen, flags);
1212} 1212}
1213 1213
1214void
1215skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
1216 struct flow_dissector *flow_dissector,
1217 void *target_container);
1218
1214static inline __u32 skb_get_hash(struct sk_buff *skb) 1219static inline __u32 skb_get_hash(struct sk_buff *skb)
1215{ 1220{
1216 if (!skb->l4_hash && !skb->sw_hash) 1221 if (!skb->l4_hash && !skb->sw_hash)
@@ -3241,7 +3246,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
3241 int *peeked, int *off, int *err); 3246 int *peeked, int *off, int *err);
3242struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, 3247struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
3243 int *err); 3248 int *err);
3244unsigned int datagram_poll(struct file *file, struct socket *sock, 3249__poll_t datagram_poll(struct file *file, struct socket *sock,
3245 struct poll_table_struct *wait); 3250 struct poll_table_struct *wait);
3246int skb_copy_datagram_iter(const struct sk_buff *from, int offset, 3251int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
3247 struct iov_iter *to, int size); 3252 struct iov_iter *to, int size);
@@ -3282,6 +3287,7 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
3282void skb_scrub_packet(struct sk_buff *skb, bool xnet); 3287void skb_scrub_packet(struct sk_buff *skb, bool xnet);
3283unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); 3288unsigned int skb_gso_transport_seglen(const struct sk_buff *skb);
3284bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu); 3289bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu);
3290bool skb_gso_validate_mac_len(const struct sk_buff *skb, unsigned int len);
3285struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); 3291struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features);
3286struct sk_buff *skb_vlan_untag(struct sk_buff *skb); 3292struct sk_buff *skb_vlan_untag(struct sk_buff *skb);
3287int skb_ensure_writable(struct sk_buff *skb, int write_len); 3293int skb_ensure_writable(struct sk_buff *skb, int write_len);
@@ -4115,6 +4121,21 @@ static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb)
4115 return hdr_len + skb_gso_transport_seglen(skb); 4121 return hdr_len + skb_gso_transport_seglen(skb);
4116} 4122}
4117 4123
4124/**
4125 * skb_gso_mac_seglen - Return length of individual segments of a gso packet
4126 *
4127 * @skb: GSO skb
4128 *
4129 * skb_gso_mac_seglen is used to determine the real size of the
4130 * individual segments, including MAC/L2, Layer3 (IP, IPv6) and L4
4131 * headers (TCP/UDP).
4132 */
4133static inline unsigned int skb_gso_mac_seglen(const struct sk_buff *skb)
4134{
4135 unsigned int hdr_len = skb_transport_header(skb) - skb_mac_header(skb);
4136 return hdr_len + skb_gso_transport_seglen(skb);
4137}
4138
4118/* Local Checksum Offload. 4139/* Local Checksum Offload.
4119 * Compute outer checksum based on the assumption that the 4140 * Compute outer checksum based on the assumption that the
4120 * inner checksum will be offloaded later. 4141 * inner checksum will be offloaded later.