Re: [ovs-discuss] [ovs-dev] OVS+DPDK QoS rate limit issue

2017-08-24 Thread Darrell Ball
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 王志克" 
 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-...@openvswitch.org; ovs-discuss@openvswitch.org

Subject: Re: [ovs-discuss] OVS+DPDK QoS rate limit issue





> From: "王志克" 

> To: ovs-...@openvswitch.org, ovs-discuss@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=500

> ingress_policing_burst=50

> 

> 

> 

> 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=
 


___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS+DPDK QoS rate limit issue

2017-08-24 Thread 王志克
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-...@openvswitch.org; ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] OVS+DPDK QoS rate limit issue


> From: "王志克" 
> To: ovs-...@openvswitch.org, ovs-discuss@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=500
> ingress_policing_burst=50
> 
> 
> 
> 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://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to Ubuntu 16.04

2017-08-24 Thread Chad Willman
Thanks very much for your replies to my issue, folks.

I’ve decide to remove OVS from the system and return to Linux bridging. OVS is 
the only thing that didn’t survive the upgrade to Ubuntu 16.04
and it may take some time to debug the problem, especially with no support from 
Ubuntu. I don’t have that time to spare.

Again, I’m much obliged for your responses.

Regards,

Chad Willman

From: Chad Willman 
Date: Thursday, August 24, 2017 at 7:20 AM
To: "O'Reilly, Darragh" , Ben Warren 

Cc: "ovs-discuss@openvswitch.org" 
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Couple of notes.

I disabled NetworkManager service. It got rid of the NetworkManager kern.log, 
but the “device ovsbr0 entered/left promiscuous mode” is still there.

Regarding creating the bridge using ovs-vsctl vs brctl, I completely removed 
the ovsbr0 bridge, removed the openvswitch 2.5.2 packages, and verified
that “brctl show” displayed nothing. Then I reinstalled the openvswitch 2.5.2 
packages and recreated the ovsbr0 bridge using ovs-vsctl.
The “brctl show” command still displays the ovsbr0 bridge, even though it was 
created with the ovs-vsctl command (re: Ben’s comment earlier in the thread).

Still getting “2017-08-24T12:11:39.089Z|385668|bridge|INFO|bridge ovsbr0: added 
interface ovsbr0 on port 65534” in the ovs-vswitchd log as well.

But disabling the NetworkManager service was a clue. The Ubuntu system I’m 
trying to fix is a hybrid of sorts. It was installed with Ubuntu Server 14.04,
but was later modified to enable graphical access through VNC (hence, 
NetworkManager being active).  It’s possible there are other elements at work,
that are related to that hybrid configuration.

The interesting part is that the system has been operating fine with 14.04 for 
3 years. It wasn’t until the upgrade to Ubuntu 16.04 that the issue began.
That upgrade took openvswitch from 2.0.2 to 2.5.2 (Ubuntu’s package versions).

Thanks for the responses.

CW

From: "O'Reilly, Darragh" 
Date: Thursday, August 24, 2017 at 2:54 AM
To: Chad Willman , Ben Warren 
Cc: "ovs-discuss@openvswitch.org" 
Subject: RE: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04


Maybe a NetworkManager problem. I would disable it completely on a server, but 
maybe you could change it to ignore OVS interfaces.

From: ovs-discuss-boun...@openvswitch.org 
[mailto:ovs-discuss-boun...@openvswitch.org] On Behalf Of Chad Willman
Sent: 23 August 2017 18:20
To: Ben Warren 
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi,

I eliminated the lxcbr0, but still have the same problem with ovs-vswitchd 
eating CPU.


cwillman@harley:~$ sudo brctl show

bridge name

bridge id STP enabled

interfaces

ovsbr0

8000.c6074be69e43  no em1

vnet0

vnet1

vnet2





kern.log is also flooding with this message - Aug 23 07:36:03 harley 
NetworkManager[2481]:   [1503491763.8976] device (ovsbr0): enslaved to 
non-master-type device ovs-system; ignoring

Aug 23 07:36:03 harley kernel: [58455.254778] device ovsbr0 entered promiscuous 
mode

Aug 23 07:36:03 harley kernel: [58455.257975] device ovsbr0 left promiscuous 
mode





Would appreciate any other suggestions.





Regards,





Chad




From: Chad W mailto:cwill...@ixiacom.com>>
Date: Wednesday, August 23, 2017 at 11:55 AM
To: Ben Warren mailto:b...@skyportsystems.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Ben and thanks for the response.

brctl shows me this -

bridge namebridge id

STP enabledinterfaces

lxcbr08000.00163e00

no

ovsbr08000.c6074be69e43

no em1

vnet0

vnet1

vnet2





The ovsbr0 bridge looks right, but the lxcbr0 should not be there.

Not sure how it got there (we have multiple admins on this system), but I’ll 
try nuking it.



Regards,



Chad




From: Ben Warren mailto:b...@skyportsystems.com>>
Date: Wednesday, August 23, 2017 at 11:43 AM
To: Chad W mailto:cwill...@ixiacom.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Chad,

I’ve seen this if regular Linux bridging is enabled.  The command ‘brctl show’ 
will display non-OVS bridges.

regards,
Ben

On Aug 23, 2017, at 9:23 AM, Chad Willman 
mailto:cwill...@ixiacom.com>> wrote:


Is there a forum specific to discing issues encountered ?

My ovs-vswitchd daemon is consuming 400% CPU and flooding ovs-vswitchd.log with 
the same message repeatedly - 
2017-08-23T16:18:28.049Z|641473|bridge|INFO|bridge ovsbr0: added interface 
ovsbr0 on port 65534

Looking for help or ideas for debugging the issue.

Thanks,

CW
___
discuss mailing list
disc...@openvswitch.org

Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to Ubuntu 16.04

2017-08-24 Thread Chad Willman
Couple of notes.

I disabled NetworkManager service. It got rid of the NetworkManager kern.log, 
but the “device ovsbr0 entered/left promiscuous mode” is still there.

Regarding creating the bridge using ovs-vsctl vs brctl, I completely removed 
the ovsbr0 bridge, removed the openvswitch 2.5.2 packages, and verified
that “brctl show” displayed nothing. Then I reinstalled the openvswitch 2.5.2 
packages and recreated the ovsbr0 bridge using ovs-vsctl.
The “brctl show” command still displays the ovsbr0 bridge, even though it was 
created with the ovs-vsctl command (re: Ben’s comment earlier in the thread).

Still getting “2017-08-24T12:11:39.089Z|385668|bridge|INFO|bridge ovsbr0: added 
interface ovsbr0 on port 65534” in the ovs-vswitchd log as well.

But disabling the NetworkManager service was a clue. The Ubuntu system I’m 
trying to fix is a hybrid of sorts. It was installed with Ubuntu Server 14.04,
but was later modified to enable graphical access through VNC (hence, 
NetworkManager being active).  It’s possible there are other elements at work,
that are related to that hybrid configuration.

The interesting part is that the system has been operating fine with 14.04 for 
3 years. It wasn’t until the upgrade to Ubuntu 16.04 that the issue began.
That upgrade took openvswitch from 2.0.2 to 2.5.2 (Ubuntu’s package versions).

Thanks for the responses.

CW

From: "O'Reilly, Darragh" 
Date: Thursday, August 24, 2017 at 2:54 AM
To: Chad Willman , Ben Warren 
Cc: "ovs-discuss@openvswitch.org" 
Subject: RE: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04


Maybe a NetworkManager problem. I would disable it completely on a server, but 
maybe you could change it to ignore OVS interfaces.

From: ovs-discuss-boun...@openvswitch.org 
[mailto:ovs-discuss-boun...@openvswitch.org] On Behalf Of Chad Willman
Sent: 23 August 2017 18:20
To: Ben Warren 
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi,

I eliminated the lxcbr0, but still have the same problem with ovs-vswitchd 
eating CPU.


cwillman@harley:~$ sudo brctl show

bridge name

bridge id STP enabled

interfaces

ovsbr0

8000.c6074be69e43  no em1

vnet0

vnet1

vnet2




kern.log is also flooding with this message - Aug 23 07:36:03 harley 
NetworkManager[2481]:   [1503491763.8976] device (ovsbr0): enslaved to 
non-master-type device ovs-system; ignoring

Aug 23 07:36:03 harley kernel: [58455.254778] device ovsbr0 entered promiscuous 
mode

Aug 23 07:36:03 harley kernel: [58455.257975] device ovsbr0 left promiscuous 
mode




Would appreciate any other suggestions.




Regards,




Chad



From: Chad W mailto:cwill...@ixiacom.com>>
Date: Wednesday, August 23, 2017 at 11:55 AM
To: Ben Warren mailto:b...@skyportsystems.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Ben and thanks for the response.

brctl shows me this -

bridge namebridge id

STP enabledinterfaces

lxcbr08000.00163e00

no

ovsbr08000.c6074be69e43

no em1

vnet0

vnet1

vnet2




The ovsbr0 bridge looks right, but the lxcbr0 should not be there.

Not sure how it got there (we have multiple admins on this system), but I’ll 
try nuking it.



Regards,



Chad



From: Ben Warren mailto:b...@skyportsystems.com>>
Date: Wednesday, August 23, 2017 at 11:43 AM
To: Chad W mailto:cwill...@ixiacom.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Chad,

I’ve seen this if regular Linux bridging is enabled.  The command ‘brctl show’ 
will display non-OVS bridges.

regards,
Ben

On Aug 23, 2017, at 9:23 AM, Chad Willman 
mailto:cwill...@ixiacom.com>> wrote:


Is there a forum specific to discing issues encountered ?

My ovs-vswitchd daemon is consuming 400% CPU and flooding ovs-vswitchd.log with 
the same message repeatedly - 
2017-08-23T16:18:28.049Z|641473|bridge|INFO|bridge ovsbr0: added interface 
ovsbr0 on port 65534

Looking for help or ideas for debugging the issue.

Thanks,

CW
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] OVS+DPDK QoS rate limit issue

2017-08-24 Thread Lance Richardson
> From: "王志克" 
> To: ovs-...@openvswitch.org, ovs-discuss@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=500
> ingress_policing_burst=50
> 
> 
> 
> 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://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to Ubuntu 16.04

2017-08-24 Thread O'Reilly, Darragh

Maybe a NetworkManager problem. I would disable it completely on a server, but 
maybe you could change it to ignore OVS interfaces.

From: ovs-discuss-boun...@openvswitch.org 
[mailto:ovs-discuss-boun...@openvswitch.org] On Behalf Of Chad Willman
Sent: 23 August 2017 18:20
To: Ben Warren 
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi,

I eliminated the lxcbr0, but still have the same problem with ovs-vswitchd 
eating CPU.


cwillman@harley:~$ sudo brctl show

bridge name

bridge id STP enabled

interfaces

ovsbr0

8000.c6074be69e43  no em1

vnet0

vnet1

vnet2



kern.log is also flooding with this message - Aug 23 07:36:03 harley 
NetworkManager[2481]:   [1503491763.8976] device (ovsbr0): enslaved to 
non-master-type device ovs-system; ignoring

Aug 23 07:36:03 harley kernel: [58455.254778] device ovsbr0 entered promiscuous 
mode

Aug 23 07:36:03 harley kernel: [58455.257975] device ovsbr0 left promiscuous 
mode



Would appreciate any other suggestions.



Regards,



Chad


From: Chad W mailto:cwill...@ixiacom.com>>
Date: Wednesday, August 23, 2017 at 11:55 AM
To: Ben Warren mailto:b...@skyportsystems.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Ben and thanks for the response.

brctl shows me this -

bridge namebridge id

STP enabledinterfaces

lxcbr08000.00163e00

no

ovsbr08000.c6074be69e43

no em1

vnet0

vnet1

vnet2



The ovsbr0 bridge looks right, but the lxcbr0 should not be there.

Not sure how it got there (we have multiple admins on this system), but I'll 
try nuking it.



Regards,



Chad


From: Ben Warren mailto:b...@skyportsystems.com>>
Date: Wednesday, August 23, 2017 at 11:43 AM
To: Chad W mailto:cwill...@ixiacom.com>>
Cc: "ovs-discuss@openvswitch.org" 
mailto:ovs-discuss@openvswitch.org>>
Subject: Re: [ovs-discuss] problem with openvswitch 2.5.2 after upgrade to 
Ubuntu 16.04

Hi Chad,

I've seen this if regular Linux bridging is enabled.  The command 'brctl show' 
will display non-OVS bridges.

regards,
Ben

On Aug 23, 2017, at 9:23 AM, Chad Willman 
mailto:cwill...@ixiacom.com>> wrote:


Is there a forum specific to discing issues encountered ?

My ovs-vswitchd daemon is consuming 400% CPU and flooding ovs-vswitchd.log with 
the same message repeatedly - 
2017-08-23T16:18:28.049Z|641473|bridge|INFO|bridge ovsbr0: added interface 
ovsbr0 on port 65534

Looking for help or ideas for debugging the issue.

Thanks,

CW
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss