linux-mips
[Top] [All Lists]

Re: [PATCH 1/3] staging: octeon-ethernet: make dropped packets to consum

To: Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 1/3] staging: octeon-ethernet: make dropped packets to consume NAPI budget
From: David Daney <ddaney@caviumnetworks.com>
Date: Thu, 5 Sep 2013 11:55:51 -0700
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <devel@driverdev.osuosl.org>, <linux-mips@linux-mips.org>, David Daney <david.daney@cavium.com>, "Jason A. Donenfeld" <Jason@zx2c4.com>, <richard@nod.at>
In-reply-to: <1378406641-16530-2-git-send-email-aaro.koskinen@iki.fi>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1378406641-16530-1-git-send-email-aaro.koskinen@iki.fi> <1378406641-16530-2-git-send-email-aaro.koskinen@iki.fi>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 09/05/2013 11:43 AM, Aaro Koskinen wrote:
We should count also dropped packets, otherwise the NAPI handler may
end up running too long.

Is this actually a problem?

If so ... the patch looks sane and you and add Acked-by me.


Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
  drivers/staging/octeon/ethernet-rx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c 
b/drivers/staging/octeon/ethernet-rx.c
index 34afc16..10e5416 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int 
budget)
                        if (backlog > budget * cores_in_use && napi != NULL)
                                cvm_oct_enable_one_cpu();
                }
+               rx_count++;

                skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1;
                if (likely(skb_in_hw)) {
@@ -429,7 +430,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int 
budget)
  #endif
                                }
                                netif_receive_skb(skb);
-                               rx_count++;
                        } else {
                                /* Drop any packet received for a device that 
isn't up */
                                /*



<Prev in Thread] Current Thread [Next in Thread>