Hi Krishna.

On Fri, Sep 14, 2007 at 02:31:56PM +0530, Krishna Kumar ([EMAIL PROTECTED]) 
wrote:
> +int dev_add_skb_to_blist(struct sk_buff *skb, struct net_device *dev)
> +{
> +     if (!list_empty(&ptype_all))
> +             dev_queue_xmit_nit(skb, dev);
> +
> +     if (netif_needs_gso(dev, skb)) {
> +             if (unlikely(dev_gso_segment(skb))) {
> +                     kfree_skb(skb);
> +                     return 0;
> +             }
> +
> +             if (skb->next) {
> +                     int count = 0;
> +
> +                     do {
> +                             struct sk_buff *nskb = skb->next;
> +
> +                             skb->next = nskb->next;
> +                             __skb_queue_tail(dev->skb_blist, nskb);
> +                             count++;
> +                     } while (skb->next);

Could it be list_move()-like function for skb lists?
I'm pretty sure if you change first and the last skbs and ke of the
queue in one shot, result will be the same.
Actually how many skbs are usually batched in your load?

> +                     /* Reset destructor for kfree_skb to work */
> +                     skb->destructor = DEV_GSO_CB(skb)->destructor;
> +                     kfree_skb(skb);

Why do you free first skb in the chain?

> +                     return count;
> +             }
> +     }
> +     __skb_queue_tail(dev->skb_blist, skb);
> +     return 1;
> +}

-- 
        Evgeniy Polyakov
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to