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]
Date:	Fri, 06 Feb 2009 03:11:00 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	Steve.Glendinning@...c.com
Cc:	netdev@...r.kernel.org
Subject: Re: TX pre-headers...

From: Steve.Glendinning@...c.com
Date: Fri, 6 Feb 2009 10:46:24 +0000

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

This is exactly the kind of code that the NIU transmit handler
has.

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

Right.

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

ARP packets, as one specific case, are still going to trigger that
conditional above and need the copy.

TCP, UDP and others don't trigger this usually only because
they add MAX_TCP_HEADER et al. to all of their allocations
which essentially gives 128 bytes of slack space at the front
of every TX frame from transport protocols.

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