netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shemminger@vyatta.com
Cc: thomas@wytron.com.tw, netdev@vger.kernel.org
Subject: Re: [PATCH 3/4] ethoc: align received packet to make IP header at word boundary
Date: Wed, 07 Oct 2009 13:52:17 -0700 (PDT)	[thread overview]
Message-ID: <20091007.135217.73491149.davem@davemloft.net> (raw)
In-Reply-To: <20091007091337.532d9ed1@nehalam>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 7 Oct 2009 09:13:37 -0700

> On Mon,  5 Oct 2009 17:33:19 +0800
> Thomas Chou <thomas@wytron.com.tw> wrote:
> 
>> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
>> index f92747f..0c6c7f4 100644
>> --- a/drivers/net/ethoc.c
>> +++ b/drivers/net/ethoc.c
>> @@ -399,6 +399,10 @@ static int ethoc_rx(struct net_device *dev, int limit)
>>  		if (ethoc_update_rx_stats(priv, &bd) == 0) {
>>  			int size = bd.stat >> 16;
>>  			struct sk_buff *skb = netdev_alloc_skb(dev, size);
>> +
>> +			size -= 4; /* strip the CRC */
>> +			skb_reserve(skb, 2); /* align TCP/IP header */
> 
> Please use NET_IP_ALIGN rather than hard coding 2 so that the value
> can be changed on a per-cpu architecture basis if desired.

Indeed.

Thomas please send a patch to fix this up, thanks.

  reply	other threads:[~2009-10-07 20:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-05  9:33 [PATCH 1/4] ethoc: fix typo to compute number of tx descriptors Thomas Chou
2009-10-05  9:33 ` [PATCH 2/4] ethoc: fix buffer address mapping Thomas Chou
2009-10-05  9:33   ` [PATCH 3/4] ethoc: align received packet to make IP header at word boundary Thomas Chou
2009-10-05  9:33     ` [PATCH 4/4] ethoc: use system memory as buffer Thomas Chou
2009-10-07 10:42       ` David Miller
2009-10-07 10:42     ` [PATCH 3/4] ethoc: align received packet to make IP header at word boundary David Miller
2009-10-07 16:13     ` Stephen Hemminger
2009-10-07 20:52       ` David Miller [this message]
2009-10-08  2:42         ` Thomas Chou
2009-10-07 10:42   ` [PATCH 2/4] ethoc: fix buffer address mapping David Miller
2009-10-07 10:41 ` [PATCH 1/4] ethoc: fix typo to compute number of tx descriptors 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=20091007.135217.73491149.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=thomas@wytron.com.tw \
    /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).