[ovs-discuss] Openvswitch 1.9 patch ports do not have port numbers

Ben Pfaff blp at nicira.com
Fri May 10 22:14:38 UTC 2013


OK, what's "ovs-dpctl show" say?  And does anything interesting show up in the
ovs-vswitchd log?

On Fri, May 10, 2013 at 2:58 PM, Kris Lindgren <klindgren at godaddy.com> wrote:
> Hello,
>
> I just rechecked everything.  Result is the same.  I have included all of
> the steps used for testing:
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]#  rpm -qplf
> openvswitch-kmod-1.9.0-1.el6.x86_64.rpm
> /lib/modules/3.4.36-6.el6.centos.alt.x86_64/kernel/extra/openvswitch/brcompat.ko
> /lib/modules/3.4.36-6.el6.centos.alt.x86_64/kernel/extra/openvswitch/openvswitch.ko
>
> [root at centos-ovs-build-06-00-00-6b-df-48 openvswitch-1.9.0]# lsmod | grep
> openvswitch
> [root at centos-ovs-build-06-00-00-6b-df-48 openvswitch-1.9.0]# insmod
> /lib/modules/3.4.36-6.el6.centos.alt.x86_64/kernel/extra/openvswitch/openvswitch.ko
>
> [root at centos-ovs-build-06-00-00-6b-df-48 openvswitch-1.9.0]# dmesg
> *snip*
> openvswitch: Open vSwitch switching datapath 1.9.0, built May 10 2013
> 14:02:24
>
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]# /etc/init.d/openvswitch
> start
>
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]# ovs-vsctl show
> 57b8b736-96dd-4e20-820b-e45228611685
> ovs_version: "1.9.0"
>
> Now create bridges and patchport:
> ovs-vsctl add-br xenbr0-int
> ovs-vsctl add-br xenbr0-tun
> ovs-vsctl add-port xenbr0-int xenbr0-int-patch-tun
> ovs-vsctl set interface xenbr0-int-patch-tun type=patch
> ovs-vsctl set interface xenbr0-int-patch-tun
> options:peer=xenbr0-tun-patch-int
> ovs-vsctl add-port xenbr0-tun xenbr0-tun-patch-int
> ovs-vsctl set interface xenbr0-tun-patch-int type=patch
> ovs-vsctl set interface xenbr0-tun-patch-int
> options:peer=xenbr0-int-patch-tun
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]# ovs-vsctl show
> 57b8b736-96dd-4e20-820b-e45228611685
>
> Bridge "xenbr0-tun"
> Port "xenbr0-tun"
> Interface "xenbr0-tun"
> type: internal
> Port "xenbr0-tun-patch-int"
> Interface "xenbr0-tun-patch-int"
> type: patch
> options: {peer="xenbr0-int-patch-tun"}
> Bridge "xenbr0-int"
> Port "xenbr0-int"
> Interface "xenbr0-int"
> type: internal
> Port "xenbr0-int-patch-tun"
> Interface "xenbr0-int-patch-tun"
> type: patch
> options: {peer="xenbr0-tun-patch-int"}
> ovs_version: "1.9.0"
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]#  ovs-vsctl get Interface
> xenbr0-tun-patch-int ofport
> -1
>
> [root at centos-ovs-build-06-00-00-6b-df-48 x86_64]# ovs-ofctl show xenbr0-tun
> OFPT_FEATURES_REPLY (xid=0x1): dpid:00007a10e9763c46
>
> n_tables:255, n_buffers:256
> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
> actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST
> SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
> LOCAL(xenbr0-tun): addr:7a:10:e9:76:3c:46
> config: PORT_DOWN
> state: LINK_DOWN
>
> speed: 100 Mbps now, 100 Mbps max
> OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
>
> kmod package was built using the following:
>
> rpmbuild -bb -D "kversion 3.4.36-6.el6.centos.alt.x86_64"
> openvswitch-kmod-fedora.spec  where openvswitch-kmod-fedora.spec is the spec
> file included in the tarball under /rhel/.
>
>
> ____________________________________________
>
> Kris Lindgren
> Linux Systems Engineer
> GoDaddy.com, LLC.
>
> -------- Original Message --------
> Subject: Re: [ovs-discuss] Openvswitch 1.9 patch ports do not have port
> numbers
> From: Ben Pfaff <blp at nicira.com>
> Date: Fri, May 10, 2013 12:01 pm
> To: Kris Lindgren <klindgren at godaddy.com>
> Cc: discuss at openvswitch.org
>
> Double-check everything. You probably do not have the right version
> of the kernel
> module loaded.
>
> On Fri, May 10, 2013 at 10:59 AM, Kris Lindgren <klindgren at godaddy.com>
> wrote:
>> Hello,
>>
>> Sorry, I forgot to mention that point. I have the kmod compiled and
>> loaded:
>>
>> lsmod | grep openvswitch:
>>
>> openvswitch 92457 0
>>
>> uname -a; ls
>>
>> /lib/modules/3.4.36-6.el6.centos.alt.x86_64/kernel/extra/openvswitch/openvswitch.ko:
>>
>> Linux localhost 3.4.36-6.el6.centos.alt.x86_64 #1 SMP Fri Mar 15 17:07:18
>> UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>>
>> /lib/modules/3.4.36-6.el6.centos.alt.x86_64/kernel/extra/openvswitch/openvswitch.ko
>> ____________________________________________
>>
>> Kris Lindgren
>> Linux Systems Engineer
>> GoDaddy.com, LLC.
>>
>>
>>
>> -------- Original Message --------
>> Subject: Re: [ovs-discuss] Openvswitch 1.9 patch ports do not have port
>> numbers
>> From: Ben Pfaff <blp at nicira.com>
>> Date: Fri, May 10, 2013 11:33 am
>> To: Kris Lindgren <klindgren at godaddy.com>
>> Cc: discuss at openvswitch.org
>>
>> You are probably encountering a problem explained in the FAQ:
>>
>> If you are using Open vSwitch 1.9 or an earlier version, then you
>> need to be using the kernel module bundled with Open vSwitch rather
>> than the one that is integrated into Linux 3.3 and later, because
>> Open vSwitch 1.9 and earlier versions need kernel support for patch
>> ports. This also means that in Open vSwitch 1.9 and earlier, patch
>> ports will not work with the userspace datapath, only with the
>> kernel module.
>>
>> On Fri, May 10, 2013 at 10:29 AM, Kris Lindgren <klindgren at godaddy.com>
>> wrote:
>>> Hello all,
>>>
>>> I am running into an issue with the tar.gz download of 1.9 from the main
>>> site. I am attempting to mimic an openstack quantum setup for tunneling.
>>> Under this setup openflow rules are applied to a patch port on the tunnel
>>> bridge to translate vlans to tunnel id's and vice-versa. The problem is
>>> that under 1.9 patch ports do not have a port number so it is not
>>> possible
>>> to apply openflow rules to them. This use to work under 1.4 and is
>>> working
>>> again under 1.10.
>>>
>>> ovs-vsctl show:
>>> *snip*
>>> Bridge "xenbr0-tun"
>>> Port "xenbr0-tun-patch-int"
>>> Interface "xenbr0-tun-patch-int"
>>> type: patch
>>> options: {peer="xenbr0-int-patch-tun"}
>>> Port "xenbr0-tun"
>>> Interface "xenbr0-tun"
>>> type: internal
>>> Port "gre1"
>>> Interface "gre1"
>>> type: gre
>>> options: {in_key=flow, out_key=flow,
>>> remote_ip="10.224.50.3"}
>>> Bridge "xenbr0-int"
>>> Port "xenbr0-int"
>>> Interface "xenbr0-int"
>>> type: internal
>>> Port "veth-xenbr0-int"
>>> Interface "veth-xenbr0-int"
>>> Port "xenbr0-int-patch-tun"
>>> Interface "xenbr0-int-patch-tun"
>>> type: patch
>>> options: {peer="xenbr0-tun-patch-int"}
>>> ovs_version: "1.9.0"
>>> *snip*
>>>
>>> ovs-ofctl show xenbr0-tun:
>>>
>>> OFPT_FEATURES_REPLY (xid=0x1): dpid:0000c64d2e707940
>>>
>>> n_tables:255, n_buffers:256
>>> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
>>> actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC
>>> SET_DL_DST
>>> SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
>>> 1(gre1): addr:56:52:09:c7:06:69
>>> config: 0
>>> state: 0
>>> speed: 100 Mbps now, 100 Mbps max
>>> LOCAL(xenbr0-tun): addr:c6:4d:2e:70:79:40
>>> config: 0
>>> state: 0
>>> speed: 100 Mbps now, 100 Mbps max
>>>
>>> ovs-vsctl get Interface xenbr0-tun-patch-int ofport:
>>>
>>> -1
>>>
>>> Now using the latest 1.10 source with the same setup commands I get the
>>> following:
>>>
>>> ovs-vsctl show
>>> *snip*
>>>
>>> Bridge "xenbr0-int"
>>>
>>> Port "xenbr0-int"
>>> Interface "xenbr0-int"
>>> type: internal
>>> Port "xenbr0-int-patch-tun"
>>> Interface "xenbr0-int-patch-tun"
>>> type: patch
>>> options: {peer="xenbr0-tun-patch-int"}
>>> Port "veth-xenbr0-int"
>>> Interface "veth-xenbr0-int"
>>> Bridge "xenbr0-tun"
>>> Port "xenbr0-tun"
>>> Interface "xenbr0-tun"
>>> type: internal
>>> Port "gre1"
>>> Interface "gre1"
>>> type: gre
>>> options: {in_key=flow, out_key=flow,
>>> remote_ip="10.224.50.3"}
>>> Port "xenbr0-tun-patch-int"
>>> Interface "xenbr0-tun-patch-int"
>>> type: patch
>>> options: {peer="xenbr0-int-patch-tun"}
>>> *snip*
>>>
>>> ovs-ofctl show xenbr0-tun:
>>>
>>> OFPT_FEATURES_REPLY (xid=0x2): dpid:000082520c63ae4d
>>>
>>> n_tables:254, n_buffers:256
>>> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
>>> actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC
>>> SET_DL_DST
>>> SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
>>> 1(xenbr0-tun-patc): addr:76:a2:4c:f7:55:6d
>>> config: 0
>>> state: 0
>>> speed: 0 Mbps now, 0 Mbps max
>>> 3(gre1): addr:92:83:1a:a8:05:2b
>>> config: 0
>>> state: 0
>>> speed: 0 Mbps now, 0 Mbps max
>>> LOCAL(xenbr0-tun): addr:82:52:0c:63:ae:4d
>>> config: 0
>>> state: 0
>>> speed: 0 Mbps now, 0 Mbps max
>>> OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
>>>
>>> ovs-vsctl get Interface xenbr0-tun-patch-int ofport:
>>>
>>> 1
>>>
>>> As you can see under 1.10 patch ports once again have port numbers and
>>> show
>>> up correctly as ports. Is their a newer version of 1.9.0 that I should be
>>> using?
>>> ____________________________________________
>>>
>>> Kris Lindgren
>>> Linux Systems Engineer
>>> GoDaddy, LLC.
>>>
>>>
>>> _______________________________________________
>>> discuss mailing list
>>> discuss at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/discuss
>>>
>>
>>
>>
>> --
>> "I don't normally do acked-by's. I think it's my way of avoiding
>> getting blamed when it all blows up." Andrew Morton
>
>
>
> --
> "I don't normally do acked-by's. I think it's my way of avoiding
> getting blamed when it all blows up." Andrew Morton



-- 
"I don't normally do acked-by's.  I think it's my way of avoiding
getting blamed when it all blows up."               Andrew Morton



More information about the discuss mailing list