>From 39caa17f8bce166a69d9e49643ecb79db95b02f4 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Wed, 27 Aug 2008 18:44:29 +0200 Subject: [PATCH] net: use bitfields API in skbuff Signed-off-by: Vegard Nossum --- include/linux/skbuff.h | 6 ++++-- net/core/skbuff.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9099237..35fe08d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -14,6 +14,7 @@ #ifndef _LINUX_SKBUFF_H #define _LINUX_SKBUFF_H +#include #include #include #include @@ -285,11 +286,12 @@ struct sk_buff { }; }; __u32 priority; - __u8 local_df:1, + DEFINE_BITFIELD(__u8, flags1, + local_df:1, cloned:1, ip_summed:2, nohdr:1, - nfctinfo:3; + nfctinfo:3); __u8 pkt_type:3, fclone:2, ipvs_property:1, diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ca1ccdf..1a2505b 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -36,6 +36,7 @@ * The functions in this file will not compile correctly with gcc 2.4.x */ +#include #include #include #include @@ -438,6 +439,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old) memcpy(new->cb, old->cb, sizeof(old->cb)); new->csum_start = old->csum_start; new->csum_offset = old->csum_offset; + bitfield_begin_init(new->flags1); new->local_df = old->local_df; new->pkt_type = old->pkt_type; new->ip_summed = old->ip_summed; -- 1.5.5.1