X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Flinux%2Fskbuff.h;h=41ec9517ff134d114c007014b9932f3204bbcf87;hb=5d386c0613024993566fb3bef13a1e33fa93e91c;hp=5bea83e7c9831d1b16d9efe6a731709f6fd05899;hpb=27623e3541a25149857bb98df4af21c7460da4cc;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index 5bea83e7c..41ec9517f 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -269,4 +269,16 @@ void skb_zerocopy(struct sk_buff *to, const struct sk_buff *from, int len, #define skb_has_frag_list skb_has_frags #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, + struct page *page, int off, int size) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + __skb_frag_set_page(frag, page); + frag->page_offset = off; + skb_frag_size_set(frag, size); +} +#endif + #endif