.4 million or .04 million? There's a big difference.
On Jun 26, 2014 6:24 PM, "Ryan Wilson 76511" <wr...@vmware.com> wrote:

>  Its between 0.2 - 0.6 million PPS increase after running 3 tests with
> and without this patch. So I went with the average of 0.4 :)
>
>  And we actually use these annotations elsewhere in netdev_dpdk_send()
> where we measure size of packets and dropped packets, so it would be nice
> to add these annotations for code consistency as well.
>
>  Ryan
>
>   From: Ben Pfaff <b...@nicira.com>
> Date: Thursday, June 26, 2014 6:20 PM
> To: Ryan Wilson <wr...@nicira.com>
> Cc: "dev@openvswitch.org" <dev@openvswitch.org>
> Subject: Re: [ovs-dev] [PATCH v2 5/5] netdev-dpdk: Add OVS_UNLIKELY
> annotations in dpdk_do_tx_copy().
>
>   That's pretty impressive. Is the performance consistent enough to be
> sure, then?
>
> In either case I don't object to the patch.
> On Jun 26, 2014 6:17 PM, "Ryan Wilson" <wr...@nicira.com> wrote:
>
>> Since dropped packets due to large packet size or lack of memory
>> are unlikely, it is best to add OVS_UNLIKELY annotations to these
>> conditions.
>>
>> With DPDK fast path forwarding test, this increased throughtput
>> from 4.12 to 4.16 million packets per second.
>>
>> Signed-off-by: Ryan Wilson <wr...@nicira.com>
>> ---
>>  lib/netdev-dpdk.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index 0aee14e..03f1e02 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -664,7 +664,7 @@ dpdk_do_tx_copy(struct netdev *netdev, struct
>> dpif_packet ** pkts, int cnt)
>>
>>      for (i = 0; i < cnt; i++) {
>>          int size = ofpbuf_size(&pkts[i]->ofpbuf);
>> -        if (size > dev->max_packet_len) {
>> +        if (OVS_UNLIKELY(size > dev->max_packet_len)) {
>>              VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d",
>>                           (int)size , dev->max_packet_len);
>>
>> @@ -688,7 +688,7 @@ dpdk_do_tx_copy(struct netdev *netdev, struct
>> dpif_packet ** pkts, int cnt)
>>          newcnt++;
>>      }
>>
>> -    if (dropped) {
>> +    if (OVS_UNLIKELY(dropped)) {
>>          ovs_mutex_lock(&dev->mutex);
>>          dev->stats.tx_dropped += dropped;
>>          ovs_mutex_unlock(&dev->mutex);
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev
>> <https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=TfBS78Vw3dzttvXidhbffg%3D%3D%0A&m=wtH3lN2ST0E5hR7ESg7AwzXseDogoZZdb1KOoAV5uQ0%3D%0A&s=1542518c0ff9ce83f83a308a7e942d661a79c78b4fbac3e67a27b268c9d58df0>
>>
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to