[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140223235152.GF6598@order.stressinduktion.org>
Date: Mon, 24 Feb 2014 00:51:52 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Florian Westphal <fw@...len.de>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v6 2/2] net: ip, ipv6: handle gso skbs in forwarding path
On Thu, Feb 13, 2014 at 11:09:12PM +0100, Florian Westphal wrote:
> +/* called if GSO skb needs to be fragmented on forward */
> +static int ip_forward_finish_gso(struct sk_buff *skb)
> +{
> + struct dst_entry *dst = skb_dst(skb);
> + netdev_features_t features;
> + struct sk_buff *segs;
> + int ret = 0;
> +
> + features = netif_skb_dev_features(skb, dst->dev);
> + segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
While reviewing the skb->encapsulation logic I noticed that some drivers
(mlx4 and i40e, i40evf) already started to set skb->encapsulation = 1 in
the receive path.
Maybe it would be helpful to reset skb->encapsulation to zero before
segmentation happens so we don't miss to update the fragmentation ids and
offsets on udp packets?
> + if (IS_ERR(segs)) {
> + kfree_skb(skb);
> + return -ENOMEM;
> + }
> +
> + consume_skb(skb);
> +
> + do {
> + struct sk_buff *nskb = segs->next;
> + int err;
> +
> + segs->next = NULL;
> + err = dst_output(segs);
> +
> + if (err && ret == 0)
> + ret = err;
> + segs = nskb;
> + } while (segs);
> +
> + return ret;
> +}
> +
Bye,
Hannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists