From: Andrew Gallatin <gallatin@myri.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Roland Dreier <rdreier@cisco.com>,
davem@davemloft.net, ossthema@de.ibm.com, netdev@vger.kernel.org
Subject: Re: [PATCH]: fix lro_gen_skb() alignment
Date: Sun, 02 Dec 2007 19:07:26 -0500 [thread overview]
Message-ID: <475348BE.3010203@myri.com> (raw)
In-Reply-To: <20071130223457.GA25388@gondor.apana.org.au>
Herbert Xu wrote:
> On Fri, Nov 30, 2007 at 02:35:43PM -0500, Andrew Gallatin wrote:
>>> Isn't the value of 2 ethernet-specific (to round the 14-byte header up
>>> to 16)? Given that the rest of the lro code is fairly careful to
>>> calculate mac_hdr_len etc it seems as if it would be cleaner to make
>>> this independent of the specific L2 being used.
>>>
>>> (And I plan on using the LRO module for IP-over-InfiniBand so this is
>>> not completely theoretical)
>
> Good point!
>
> We really should rename NET_IP_ALIGN so that both Ethernet and DMA
> occur in it somehow :)
>
>> Good point. I tend to think all the world is ethernet.
>> Perhaps the better way would be to simply add an alignment pad
>> field to lro_mgr? When the driver initializes it, it specifies
>> any padding needed. Ethernet drivers would specify 2.
>
> Just pass in the mac_hdr_len, and calculate the padding as
That was my first thought as well, but it turns out that
when lro_gen_skb() is called via the out1 label, mac_hdr_len
may not be known. It seemed simplest and cleanest to just
make it a field in lro_mgr.
Drew
next prev parent reply other threads:[~2007-12-03 0:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 14:47 [PATCH]: fix lro_gen_skb() alignment Andrew Gallatin
2007-11-30 9:59 ` Herbert Xu
2007-11-30 18:35 ` Andrew Gallatin
2007-11-30 19:14 ` Roland Dreier
2007-11-30 19:35 ` Andrew Gallatin
2007-11-30 22:34 ` Herbert Xu
2007-12-03 0:07 ` Andrew Gallatin [this message]
2007-12-03 9:29 ` Herbert Xu
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=475348BE.3010203@myri.com \
--to=gallatin@myri.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=ossthema@de.ibm.com \
--cc=rdreier@cisco.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).