Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed

2017-07-13 Thread Stuart Cardall
adding gawk to the ovs APKBUILD fixes tests 7 & 8

Stuart.


On 07/14/2017 12:46 AM, Ben Pfaff wrote:
> On Mon, Jul 10, 2017 at 01:14:38PM -0400, Lance Richardson wrote:
>>> From: "Stuart Cardall" 
>>> To: b...@openvswitch.org
>>> Sent: Saturday, 8 July, 2017 5:22:17 PM
>>> Subject: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 
>>> 1892 1893 1894 1895 1896 1900 1902 failed
>>>
>>>
>>>
>>> Hello,
>>>
>>> Attached is the test suite log for ovs 2.7.1 in Alpine Linux / musl c:
>>>
>>> testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed
>>>
>>>
>>> Kind Regards,
>>>
>>> Stuart Cardall.
>>>
>> These will pass if GNU awk is used instead of busybox awk (apk add gawk).
>>
>>7: completion.at:343  vsctl-bashcomp - basic verification
>>8: completion.at:425  vsctl-bashcomp - argument completion
> That's interesting.  I thought I'd try to figure out the root of the
> problem, but I don't get failures in my usual environment if I replace
> "awk" by "busybox awk" and run these tests, so I wonder whether there's
> something else at play.

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


Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed

2017-07-13 Thread Ben Pfaff
On Thu, Jul 13, 2017 at 08:34:30PM -0400, Lance Richardson wrote:
> > From: "Lance Richardson" 
> > To: "Ben Pfaff" 
> > Cc: develo...@it-offshore.co.uk, b...@openvswitch.org
> > Sent: Thursday, 13 July, 2017 8:12:30 PM
> > Subject: Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 
> > 1891 1892 1893 1894 1895 1896 1900 1902
> > failed
> > 
> > > From: "Ben Pfaff" 
> > > To: "Lance Richardson" 
> > > Cc: develo...@it-offshore.co.uk, b...@openvswitch.org
> > > Sent: Thursday, 13 July, 2017 7:46:13 PM
> > > Subject: Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767
> > > 1891 1892 1893 1894 1895 1896 1900 1902
> > > failed
> > > 
> > > On Mon, Jul 10, 2017 at 01:14:38PM -0400, Lance Richardson wrote:
> > > > > From: "Stuart Cardall" 
> > > > > To: b...@openvswitch.org
> > > > > Sent: Saturday, 8 July, 2017 5:22:17 PM
> > > > > Subject: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767
> > > > > 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > > > 
> > > > > 
> > > > > 
> > > > > Hello,
> > > > > 
> > > > > Attached is the test suite log for ovs 2.7.1 in Alpine Linux / musl c:
> > > > > 
> > > > > testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > > > 
> > > > > 
> > > > > Kind Regards,
> > > > > 
> > > > > Stuart Cardall.
> > > > > 
> > > > 
> > > > These will pass if GNU awk is used instead of busybox awk (apk add 
> > > > gawk).
> > > > 
> > > >7: completion.at:343  vsctl-bashcomp - basic verification
> > > >8: completion.at:425  vsctl-bashcomp - argument completion
> > > 
> > > That's interesting.  I thought I'd try to figure out the root of the
> > > problem, but I don't get failures in my usual environment if I replace
> > > "awk" by "busybox awk" and run these tests, so I wonder whether there's
> > > something else at play.
> > > 
> > 
> > I just tried that (s/awk/busybox awk/ in utilities/ovs-vsctl-bashcomp.bash)
> > and got failures in those tests with similar symptom (no completions given).
> > 
> > This was on F26, x86_64, with busybox-1.22.1-6.
> > 
> > Strange... no idea. I did find a nice wiki explaining some differences
> > between
> > busybox awk and some other implementations:
> > 
> > https://wiki.alpinelinux.org/wiki/Awk
> > 
> 
> One more tidbit... if I use busybox awk here, I get failures, otherwise I
> don't (the other invocations of awk in this script work either way):
> 
> # This is a convenience function to make sure that user input is
> # looked at as a fixed string when being compared to something.  $1 is
> # the input; this behaves like 'grep "^$1"' but deals with regex
> # metacharacters in $1.
> _ovs_vsctl_check_startswith_string () {
> awk 'index($0, thearg)==1' thearg="$1"
> }
> 
> The extent of my awk knowledge is knowing where the name comes from, so
> I have no idea what might causing the problem here or what alternative
> implementations might be worth trying...

I missed that invocation.

After some experimentation, I found the problem:
https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335522.html
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] When did vlan tag add into packet in ovs and ovs-dpdk?

2017-07-13 Thread Sam
Sorry, Add a question:

3. I start to capture packets in b2 port on br_t07, when I use vm(121) to
ping vm(120), I could not capture any packets(including arp); when I use
vm(121) to ping vm(220), I could capture it; when I use vm(121) to ping
unknown host like 123, I could not capture any thing.
Why no thing when I ping unknown host?

2017-07-14 9:46 GMT+08:00 Sam :

> Hi all,
>
> I'm testing vlan in both ovs and ovs-dpdk. My topology is:
>
> vm(121) vm(120)   vm(220)
> |  |   |
>---
>  --
>br_t07| b2   b2 |  br_t08
> --
>
> I set vlan 1020 by `ovs-vsctl set vm121 tag 1020` in br_t07's vm(121) port
> and vm(120) port, so the vm(121) could ping through vm(120).
>
> I set no vlan tag on vm(220), so vm(121) could not ping through vm(220).
>
> For normal ovs, vm(121) etc port is internal type, b2 is bond port; for
> ovs-dpdk it's dpdkvhostuser type, b2 is dpdk bond port.
>
> Now I use ovs-dump tool to capture packets in br_t07's b2, and I can's
> capture packets with vlan 1020 tag; and I use gdb to debug, also I can't
> get it.
>
> My question is:
> 1. In normal ovs, where or which function is to add vlan tag onto packet?
> I think it's in datapath?
> 2. This is important, in ovs-dpdk, where or which function is to add vlan
> tag onto packet? I think it's in pmd?
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] When did vlan tag add into packet in ovs and ovs-dpdk?

2017-07-13 Thread Sam
For hardware switch, a port with vlan 1020, it's behavior is:

1. packet come into port will set vlan tag 1020 in switch, and then send it.
2. only packet with vlan 1020 will come out from this port.

So I don't know if ovs works like this?

2017-07-14 9:46 GMT+08:00 Sam :

