• Home
  • Raw
  • Download

Lines Matching refs:skb

110 static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb)  in __udp_lib_checksum_complete()  argument
112 return (UDP_SKB_CB(skb)->cscov == skb->len ? in __udp_lib_checksum_complete()
113 __skb_checksum_complete(skb) : in __udp_lib_checksum_complete()
114 __skb_checksum_complete_head(skb, UDP_SKB_CB(skb)->cscov)); in __udp_lib_checksum_complete()
117 static inline int udp_lib_checksum_complete(struct sk_buff *skb) in udp_lib_checksum_complete() argument
119 return !skb_csum_unnecessary(skb) && in udp_lib_checksum_complete()
120 __udp_lib_checksum_complete(skb); in udp_lib_checksum_complete()
129 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing() argument
131 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing()
133 skb_queue_walk(&sk->sk_write_queue, skb) { in udp_csum_outgoing()
134 csum = csum_add(csum, skb->csum); in udp_csum_outgoing()
139 static inline __wsum udp_csum(struct sk_buff *skb) in udp_csum() argument
141 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum()
142 sizeof(struct udphdr), skb->csum); in udp_csum()
144 for (skb = skb_shinfo(skb)->frag_list; skb; skb = skb->next) { in udp_csum()
145 csum = csum_add(csum, skb->csum); in udp_csum()
156 void udp_set_csum(bool nocheck, struct sk_buff *skb,
159 static inline void udp_csum_pull_header(struct sk_buff *skb) in udp_csum_pull_header() argument
161 if (!skb->csum_valid && skb->ip_summed == CHECKSUM_NONE) in udp_csum_pull_header()
162 skb->csum = csum_partial(skb->data, sizeof(struct udphdr), in udp_csum_pull_header()
163 skb->csum); in udp_csum_pull_header()
164 skb_pull_rcsum(skb, sizeof(struct udphdr)); in udp_csum_pull_header()
165 UDP_SKB_CB(skb)->cscov -= sizeof(struct udphdr); in udp_csum_pull_header()
168 typedef struct sock *(*udp_lookup_t)(const struct sk_buff *skb, __be16 sport,
171 void udp_v6_early_demux(struct sk_buff *skb);
197 static inline __be16 udp_flow_src_port(struct net *net, struct sk_buff *skb, in udp_flow_src_port() argument
207 hash = skb_get_hash(skb); in udp_flow_src_port()
213 hash = jhash(skb->data, 2 * ETH_ALEN, in udp_flow_src_port()
214 (__force u32) skb->protocol); in udp_flow_src_port()
251 void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len);
252 int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb);
253 void udp_skb_destructor(struct sock *sk, struct sk_buff *skb);
264 int udp_v4_early_demux(struct sk_buff *skb);
275 void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst);
276 int udp_rcv(struct sk_buff *skb);
283 struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
295 struct udp_table *tbl, struct sk_buff *skb);
296 struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb,
306 struct sk_buff *skb);
307 struct sock *udp6_lib_lookup_skb(const struct sk_buff *skb,
333 static inline struct udp_dev_scratch *udp_skb_scratch(struct sk_buff *skb) in udp_skb_scratch() argument
335 return (struct udp_dev_scratch *)&skb->dev_scratch; in udp_skb_scratch()
339 static inline unsigned int udp_skb_len(struct sk_buff *skb) in udp_skb_len() argument
341 return udp_skb_scratch(skb)->len; in udp_skb_len()
344 static inline bool udp_skb_csum_unnecessary(struct sk_buff *skb) in udp_skb_csum_unnecessary() argument
346 return udp_skb_scratch(skb)->csum_unnecessary; in udp_skb_csum_unnecessary()
349 static inline bool udp_skb_is_linear(struct sk_buff *skb) in udp_skb_is_linear() argument
351 return udp_skb_scratch(skb)->is_linear; in udp_skb_is_linear()
355 static inline unsigned int udp_skb_len(struct sk_buff *skb) in udp_skb_len() argument
357 return skb->len; in udp_skb_len()
360 static inline bool udp_skb_csum_unnecessary(struct sk_buff *skb) in udp_skb_csum_unnecessary() argument
362 return skb_csum_unnecessary(skb); in udp_skb_csum_unnecessary()
365 static inline bool udp_skb_is_linear(struct sk_buff *skb) in udp_skb_is_linear() argument
367 return !skb_is_nonlinear(skb); in udp_skb_is_linear()
371 static inline int copy_linear_skb(struct sk_buff *skb, int len, int off, in copy_linear_skb() argument
376 n = copy_to_iter(skb->data + off, len, to); in copy_linear_skb()
458 struct sk_buff *skb, bool ipv4) in udp_rcv_segment() argument
477 if (skb->pkt_type == PACKET_LOOPBACK) in udp_rcv_segment()
478 skb->ip_summed = CHECKSUM_PARTIAL; in udp_rcv_segment()
483 segs = __skb_gso_segment(skb, features, false); in udp_rcv_segment()
485 int segs_nr = skb_shinfo(skb)->gso_segs; in udp_rcv_segment()
489 kfree_skb(skb); in udp_rcv_segment()
493 consume_skb(skb); in udp_rcv_segment()
497 static inline void udp_post_segment_fix_csum(struct sk_buff *skb) in udp_post_segment_fix_csum() argument
500 WARN_ON_ONCE(UDP_SKB_CB(skb)->partial_cov); in udp_post_segment_fix_csum()
515 UDP_SKB_CB(skb)->cscov = skb->len; in udp_post_segment_fix_csum()
516 if (skb->ip_summed == CHECKSUM_NONE && !skb->csum_valid) in udp_post_segment_fix_csum()
517 skb->csum_valid = 1; in udp_post_segment_fix_csum()