Re: [ovs-discuss] openvswitch-2.11.0 single MPLS_POP

2019-03-21 Thread Gregory Rose



On 3/21/2019 4:34 AM, Thomas Crowley wrote:

Ben,
  Thank you for your response.  I did some more digging and simplified 
what I am doing.  I can get it working fine with ovs 2.6.0 but with 
2.11.0 I still get the error
 "2019-03-21T12:00:50.563Z|00076|odp_util(handler49)|ERR|invalid 
Ethertype 0 in flow key"
now I am getting it when I try to send a packet to the controller with 
the following rule
"cookie=0xb9b3443b96, duration=891.881s, table=0, n_packets=2073, 
n_bytes=245802, priority=1333,in_port=input actions=CONTROLLER:65535"
If I write a rule to just pass all of the traffic to another port it 
works fine.  I thought maybe it has something to do with a miss match 
between the kernel module and the ovs version I am using.  I am using 
debian, "SMP Debian 4.9.144-3.1", and I can not get the kernel module 
to compile I get "error: too few arguments to function 
'inet_fraq_find' 

Any ideas on what to try next?


That's curious that a compile of the openvswitch kernel module fails on 
4.9.144-3.1 because our travis build checker has support for all the way 
up to 4.9.149 and it compiles just fine.  I'm curious where you got this 
kernel?  If I could download and build it myself I could probably figure 
out what the compile issue is.


- Greg



Thank you,
Tom



On Fri, Mar 15, 2019 at 7:28 PM Ben Pfaff > wrote:


You should not need to match on both labels to pop a single label.

If you use ofproto/trace for this packet (see ovs-vswitchd(8)), what
does it say?

On Tue, Mar 12, 2019 at 08:34:38AM -0400, Thomas Crowley wrote:
> I am attempting to pop the outer MPLS label on a packet that has
two MPLS
> labels and send the result to a patch port that then sends the
packet back
> to the same bridge.  I am using a combination of ONOS and
scapy(see bottom
> of email for script) to do my test.  I do not get the packet
back to my
> bridge via the patch port.  I do get the following error:
>
> 2019-03-12T12:00:51.460Z|00019|odp_util(handler7)|ERR|invalid
Ethertype 0
> in flow key
>
> when I dump the flow OVS tells me that it is:
>
> cookie=0xba8259b570, duration=30.601s, table=0, n_packets=27,
> n_bytes=1350,
priority=60001,mpls,in_port=input,mpls_label=164,mpls_bos=0
> actions=pop_mpls:0x8847,output:"4PatchIn"
>
> If I run the same test but with a packet with only a single MPLS
label it
> works fine.  Do I have to match both labels in order to pop a
single label?
>
> Thank you,
> Tom
>
> Scapy script:
> #!/usr/bin/env python
>
> import sys
> from scapy.all import *
>
> load_contrib("mpls")
> mpls_eth = Ether(src="ca:09:11:11:11:1b", dst="ca:01:07:fc:00:1c",
> type=0x8847)
> mpls_lables=MPLS(label=164, s=0, ttl=255)/MPLS(label=182, s=1,
ttl=255)
> mpls_ip = IP(src='10.0.255.2', dst='10.0.255.4')
> mpls_icmp = ICMP(type="echo-request")
> mpls_raw = Raw(load="Fok!")
> mpls_frame=mpls_eth/mpls_lables/mpls_ip/ICMP()
> #mpls_icmp/mpls_raw
>
> #>>> Ether(str(mpls_frame))
> # label=16 cos=0 s=0 ttl=255 | label=18 cos=0 s=0 ttl=255 | os=0 s=1 ttl=255 | ttl=64 proto=icmp chksum=0x68c7 src=10.0.255.2 dst=10.0.255.2
options=[]
> | =0xcaf3 id=0x0 seq=0x0 |>>>
>
> sendp(mpls_frame, iface="input")
>
> sendp(mpls_frame, iface="input", loop=1, inter=1.1)

> ___
> 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] openvswitch-2.11.0 single MPLS_POP

2019-03-21 Thread Thomas Crowley
Ben,
  Thank you for your response.  I did some more digging and simplified what
I am doing.  I can get it working fine with ovs 2.6.0 but with 2.11.0 I
still get the error
 "2019-03-21T12:00:50.563Z|00076|odp_util(handler49)|ERR|invalid Ethertype
0 in flow key"
now I am getting it when I try to send a packet to the controller with the
following rule
"cookie=0xb9b3443b96, duration=891.881s, table=0, n_packets=2073,
n_bytes=245802, priority=1333,in_port=input actions=CONTROLLER:65535"
If I write a rule to just pass all of the traffic to another port it works
fine.  I thought maybe it has something to do with a miss match between the
kernel module and the ovs version I am using.  I am using debian, "SMP
Debian 4.9.144-3.1", and I can not get the kernel module to compile I get
"error: too few arguments to function 'inet_fraq_find' 
Any ideas on what to try next?

Thank you,
Tom



On Fri, Mar 15, 2019 at 7:28 PM Ben Pfaff  wrote:

> You should not need to match on both labels to pop a single label.
>
> If you use ofproto/trace for this packet (see ovs-vswitchd(8)), what
> does it say?
>
> On Tue, Mar 12, 2019 at 08:34:38AM -0400, Thomas Crowley wrote:
> > I am attempting to pop the outer MPLS label on a packet that has two MPLS
> > labels and send the result to a patch port that then sends the packet
> back
> > to the same bridge.  I am using a combination of ONOS and scapy(see
> bottom
> > of email for script) to do my test.  I do not get the packet back to my
> > bridge via the patch port.  I do get the following error:
> >
> > 2019-03-12T12:00:51.460Z|00019|odp_util(handler7)|ERR|invalid Ethertype 0
> > in flow key
> >
> > when I dump the flow OVS tells me that it is:
> >
> > cookie=0xba8259b570, duration=30.601s, table=0, n_packets=27,
> > n_bytes=1350, priority=60001,mpls,in_port=input,mpls_label=164,mpls_bos=0
> > actions=pop_mpls:0x8847,output:"4PatchIn"
> >
> > If I run the same test but with a packet with only a single MPLS label it
> > works fine.  Do I have to match both labels in order to pop a single
> label?
> >
> > Thank you,
> > Tom
> >
> > Scapy script:
> > #!/usr/bin/env python
> >
> > import sys
> > from scapy.all import *
> >
> > load_contrib("mpls")
> > mpls_eth = Ether(src="ca:09:11:11:11:1b", dst="ca:01:07:fc:00:1c",
> > type=0x8847)
> > mpls_lables=MPLS(label=164, s=0, ttl=255)/MPLS(label=182, s=1, ttl=255)
> > mpls_ip = IP(src='10.0.255.2', dst='10.0.255.4')
> > mpls_icmp = ICMP(type="echo-request")
> > mpls_raw = Raw(load="Fok!")
> > mpls_frame=mpls_eth/mpls_lables/mpls_ip/ICMP()
> > #mpls_icmp/mpls_raw
> >
> > #>>> Ether(str(mpls_frame))
> > # > label=16 cos=0 s=0 ttl=255 | > label=18 cos=0 s=0 ttl=255 | > os=0 s=1 ttl=255 | > ttl=64 proto=icmp chksum=0x68c7 src=10.0.255.2 dst=10.0.255.2 options=[]
> > | > =0xcaf3 id=0x0 seq=0x0 |>>>
> >
> > sendp(mpls_frame, iface="input")
> >
> > sendp(mpls_frame, iface="input", loop=1, inter=1.1)
>
> > ___
> > 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] openvswitch-2.11.0 single MPLS_POP

2019-03-15 Thread Ben Pfaff
You should not need to match on both labels to pop a single label.

If you use ofproto/trace for this packet (see ovs-vswitchd(8)), what
does it say?

On Tue, Mar 12, 2019 at 08:34:38AM -0400, Thomas Crowley wrote:
> I am attempting to pop the outer MPLS label on a packet that has two MPLS
> labels and send the result to a patch port that then sends the packet back
> to the same bridge.  I am using a combination of ONOS and scapy(see bottom
> of email for script) to do my test.  I do not get the packet back to my
> bridge via the patch port.  I do get the following error:
> 
> 2019-03-12T12:00:51.460Z|00019|odp_util(handler7)|ERR|invalid Ethertype 0
> in flow key
> 
> when I dump the flow OVS tells me that it is:
> 
> cookie=0xba8259b570, duration=30.601s, table=0, n_packets=27,
> n_bytes=1350, priority=60001,mpls,in_port=input,mpls_label=164,mpls_bos=0
> actions=pop_mpls:0x8847,output:"4PatchIn"
> 
> If I run the same test but with a packet with only a single MPLS label it
> works fine.  Do I have to match both labels in order to pop a single label?
> 
> Thank you,
> Tom
> 
> Scapy script:
> #!/usr/bin/env python
> 
> import sys
> from scapy.all import *
> 
> load_contrib("mpls")
> mpls_eth = Ether(src="ca:09:11:11:11:1b", dst="ca:01:07:fc:00:1c",
> type=0x8847)
> mpls_lables=MPLS(label=164, s=0, ttl=255)/MPLS(label=182, s=1, ttl=255)
> mpls_ip = IP(src='10.0.255.2', dst='10.0.255.4')
> mpls_icmp = ICMP(type="echo-request")
> mpls_raw = Raw(load="Fok!")
> mpls_frame=mpls_eth/mpls_lables/mpls_ip/ICMP()
> #mpls_icmp/mpls_raw
> 
> #>>> Ether(str(mpls_frame))
> # label=16 cos=0 s=0 ttl=255 | label=18 cos=0 s=0 ttl=255 | os=0 s=1 ttl=255 | ttl=64 proto=icmp chksum=0x68c7 src=10.0.255.2 dst=10.0.255.2 options=[]
> | =0xcaf3 id=0x0 seq=0x0 |>>>
> 
> sendp(mpls_frame, iface="input")
> 
> sendp(mpls_frame, iface="input", loop=1, inter=1.1)

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