On Mar 30, 2013, at 18:20 , ext Pravin B Shelar wrote: > diff --git a/datapath/linux/compat/include/linux/netdevice.h > b/datapath/linux/compat/include/linux/netdevice.h > index 71aad87..4ffdac4 100644 > --- a/datapath/linux/compat/include/linux/netdevice.h > +++ b/datapath/linux/compat/include/linux/netdevice.h > @@ -167,4 +167,30 @@ static inline struct sk_buff *__skb_gso_segment(struct > sk_buff *skb, > } > #endif > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) > +static inline struct sk_buff *rpl__skb_gso_segment(struct sk_buff *skb, > + netdev_features_t features, > + bool tx_path) > +{ > + struct sk_buff *nskb; > + char cb[48]; > + > + /* From 3.9 kernel skb->cb is used by skb gso. Therefore > + * make copy of it to restore it. */ > + > + memcpy(cb, skb->cb, sizeof(skb->cb)); > + nskb = __skb_gso_segment(skb, 0, false); > + if (IS_ERR(nskb)) > + return nskb; > + > + skb = nskb; > + while (nskb) { > + memcpy(nskb->cb, cb, sizeof(nskb->cb)); > + nskb = nskb->next; > + } > + return skb; > +} > +#define __skb_gso_segment rpl__skb_gso_segment > +#endif > +
Is it only the struct ovs_skb_cb we are concerned with here? If so, it would be more efficient just to copy "sizeof (struct ovs_skb_cb)" bytes back and forth, which is currently less than the full 48 bytes. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev