2017-01-08 17:30 GMT-08:00 nickcooper-zhangtonghao <[email protected]>: > 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 <[email protected]>
I don't think this is a big deal, since netdev-dummy is only used for testing, but don't you think it's better to check it in set_config() and return an error? Also, could you use the prefix netdev-dummy, instead of datapath? Thanks, Daniele > --- > lib/netdev-dummy.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c > index d406cbc..d75e597 100644 > --- a/lib/netdev-dummy.c > +++ b/lib/netdev-dummy.c > @@ -897,6 +897,9 @@ netdev_dummy_get_numa_id(const struct netdev *netdev_) > return numa_id; > } > > + > +#define DUMMY_MAX_QUEUES_PER_PORT 1024 > + > /* Sets the number of tx queues and rx queues for the dummy PMD interface. */ > static int > netdev_dummy_reconfigure(struct netdev *netdev_) > @@ -905,8 +908,8 @@ netdev_dummy_reconfigure(struct netdev *netdev_) > > ovs_mutex_lock(&netdev->mutex); > > - netdev_->n_txq = netdev->requested_n_txq; > - netdev_->n_rxq = netdev->requested_n_rxq; > + netdev_->n_txq = MIN(DUMMY_MAX_QUEUES_PER_PORT, netdev->requested_n_txq); > + netdev_->n_rxq = MIN(DUMMY_MAX_QUEUES_PER_PORT, netdev->requested_n_rxq); > netdev->numa_id = netdev->requested_numa_id; > > ovs_mutex_unlock(&netdev->mutex); > -- > 1.8.3.1 > > > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