> Hi all,
>
> I'm testing vlan in both ovs and ovs-dpdk. My topology is:
>
> vm(121) vm(120)   vm(220)
> |  |   |
>---
>  --
>br_t07| b2   b2 |  br_t08
> --
>
> I set vlan 1020 by `ovs-vsctl set vm121 tag 1020` in br_t07's vm(121) port
> and vm(120) port, so the vm(121) could ping through vm(120).
>
> I set no vlan tag on vm(220), so vm(121) could not ping through vm(220).
>
> For normal ovs, vm(121) etc port is internal type, b2 is bond port; for
> ovs-dpdk it's dpdkvhostuser type, b2 is dpdk bond port.
>
> Now I use ovs-dump tool to capture packets in br_t07's b2, and I can's
> capture packets with vlan 1020 tag; and I use gdb to debug, also I can't
> get it.
>
> My question is:
> 1. In normal ovs, where or which function is to add vlan tag onto packet?
> I think it's in datapath?
> 2. This is important, in ovs-dpdk, where or which function is to add vlan
> tag onto packet? I think it's in pmd?
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] When did vlan tag add into packet in ovs and ovs-dpdk?

2017-07-13 Thread Sam
Hi all,

I'm testing vlan in both ovs and ovs-dpdk. My topology is:

vm(121) vm(120)   vm(220)
|  |   |
   -----
   br_t07| b2   b2 |  br_t08
--

I set vlan 1020 by `ovs-vsctl set vm121 tag 1020` in br_t07's vm(121) port
and vm(120) port, so the vm(121) could ping through vm(120).

I set no vlan tag on vm(220), so vm(121) could not ping through vm(220).

For normal ovs, vm(121) etc port is internal type, b2 is bond port; for
ovs-dpdk it's dpdkvhostuser type, b2 is dpdk bond port.

Now I use ovs-dump tool to capture packets in br_t07's b2, and I can's
capture packets with vlan 1020 tag; and I use gdb to debug, also I can't
get it.

My question is:
1. In normal ovs, where or which function is to add vlan tag onto packet? I
think it's in datapath?
2. This is important, in ovs-dpdk, where or which function is to add vlan
tag onto packet? I think it's in pmd?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed

2017-07-13 Thread Lance Richardson
> From: "Lance Richardson" 
> To: "Ben Pfaff" 
> Cc: develo...@it-offshore.co.uk, b...@openvswitch.org
> Sent: Thursday, 13 July, 2017 8:12:30 PM
> Subject: Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 
> 1891 1892 1893 1894 1895 1896 1900 1902
> failed
> 
> > From: "Ben Pfaff" 
> > To: "Lance Richardson" 
> > Cc: develo...@it-offshore.co.uk, b...@openvswitch.org
> > Sent: Thursday, 13 July, 2017 7:46:13 PM
> > Subject: Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767
> > 1891 1892 1893 1894 1895 1896 1900 1902
> > failed
> > 
> > On Mon, Jul 10, 2017 at 01:14:38PM -0400, Lance Richardson wrote:
> > > > From: "Stuart Cardall" 
> > > > To: b...@openvswitch.org
> > > > Sent: Saturday, 8 July, 2017 5:22:17 PM
> > > > Subject: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767
> > > > 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > > 
> > > > 
> > > > 
> > > > Hello,
> > > > 
> > > > Attached is the test suite log for ovs 2.7.1 in Alpine Linux / musl c:
> > > > 
> > > > testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > > 
> > > > 
> > > > Kind Regards,
> > > > 
> > > > Stuart Cardall.
> > > > 
> > > 
> > > These will pass if GNU awk is used instead of busybox awk (apk add gawk).
> > > 
> > >7: completion.at:343  vsctl-bashcomp - basic verification
> > >8: completion.at:425  vsctl-bashcomp - argument completion
> > 
> > That's interesting.  I thought I'd try to figure out the root of the
> > problem, but I don't get failures in my usual environment if I replace
> > "awk" by "busybox awk" and run these tests, so I wonder whether there's
> > something else at play.
> > 
> 
> I just tried that (s/awk/busybox awk/ in utilities/ovs-vsctl-bashcomp.bash)
> and got failures in those tests with similar symptom (no completions given).
> 
> This was on F26, x86_64, with busybox-1.22.1-6.
> 
> Strange... no idea. I did find a nice wiki explaining some differences
> between
> busybox awk and some other implementations:
> 
> https://wiki.alpinelinux.org/wiki/Awk
> 

One more tidbit... if I use busybox awk here, I get failures, otherwise I
don't (the other invocations of awk in this script work either way):

# This is a convenience function to make sure that user input is
# looked at as a fixed string when being compared to something.  $1 is
# the input; this behaves like 'grep "^$1"' but deals with regex
# metacharacters in $1.
_ovs_vsctl_check_startswith_string () {
awk 'index($0, thearg)==1' thearg="$1"
}

The extent of my awk knowledge is knowing where the name comes from, so
I have no idea what might causing the problem here or what alternative
implementations might be worth trying...

Regards,

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


Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed

2017-07-13 Thread Lance Richardson
> From: "Ben Pfaff" 
> To: "Lance Richardson" 
> Cc: develo...@it-offshore.co.uk, b...@openvswitch.org
> Sent: Thursday, 13 July, 2017 7:46:13 PM
> Subject: Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 
> 1891 1892 1893 1894 1895 1896 1900 1902
> failed
> 
> On Mon, Jul 10, 2017 at 01:14:38PM -0400, Lance Richardson wrote:
> > > From: "Stuart Cardall" 
> > > To: b...@openvswitch.org
> > > Sent: Saturday, 8 July, 2017 5:22:17 PM
> > > Subject: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767
> > > 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > 
> > > 
> > > 
> > > Hello,
> > > 
> > > Attached is the test suite log for ovs 2.7.1 in Alpine Linux / musl c:
> > > 
> > > testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > > 
> > > 
> > > Kind Regards,
> > > 
> > > Stuart Cardall.
> > > 
> > 
> > These will pass if GNU awk is used instead of busybox awk (apk add gawk).
> > 
> >7: completion.at:343  vsctl-bashcomp - basic verification
> >8: completion.at:425  vsctl-bashcomp - argument completion
> 
> That's interesting.  I thought I'd try to figure out the root of the
> problem, but I don't get failures in my usual environment if I replace
> "awk" by "busybox awk" and run these tests, so I wonder whether there's
> something else at play.
> 

I just tried that (s/awk/busybox awk/ in utilities/ovs-vsctl-bashcomp.bash)
and got failures in those tests with similar symptom (no completions given).

This was on F26, x86_64, with busybox-1.22.1-6.

Strange... no idea. I did find a nice wiki explaining some differences between
busybox awk and some other implementations:

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


