Hi Ian

Did you have any suggestions for this fix or is it ok as is ?

Thanks Darrell



On 8/24/17, 7:16 PM, "ovs-dev-boun...@openvswitch.org on behalf of 王志克" 
<ovs-dev-boun...@openvswitch.org on behalf of wangzh...@jd.com> wrote:

    Hi Lance,
    
    
    
    Your patch works. Thanks.
    
    
    
    BR,
    
    Wang Zhike
    
    
    
    -----Original Message-----
    
    From: Lance Richardson [mailto:lrich...@redhat.com] 
    
    Sent: Thursday, August 24, 2017 8:10 PM
    
    To: 王志克
    
    Cc: ovs-dev@openvswitch.org; ovs-disc...@openvswitch.org
    
    Subject: Re: [ovs-discuss] OVS+DPDK QoS rate limit issue
    
    
    
    
    
    > From: "王志克" <wangzh...@jd.com>
    
    > To: ovs-dev@openvswitch.org, ovs-disc...@openvswitch.org
    
    > Sent: Wednesday, August 23, 2017 11:41:05 PM
    
    > Subject: [ovs-discuss] OVS+DPDK QoS rate limit issue
    
    > 
    
    > 
    
    > 
    
    > Hi All,
    
    > 
    
    > 
    
    > 
    
    > I am using OVS2.7.0 and DPDK 16.11, and testing rate limit function.
    
    > 
    
    > 
    
    > 
    
    > I found that if the policing_rate is set very large, say 5Gbps, the rate 
is
    
    > limited dramatically to very low value, like 800Mbps.
    
    > 
    
    > The command is as below:
    
    > 
    
    > ovs-vsctl set interface port-7zel2so9sg ingress_policing_rate=5000000
    
    > ingress_policing_burst=500000
    
    > 
    
    > 
    
    > 
    
    > If we set the rate lower than 4Gbps, the rate is limited correctly.
    
    > 
    
    > 
    
    > 
    
    > Test setup:
    
    > 
    
    > Sender (DPDK pktGen) sends out about 10Gbps udp packet, with size about 
1420
    
    > IP size.
    
    > 
    
    > The rate limit is set on VM vhost-user-client port.
    
    > 
    
    > 
    
    > 
    
    > Any idea about this issue? Is that known issue?
    
    > 
    
    > 
    
    
    
    It seems 32-bit arithmetic is being used when converting the rate from
    
    kilobits per second to bytes per second. Could you give this patch a try?
    
    
    
    diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
    
    index 1aaf6f7e2..d6ed2c7b0 100644
    
    --- a/lib/netdev-dpdk.c
    
    +++ b/lib/netdev-dpdk.c
    
    @@ -2229,8 +2229,8 @@ netdev_dpdk_policer_construct(uint32_t rate, uint32_t 
burst)
    
         rte_spinlock_init(&policer->policer_lock);
    
     
    
         /* rte_meter requires bytes so convert kbits rate and burst to bytes. 
*/
    
    -    rate_bytes = rate * 1000/8;
    
    -    burst_bytes = burst * 1000/8;
    
    +    rate_bytes = rate * 1000ULL/8;
    
    +    burst_bytes = burst * 1000ULL/8;
    
     
    
         policer->app_srtcm_params.cir = rate_bytes;
    
         policer->app_srtcm_params.cbs = burst_bytes;
    
    
    
    Regards,
    
    
    
       Lance Richardson
    
    
    
    > 
    
    > Br,
    
    > 
    
    > Wang Zhike
    
    > 
    
    > _______________________________________________
    
    > discuss mailing list
    
    > disc...@openvswitch.org
    
    > 
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddiscuss&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=uh9yIsPRl-Wg_mzYEUSGJQ8MIc8bQSMveIRvPzVhs3o&s=wFA4X4_UKYadj8wqKID9C9HTVu7B_oGv6QnzzZOjLRs&e=
 
    
    > 
    
    _______________________________________________
    dev mailing list
    d...@openvswitch.org
    
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=uh9yIsPRl-Wg_mzYEUSGJQ8MIc8bQSMveIRvPzVhs3o&s=SR-iNl6jVSY3oDZ9W-JMageFfsPuE9WBvXeCFV8filc&e=
 
    

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

Reply via email to