[ovs-dev] [PATCH v7 16/16] netdev-dpdk: Use ->reconfigure() call to change rx/tx queues.
Kavanagh, Mark B
mark.b.kavanagh at intel.com
Mon Apr 18 08:56:01 UTC 2016
>
>
>
>On 14/04/2016 05:37, "Kavanagh, Mark B" <mark.b.kavanagh at intel.com> wrote:
>
>>Hi Daniele,
>>
>>One comment inline.
>>
>>Thanks,
>>Mark
>>
>>>
>>>This introduces in dpif-netdev and netdev-dpdk the first use for the
>>>newly introduce reconfigure netdev call.
>>>
>>>When a request to change the number of queues comes, netdev-dpdk will
>>>remember this and notify the upper layer via
>>>netdev_request_reconfigure().
>>>
>>>The datapath, instead of periodically calling netdev_set_multiq(), can
>>>detect this and call reconfigure().
>>>
>>>This mechanism can also be used to:
>>>* Automatically match the number of rxq with the one provided by qemu
>>> via the new_device callback.
>>>* Provide a way to change the MTU of dpdk devices at runtime.
>>>* Move a DPDK vhost device to the proper NUMA socket.
>>>
>>>Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
>>>---
>>> lib/dpif-netdev.c | 69 +++++++++---------
>>> lib/netdev-dpdk.c | 195
>>>++++++++++++++++++++++++++------------------------
>>> lib/netdev-provider.h | 23 +++---
>>> lib/netdev.c | 34 +++------
>>> lib/netdev.h | 3 +-
>>> 5 files changed, 155 insertions(+), 169 deletions(-)
>
>[...]
>
>>>@@ -312,12 +305,12 @@ struct netdev_class {
>>> * making sure that these concurrent calls do not create a race
>>>condition
>>> * by using multiple hw queues or locking.
>>> *
>>>- * On error, the tx queue and rx queue configuration is
>>>indeterminant.
>>>- * Caller should make decision on whether to restore the previous or
>>>- * the default configuration. Also, caller must make sure there is
>>>no
>>>- * other thread accessing the queues at the same time. */
>>>- int (*set_multiq)(struct netdev *netdev, unsigned int n_txq,
>>>- unsigned int n_rxq);
>>>+ * The caller will call netdev_reconfigure() (if necessary) before
>>>using
>>>+ * netdev_send() on any of the newly configured queues, giving the
>>>provider
>>>+ * a chance to adjust its settings.
>>>+ *
>>>+ * On error, the tx queue configuration is unchanged. */
>>>+ int (*set_multiq)(struct netdev *netdev, unsigned int n_txq);
>>
>>Since this function now deals only with TX queues, an identifier along
>>the lines of 'set_tx_multiq' might more accurately describe its
>>functionality. Specific netdev classes would need to modify the names of
>>their own specific 'set_multiq' functions accordingly.
>
>You're right, 'set_tx_multiq()' is definitely a better name for it. I
>updated it.
>
>Thanks for all your feedback
No problem - thanks for the patchset!
Cheers,
Mark
More information about the dev
mailing list