LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Toshiharu Okada" <toshiharu-linux@dsn.okisemi.com>
To: "David Miller" <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<qi.wang@intel.com>, <yong.y.wang@intel.com>,
	<andrew.chih.howe.khor@intel.com>, <joel.clark@intel.com>,
	<kok.howg.ewe@intel.com>, <tomoya-linux@dsn.okisemi.com>
Subject: Re: [PATCH] pch_gbe: Fix the issue that the receiving data is not normal.
Date: Wed, 9 Feb 2011 13:58:44 +0900	[thread overview]
Message-ID: <12CF314023A64E13A83B8E6AEF56D177@hacdom.okisemi.com> (raw)
In-Reply-To: <20110208.163522.232741523.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 08 Feb 2011 16:35:22 -0800 (PST)
>> Hi Devid
>>
>> I resubmit this patch modified.
>> Please check them.
>
>Your memcpy+memcpy sequences are equivalent to memmove(), please
>use that instead.
>

I use memmove().

>I have to say this function is insanely complicated.  There seems
>to be 16 different ways RX packets are processed.  I can't believe
>that is needs to be like this.

If processing is arranged, There are 4 different ways RX packets are 
processed.

[Case1]
"rx_csum is enable " and
 "NET_IP_ALIGN == 0"

 DMA buffer is used as SKB as it is.

[Case2]
"rx_csum is enable " and
 "NET_IP_ALIGN != 0"

 Because alignment differs, the new_skb is newly allocated, and data is 
copied to new_skb.

[Case3]
"rx_csum is disable " and
 "length < copybreak" or "NET_IP_ALIGN != PCH_GBE_DMA_PADDING"

 Because alignment differs, the new_skb is newly allocated, and data is 
copied to new_skb.
 Padding data is deleted at the time of a copy.

[Case4]
"rx_csum is disable " and
 "length >= copybreak" and "NET_IP_ALIGN == PCH_GBE_DMA_PADDING"

 Padding data is deleted by moving header data.

I rewrite without using skb_copy_flag and skb_padding simply.

Best regards
Toshiharu Okada(OKI semiconductor) 


  reply	other threads:[~2011-02-09  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08  8:24 Toshiharu Okada
2011-02-09  0:35 ` David Miller
2011-02-09  4:58   ` Toshiharu Okada [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-24  4:43 Toshiharu Okada
2011-01-25 21:32 ` David Miller
2011-01-27  8:45   ` Toshiharu Okada

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=12CF314023A64E13A83B8E6AEF56D177@hacdom.okisemi.com \
    --to=toshiharu-linux@dsn.okisemi.com \
    --cc=andrew.chih.howe.khor@intel.com \
    --cc=davem@davemloft.net \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=qi.wang@intel.com \
    --cc=tomoya-linux@dsn.okisemi.com \
    --cc=yong.y.wang@intel.com \
    --subject='Re: [PATCH] pch_gbe: Fix the issue that the receiving data is not normal.' \
    /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

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