On Tue, 2014-03-04 at 20:01 +0800, Hayes Wang wrote:
> Support hw IPv6 checksum for TCP and UDP packets.


> +/*
> + * r8152_csum_workaround()
> + * The hw limites the value the transport offset. When the offset is out of 
> the
> + * range, calculate the checksum by sw.
> + */
> +static void r8152_csum_workaround(struct r8152 *tp, struct sk_buff *skb,
> +                               struct sk_buff_head *list)
> +{
> +     if (skb_shinfo(skb)->gso_size) {
> +             netdev_features_t features = tp->netdev->features;
> +             struct sk_buff *segs, *nskb;
> +
> +             features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
> +             segs = skb_gso_segment(skb, features);
> +             if (IS_ERR(segs) || !segs)
> +                     goto drop;
> +
> +             do {
> +                     nskb = segs;
> +                     segs = segs->next;
> +                     nskb->next = NULL;
> +                     __skb_queue_head(list, nskb);

This introduces TCP reordering.

You should use some kind of skb_queue_splice()



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to