From: Frank Blaschka <blaschka@linux.vnet.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: TX pre-headers...
Date: Fri, 06 Feb 2009 13:02:13 +0100 [thread overview]
Message-ID: <498C26C5.7010003@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090206.014107.231141422.davem@davemloft.net>
David Miller schrieb:
> 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.
>
> Putting a hack into NIU is the wrong way to do this and would only fix
> cases where NIU is the receiver and transmitting device. e1000 to
> NIU would still be broken, for example.
>
> I think the way to solve this is to have each device indicate how
> much TX slack space it neads for it's preheaders. On device
> registration we have some global "netdev_max_tx_hdr_space" that
> records the maximum value seen.
>
> We could decrease it on unregister (by walking the device list)
> but I don't think that is worth it.
>
> We also round netdev_max_tx_hdr_space up to be a multiple of 4
> or something reasonable like that.
>
> Then we get drivers to use a new interface:
>
> struct sk_buff *netdev_alloc_rx_skb(struct net_device *dev, int size);
>
> which is nearly identical to netdev_alloc_skb() except that it does:
>
> size += NET_IP_ALIGN + netdev_max_tx_hdr_space;
> skb = netdev_alloc_skb(dev, size);
> if (skb)
> skb_reserve(skb, NET_IP_ALIGN + netdev_max_tx_hdr_space);
> return skb;
>
> Seems reasonable?
Absolutely yes, this would help the s/390 qeth drivers too
> --
> 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
>
next prev parent reply other threads:[~2009-02-06 12:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 9:41 TX pre-headers David Miller
2009-02-06 10:46 ` Steve.Glendinning
2009-02-06 11:11 ` David Miller
2009-02-06 18:53 ` Inaky Perez-Gonzalez
2009-02-06 12:02 ` Frank Blaschka [this message]
2009-02-07 8:10 ` David Miller
2009-02-09 3:34 ` David Miller
2009-02-09 10:07 ` Herbert Xu
2009-02-09 10:14 ` David Miller
2009-02-09 10:19 ` Herbert Xu
2009-02-09 15:39 ` Krzysztof Halasa
2009-02-10 8:15 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=498C26C5.7010003@linux.vnet.ibm.com \
--to=blaschka@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.