Thanks for the detailed reviews Ilya!

I've applied all your comments, your acked-by and tested-by.

I found another bug in dp_netdev_free() and I fixed it.

I've decided to send a v5, since I was hoping to get Ben's opinion
on this.

On 21/03/2016 06:48, "Ilya Maximets" <i.maxim...@samsung.com> wrote:

>There are few style problems in patches. I've sent corresponding mails.
>Other than this:
>       Tested-by: Ilya Maximets <i.maxim...@samsung.com>
>       Acked-by: Ilya Maximets <i.maxim...@samsung.com>
>
>On 17.03.2016 02:39, Daniele Di Proietto wrote:
>> Currently we treat set_multiq() calls specially in netdev and
>>dpif-netdev:
>> every pmd thread must be stopped and set_multiq() is allowed to destroy
>>and
>> recreate the device.
>> 
>> I think we can improve this by:
>> * Generalizing the mechanism to allow changing other parameters at
>>runtime
>>   (such as MTU).
>> * Involving less the above layer (dpif-netdev).  The request for changes
>>   often comes from below (netdev_dpdk_set_config(), or the vhost
>>new_device()
>>   callback).  There's no need for dpif-netdev to remember the requested
>>value,
>>   all that it needs to know is that a configuration change is requested.
>> 
>> This series implements exactly this: a mechanism to allow a netdev
>>provider
>> to request configuration changes, to which dpif-netdev will respond by
>> stopping rx/tx and calling a netdev function to appy the new
>>configuration.
>> 
>> The new mechanism is used in this series to replace the set_multiq()
>>call,
>> but the idea is to use it also at least for:
>> 
>> * Changing the MTU at runtime
>> * Automatically detecting the number of rx queues for a vhost-user
>>device
>> 
>> The first commits also clean up some code in dpif-netdev and make the
>>ports
>> cmap fully RCU protected.
>> 
>> v4:
>> * Added another patch to uniform names of variables in netdev-dpdk (no
>>   functional change)
>> * Update some netdev comments to document the relation between
>>   netdev_set_multiq() and netdev_reconfigure()
>> * Clarify that when netdev_reconfigure() is called no call to
>>netdev_send()
>>   or netdev_rxq_recv() must be issued.
>> * Move check to skip reconfiguration in netdev_dpdk_reconfigure() before
>>   rte_eth_dev_stop().
>> 
>> v3:
>> * Fixed another outdated comment about rx queue configuration, as
>>pointed out
>>   by Mark
>> * Removed unnecessary and buggy initialization of requested_n_rxq in
>>   reconfigure_pmd_threads().
>> * Removed unused 'err' variable in netdev_dpdk_set_multiq().
>> * Changed comparison in netdev_set_multiq() to use previous
>>   'netdev->requested_n_txq' instead of 'netdev->up.n_txq'
>> * Return immediately in netdev_dpdk_reconfigure() if configuration
>>didn't
>>   change anything.
>> 
>> v2:
>> * Fixed do_add_port(): we have to call netdev_reconfigure() before
>>opening
>>   the rxqs.  This prevents memory leaks, and makes sure that the
>>datapath
>>   polls the appropriate number of queues
>> * Fixed netdev_dpdk_vhost_set_multiq(): it must call
>>   netdev_request_reconfigure(). Since it is now equal to
>>   netdev_dpdk_set_multiq(), the two function have been merged.
>> * Fixed netdev_dpdk_set_config(): dev->requested_n_rxq is now accessed
>>   while holding the appropriate mutex.
>> * Fixed some outdated comments about rx queue configuration.
>> 
>> 
>> Daniele Di Proietto (12):
>>   netdev-dpdk: Consistent variable naming.
>>   dpif-netdev: Proper error handling in do_add_port().
>>   dpif-netdev: Keep count of elements in port->rxq[].
>>   dpif-netdev: Do not keep refcount for ports.
>>   dpif-netdev: Remove useless dpif-dummy/delete-port appctl.
>>   dpif-netdev: Wait an RCU grace period before freeing ports.
>>   ofproto-dpif: Call dpif_poll_threads_set() before dpif_run()
>>   dpif-netdev: Change pmd thread configuration in dpif_netdev_run().
>>   dpif-netdev: Document locking discipline for non_pmd_mutex.
>>   dpif-netdev: Fix reconfigure_pmd_threads().
>>   netdev: Add reconfigure request mechanism.
>>   netdev-dpdk: Use ->reconfigure() call to change rx/tx queues.
>> 
>>  lib/dpif-netdev.c      | 435 +++++++++++++++++---------------
>>  lib/dpif-provider.h    |   3 +-
>>  lib/netdev-bsd.c       |   1 +
>>  lib/netdev-dpdk.c      | 654
>>+++++++++++++++++++++++++------------------------
>>  lib/netdev-dummy.c     |   1 +
>>  lib/netdev-linux.c     |   1 +
>>  lib/netdev-provider.h  |  50 ++--
>>  lib/netdev-vport.c     |   1 +
>>  lib/netdev.c           |  72 ++++--
>>  lib/netdev.h           |   7 +-
>>  ofproto/ofproto-dpif.c |   4 +-
>>  tests/bridge.at        |   4 +-
>>  12 files changed, 668 insertions(+), 565 deletions(-)
>> 

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to