[ovs-dev] [PATCH v3 11/18] dpctl: Avoid making assumptions on pmd threads.

Daniele Di Proietto diproiettod at vmware.com
Mon Jan 16 04:14:30 UTC 2017


On 13/01/2017 16:51, "Ben Pfaff" <blp at ovn.org> wrote:

>On Sun, Jan 08, 2017 at 07:15:09PM -0800, Daniele Di Proietto wrote:
>> Currently dpctl depends on ovs-numa module to delete and create flows on
>> different pmd threads for pmd devices.
>> 
>> The next commits will move away the pmd threads state from ovs-numa to
>> dpif-netdev, so the ovs-numa interface will not be supported.
>> 
>> Also, the assignment between ports and thread is an implementation
>> detail of dpif-netdev, dpctl shouldn't know anything about it.
>> 
>> This commit changes the dpif_flow_put() and dpif_flow_del() calls to
>> iterate over all the pmd threads, if pmd_id is PMD_ID_NULL.
>> 
>> A simple test is added.
>> 
>> Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
>
>dpif_netdev_flow_del() and dpif_netdev_flow_put() have a lot of very
>similar code, which makes one wonder whether any common code can be
>factored out.

You're right, they share s lot of code.  I haven't found an easy way to
reduce duplication without introducing callbacks, so I left it as it is
for now, I hope it's ok

Perhaps I can add the common code in dpif_netdev_operate, I'll post
something soon.

Thanks,

Daniele


More information about the dev mailing list