staging: octeon-ethernet: allow to use only 1 CPU for packet processing
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 6 Oct 2013 20:35:16 +0000 (23:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2013 05:03:18 +0000 (22:03 -0700)
Module parameter max_rx_cpus has off-by-one error. Fix that.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon/ethernet-rx.c

index 0d539eb2be5b786c81e3c6db3e76041d8d303c3f..0315f60497b7fcacc48ca876bb862febed85c759 100644 (file)
@@ -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());