Message ID | 1483925422-4607-4-git-send-email-nic@opencloud.tech |
---|---|
State | Accepted |
Headers | show |
2017-01-08 17:30 GMT-08:00 nickcooper-zhangtonghao <nic@opencloud.tech>: > 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 <nic@opencloud.tech> Thanks, I changed the prefix of the commit message and applied to master > --- > lib/netdev-dummy.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c > index d75e597..8d9c805 100644 > --- a/lib/netdev-dummy.c > +++ b/lib/netdev-dummy.c > @@ -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 > -- > 1.8.3.1 > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index d75e597..8d9c805 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -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
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 <nic@opencloud.tech> --- lib/netdev-dummy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)