Skip to content

Commit

Permalink
staging: octeon-ethernet: allow to use only 1 CPU for packet processing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Oct 7, 2013
1 parent cd39f73 commit d2ca24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/octeon/ethernet-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit d2ca24c

Please sign in to comment.