On Wed, Apr 10, 2019 at 9:32 AM David Marchand <david.march...@redhat.com>
wrote:

> On Tue, Apr 9, 2019 at 1:42 PM Ilya Maximets <i.maxim...@samsung.com>
> wrote:
>
>>
>> What do you think about something like this (not even compile tested):
>> ---
>> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
>> index bd9718824..0cf492a3b 100644
>> --- a/lib/dpif-netdev.c
>> +++ b/lib/dpif-netdev.c
>> @@ -591,6 +591,8 @@ struct polled_queue {
>>      struct dp_netdev_rxq *rxq;
>>      odp_port_t port_no;
>>      bool emc_enabled;
>> +    bool enabled;
>> +    uint64_t change_seq;
>>  };
>>
>>  /* Contained by struct dp_netdev_pmd_thread's 'poll_list' member. */
>> @@ -5375,6 +5377,9 @@ pmd_load_queues_and_ports(struct
>> dp_netdev_pmd_thread *pmd,
>>          poll_list[i].rxq = poll->rxq;
>>          poll_list[i].port_no = poll->rxq->port->port_no;
>>          poll_list[i].emc_enabled = poll->rxq->port->emc_enabled;
>> +        poll_list[i].enabled = netdev_rxq_enabled(poll->rxq);
>> +        poll_list[i].change_seq =
>> +                     netdev_get_change_seq(poll->rxq->port->netdev);
>>          i++;
>>      }
>>
>> @@ -5440,6 +5445,10 @@ reload:
>>
>>          for (i = 0; i < poll_cnt; i++) {
>>
>> +            if (!poll_list[i].enabled) {
>> +                continue;
>> +            }
>> +
>>              if (poll_list[i].emc_enabled) {
>>                  atomic_read_relaxed(&pmd->dp->emc_insert_min,
>>                                      &pmd->ctx.emc_insert_min);
>> @@ -5476,6 +5485,15 @@ reload:
>>              if (reload) {
>>                  break;
>>              }
>> +
>> +            for (i = 0; i < poll_cnt; i++) {
>> +                uint64_t current_seq =
>> +
>>  netdev_get_change_seq(poll_list[i].rxq->port->netdev);
>> +                if (poll_list[i].change_seq != current_seq) {
>> +                    poll_list[i].change_seq = current_seq;
>> +                    poll_list[i].enabled =
>> netdev_rxq_enabled(poll_list[i].rxq);
>> +                }
>> +            }
>>          }
>>          pmd_perf_end_iteration(s, rx_packets, tx_packets,
>>                                 pmd_perf_metrics_enabled(pmd));
>> ---
>> + replacing of your 'netdev_request_reconfigure(&dev->up)' inside
>> 'vring_state_changed'
>> with 'netdev_change_seq_changed(&dev->up)'?
>>
>
> Interesting, I would prefer to have a bitmap of rxq rather than looping on
> all and checking the state.
> But let me try your approach first.
>

Incorporated this change, and it works fine, I get similar numbers
with/without a bitmap, so I dropped the bitmap.
I would say we are only missing some information in
dpif-netdev/pmd-rxq-show to get a per rxq status.

I will submit this with the fix on F_MQ if this is okay for you.

Thanks!

-- 
David Marchand
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to