On 04/13/2017 07:11 PM, Kevin Traynor wrote:
> On 03/12/2017 05:33 PM, Bhanuprakash Bodireddy wrote:
>> Conditional EMC insert patch gives the flexibility to configure the
>> probability of flow insertion in to EMC. This also allows an option to
>> entirely disable EMC by setting 'emc-insert-inv-prob=0' which can be
>> useful at large number of parallel flows.
>>
>> This patch skips EMC lookup when EMC is disabled. This is useful to
>> avoid wasting CPU cycles and also improve performance considerably.
>>
> 
> LGTM. How much does this improve performance?
> 

Ack for the series,
Acked-by: Kevin Traynor <ktray...@redhat.com>

>> Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com>
>> CC: Ciara Loftus <ciara.lof...@intel.com>
>> CC: Georg Schmuecking <georg.schmueck...@ericsson.com>
>> ---
>>  lib/dpif-netdev.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
>> index 7d53a8d..faadedb 100644
>> --- a/lib/dpif-netdev.c
>> +++ b/lib/dpif-netdev.c
>> @@ -4517,8 +4517,11 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,
>>      size_t n_missed = 0, n_dropped = 0;
>>      struct dp_packet *packet;
>>      const size_t size = dp_packet_batch_size(packets_);
>> +    uint32_t cur_min;
>>      int i;
>>  
>> +    atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);
>> +
>>      DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {
>>          struct dp_netdev_flow *flow;
>>  
>> @@ -4542,7 +4545,8 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,
>>          key->len = 0; /* Not computed yet. */
>>          key->hash = dpif_netdev_packet_get_rss_hash(packet, &key->mf);
>>  
>> -        flow = emc_lookup(flow_cache, key);
>> +        /* If EMC is disabled skip emc_lookup */
>> +        flow = (cur_min == 0) ? NULL: emc_lookup(flow_cache, key);
>>          if (OVS_LIKELY(flow)) {
>>              dp_netdev_queue_batches(packet, flow, &key->mf, batches,
>>                                      n_batches);
>>
> 
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 

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

Reply via email to