[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-netdev
Subject:    Re: [patch net] udp6: respect IPV6_DONTFRAG sockopt in case there are pending frames
From:       Hannes Frederic Sowa <hannes () stressinduktion ! org>
Date:       2013-09-30 21:21:55
Message-ID: 20130930212155.GG10771 () order ! stressinduktion ! org
[Download RAW message or body]

On Mon, Sep 30, 2013 at 07:56:40PM +0200, Hannes Frederic Sowa wrote:
> Hmm, I wonder if we need the same change in ipv6/raw.c.

Nope, ipv6/raw.c is fine.

> Looks good at first sight, but I need to do some more tests.

Strange, loopback traffic is not bound by the frag_size. This fixes it but
should not be necessary. Don't know the reason, yet.

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index a54c45c..9dd136e 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -124,7 +124,14 @@ static int ip6_finish_output2(struct sk_buff *skb)
 
 static int ip6_finish_output(struct sk_buff *skb)
 {
-	if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) ||
+	int mtu;
+	struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL;
+
+	mtu = ip6_skb_dst_mtu(skb);
+	if (np && np->frag_size && np->frag_size < mtu)
+		mtu = np->frag_size;
+
+	if ((skb->len > mtu && !skb_is_gso(skb)) ||
 	    dst_allfrag(skb_dst(skb)))
 		return ip6_fragment(skb, ip6_finish_output2);
 	else


Regarding your patch, this is fine by me:

Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Thanks,

  Hannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic