linux-mips
[Top] [All Lists]

[PATCH 2/2] staging: octeon-ethernet: allow to use only 1 CPU for packet

To: devel@driverdev.osuosl.org, linux-mips@linux-mips.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, David Daney <david.daney@cavium.com>
Subject: [PATCH 2/2] staging: octeon-ethernet: allow to use only 1 CPU for packet processing
From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: Sat, 28 Sep 2013 22:50:34 +0300
Cc: richard@nod.at, Aaro Koskinen <aaro.koskinen@iki.fi>
In-reply-to: <1380397834-14286-1-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: <1380397834-14286-1-git-send-email-aaro.koskinen@iki.fi>
Sender: linux-mips-bounce@linux-mips.org
Module parameter max_rx_cpus has off-by-one error. Fix that.

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 de831c1..fe1ee49 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -513,7 +513,7 @@ void cvm_oct_rx_initialize(void)
        if (NULL == dev_for_napi)
                panic("No net_devices were allocated.");
 
-       if (max_rx_cpus > 1  && max_rx_cpus < num_online_cpus())
+       if (max_rx_cpus >= 1 && max_rx_cpus < num_online_cpus())
                atomic_set(&core_state.available_cores, max_rx_cpus);
        else
                atomic_set(&core_state.available_cores, num_online_cpus());
-- 
1.8.4.rc3


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