/* This function segments the given skb and stores the list of segments in skb->next.  */
static int dev_gso_segment(struct sk_buff *skb)
/* This function segments the given skb and stores the list of segments in skb->next.  */
static int dev_gso_segment(struct sk_buff *skb)
{
	struct net_device *dev = skb->dev;
	struct sk_buff *segs;
	int features = dev->features & ~(illegal_highdma(dev, skb) ?
					 NETIF_F_SG : 0);
	segs = skb_gso_segment(skb, features);
	if (!segs)
		return 0;
	if (IS_ERR(segs))
		return PTR_ERR(segs);
	skb->next = segs;
	DEV_GSO_CB(skb)->destructor = skb->destructor;
	skb->destructor = dev_gso_skb_destructor;
	return 0;
}