[ovs-dev] [PATCH v2] netdev-dummy: Limits the number of tx/rx queues.
Aaron Conole
aconole at redhat.com
Mon Jan 9 15:52:27 UTC 2017
nickcooper-zhangtonghao <nic at opencloud.tech> writes:
> This patch avoids the ovs_rcu to report WARN, caused by blocked
> for a long time, when ovs-vswitchd processes a port with many
> rx/tx queues. The number of tx/rx queues per port may be appropriate,
> because the dpdk uses it as an default max value.
>
> Signed-off-by: nickcooper-zhangtonghao <nic at opencloud.tech>
> ---
I don't understand how this change impacts the ovs_rcu warning, unless
you find an issue creating 1025 tx/rx queues. Is that what happened?
> lib/netdev-dummy.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
> index bdb77e1..5370404 100644
> --- a/lib/netdev-dummy.c
> +++ b/lib/netdev-dummy.c
> @@ -827,6 +827,8 @@ netdev_dummy_set_in6(struct netdev *netdev_, struct in6_addr *in6,
> return 0;
> }
>
> +#define DUMMY_MAX_QUEUES_PER_PORT 1024
> +
> static int
> netdev_dummy_set_config(struct netdev *netdev_, const struct smap *args)
> {
> @@ -868,8 +870,11 @@ netdev_dummy_set_config(struct netdev *netdev_, const struct smap *args)
> goto exit;
> }
>
> - 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_n_rxq = MIN(DUMMY_MAX_QUEUES_PER_PORT,
> + MAX(smap_get_int(args, "n_rxq", NR_QUEUE), 1));
> + new_n_txq = MIN(DUMMY_MAX_QUEUES_PER_PORT,
> + 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
More information about the dev
mailing list