From: Patrick McHardy <hidden> Date: 2004-12-27 17:18:46
Alan Cox wrote:
The networking world runs in 1514 byte packets pretty much all the time.
This adds a 1620 byte slab for such objects and is one of the internally
generated Red Hat patches we use on things like Fedora Core 3. Original:
Arjan van de Ven.
Signed-off-by: Alan Cox <redacted>
Why 1620 bytes ? Most drivers allocate packet_size + 2 bytes.
dev_alloc_skb adds another 16 bytes, finally alloc_skb adds
sizeof(struct skb_shared_info). So we get:
(32bit): 1514b + 2b + 16b + 160b = 1692b
(64bit): 1514b + 2b + 16b + 312b = 1844b
On paths using alloc_skb instead of dev_alloc_skb it's 16 bytes
less, but 1620 bytes is still too small for full-sized packets.
Regards
Patrick
From: "David S. Miller" <davem@davemloft.net> Date: 2004-12-27 22:25:31
On Mon, 27 Dec 2004 18:17:32 +0100
Patrick McHardy [off-list ref] wrote:
Alan Cox wrote:
quoted
The networking world runs in 1514 byte packets pretty much all the time.
This adds a 1620 byte slab for such objects and is one of the internally
generated Red Hat patches we use on things like Fedora Core 3. Original:
Arjan van de Ven.
Signed-off-by: Alan Cox <redacted>
Why 1620 bytes ? Most drivers allocate packet_size + 2 bytes.
dev_alloc_skb adds another 16 bytes, finally alloc_skb adds
sizeof(struct skb_shared_info). So we get:
(32bit): 1514b + 2b + 16b + 160b = 1692b
(64bit): 1514b + 2b + 16b + 312b = 1844b
On paths using alloc_skb instead of dev_alloc_skb it's 16 bytes
less, but 1620 bytes is still too small for full-sized packets.
Absolutely, there is no way this patch actually helps for
full sized frames. Another thing in the above equations is
that on output you have to add in MAX_TCP_HEADER which is
128 + MAX_HEADER. MAX_HEADER is variable sized based upon
which link layer support is built into the kernel.
Even on input, many ethernet device drivers add in their
own amounts to the size for DMA and cache-line alignment.
So this special slab would never be used on output even
if it got the base equations correct.
If we are really going to do something like this, it should
be calculated properly and be determined per-interface
type as netdevs are registered.
Special casing ethernet is just rediculious.
On Llu, 2004-12-27 at 22:23, David S. Miller wrote:
If we are really going to do something like this, it should
be calculated properly and be determined per-interface
type as netdevs are registered.
Fine by me, I'm just going through plausible looking changes in the Red
Hat tree. You might want to slightly injure someone internally until
they drop that too 8)
Alan
From: Dave Jones <hidden> Date: 2004-12-28 07:33:57
On Tue, Dec 28, 2004 at 12:51:28AM +0000, Alan Cox wrote:
> On Llu, 2004-12-27 at 22:23, David S. Miller wrote:
> > If we are really going to do something like this, it should
> > be calculated properly and be determined per-interface
> > type as netdevs are registered.
>
> Fine by me, I'm just going through plausible looking changes in the Red
> Hat tree. You might want to slightly injure someone internally until
> they drop that too 8)
Internal injuries unnecessary. Regardless of outcome of this patch,
Fedora will pick up whatever happens upstream instead of carrying
this any longer. This and a few other patches have been stagnating
in our tree for far longer than they should have been.
Dave