X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Flinux%2Fskbuff.h;h=96d80124f927075a977f61d2994244e4fd3b4320;hb=c0338a5ccbe7a1133b833bb2675b400619f32190;hp=ccf471714854e5d2166a07c6ca9e3e4b3c7872d6;hpb=6455100f38e9312346f4d58511595f695d813537;p=openvswitch diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index ccf47171..96d80124 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -232,4 +232,17 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb) #define consume_skb kfree_skb #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +static inline struct page *skb_frag_page(const skb_frag_t *frag) +{ + return frag->page; +} +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40) +static inline void skb_reset_mac_len(struct sk_buff *skb) +{ + skb->mac_len = skb->network_header - skb->mac_header; +} +#endif #endif