Re: [ovs-discuss] building from source / ovs-dpctl-top crash

2017-07-13 Thread Ben Pfaff
On Mon, Jul 10, 2017 at 04:21:36PM -0400, Blue Lang wrote:
> New to the list. My company is building an (awesome) industrial security
> networking platform and OVS is a big part of the solution, so thank you all
> for your work.
> 
> I'd like to use ovs-dpctl-top as part of our testing suite, but it is
> crashing on launch. I built it and mininet from scratch/TOT to be sure it
> wasn't an old bug. I have two suggestions for the build scripts, and the
> error I'm seeing with -top.
> 
> 
>- Should make install create /usr/local/var/run/openvswitch by default?
>Right now this is a needless manual step.

ovs-ctl will create this before it starts any daemon, and the distro
packages also create it, so it's usually not necessary.

>- Can ovsdb-server create a symlink to db.sock to avoid requiring
> "--remote=punix:/usr/local/var/run/openvswitch/db.sock" in what seems to
>be the default invocation? All of the related tools seem to want to use
>db.sock rather than the instantiation-specific socket.

What symlink do you mean?  I don't know of installations that use a
symlink here.

> Sorry if I misunderstood the operation of either of the above - this is
> just based on my experience today building it for the first time.
> 
> -top dies with the following stack trace the moment mininet instantiates:
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 1290, in 
> 
> sys.exit(main())
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 1282, in main
> 
> flows_top(args)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 1191, in flows_top
> 
> flows_read(ihdl, flow_db)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 593, in flows_read
> 
> flow_db.flow_line_add(line)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 988, in flow_line_add
> 
> self.flow_event(fields_dict, stats_old_dict, stats_dict)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 1080, in flow_event
> 
> matches = flow_aggregate(fields_dict, stats_new_dict)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 576, in flow_aggregate
> 
> field, stats_dict)
> 
>   File "/usr/local/bin/ovs-dpctl-top", line 268, in element_ipv6_get
> 
> element_show = fmt % (field_type, element["src"], element["dst"])
> 
> KeyError: 'src'
> 
> If this is not a known error I can spend some time debugging it.

I think that ovs-dpctl-top is probably not used very much.  Maybe bugs
have crept in because no one is using it.  If you find the problem and
fix it, please pass it along.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed

2017-07-13 Thread Ben Pfaff
On Mon, Jul 10, 2017 at 01:14:38PM -0400, Lance Richardson wrote:
> > From: "Stuart Cardall" 
> > To: b...@openvswitch.org
> > Sent: Saturday, 8 July, 2017 5:22:17 PM
> > Subject: [ovs-discuss] Subject: [openvswitch 2.7.1] testsuite: 7 8 767 1891 
> > 1892 1893 1894 1895 1896 1900 1902 failed
> > 
> > 
> > 
> > Hello,
> > 
> > Attached is the test suite log for ovs 2.7.1 in Alpine Linux / musl c:
> > 
> > testsuite: 7 8 767 1891 1892 1893 1894 1895 1896 1900 1902 failed
> > 
> > 
> > Kind Regards,
> > 
> > Stuart Cardall.
> > 
> 
> These will pass if GNU awk is used instead of busybox awk (apk add gawk).
> 
>7: completion.at:343  vsctl-bashcomp - basic verification
>8: completion.at:425  vsctl-bashcomp - argument completion

That's interesting.  I thought I'd try to figure out the root of the
problem, but I don't get failures in my usual environment if I replace
"awk" by "busybox awk" and run these tests, so I wonder whether there's
something else at play.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Could anyone tell me whether there is a buffer between M2 and vswitchd?

2017-07-13 Thread Ben Pfaff
On Fri, Jul 14, 2017 at 12:56:28AM +0530, Numan Siddique wrote:
> On Fri, Jul 14, 2017 at 12:21 AM, Ben Pfaff  wrote:
> 
> > On Thu, Jul 13, 2017 at 04:13:33PM +0800, 杨润垲 wrote:
> > > hi all,
> > > Recently, I analyze the performance of Open vSwitch. By reading the
> > source code, I abstract the packet-receiving process as the model of Fig.1.
> > Queue1 (denoting NIC DMA) is a buffer that stores the incoming packets. M1
> > processes the packets, and looks up the flow table to match an entry. If
> > the match fails, the packet is sent to Queue2 in order to be handled by
> > ovs-vswitchd. If successful, the packet will be sent out by M2, which
> > finishes the left processing.
> > > Please help me regarding this.
> >
> > What's your question?
> >
> 
> Looks like the question is in the attached pdf file - question.pdf
> 
> 
> Could anyone tell me whether there is a buffer between M2 and vswitchd?
> Recently, I analyze the performance of Open vSwitch. By reading the source
> code, I
> abstract the packet-receiving process as the model of Fig.1. Queue1
> (denoting NIC DMA) is
> a buffer that stores the incoming packets. M1 processes the packets, and
> looks up the flow
> table to match an entry. If the match fails, the packet is sent to Queue2
> in order to be handled
> by ovs-vswitchd. If successful, the packet will be sent out by M2, which
> finishes the left
> processing.

There's no buffer.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Could anyone tell me whether there is a buffer between M2 and vswitchd?

2017-07-13 Thread Numan Siddique
On Fri, Jul 14, 2017 at 12:21 AM, Ben Pfaff  wrote:

> On Thu, Jul 13, 2017 at 04:13:33PM +0800, 杨润垲 wrote:
> > hi all,
> > Recently, I analyze the performance of Open vSwitch. By reading the
> source code, I abstract the packet-receiving process as the model of Fig.1.
> Queue1 (denoting NIC DMA) is a buffer that stores the incoming packets. M1
> processes the packets, and looks up the flow table to match an entry. If
> the match fails, the packet is sent to Queue2 in order to be handled by
> ovs-vswitchd. If successful, the packet will be sent out by M2, which
> finishes the left processing.
> > Please help me regarding this.
>
> What's your question?
>

Looks like the question is in the attached pdf file - question.pdf


Could anyone tell me whether there is a buffer between M2 and vswitchd?
Recently, I analyze the performance of Open vSwitch. By reading the source
code, I
abstract the packet-receiving process as the model of Fig.1. Queue1
(denoting NIC DMA) is
a buffer that stores the incoming packets. M1 processes the packets, and
looks up the flow
table to match an entry. If the match fails, the packet is sent to Queue2
in order to be handled
by ovs-vswitchd. If successful, the packet will be sent out by M2, which
finishes the left
processing.


Numan


___
> 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-dev] how to get packet information in ovs-dpdk?

