* [B.A.T.M.A.N.] Layer 2 fragmentation
@ 2010-05-27 14:23 Andreas Langer
2010-05-27 15:07 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Langer @ 2010-05-27 14:23 UTC (permalink / raw)
To: b.a.t.m.a.n
Hello,
i looked into the problem of fragmenting packets on layer2 to solve the mtu issue. I found a
unforeseen problem : oversized packets will be dropped by the bridge module ( if bat0 is in a
bridge ). I think the reason can be found here net/bridge/br_forward.c on line 44
43 /* drop mtu oversized packets except gso */
44 if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))
45 kfree_skb(skb);
Possible solution: make a patch for the bridge module
if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb) && !(skb->dev->priv_flags &
IFF_CAN_FRAG))
IFF_CAN_FRAG must be added to include/linux/if.h and batman-adv has to set this flag on bat0
I can make a patch for mainline inclusion, do you believe it is going to be accepted ?
regards,
andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] Layer 2 fragmentation
2010-05-27 14:23 [B.A.T.M.A.N.] Layer 2 fragmentation Andreas Langer
@ 2010-05-27 15:07 ` Andrew Lunn
2010-05-27 15:30 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2010-05-27 15:07 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Thu, May 27, 2010 at 04:23:50PM +0200, Andreas Langer wrote:
> Hello,
> i looked into the problem of fragmenting packets on layer2 to solve the mtu issue. I found a
> unforeseen problem : oversized packets will be dropped by the bridge module ( if bat0 is in a
> bridge ). I think the reason can be found here net/bridge/br_forward.c on line 44
>
> 43 /* drop mtu oversized packets except gso */
> 44 if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))
> 45 kfree_skb(skb);
I don't quite understand the problem. If you have implemented
fragmentation, you will naturally increase the MTU on bat0 so that it
is the standard for Ethernet. So this statement will not trigger.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] Layer 2 fragmentation
2010-05-27 15:07 ` Andrew Lunn
@ 2010-05-27 15:30 ` Marek Lindner
2010-05-27 15:42 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Marek Lindner @ 2010-05-27 15:30 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Thursday 27 May 2010 23:07:00 Andrew Lunn wrote:
> I don't quite understand the problem. If you have implemented
> fragmentation, you will naturally increase the MTU on bat0 so that it
> is the standard for Ethernet. So this statement will not trigger.
AFAIK batman-adv determines the minimal MTU automatically, so that you can't
simply increase the mtu on bat0. But you are right - if the fragmentation is
enabled batman-adv could allow higher mtu values.
Cheers,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] Layer 2 fragmentation
2010-05-27 15:30 ` Marek Lindner
@ 2010-05-27 15:42 ` Andrew Lunn
2010-05-27 16:12 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2010-05-27 15:42 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Thu, May 27, 2010 at 11:30:15PM +0800, Marek Lindner wrote:
> On Thursday 27 May 2010 23:07:00 Andrew Lunn wrote:
> > I don't quite understand the problem. If you have implemented
> > fragmentation, you will naturally increase the MTU on bat0 so that it
> > is the standard for Ethernet. So this statement will not trigger.
>
> AFAIK batman-adv determines the minimal MTU automatically, so that you can't
> simply increase the mtu on bat0. But you are right - if the fragmentation is
> enabled batman-adv could allow higher mtu values.
We discussed this a while ago. Actually fragmentation should be
considered the last resort. It if first better to try header
compression, to make the frame small enough that it can be sent
without fragmentation. I think you had a quick look at using the PPP
compression code, but i guess it did not go any further.
We only need to fragment when compression is not possible.
In either case, we should remove the automatic MTU calculation, and
just offer the default for Ethernet. Let the compression and
fragmentation code solve any differences.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] Layer 2 fragmentation
2010-05-27 15:42 ` Andrew Lunn
@ 2010-05-27 16:12 ` Marek Lindner
0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2010-05-27 16:12 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Thursday 27 May 2010 23:42:36 Andrew Lunn wrote:
> We discussed this a while ago. Actually fragmentation should be
> considered the last resort. It if first better to try header
> compression, to make the frame small enough that it can be sent
> without fragmentation. I think you had a quick look at using the PPP
> compression code, but i guess it did not go any further.
>
> We only need to fragment when compression is not possible.
I read about the compression and I still think it is a good idea.
Unfortunately, it requires deep packet inspection and would only work for 99%
of the IPv4 traffic. Besides, both solutions do not exclude each other.
Regards,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-27 16:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 14:23 [B.A.T.M.A.N.] Layer 2 fragmentation Andreas Langer
2010-05-27 15:07 ` Andrew Lunn
2010-05-27 15:30 ` Marek Lindner
2010-05-27 15:42 ` Andrew Lunn
2010-05-27 16:12 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox