[ovs-discuss] ovs route refresh problem

2018-02-22 Thread Yinpeijun

>>On Sun, Feb 11, 2018 at 07:27:34AM +, Yinpeijun wrote:
>> Hi all
>> Recently , I run a test two VM commulication with 
>> vxlan and ovs+dpdk networking(ovs2.7.2). when I add 200 virtual device 
>> on the physical service  of the commulicate vm then check the ping result,  
>> there  is  loss packet statistics. Then I use vlan and ovs+dpdk networking, 
>> do the same thing , there is no loss packets statistics.
>> I read the source code and add some log to confirm the 
>> problem,  the final problem I think is unreasonable routing refresh,  
>> in route_table_rest function delete all items before readding, so in the 
>> middle of the interval  ovs_router_lookup  can not find the route then cause 
>> packet drop.  So I think the implementation need to optimize, Any advice on 
>> how to optimize it?

>I don't fully understand your use case.  However, if you're not using DPDK, 
>then OVS isn't doing routing in userspace so this is probably not the problem.

Thank you for your replay, the test case just for reproduce the problem. The 
actual  scene is to create or migrate virtual machines in openstack env. 
Correspondence will be created linux bridge
and other virtual device.

There is also have problem in netdev dataptah without dpdk.  vxlan tunnel need 
route in userspace and ovs maintain the route table as follow:
ovs-appctl ovs/route/show
Route Table:
Cached: x.xx.1.10/32 dev eth0 SRC x.xx.1.10
Cached: 10.0.0.10/32 dev brcps SRC 10.0.0.10
Cached: 127.0.0.1/32 dev lo SRC 127.0.0.1

So when I create virtual device trigger ovs refresh the route then affect the 
already existing virtual machine communication.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Is a new field in flow.h necessary for matching on a custom v6 extension header?

2018-02-22 Thread Alan Kayahan
I understand that there must be a construct in the struct flow, and
introducing a new be32 will save the day for me. However looking at this
from a broader perspective, say matching on the fields of any v6 extension
header made into the OF specification, neither adding individual fields nor
adding every v6 extension header into the struct flow looks elegant to me.
What do you think?

2018-02-21 17:10 GMT+01:00 Ben Pfaff :

> On Mon, Feb 19, 2018 at 06:15:30PM +0100, Alan Kayahan wrote:
> > I have a custom v6 extension header, in which I would like to perform an
> > LPM match on only one 32bit field.
> >
> > Since an extension header is technically not a new field, do I still need
> > to introduce anything in the struct flow?
>
> Without anything in struct flow, how do you propose to match on it?
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] ovs-vswitchd 100% CPU in OVN scale test

2018-02-22 Thread Han Zhou
> Hi Han,
>
> If you investigate the patch you referenced, it's fairly small. It adds
an extra strcmp() call and an extra call to ofproto_port_open_type(). It's
most likely the extra call to ofproto_port_open_type() is causing the extra
CPU usage. Most of the processing done by calling it a second time is
redundant.
>
> Patch one to optimize the behavior would be to factor out the common
parts of ofproto_port_open_type() so that it may be called once. Then call
the parts that differ for each port type. This should be simple. It would
be worth testing again with this patch alone to see how much of an impact
this makes.
>
> Patch two would be to start caching results of ofproto_port_open_type()
locally since the result is not likely to differ between repeated calls.
This would be a bit trickier to make 100% correct because you would need to
be able to reliably detect when your cached value is "dirty". This patch
would be worth pursuing if patch one does not do enough on its own.
>
> Mark!

The ideas looks good. One thing I am still not clear is the trigger of this
problem. I tried repeating same add-port command in a simple sandbox, but
there is no obvious difference whether I revert the patch 8c319e8b7. The
issue is only reproduced in the scale test environment. We might need to
dig deeper into this to understand the root cause. At the same time we will
try the patch you suggested.

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


[ovs-discuss] cannot start a VM with vhostuser interfaces

2018-02-22 Thread Riccardo Ravaioli
Hi,

I'm having trouble starting a VM with vhostuser interfaces and I'm not sure
if it's due to my configuration of libvirt or of openvswitch.

I have a simple configuration where a VM running Debian has 1 vhostuser
interface plugged into an OVS switch where a DPDK interface is already
plugged in.
$ ovs-vsctl show:
Bridge "switch1"
Port "switch1"
Interface "switch1"
type: internal
Port "1.switch1"
Interface "1.switch1"
type: dpdk
options: {dpdk-devargs=":0b:00.0"}
Port "0.switch1"
Interface "0.vm"
type: dpdkvhostuserclient
options: {vhost-server-path="/opt/oa/vhost/0.vm.sock"}


The relevant excerpt from the XML of my VM is:


http://libvirt.org/schemas/domain/qemu/1.0;>
 
 
/opt/oa/bin/qemu-system-x86_64


  
  
  
  
  

  


  
  





  



Now, if I try to start my VM, I get the following error and the VM is not
started at all:
$ virsh create vm.xml
error: Failed to create domain from vm.xml
error: unsupported configuration: scripts are not supported on interfaces
of type vhostuser


The logs from libvirtd.log say:
2018-02-22 09:18:24.982+: 2033: warning :
qemuProcessStartWarnShmem:4539 : Detected vhost-user interface without any
shared memory, the interface might not be operational
2018-02-22 09:18:24.982+: 2033: error : qemuBuildHostNetStr:3894 :
unsupported configuration: scripts are not supported on interfaces of type
vhostuser

The logs from qemu simply say:
2018-02-22 09:26:15.857+: shutting down, reason=failed

And finally, ovs-vswitchd.log:
2018-02-22T09:18:24.715Z|00328|dpdk|INFO|VHOST_CONFIG: vhost-user client:
socket created, fd: 51
2018-02-22T09:18:24.716Z|00329|netdev_dpdk|INFO|vHost User device '0.vm'
created in 'client' mode, using client socket '/opt/oa/vhost/0.vm.sock'
2018-02-22T09:18:24.718Z|00330|dpdk|WARN|VHOST_CONFIG: failed to connect to
/opt/oa/vhost/0.vm.sock: No such file or directory
2018-02-22T09:18:24.718Z|00331|dpdk|INFO|VHOST_CONFIG:
/opt/oa/vhost/0.vm.sock: reconnecting...
2018-02-22T09:18:24.718Z|00332|bridge|INFO|bridge switch1: added interface
0.vm on port 5


Am I missing something on the openvswitch or on the libvirt side?

It looks like openvswitch can't find /opt/oa/vhost/0.vm.sock, but isn't
either openvswitch or libvirt in charge of creating it?
Then, I'm not too sure about the error messages in libvirtd.log...

My software versions are: libvirt 3.10.0, qemu 2.10.2, openvswitch 2.8.1
and DPDK 17.11.

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


Re: [ovs-discuss] A way to measure time packet/flow takes in EMC and dpcls cache

2018-02-22 Thread William Tu
On Thu, Feb 22, 2018 at 6:43 AM, Att Att  wrote:
> Hi guys
>
> I am looking for a way to measure latency of a packet when it goes through
> EMC and dpcls?I also want to test the time it spends in EMC and in dpcls
> tables. Please suggest me a way to do that.
>
> Thank you
>
Try ovs-appctl dpif-netdev/pmd-stats-show

# man ovs-vswitchd
 dpif-netdev/pmd-stats-show [dp]
  Shows performance statistics for each pmd thread of the
datapath dp.  The special thread ``main''
  sums up the statistics of every non pmd thread.  The sum
of ``emc  hits'',  ``masked  hits''  and
  ``miss''  is the number of packets received by the
datapath.  Cycles are counted using the TSC or
  similar facilities (when available on the platform).
To  reset  these  counters  use  dpif-net‐
  dev/pmd-stats-clear.  The  duration  of one cycle
depends on the measuring infrastructure. ``idle
  cycles'' refers to cycles spent polling devices  but
not  receiving  any  packets.  ``processing
  cycles''  refers  to  cycles  spent  polling devices and
successfully receiving packets, plus the
  cycles spent processing said packets.

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


[ovs-discuss] A way to measure time packet/flow takes in EMC and dpcls cache

2018-02-22 Thread Att Att
Hi guys

I am looking for a way to measure latency of a packet when it goes through
EMC and dpcls?I also want to test the time it spends in EMC and in dpcls
tables. Please suggest me a way to do that.

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


Re: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available

2018-02-22 Thread Avi Cohen (A)
Mark
Yes - it is there
I'll check again
Regards
Avi

> -Original Message-
> From: Kavanagh, Mark B [mailto:mark.b.kavan...@intel.com]
> Sent: Thursday, 22 February, 2018 12:03 PM
> To: Avi Cohen (A); Justin Pettit; discuss
> Subject: RE: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> 
> >From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
> >boun...@openvswitch.org] On Behalf Of Avi Cohen (A)
> >Sent: Thursday, February 22, 2018 8:17 AM
> >To: Justin Pettit ; discuss 
> >Subject: Re: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> >
> >Hi
> >I have compilation error w ovs-dpdk 2.9
> >lib/netdev-dpdk.c:29:25: fatal error: rte_bus_pci.h: No such file or
> >directory
> 
> Hi Avi,
> 
> I've just built with DPDK v17.11 and OvS v2.9.0, without issue.
> 
> Can you confirm that rte_bus_pci.h is present in $DPDK_DIR/drivers/bus/pci?
> 
> Cheers,
> Mark
> 
> 
> >
> >I have dpdk.17.11
> >Kernel 4.13.0-32
> >
> >
> >Best Regards
> >Avi
> >
> >> -Original Message-
> >> From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
> >> boun...@openvswitch.org] On Behalf Of Justin Pettit
> >> Sent: Wednesday, 21 February, 2018 12:59 AM
> >> To: discuss
> >> Subject: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> >>
> >> The Open vSwitch team is pleased to announce the release of Open
> >> vSwitch
> >> 2.9.0:
> >>
> >>  http://openvswitch.org/releases/openvswitch-2.9.0.tar.gz
> >>
> >> A few other feature highlights of 2.9.0 include:
> >>
> >>  - No longer slow-path traffic that is sent to a controller.
> >>
> >>  - The DPDK version of OVS adds support for DPDK v17.11 and vHost
> IOMMU.
> >>
> >>  - OVN adds support to send IPv6 Router Advertisement packets in
> >> response
> >to
> >>the IPv6 Router Solicitation packets from VIF ports.
> >>
> >>  - NSH support in the Linux kernel datapath.
> >>
> >>  - Support for Linux kernels up to 4.13.
> >>
> >>  - And many others.  See the full change log here:
> >>
> >>  http://openvswitch.org/releases/NEWS-2.9.0
> >>
> >> In addition to the 2.9.0 release, we've also released 2.8.2:
> >>
> >>  http://openvswitch.org/releases/openvswitch-2.8.2.tar.gz
> >>
> >> This release contains bug fixes for 2.8.1 as well as updating NSH
> >> support
> >to the
> >> latest IETF draft.
> >>
> >> We plan to release 2.9.1 in the near future that will add support for
> >clustered
> >> OVSDB using the Raft consensus algorithm.  This will be particularly
> >useful for
> >> OVN, since it will allow multiple instances of the database to be run
> >> to
> >provide
> >> better performance and reliability.
> >>
> >> Enjoy!
> >>
> >> --The Open vSwitch Team
> >>
> >> 
> >> Open vSwitch is a production quality, multilayer open source virtual
> >switch. It is
> >> designed to enable massive network automation through programmatic
> >> extension, while still supporting standard management interfaces.
> >> Open vSwitch can operate both as a soft switch running within the
> >> hypervisor,
> >and as
> >> the control stack for switching silicon. It has been ported to
> >> multiple virtualization platforms and switching chipsets.
> >>
> >>
> >> ___
> >> 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
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] REDHAT: Route issue with dpdk-bond ports

2018-02-22 Thread Vishal Deep Ajmera
Hi Flavio,

I have sent a formal patch to mailing list. Sorry for submitting a little late.

Warm Regards,
Vishal Ajmera

-Original Message-
From: ovs-discuss-boun...@openvswitch.org 
[mailto:ovs-discuss-boun...@openvswitch.org] On Behalf Of Vishal Deep Ajmera
Sent: Saturday, January 20, 2018 10:38 AM
To: Flavio Leitner 
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] REDHAT: Route issue with dpdk-bond ports

> It looks good to me. I hope it does work for any number of ports
> and doesn't show any errors.  If that's the case, please submit a
> formal patch to ovs-dev@ and don't forget to request to patch 2.9
> (if you need that) as it's branched off at this point.

Ok Flavio. I will send formal patch to ovs-dev mailing list.
___
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] Open vSwitch 2.9.0 and 2.8.2 Available

2018-02-22 Thread Kavanagh, Mark B
>From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
>boun...@openvswitch.org] On Behalf Of Avi Cohen (A)
>Sent: Thursday, February 22, 2018 8:17 AM
>To: Justin Pettit ; discuss 
>Subject: Re: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
>
>Hi
>I have compilation error w ovs-dpdk 2.9
>lib/netdev-dpdk.c:29:25: fatal error: rte_bus_pci.h: No such file or
>directory

Hi Avi,

I've just built with DPDK v17.11 and OvS v2.9.0, without issue.

Can you confirm that rte_bus_pci.h is present in $DPDK_DIR/drivers/bus/pci?

Cheers,
Mark


>
>I have dpdk.17.11
>Kernel 4.13.0-32
>
>
>Best Regards
>Avi
>
>> -Original Message-
>> From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
>> boun...@openvswitch.org] On Behalf Of Justin Pettit
>> Sent: Wednesday, 21 February, 2018 12:59 AM
>> To: discuss
>> Subject: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
>>
>> The Open vSwitch team is pleased to announce the release of Open vSwitch
>> 2.9.0:
>>
>>  http://openvswitch.org/releases/openvswitch-2.9.0.tar.gz
>>
>> A few other feature highlights of 2.9.0 include:
>>
>>  - No longer slow-path traffic that is sent to a controller.
>>
>>  - The DPDK version of OVS adds support for DPDK v17.11 and vHost IOMMU.
>>
>>  - OVN adds support to send IPv6 Router Advertisement packets in response
>to
>>the IPv6 Router Solicitation packets from VIF ports.
>>
>>  - NSH support in the Linux kernel datapath.
>>
>>  - Support for Linux kernels up to 4.13.
>>
>>  - And many others.  See the full change log here:
>>
>>  http://openvswitch.org/releases/NEWS-2.9.0
>>
>> In addition to the 2.9.0 release, we've also released 2.8.2:
>>
>>  http://openvswitch.org/releases/openvswitch-2.8.2.tar.gz
>>
>> This release contains bug fixes for 2.8.1 as well as updating NSH support
>to the
>> latest IETF draft.
>>
>> We plan to release 2.9.1 in the near future that will add support for
>clustered
>> OVSDB using the Raft consensus algorithm.  This will be particularly
>useful for
>> OVN, since it will allow multiple instances of the database to be run to
>provide
>> better performance and reliability.
>>
>> Enjoy!
>>
>> --The Open vSwitch Team
>>
>> 
>> Open vSwitch is a production quality, multilayer open source virtual
>switch. It is
>> designed to enable massive network automation through programmatic
>> extension, while still supporting standard management interfaces. Open
>> vSwitch can operate both as a soft switch running within the hypervisor,
>and as
>> the control stack for switching silicon. It has been ported to multiple
>> virtualization platforms and switching chipsets.
>>
>>
>> ___
>> 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
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available

2018-02-22 Thread Avi Cohen (A)
Ok with dpdk.18-02

> -Original Message-
> From: Avi Cohen (A)
> Sent: Thursday, 22 February, 2018 10:16 AM
> To: 'Justin Pettit'; discuss
> Subject: RE: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> 
> Hi
> I have compilation error w ovs-dpdk 2.9
> lib/netdev-dpdk.c:29:25: fatal error: rte_bus_pci.h: No such file or directory
> 
> I have dpdk.17.11
> Kernel 4.13.0-32
> 
> 
> Best Regards
> Avi
> 
> > -Original Message-
> > From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
> > boun...@openvswitch.org] On Behalf Of Justin Pettit
> > Sent: Wednesday, 21 February, 2018 12:59 AM
> > To: discuss
> > Subject: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> >
> > The Open vSwitch team is pleased to announce the release of Open
> > vSwitch
> > 2.9.0:
> >
> >  http://openvswitch.org/releases/openvswitch-2.9.0.tar.gz
> >
> > A few other feature highlights of 2.9.0 include:
> >
> >  - No longer slow-path traffic that is sent to a controller.
> >
> >  - The DPDK version of OVS adds support for DPDK v17.11 and vHost IOMMU.
> >
> >  - OVN adds support to send IPv6 Router Advertisement packets in response to
> >the IPv6 Router Solicitation packets from VIF ports.
> >
> >  - NSH support in the Linux kernel datapath.
> >
> >  - Support for Linux kernels up to 4.13.
> >
> >  - And many others.  See the full change log here:
> >
> >  http://openvswitch.org/releases/NEWS-2.9.0
> >
> > In addition to the 2.9.0 release, we've also released 2.8.2:
> >
> >  http://openvswitch.org/releases/openvswitch-2.8.2.tar.gz
> >
> > This release contains bug fixes for 2.8.1 as well as updating NSH
> > support to the latest IETF draft.
> >
> > We plan to release 2.9.1 in the near future that will add support for
> > clustered OVSDB using the Raft consensus algorithm.  This will be
> > particularly useful for OVN, since it will allow multiple instances of
> > the database to be run to provide better performance and reliability.
> >
> > Enjoy!
> >
> > --The Open vSwitch Team
> >
> > 
> > Open vSwitch is a production quality, multilayer open source virtual
> > switch. It is designed to enable massive network automation through
> > programmatic extension, while still supporting standard management
> > interfaces. Open vSwitch can operate both as a soft switch running
> > within the hypervisor, and as the control stack for switching silicon.
> > It has been ported to multiple virtualization platforms and switching 
> > chipsets.
> >
> >
> > ___
> > 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] Open vSwitch 2.9.0 and 2.8.2 Available

2018-02-22 Thread Avi Cohen (A)
Hi
I have compilation error w ovs-dpdk 2.9
lib/netdev-dpdk.c:29:25: fatal error: rte_bus_pci.h: No such file or directory

I have dpdk.17.11
Kernel 4.13.0-32


Best Regards
Avi

> -Original Message-
> From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
> boun...@openvswitch.org] On Behalf Of Justin Pettit
> Sent: Wednesday, 21 February, 2018 12:59 AM
> To: discuss
> Subject: [ovs-discuss] Open vSwitch 2.9.0 and 2.8.2 Available
> 
> The Open vSwitch team is pleased to announce the release of Open vSwitch
> 2.9.0:
> 
>  http://openvswitch.org/releases/openvswitch-2.9.0.tar.gz
> 
> A few other feature highlights of 2.9.0 include:
> 
>  - No longer slow-path traffic that is sent to a controller.
> 
>  - The DPDK version of OVS adds support for DPDK v17.11 and vHost IOMMU.
> 
>  - OVN adds support to send IPv6 Router Advertisement packets in response to
>the IPv6 Router Solicitation packets from VIF ports.
> 
>  - NSH support in the Linux kernel datapath.
> 
>  - Support for Linux kernels up to 4.13.
> 
>  - And many others.  See the full change log here:
> 
>  http://openvswitch.org/releases/NEWS-2.9.0
> 
> In addition to the 2.9.0 release, we've also released 2.8.2:
> 
>  http://openvswitch.org/releases/openvswitch-2.8.2.tar.gz
> 
> This release contains bug fixes for 2.8.1 as well as updating NSH support to 
> the
> latest IETF draft.
> 
> We plan to release 2.9.1 in the near future that will add support for 
> clustered
> OVSDB using the Raft consensus algorithm.  This will be particularly useful 
> for
> OVN, since it will allow multiple instances of the database to be run to 
> provide
> better performance and reliability.
> 
> Enjoy!
> 
> --The Open vSwitch Team
> 
> 
> Open vSwitch is a production quality, multilayer open source virtual switch. 
> It is
> designed to enable massive network automation through programmatic
> extension, while still supporting standard management interfaces. Open
> vSwitch can operate both as a soft switch running within the hypervisor, and 
> as
> the control stack for switching silicon. It has been ported to multiple
> virtualization platforms and switching chipsets.
> 
> 
> ___
> 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