netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: f.fainelli@gmail.com
Cc: pgynther@google.com, netdev@vger.kernel.org, jaedon.shin@gmail.com
Subject: Re: [PATCH net-next] net: bcmgenet: rewrite bcmgenet_rx_refill()
Date: Fri, 13 Mar 2015 15:48:44 -0400 (EDT)	[thread overview]
Message-ID: <20150313.154844.1460460664757494447.davem@davemloft.net> (raw)
In-Reply-To: <55032C64.3010706@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Fri, 13 Mar 2015 11:28:52 -0700

> On 12/03/15 15:48, Petri Gynther wrote:
>> Currently, bcmgenet_desc_rx() calls bcmgenet_rx_refill() at the end of
>> Rx packet processing loop, after the current Rx packet has already been
>> passed to napi_gro_receive(). However, bcmgenet_rx_refill() might fail
>> to allocate a new Rx skb, thus leaving a hole on the Rx queue where no
>> valid Rx buffer exists.
>> 
>> To eliminate this situation:
>> 1. Rewrite bcmgenet_rx_refill() to retain the current Rx skb on the Rx
>>    queue if a new replacement Rx skb can't be allocated and DMA-mapped.
>>    In this case, the data on the current Rx skb is effectively dropped.
>> 2. Modify bcmgenet_desc_rx() to call bcmgenet_rx_refill() at the top of
>>    Rx packet processing loop, so that the new replacement Rx skb is
>>    already in place before the current Rx skb is processed.
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> Tested-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Thanks! Have not noticed any performance impact doing 64B/1500B testing.

Applied, thanks everyone.

      reply	other threads:[~2015-03-13 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 22:48 [PATCH net-next] net: bcmgenet: rewrite bcmgenet_rx_refill() Petri Gynther
2015-03-13  1:05 ` Florian Fainelli
2015-03-13  3:03 ` David Miller
2015-03-13 14:42 ` Jaedon Shin
2015-03-13 18:28 ` Florian Fainelli
2015-03-13 19:48   ` David Miller [this message]

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=20150313.154844.1460460664757494447.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jaedon.shin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pgynther@google.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).