2017-07-13 Thread Ben Pfaff
Now I see that you're reporting a bug in "ovs-dpdk", not in Open
vSwitch.  You should report that bug to an ovs-dpdk mailing list.

On Thu, Jul 13, 2017 at 03:24:40PM +0800, Sam wrote:
> Yes it is.
> 
> I'm also confused, as when I use normal kernel based ovs-2.3.0, `ovs-ofctl
> snoop br0` works good and will not quit.
> 
> 2017-07-12 23:24 GMT+08:00 Ben Pfaff :
> 
> > On Wed, Jul 12, 2017 at 04:21:04PM +0800, Sam wrote:
> > > hi all,
> > >
> > > I'm running ovs-dpdk(ovs-2.4.9), I found the counter of bond port of br_t
> > > is increasing, but I want to know what's these packets, how could I do
> > this?
> > >
> > > first, I use `ovs-ofctl snoop br_t`, but it quit quickly as below:
> > >
> > > > [root@yf-mos-test-net07 ~]# /usr/local/bin/ovs-ofctl snoop
> > > > /usr/local/var/run/openvswitch/br_t.mgmt
> > > > [root@yf-mos-test-net07 ~]# /usr/local/bin/ovs-ofctl snoop
> > > > /usr/local/var/run/openvswitch/br_t.mgmt
> > > > ovs-ofctl: /usr/local/var/run/openvswitch/ovs-ofctl.pid: already
> > running
> > > > as pid 22082, aborting
> >
> > That is a strange message.  It should only appear if you use --pidfile
> > and --daemon and there's already an ovs-ofctl running that way.  Is the
> > above the complete context from your session?
> >
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Could anyone tell me whether there is a buffer between M2 and vswitchd?

2017-07-13 Thread Ben Pfaff
On Thu, Jul 13, 2017 at 04:13:33PM +0800, 杨润垲 wrote:
> hi all,
> Recently, I analyze the performance of Open vSwitch. By reading the source 
> code, I abstract the packet-receiving process as the model of Fig.1. Queue1 
> (denoting NIC DMA) is a buffer that stores the incoming packets. M1 processes 
> the packets, and looks up the flow table to match an entry. If the match 
> fails, the packet is sent to Queue2 in order to be handled by ovs-vswitchd. 
> If successful, the packet will be sent out by M2, which finishes the left 
> processing.
> Please help me regarding this.

What's your question?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot match correct ethertype after POP vlan and GOTO table

2017-07-13 Thread Ben Pfaff
On Tue, Jul 04, 2017 at 03:27:50PM +0800, Dickens Yeh wrote:
> Hi,
> I have an question, and I haven't found any OpenFlow Spec to defined it ,
> please give me a help.
> 
> I am trying to work with 3 vlan tags, but it cannot match correct ethertype
> after pop 1 vlan tag.
> OVS Bridge already set with vlan-limit = 0, and it can watch over 2 vlan
> and match the correct ethertype like ARP.
> 
> My question is:  the packet have 3 vlan tags, pop 1 vlan tag and goto-table
> 1. In table 1, will it match with the new packet (modified) or the original
> packet like in table 0?

The OVS documentation says:

   other_config  :  vlan-limit: optional string, containing an integer, at
   least 0
  Limits the number of VLAN headers that can  be  matched  to  the
  specified  number.  Further VLAN headers will be treated as pay‐
  load, e.g. a packet with more 802.1q headers will match Ethernet
  type 0x8100.

  Value  0  means  unlimited.  The actual number of supported VLAN
  headers is the smallest of vlan-limit, the number of VLANs  sup‐
  ported  by  Open vSwitch userspace (currently 2), and the number
  supported by the datapath.

  If this value is absent, the default is currently 1. This  main‐
  tains backward compatibility with controllers that were designed
  for use with Open vSwitch versions earlier than 2.8, which  only
  supported one VLAN.

It's not clear to me whether you're describing a bug.  Does OVS behavior
differ from what is documented abovve?
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Ben Pfaff
Sure, send a patch to add a configuration option.

On Thu, Jul 13, 2017 at 05:41:11PM +, Rana, JaiSingh wrote:
> Hi Ben, 
> Sorry for the confusion. I meant ovn-controller invocation of function for 
> pushing open-flows   from southdb to vswitchd which is running in nic using 
> tcp connection and I agree with Lance that using external-ids for this 
> purpose might be better idea.
> Also for now, only this assumption i.e. ovn-controller and vswitchd are 
> running on same host is blocking me. As as a proof of concept, i hardcoded 
> tcp connection instead of unix socket file in ovn and now flows are getting 
> updated in vswitchd. 
> Other configuration change that is done is to setup OF controller on 
> integration bridge with ptcp instead of tcp method. 
> 
> Thanks,
> Jai
> 
> 
> On July 13, 2017 10:35:07 PM Ben Pfaff  wrote:
> 
> > On Thu, Jul 13, 2017 at 12:53:11PM -0400, Lance Richardson wrote:
> >> > From: "Ben Pfaff" 
> >> > To: "Lance Richardson" 
> >> > Cc: "JaiSingh Rana" , 
> >> > ovs-discuss@openvswitch.org
> >> > Sent: Thursday, 13 July, 2017 12:47:47 PM
> >> > Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
> >> > ovs-ofctl invocation.
> >> > 
> >> > On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
> >> > > > From: "JaiSingh Rana" 
> >> > > > To: ovs-discuss@openvswitch.org
> >> > > > Sent: Thursday, 13 July, 2017 3:49:15 AM
> >> > > > Subject: [ovs-discuss] Remote connection method for ovn-controller
> >> > > > ovs-ofctlinvocation.
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > Hi,
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
> >> > > > method
> >> > > > for ovs-ofctl invokation as unix:file as assumption is there will be 
> >> > > > unix
> >> > > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
> >> > > > bridge
> >> > > > e.g. br-int.mgmt
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > There is an issue in our Openvswitch offload model where vswitchd is
> >> > > > running
> >> > > > on nic and ovn-controller on host. As there is no option for telling
> >> > > > ovn-controller to use tcp:port connection method for ovs-ofctl , 
> >> > > > flows
> >> > > > are
> >> > > > not being pushed to vswitchd.
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > For providing the patch, need some input. Should connection method be
> >> > > > provided as an argument to ovn-controller or it can be written to
> >> > > > /etc/sysconfig/openvswitch from where ovn-controller can read and 
> >> > > > use if
> >> > > > option is present otherwise it defaults to unix file method.
> >> > > > 
> >> > > > 
> >> > > 
> >> > > My suggestion would be to use external-ids in the local ovsdb, as is
> >> > > currently done for ovn-remote and ovn-encap. Maybe something like:
> >> > > 
> >> > > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
> >> > 
> >> > Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
> >> > ovs-ofctl.
> >> > 
> >> 
> >> Well, I'm terrible with naming things, and should have added a comment to 
> >> that
> >> effect :-) 
> >> 
> >> My rationale for "ovn-ofctl" was shallowly based on the the related file,
> >> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
> >> 
> >> What would be a more appropriate name?
> >
> > I really should have directed that to the original poster, since he
> > suggested that ovs-ofctl was involved.
> >
> > Probably, something that used words like "switch", "openflow", "remote",
> > "connection", "ovs", etc., like "ovn-switch-connection".
> >
> > However, this is not going to be the only problem that the OP will
> > encounter, since ovn-controller makes other assumptions that it is
> > running on the ovs-switchd host.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Hi Ben, 
Sorry for the confusion. I meant ovn-controller invocation of function for 
pushing open-flows   from southdb to vswitchd which is running in nic using tcp 
connection and I agree with Lance that using external-ids for this purpose 
might be better idea.
Also for now, only this assumption i.e. ovn-controller and vswitchd are running 
on same host is blocking me. As as a proof of concept, i hardcoded tcp 
connection instead of unix socket file in ovn and now flows are getting updated 
in vswitchd. 
Other configuration change that is done is to setup OF controller on 
integration bridge with ptcp instead of tcp method. 

Thanks,
Jai


On July 13, 2017 10:35:07 PM Ben Pfaff  wrote:

> On Thu, Jul 13, 2017 at 12:53:11PM -0400, Lance Richardson wrote:
>> > From: "Ben Pfaff" 
>> > To: "Lance Richardson" 
>> > Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
>> > Sent: Thursday, 13 July, 2017 12:47:47 PM
>> > Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
>> > ovs-ofctl   invocation.
>> > 
>> > On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
>> > > > From: "JaiSingh Rana" 
>> > > > To: ovs-discuss@openvswitch.org
>> > > > Sent: Thursday, 13 July, 2017 3:49:15 AM
>> > > > Subject: [ovs-discuss] Remote connection method for ovn-controller
>> > > > ovs-ofctl  invocation.
>> > > > 
>> > > > 
>> > > > 
>> > > > Hi,
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
>> > > > method
>> > > > for ovs-ofctl invokation as unix:file as assumption is there will be 
>> > > > unix
>> > > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
>> > > > bridge
>> > > > e.g. br-int.mgmt
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > There is an issue in our Openvswitch offload model where vswitchd is
>> > > > running
>> > > > on nic and ovn-controller on host. As there is no option for telling
>> > > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
>> > > > are
>> > > > not being pushed to vswitchd.
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > For providing the patch, need some input. Should connection method be
>> > > > provided as an argument to ovn-controller or it can be written to
>> > > > /etc/sysconfig/openvswitch from where ovn-controller can read and use 
>> > > > if
>> > > > option is present otherwise it defaults to unix file method.
>> > > > 
>> > > > 
>> > > 
>> > > My suggestion would be to use external-ids in the local ovsdb, as is
>> > > currently done for ovn-remote and ovn-encap. Maybe something like:
>> > > 
>> > > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
>> > 
>> > Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
>> > ovs-ofctl.
>> > 
>> 
>> Well, I'm terrible with naming things, and should have added a comment to 
>> that
>> effect :-) 
>> 
>> My rationale for "ovn-ofctl" was shallowly based on the the related file,
>> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
>> 
>> What would be a more appropriate name?
>
> I really should have directed that to the original poster, since he
> suggested that ovs-ofctl was involved.
>
> Probably, something that used words like "switch", "openflow", "remote",
> "connection", "ovs", etc., like "ovn-switch-connection".
>
> However, this is not going to be the only problem that the OP will
> encounter, since ovn-controller makes other assumptions that it is
> running on the ovs-switchd host.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] How to add real NIC interfaces into OpenStack Network

2017-07-13 Thread Ali Volkan Atli
Hi

Actually, I'm not sure it is the right place to ask the question but I hope 
someone enlighten me.

First, I did ./stack from devstack using local.conf below 

[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

NEUTRON_CREATE_INITIAL_NETWORKS=False

I was hoping the OVS would not create any bridges, but there are several 
bridges as below. Even more interesting, I do not see any network on the 
dashboard (whatever admin or demo users). I think it is strange. Is there any 
explanation for that?

stack@cloud:~/devstack$ sudo ovs-vsctl show
a78a396a-c697-4e69-a615-fa77df2be2b1
Manager "ptcp:6640:127.0.0.1"
is_connected: true
Bridge br-int
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
Port br-int
Interface br-int
type: internal
Port patch-tun
Interface patch-tun
type: patch
options: {peer=patch-int}
Port int-br-ex
Interface int-br-ex
type: patch
options: {peer=phy-br-ex}
Bridge br-ex
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
Port br-ex
Interface br-ex
type: internal
Port phy-br-ex
Interface phy-br-ex
type: patch
options: {peer=int-br-ex}
Bridge br-tun
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-tun}
Port br-tun
Interface br-tun
type: internal
ovs_version: "2.6.1"

Second, I created a local network (openstack network create local_net 
--provider-network-type local) and I have multiple real NIC interfaces and I'd 
like to add the real NIC interfaces as a port into local network. But I did not 
see any example/tutorial etc.. for my issue. I will use "ovs-vsctl add-port" to 
add it my local_net created from openstack, but I don't know how to see it in 
OvS. What is local_net's counterpart in OVS? How can I add real NIC interfaces 
into local network and also local instances. I want to communicate my external 
laptop with an openstack instance via devstack-neutron.

Thanks in advance

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


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Ben Pfaff
No, it doesn't.  I wrote this code and I know.

On Thu, Jul 13, 2017 at 05:12:28PM +, Rana, JaiSingh wrote:
> Ben,
> ovn-controller does invoke ovs-ofctl to push flows to vswitchd in 
> ovn/controller/ofctrl.c and ovn/controller/pinctrl.c
> 
>  Therefore I guess naming this external id(TODO)as ovn-ofctl does make some 
> sense. 
> 
> Thanks,
> Jai
> 
> 
> 
> 
> 
> On July 13, 2017 10:23:14 PM Lance Richardson  wrote:
> 
> >> From: "Ben Pfaff" 
> >> To: "Lance Richardson" 
> >> Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
> >> Sent: Thursday, 13 July, 2017 12:47:47 PM
> >> Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
> >> ovs-ofctl   invocation.
> >> 
> >> On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
> >> > > From: "JaiSingh Rana" 
> >> > > To: ovs-discuss@openvswitch.org
> >> > > Sent: Thursday, 13 July, 2017 3:49:15 AM
> >> > > Subject: [ovs-discuss] Remote connection method for ovn-controller
> >> > > ovs-ofctl  invocation.
> >> > > 
> >> > > 
> >> > > 
> >> > > Hi,
> >> > > 
> >> > > 
> >> > > 
> >> > > 
> >> > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
> >> > > method
> >> > > for ovs-ofctl invokation as unix:file as assumption is there will be 
> >> > > unix
> >> > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
> >> > > bridge
> >> > > e.g. br-int.mgmt
> >> > > 
> >> > > 
> >> > > 
> >> > > 
> >> > > There is an issue in our Openvswitch offload model where vswitchd is
> >> > > running
> >> > > on nic and ovn-controller on host. As there is no option for telling
> >> > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
> >> > > are
> >> > > not being pushed to vswitchd.
> >> > > 
> >> > > 
> >> > > 
> >> > > 
> >> > > For providing the patch, need some input. Should connection method be
> >> > > provided as an argument to ovn-controller or it can be written to
> >> > > /etc/sysconfig/openvswitch from where ovn-controller can read and use 
> >> > > if
> >> > > option is present otherwise it defaults to unix file method.
> >> > > 
> >> > > 
> >> > 
> >> > My suggestion would be to use external-ids in the local ovsdb, as is
> >> > currently done for ovn-remote and ovn-encap. Maybe something like:
> >> > 
> >> > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
> >> 
> >> Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
> >> ovs-ofctl.
> >> 
> >
> > Well, I'm terrible with naming things, and should have added a comment to 
> > that
> > effect :-) 
> >
> > My rationale for "ovn-ofctl" was shallowly based on the the related file,
> > ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
> >
> > What would be a more appropriate name?
> >
> > Thanks,
> >Lance
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Ben,
ovn-controller does invoke ovs-ofctl to push flows to vswitchd in 
ovn/controller/ofctrl.c and ovn/controller/pinctrl.c

 Therefore I guess naming this external id(TODO)as ovn-ofctl does make some 
sense. 

Thanks,
Jai





On July 13, 2017 10:23:14 PM Lance Richardson  wrote:

>> From: "Ben Pfaff" 
>> To: "Lance Richardson" 
>> Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
>> Sent: Thursday, 13 July, 2017 12:47:47 PM
>> Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
>> ovs-ofctl invocation.
>> 
>> On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
>> > > From: "JaiSingh Rana" 
>> > > To: ovs-discuss@openvswitch.org
>> > > Sent: Thursday, 13 July, 2017 3:49:15 AM
>> > > Subject: [ovs-discuss] Remote connection method for ovn-controller
>> > > ovs-ofctlinvocation.
>> > > 
>> > > 
>> > > 
>> > > Hi,
>> > > 
>> > > 
>> > > 
>> > > 
>> > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
>> > > method
>> > > for ovs-ofctl invokation as unix:file as assumption is there will be unix
>> > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
>> > > bridge
>> > > e.g. br-int.mgmt
>> > > 
>> > > 
>> > > 
>> > > 
>> > > There is an issue in our Openvswitch offload model where vswitchd is
>> > > running
>> > > on nic and ovn-controller on host. As there is no option for telling
>> > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
>> > > are
>> > > not being pushed to vswitchd.
>> > > 
>> > > 
>> > > 
>> > > 
>> > > For providing the patch, need some input. Should connection method be
>> > > provided as an argument to ovn-controller or it can be written to
>> > > /etc/sysconfig/openvswitch from where ovn-controller can read and use if
>> > > option is present otherwise it defaults to unix file method.
>> > > 
>> > > 
>> > 
>> > My suggestion would be to use external-ids in the local ovsdb, as is
>> > currently done for ovn-remote and ovn-encap. Maybe something like:
>> > 
>> > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
>> 
>> Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
>> ovs-ofctl.
>> 
>
> Well, I'm terrible with naming things, and should have added a comment to that
> effect :-) 
>
> My rationale for "ovn-ofctl" was shallowly based on the the related file,
> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
>
> What would be a more appropriate name?
>
> Thanks,
>Lance
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Ben Pfaff
On Thu, Jul 13, 2017 at 12:53:11PM -0400, Lance Richardson wrote:
> > From: "Ben Pfaff" 
> > To: "Lance Richardson" 
> > Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
> > Sent: Thursday, 13 July, 2017 12:47:47 PM
> > Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
> > ovs-ofctlinvocation.
> > 
> > On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
> > > > From: "JaiSingh Rana" 
> > > > To: ovs-discuss@openvswitch.org
> > > > Sent: Thursday, 13 July, 2017 3:49:15 AM
> > > > Subject: [ovs-discuss] Remote connection method for ovn-controller
> > > > ovs-ofctl   invocation.
> > > > 
> > > > 
> > > > 
> > > > Hi,
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
> > > > method
> > > > for ovs-ofctl invokation as unix:file as assumption is there will be 
> > > > unix
> > > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
> > > > bridge
> > > > e.g. br-int.mgmt
> > > > 
> > > > 
> > > > 
> > > > 
> > > > There is an issue in our Openvswitch offload model where vswitchd is
> > > > running
> > > > on nic and ovn-controller on host. As there is no option for telling
> > > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
> > > > are
> > > > not being pushed to vswitchd.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > For providing the patch, need some input. Should connection method be
> > > > provided as an argument to ovn-controller or it can be written to
> > > > /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> > > > option is present otherwise it defaults to unix file method.
> > > > 
> > > > 
> > > 
> > > My suggestion would be to use external-ids in the local ovsdb, as is
> > > currently done for ovn-remote and ovn-encap. Maybe something like:
> > > 
> > > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
> > 
> > Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
> > ovs-ofctl.
> > 
> 
> Well, I'm terrible with naming things, and should have added a comment to that
> effect :-) 
> 
> My rationale for "ovn-ofctl" was shallowly based on the the related file,
> ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)
> 
> What would be a more appropriate name?

I really should have directed that to the original poster, since he
suggested that ovs-ofctl was involved.

Probably, something that used words like "switch", "openflow", "remote",
"connection", "ovs", etc., like "ovn-switch-connection".

However, this is not going to be the only problem that the OP will
encounter, since ovn-controller makes other assumptions that it is
running on the ovs-switchd host.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Lance Richardson
> From: "Ben Pfaff" 
> To: "Lance Richardson" 
> Cc: "JaiSingh Rana" , ovs-discuss@openvswitch.org
> Sent: Thursday, 13 July, 2017 12:47:47 PM
> Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
> ovs-ofctl  invocation.
> 
> On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
> > > From: "JaiSingh Rana" 
> > > To: ovs-discuss@openvswitch.org
> > > Sent: Thursday, 13 July, 2017 3:49:15 AM
> > > Subject: [ovs-discuss] Remote connection method for ovn-controller
> > > ovs-ofctl invocation.
> > > 
> > > 
> > > 
> > > Hi,
> > > 
> > > 
> > > 
> > > 
> > > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection
> > > method
> > > for ovs-ofctl invokation as unix:file as assumption is there will be unix
> > > file created by vswitchd in OVS_RUNDIR for managing OF controller on
> > > bridge
> > > e.g. br-int.mgmt
> > > 
> > > 
> > > 
> > > 
> > > There is an issue in our Openvswitch offload model where vswitchd is
> > > running
> > > on nic and ovn-controller on host. As there is no option for telling
> > > ovn-controller to use tcp:port connection method for ovs-ofctl , flows
> > > are
> > > not being pushed to vswitchd.
> > > 
> > > 
> > > 
> > > 
> > > For providing the patch, need some input. Should connection method be
> > > provided as an argument to ovn-controller or it can be written to
> > > /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> > > option is present otherwise it defaults to unix file method.
> > > 
> > > 
> > 
> > My suggestion would be to use external-ids in the local ovsdb, as is
> > currently done for ovn-remote and ovn-encap. Maybe something like:
> > 
> > ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd
> 
> Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
> ovs-ofctl.
> 

Well, I'm terrible with naming things, and should have added a comment to that
effect :-) 

My rationale for "ovn-ofctl" was shallowly based on the the related file,
ovn/controller/ofctrl.c (well, I omitted the 'r' for some reason,.)

What would be a more appropriate name?

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


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Ben Pfaff
On Thu, Jul 13, 2017 at 09:35:01AM -0400, Lance Richardson wrote:
> > From: "JaiSingh Rana" 
> > To: ovs-discuss@openvswitch.org
> > Sent: Thursday, 13 July, 2017 3:49:15 AM
> > Subject: [ovs-discuss] Remote connection method for ovn-controller 
> > ovs-ofctlinvocation.
> > 
> > 
> > 
> > Hi,
> > 
> > 
> > 
> > 
> > Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method
> > for ovs-ofctl invokation as unix:file as assumption is there will be unix
> > file created by vswitchd in OVS_RUNDIR for managing OF controller on bridge
> > e.g. br-int.mgmt
> > 
> > 
> > 
> > 
> > There is an issue in our Openvswitch offload model where vswitchd is running
> > on nic and ovn-controller on host. As there is no option for telling
> > ovn-controller to use tcp:port connection method for ovs-ofctl , flows are
> > not being pushed to vswitchd.
> > 
> > 
> > 
> > 
> > For providing the patch, need some input. Should connection method be
> > provided as an argument to ovn-controller or it can be written to
> > /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> > option is present otherwise it defaults to unix file method.
> > 
> > 
> 
> My suggestion would be to use external-ids in the local ovsdb, as is
> currently done for ovn-remote and ovn-encap. Maybe something like:
> 
> ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd

Using the name "ovs-ofctl" here is weird.  ovn-controller doesn't use
ovs-ofctl.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Thanks Richardson for the suggestion.


This seems to be a better way than using some configuration file for picking 
connection method. I will look into code for changes required.


-Jai



From: Lance Richardson 
Sent: 13 July 2017 19:05
To: Rana, JaiSingh
Cc: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Remote connection method for ovn-controller 
ovs-ofctl invocation.

> From: "JaiSingh Rana" 
> To: ovs-discuss@openvswitch.org
> Sent: Thursday, 13 July, 2017 3:49:15 AM
> Subject: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl  
> invocation.
>
>
>
> Hi,
>
>
>
>
> Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method
> for ovs-ofctl invokation as unix:file as assumption is there will be unix
> file created by vswitchd in OVS_RUNDIR for managing OF controller on bridge
> e.g. br-int.mgmt
>
>
>
>
> There is an issue in our Openvswitch offload model where vswitchd is running
> on nic and ovn-controller on host. As there is no option for telling
> ovn-controller to use tcp:port connection method for ovs-ofctl , flows are
> not being pushed to vswitchd.
>
>
>
>
> For providing the patch, need some input. Should connection method be
> provided as an argument to ovn-controller or it can be written to
> /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> option is present otherwise it defaults to unix file method.
>
>

My suggestion would be to use external-ids in the local ovsdb, as is
currently done for ovn-remote and ovn-encap. Maybe something like:

ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd

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


Re: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Lance Richardson
> From: "JaiSingh Rana" 
> To: ovs-discuss@openvswitch.org
> Sent: Thursday, 13 July, 2017 3:49:15 AM
> Subject: [ovs-discuss] Remote connection method for ovn-controller ovs-ofctl  
> invocation.
> 
> 
> 
> Hi,
> 
> 
> 
> 
> Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method
> for ovs-ofctl invokation as unix:file as assumption is there will be unix
> file created by vswitchd in OVS_RUNDIR for managing OF controller on bridge
> e.g. br-int.mgmt
> 
> 
> 
> 
> There is an issue in our Openvswitch offload model where vswitchd is running
> on nic and ovn-controller on host. As there is no option for telling
> ovn-controller to use tcp:port connection method for ovs-ofctl , flows are
> not being pushed to vswitchd.
> 
> 
> 
> 
> For providing the patch, need some input. Should connection method be
> provided as an argument to ovn-controller or it can be written to
> /etc/sysconfig/openvswitch from where ovn-controller can read and use if
> option is present otherwise it defaults to unix file method.
> 
> 

My suggestion would be to use external-ids in the local ovsdb, as is
currently done for ovn-remote and ovn-encap. Maybe something like:

ovs-vsctl set open . external-ids:ovn-ofctl=tcp:w.x.y.z:abcd

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


Re: [ovs-discuss] error: "Error attaching device '0000:83:00.0' to DPDK"

2017-07-13 Thread Kavanagh, Mark B
>From: ovs-discuss-boun...@openvswitch.org [mailto:ovs-discuss-
>boun...@openvswitch.org] On Behalf Of Loftus, Ciara
>Sent: Thursday, July 13, 2017 10:32 AM
>To: lvzhil...@ncic.ac.cn
>Cc: ovs-discuss 
>Subject: Re: [ovs-discuss] error: "Error attaching device ':83:00.0' to
>DPDK"
>
>Does it work when you use the uio_pci_generic driver?

Also, what version of DPDK are you using?

Do you encounter this issue with OvS v2.7.1 and DPDK v16.11.2?

Cheers,
Mark


>
>Thanks,
>Ciara
>
>From: lvzhil...@ncic.ac.cn [mailto:lvzhil...@ncic.ac.cn]
>Sent: Thursday, July 13, 2017 2:50 AM
>To: Loftus, Ciara 
>Cc: ovs-discuss 
>Subject: Re: RE: [ovs-discuss] error: "Error attaching device ':83:00.0'
>to DPDK"
>
>
>  sorry, it is a obvious mistake in writing. and after I corrected it, this
>cmdline didn't work.
>
># ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk
>options:dpdk-devargs=:83:00.0
>ovs-vsctl: Error detected while setting up 'dpdk-p0': Error attaching
>device ':83:00.0' to DPDK.  See ovs-vswitchd log for details.
>
>    I wonder whether there is other similar issue? and how to solve?
>
>
>    I think you are adding the wrong device (::82). Try adding (::83).
>
>Thanks,
>Ciara
>
>
>
>Hello,
>I have installed OVS 2.7 running.  When I do:
># ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0
>type=dpdk options:dpdk-devargs=:82:00.0
>ovs-vsctl: Error detected while setting up 'dpdk-p0': Error attaching
>device ':82:00.0' to DPDK.  See ovs-vswitchd log for details.
>
>here is some informations:
>1.    root@oncsg4:/var/log/openvswitch# $DPDK_DIR/tools/dpdk-devbind.py --
>status
>
>Network devices using DPDK-compatible driver
>
>:83:00.0 'Ethernet 10G 2P X710 Adapter' drv=vfio-
>pci unused=uio_pci_generic
>:83:00.1 'Ethernet 10G 2P X710 Adapter' drv=uio_pci_generic unused=vfio-
>pci
>
>
>2. the log file shows:
>  (1).2017-07-07T10:04:40.004Z|00064|netdev_dpdk|WARN|Error attaching
>device ':82:00.0' to DPDK
>  (2).2017-07-07T10:04:40.004Z|00065|netdev|WARN|dpdk-p0: could
>not set configuration (Invalid argument)
>
>
>lvzhil...@ncic.ac.cn
>

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


Re: [ovs-discuss] error: "Error attaching device '0000:83:00.0' to DPDK"

2017-07-13 Thread Loftus, Ciara
Does it work when you use the uio_pci_generic driver?

Thanks,
Ciara

From: lvzhil...@ncic.ac.cn [mailto:lvzhil...@ncic.ac.cn]
Sent: Thursday, July 13, 2017 2:50 AM
To: Loftus, Ciara 
Cc: ovs-discuss 
Subject: Re: RE: [ovs-discuss] error: "Error attaching device ':83:00.0' to 
DPDK"


  sorry, it is a obvious mistake in writing. and after I corrected it, this 
cmdline didn't work.


# ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk 
options:dpdk-devargs=:83:00.0

ovs-vsctl: Error detected while setting up 'dpdk-p0': Error attaching device 
':83:00.0' to DPDK.  See ovs-vswitchd log for details.

I wonder whether there is other similar issue? and how to solve?


I think you are adding the wrong device (::82). Try adding (::83).

Thanks,
Ciara





Hello,

I have installed OVS 2.7 running.  When I do:

# ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0

type=dpdk options:dpdk-devargs=:82:00.0

ovs-vsctl: Error detected while setting up 'dpdk-p0': Error attaching

device ':82:00.0' to DPDK.  See ovs-vswitchd log for details.



here is some informations:
1.root@oncsg4:/var/log/openvswitch# $DPDK_DIR/tools/dpdk-devbind.py --status

Network devices using DPDK-compatible driver

:83:00.0 'Ethernet 10G 2P X710 Adapter' drv=vfio-pci unused=uio_pci_generic
:83:00.1 'Ethernet 10G 2P X710 Adapter' drv=uio_pci_generic unused=vfio-pci





2. the log file shows:

  (1).2017-07-07T10:04:40.004Z|00064|netdev_dpdk|WARN|Error attaching 
device ':82:00.0' to DPDK

  (2).2017-07-07T10:04:40.004Z|00065|netdev|WARN|dpdk-p0: could not set 
configuration (Invalid argument)


lvzhil...@ncic.ac.cn


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


[ovs-discuss] Remote connection method for ovn-controller ovs-ofctl invocation.

2017-07-13 Thread Rana, JaiSingh
Hi,


Currently in Openvswitch-2.7.1, ovn-controller hard codes connection method for 
ovs-ofctl invokation as unix:file as  assumption is  there will be unix file 
created by vswitchd in OVS_RUNDIR for managing OF controller on bridge e.g. 
br-int.mgmt


There is an issue in our Openvswitch offload model where  vswitchd is running 
on nic  and ovn-controller on host.  As there is no option for telling 
ovn-controller to use tcp:port connection method for ovs-ofctl , flows are not 
being pushed to vswitchd.


For providing the patch, need some input. Should connection method be provided 
as an argument to ovn-controller or it can be written to 
/etc/sysconfig/openvswitch from where ovn-controller can read and use if option 
is present otherwise it defaults to unix file method.



Thanks,

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


Re: [ovs-discuss] [ovs-dev] how to get packet information in ovs-dpdk?

2017-07-13 Thread Sam
Yes it is.

I'm also confused, as when I use normal kernel based ovs-2.3.0, `ovs-ofctl
snoop br0` works good and will not quit.

2017-07-12 23:24 GMT+08:00 Ben Pfaff :

> On Wed, Jul 12, 2017 at 04:21:04PM +0800, Sam wrote:
> > hi all,
> >
> > I'm running ovs-dpdk(ovs-2.4.9), I found the counter of bond port of br_t
> > is increasing, but I want to know what's these packets, how could I do
> this?
> >
> > first, I use `ovs-ofctl snoop br_t`, but it quit quickly as below:
> >
> > > [root@yf-mos-test-net07 ~]# /usr/local/bin/ovs-ofctl snoop
> > > /usr/local/var/run/openvswitch/br_t.mgmt
> > > [root@yf-mos-test-net07 ~]# /usr/local/bin/ovs-ofctl snoop
> > > /usr/local/var/run/openvswitch/br_t.mgmt
> > > ovs-ofctl: /usr/local/var/run/openvswitch/ovs-ofctl.pid: already
> running
> > > as pid 22082, aborting
>
> That is a strange message.  It should only appear if you use --pidfile
> and --daemon and there's already an ovs-ofctl running that way.  Is the
> above the complete context from your session?
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss