Skip to content

Commit

Permalink
netdev-dummy: Uses the NR_QUEUE instead of magic numbers.
Browse files Browse the repository at this point in the history
The NR_QUEUE is defined in "lib/dpif-netdev.h", netdev-dpdk
uses it instead of magic number. netdev-dummy should be
in the same case.

Signed-off-by: nickcooper-zhangtonghao <[email protected]>
Signed-off-by: Daniele Di Proietto <[email protected]>
  • Loading branch information
xpu22 authored and ddiproietto committed Jan 9, 2017
1 parent 182ca1a commit cce57f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/netdev-dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ netdev_dummy_set_config(struct netdev *netdev_, const struct smap *args)
goto exit;
}

new_n_rxq = MAX(smap_get_int(args, "n_rxq", 1), 1);
new_n_txq = MAX(smap_get_int(args, "n_txq", 1), 1);
new_n_rxq = MAX(smap_get_int(args, "n_rxq", NR_QUEUE), 1);
new_n_txq = MAX(smap_get_int(args, "n_txq", NR_QUEUE), 1);
new_numa_id = smap_get_int(args, "numa_id", 0);
if (new_n_rxq != netdev->requested_n_rxq
|| new_n_txq != netdev->requested_n_txq
Expand Down

0 comments on commit cce57f8

Please sign in to comment.