aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h15
-rw-r--r--include/linux/skbuff.h21
2 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 16251e96e6aa..1347ac50d2af 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2318,6 +2318,21 @@ do { \
2318 compute_pseudo(skb, proto)); \ 2318 compute_pseudo(skb, proto)); \
2319} while (0) 2319} while (0)
2320 2320
2321static inline void skb_gro_remcsum_process(struct sk_buff *skb, void *ptr,
2322 int start, int offset)
2323{
2324 __wsum delta;
2325
2326 BUG_ON(!NAPI_GRO_CB(skb)->csum_valid);
2327
2328 delta = remcsum_adjust(ptr, NAPI_GRO_CB(skb)->csum, start, offset);
2329
2330 /* Adjust skb->csum since we changed the packet */
2331 skb->csum = csum_add(skb->csum, delta);
2332 NAPI_GRO_CB(skb)->csum = csum_add(NAPI_GRO_CB(skb)->csum, delta);
2333}
2334
2335
2321static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, 2336static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
2322 unsigned short type, 2337 unsigned short type,
2323 const void *daddr, const void *saddr, 2338 const void *daddr, const void *saddr,
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2748ff639144..5405dfe02572 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3099,6 +3099,27 @@ do { \
3099 compute_pseudo(skb, proto)); \ 3099 compute_pseudo(skb, proto)); \
3100} while (0) 3100} while (0)
3101 3101
3102/* Update skbuf and packet to reflect the remote checksum offload operation.
3103 * When called, ptr indicates the starting point for skb->csum when
3104 * ip_summed is CHECKSUM_COMPLETE. If we need create checksum complete
3105 * here, skb_postpull_rcsum is done so skb->csum start is ptr.
3106 */
3107static inline void skb_remcsum_process(struct sk_buff *skb, void *ptr,
3108 int start, int offset)
3109{
3110 __wsum delta;
3111
3112 if (unlikely(skb->ip_summed != CHECKSUM_COMPLETE)) {
3113 __skb_checksum_complete(skb);
3114 skb_postpull_rcsum(skb, skb->data, ptr - (void *)skb->data);
3115 }
3116
3117 delta = remcsum_adjust(ptr, skb->csum, start, offset);
3118
3119 /* Adjust skb->csum since we changed the packet */
3120 skb->csum = csum_add(skb->csum, delta);
3121}
3122
3102#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 3123#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
3103void nf_conntrack_destroy(struct nf_conntrack *nfct); 3124void nf_conntrack_destroy(struct nf_conntrack *nfct);
3104static inline void nf_conntrack_put(struct nf_conntrack *nfct) 3125static inline void nf_conntrack_put(struct nf_conntrack *nfct)