lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF39F6FFF6.453811EF-ON80257555.003A4714-80257555.003B50C2@smsc.com>
Date:	Fri, 6 Feb 2009 10:46:24 +0000
From:	Steve.Glendinning@...c.com
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: TX pre-headers...

David Miller <davem@...emloft.net> wrote on 06/02/2009 09:41:07:
> 
> Some NIC hardware wants a pre-header pushed in front of the packet
> data on transmit.
> 
> When routing or bridging this will cause a reallocation of skb->data
> on every packet forwarded because there will only be NET_IP_ALIGN
> space reserved at the head by the device receive path.
> 
> NIU is one such NIC and I only noticed this because of some things I
> saw in some of Robert Olsson's routing stress test oprofile dumps.

Many of the usbnet drivers do this as well - for example smsc95xx needs
either 8 or 12 bytes for its pre-header (depending whether tx checksum
offload is enabled) and does this in its tx_fixup:

        if (skb_headroom(skb) < overhead) {
                struct sk_buff *skb2 = skb_copy_expand(skb,
                        overhead, 0, flags);
                dev_kfree_skb_any(skb);
                skb = skb2;
                if (!skb)
                        return NULL;
        }

It would be really good to get rid of these copies.

Interestingly, this device can change the amount of pre-header space it
needs if tx checksums are enabled/disabled at runtime.  I guess the
device would just indicate its worst case requirement at registration.

Does this just apply to the routing/bridging case, or can packets
originating from the host also allocate this extra pre-header?

Steve
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