Thanks for review.
Comments inline.

On 23.02.2016 05:33, Daniele Di Proietto wrote:
>> Reassignment of all rx queues done to achieve fair distribution.

>> @@ -2401,11 +2405,20 @@ static int
>> dpif_netdev_pmd_set(struct dpif *dpif, const char *cmask)
>> {
>>     struct dp_netdev *dp = get_dp_netdev(dpif);
>> +    bool cmask_changed = pmd_cpu_mask_changed(dp, cmask);
>> +    struct dp_netdev_port *port;
>>
>> -    if (pmd_config_changed(dp, cmask)) {
>> -        struct dp_netdev_port *port;
>> +    if (cmask_changed || pmd_n_rxq_changed(dp)) {
> 
> We could just return here if nothing is changed. That will save us
> one level of indentation.

OK. I agree.

>> +        if (cmask_changed) {
>> +            dp_netdev_destroy_all_pmds(dp);
>> +        } else {
>> +            struct dp_netdev_pmd_thread *pmd;
>>
>> -        dp_netdev_destroy_all_pmds(dp);
>> +            CMAP_FOR_EACH (pmd, node, &dp->poll_threads) {
>> +                dp_netdev_pmd_clear_poll_list(pmd);
>> +                dp_netdev_reload_pmd__(pmd);
> 
> I guess this is still more than necessary.  Have you thought about
> reloading just touching the pmd threads involved with the ports that
> changed configuration?

Yes, I thought about that. This was the original purpose of patch set.
But, currently, I tried to preserve existing reload logic just to
avoid strengthening of load imbalance between threads that was already
introduced in do_del_port(). I want to change logic to reloading only
involved threads in future patch with introduction of scheduler and
load balancer for rx queues.

What do you think?

For now I'll send v2 with indentation fix.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to