[ovs-discuss] action to swap MAC addresses dl_src <-> dl_dst
Hello, is it possible to have action in ovs flow to swap MAC addresses? Currently we have to preconfigure and manually set the addresses like this: match=dl_vlan=400 actions=mod_vlan_vid:500,mod_dl_src:ee:10:10:10:10:10,mod_dl_dst:04:42:1a:55:80:09,IN_PORT` Action to swap these two would be much better and would work for any mac. Thanks, Miroslav This message, including attachments, is CONFIDENTIAL. It may also be privileged or otherwise protected by law. If you received this email by mistake please let us know by reply and then delete it from your system; you should not copy it or disclose its contents to anyone. All messages sent to and from Enea may be monitored to ensure compliance with internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. Anyone who communicates with us by email accepts these risks. ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] openvswitch-2.14.0 crashes
Removing "datapath_type=netdev" from the bridge seems to have fixed the issue. Thanks for help. From: Ben Pfaff Sent: Wednesday, June 2, 2021 8:39 PM To: Miroslav Kubiczek Cc: b...@openvswitch.org Subject: Re: [ovs-discuss] openvswitch-2.14.0 crashes CYBER SECURITY WARNING: This email was sent from an external sender. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, May 31, 2021 at 04:44:11PM +, Miroslav Kubiczek wrote: > Hello, > We observe a crash with certain packets (BGP UPDATE with 2096 bytes whereas > MTU was 1500): > > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > Core was generated by `ovs-vswitchd unix:/var/run/openvswitch/db.sock > -vconsole:emer -vsyslog:err -vfi'. > Program terminated with signal 11, Segmentation fault. > #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 > 578 b->mbuf.data_len = (uint16_t)v; /* Current seg length. */ > Missing separate debuginfos, use: debuginfo-install > glibc-2.17-307.el7.1.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 > krb5-libs-1.15.1-46.el7.x86_64 libatomic-4.8.5-44.el7.x86_64 > libcom_err-1.42.9-17.el7.x86_64 libevent-2.0.21-4.el7.x86_64 > libgcc-4.8.5-39.el7.x86_64 libpcap-1.5.3-12.el7.x86_64 > libselinux-2.5-15.el7.x86_64 libunwind-1.2-2.el7.x86_64 > numactl-libs-2.0.12-5.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 > pcre-8.32-17.el7.x86_64 python-libs-2.7.5-88.el7.x86_64 > unbound-libs-1.6.6-3.el7.x86_64 zlib-1.2.7-18.el7.x86_64 > (gdb) backtrace > #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 > #1 netdev_linux_batch_rxq_recv_sock (rx=rx@entry=0x20b1c90, mtu= out>, batch=batch@entry=0x7ffcf27baee0) at lib/netdev-linux.c:1306 This looks something of a weird case overall, because it suggests that you're using the userspace datapath but not DPDK network devices. Is that correct? This crash appears to be here: if (mmsgs[i].msg_len > std_len) { /* Build a single linear TSO packet by prepending the data from * std_len buffer to the aux_buf. */ pkt = rx->aux_bufs[i]; dp_packet_set_size(pkt, mmsgs[i].msg_len - std_len); Ending up passing a null 'pkt' to dp_packet_set_size() indicates that somehow aux_bufs[i] didn't get initialized. I don't see how that would happen. ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] openvswitch-2.14.0 crashes
We are not using DPDK in that environment. How can I check whether we use userspace datapath? Thanks M. From: Ben Pfaff Sent: Wednesday, June 2, 2021 8:39 PM To: Miroslav Kubiczek Cc: b...@openvswitch.org Subject: Re: [ovs-discuss] openvswitch-2.14.0 crashes CYBER SECURITY WARNING: This email was sent from an external sender. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, May 31, 2021 at 04:44:11PM +, Miroslav Kubiczek wrote: > Hello, > We observe a crash with certain packets (BGP UPDATE with 2096 bytes whereas > MTU was 1500): > > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > Core was generated by `ovs-vswitchd unix:/var/run/openvswitch/db.sock > -vconsole:emer -vsyslog:err -vfi'. > Program terminated with signal 11, Segmentation fault. > #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 > 578 b->mbuf.data_len = (uint16_t)v; /* Current seg length. */ > Missing separate debuginfos, use: debuginfo-install > glibc-2.17-307.el7.1.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 > krb5-libs-1.15.1-46.el7.x86_64 libatomic-4.8.5-44.el7.x86_64 > libcom_err-1.42.9-17.el7.x86_64 libevent-2.0.21-4.el7.x86_64 > libgcc-4.8.5-39.el7.x86_64 libpcap-1.5.3-12.el7.x86_64 > libselinux-2.5-15.el7.x86_64 libunwind-1.2-2.el7.x86_64 > numactl-libs-2.0.12-5.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 > pcre-8.32-17.el7.x86_64 python-libs-2.7.5-88.el7.x86_64 > unbound-libs-1.6.6-3.el7.x86_64 zlib-1.2.7-18.el7.x86_64 > (gdb) backtrace > #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 > #1 netdev_linux_batch_rxq_recv_sock (rx=rx@entry=0x20b1c90, mtu= out>, batch=batch@entry=0x7ffcf27baee0) at lib/netdev-linux.c:1306 This looks something of a weird case overall, because it suggests that you're using the userspace datapath but not DPDK network devices. Is that correct? This crash appears to be here: if (mmsgs[i].msg_len > std_len) { /* Build a single linear TSO packet by prepending the data from * std_len buffer to the aux_buf. */ pkt = rx->aux_bufs[i]; dp_packet_set_size(pkt, mmsgs[i].msg_len - std_len); Ending up passing a null 'pkt' to dp_packet_set_size() indicates that somehow aux_bufs[i] didn't get initialized. I don't see how that would happen. ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] openvswitch-2.14.0 crashes
Hello, We observe a crash with certain packets (BGP UPDATE with 2096 bytes whereas MTU was 1500): [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfi'. Program terminated with signal 11, Segmentation fault. #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 578 b->mbuf.data_len = (uint16_t)v; /* Current seg length. */ Missing separate debuginfos, use: debuginfo-install glibc-2.17-307.el7.1.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-46.el7.x86_64 libatomic-4.8.5-44.el7.x86_64 libcom_err-1.42.9-17.el7.x86_64 libevent-2.0.21-4.el7.x86_64 libgcc-4.8.5-39.el7.x86_64 libpcap-1.5.3-12.el7.x86_64 libselinux-2.5-15.el7.x86_64 libunwind-1.2-2.el7.x86_64 numactl-libs-2.0.12-5.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 pcre-8.32-17.el7.x86_64 python-libs-2.7.5-88.el7.x86_64 unbound-libs-1.6.6-3.el7.x86_64 zlib-1.2.7-18.el7.x86_64 (gdb) backtrace #0 dp_packet_set_size (v=572, b=0x0) at lib/dp-packet.h:578 #1 netdev_linux_batch_rxq_recv_sock (rx=rx@entry=0x20b1c90, mtu=, batch=batch@entry=0x7ffcf27baee0) at lib/netdev-linux.c:1306 #2 0x7f5b77fac665 in netdev_linux_rxq_recv (rxq_=0x20b1c90, batch=0x7ffcf27baee0, qfill=0x0) at lib/netdev-linux.c:1493 #3 0x7f5b77f00fe6 in netdev_rxq_recv (rx=, batch=batch@entry=0x7ffcf27baee0, qfill=) at lib/netdev.c:727 #4 0x7f5b77ecc51c in dp_netdev_process_rxq_port (pmd=pmd@entry=0x7f5b735a6010, rxq=0x20b1c00, port_no=2) at lib/dpif-netdev.c:4692 #5 0x7f5b77ecd24a in dpif_netdev_run (dpif=) at lib/dpif-netdev.c:5722 #6 0x7f5b78529de5 in type_run (type=) at ofproto/ofproto-dpif.c:370 #7 0x7f5b785128c6 in ofproto_type_run (datapath_type=datapath_type@entry=0x2105160 "netdev") at ofproto/ofproto.c:1779 #8 0x0040dea5 in bridge_run__ () at vswitchd/bridge.c:3244 #9 0x00413f78 in bridge_run () at vswitchd/bridge.c:3309 #10 0x0040ad55 in main (argc=11, argv=0x7ffcf27bb508) at vswitchd/ovs-vswitchd.c:127 (gdb) Any help is appreciated. Regards, Miroslav ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] check_pkt_larger precision
On 03. 06. 20 20:09, Numan Siddique wrote: This email was sent from an external sender. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Wed, Jun 3, 2020 at 8:27 PM Miroslav Kubiczek <mailto:miroslav.kubic...@adaptivemobile.com>> wrote: On 29. 05. 20 12:51, Numan Siddique wrote: This email was sent from an external sender. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Fri, May 29, 2020 at 3:41 PM Miroslav Kubiczek mailto:miroslav.kubic...@adaptivemobile.com>> wrote: On 29. 05. 20 11:29, Numan Siddique wrote: On Fri, May 29, 2020 at 2:25 PM Miroslav Kubiczek mailto:miroslav.kubic...@adaptivemobile.com>> wrote: Hi, I have finally implemented flows with check_pkt_larger action. Partial flow dump is here:table=0, priority=100 actions=check_pkt_larger(60)->NXM_NX_REG0[0],resubmit(,1) table=1, priority=1000,reg0=0x1 actions=resubmit(,2) table=1, priority=100,reg0=0 actions=resubmit(,3) I run a test which sends UDP packets (with VLAN) with size: 58, 59, 62, 63 and 69 in a loop. Only the packet with 69 match the action (1st line in table=1). In 2nd test I set check_pkt_larger just by one byte less to 59 and then all the above packets match. So the precision seems to be rounded to 8 bytes or something like that. Can this be fixed to be more precise ideally to exact 1 byte? Can you try without VLAN and see the accuracy ? I tried without VLAN, it's not accurate. This is how the pkt length comparison is done in vswitchd - https://github.com/openvswitch/ovs/blob/master/ofproto/ofproto-dpif-xlate.c#L6265 in kernel datapath - https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+/refs/heads/master/net/openvswitch/actions.c#1183 I can see the problem only when using DPDK. Does it use the same code? For flow translation the same code is hit. I think for ovs-dpdk datapath flows, the code here [1] should get hit. [1] - https://github.com/openvswitch/ovs/blob/master/lib/odp-execute.c#L766 I never tested with ovs-dpdk when I worked on it. Thanks Numan, I added logging and I can see in that dp_packet_size(packet) is always greater or equal 60 even if the real packet size is 59 or less. Thanks Numan When tested with non DPDK then it's working fine. Both versions are: $ ovs-ofctl --version ovs-ofctl (Open vSwitch) 2.13.0 OpenFlow versions 0x1:0x6 Thanks, Miro Thanks Numan man ovs-actions for check_pkt_larger says Syntax: check_pkt_larger(pkt_len)->dst Checks if the packet is larger than the specified length in pkt_len. If so, stores 1 in dst, which should be a 1-bit field; if not, stores 0. The packet length to check againt the argument pkt_len includes the L2 header and L2 payload of the packet, but not the VLAN tag (if present). Examples: · check_pkt_larger(1500)->reg0[0] · check_pkt_larger(8000)->reg9[10] ** Thanks Numan Thanks, Miro ___ discuss mailing list disc...@openvswitch.org <mailto:disc...@openvswitch.org> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss ___ discuss mailing list disc...@openvswitch.org <mailto: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] check_pkt_larger precision
On 29. 05. 20 12:51, Numan Siddique wrote: This email was sent from an external sender. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Fri, May 29, 2020 at 3:41 PM Miroslav Kubiczek <mailto:miroslav.kubic...@adaptivemobile.com>> wrote: On 29. 05. 20 11:29, Numan Siddique wrote: On Fri, May 29, 2020 at 2:25 PM Miroslav Kubiczek mailto:miroslav.kubic...@adaptivemobile.com>> wrote: Hi, I have finally implemented flows with check_pkt_larger action. Partial flow dump is here:table=0, priority=100 actions=check_pkt_larger(60)->NXM_NX_REG0[0],resubmit(,1) table=1, priority=1000,reg0=0x1 actions=resubmit(,2) table=1, priority=100,reg0=0 actions=resubmit(,3) I run a test which sends UDP packets (with VLAN) with size: 58, 59, 62, 63 and 69 in a loop. Only the packet with 69 match the action (1st line in table=1). In 2nd test I set check_pkt_larger just by one byte less to 59 and then all the above packets match. So the precision seems to be rounded to 8 bytes or something like that. Can this be fixed to be more precise ideally to exact 1 byte? Can you try without VLAN and see the accuracy ? I tried without VLAN, it's not accurate. This is how the pkt length comparison is done in vswitchd - https://github.com/openvswitch/ovs/blob/master/ofproto/ofproto-dpif-xlate.c#L6265 in kernel datapath - https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux/+/refs/heads/master/net/openvswitch/actions.c#1183 I can see the problem only when using DPDK. Does it use the same code? When tested with non DPDK then it's working fine. Both versions are: $ ovs-ofctl --version ovs-ofctl (Open vSwitch) 2.13.0 OpenFlow versions 0x1:0x6 Thanks, Miro Thanks Numan man ovs-actions for check_pkt_larger says Syntax: check_pkt_larger(pkt_len)->dst Checks if the packet is larger than the specified length in pkt_len. If so, stores 1 in dst, which should be a 1-bit field; if not, stores 0. The packet length to check againt the argument pkt_len includes the L2 header and L2 payload of the packet, but not the VLAN tag (if present). Examples: · check_pkt_larger(1500)->reg0[0] · check_pkt_larger(8000)->reg9[10] ** Thanks Numan Thanks, Miro ___ discuss mailing list disc...@openvswitch.org <mailto: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] check_pkt_larger precision
On 29. 05. 20 11:29, Numan Siddique wrote: On Fri, May 29, 2020 at 2:25 PM Miroslav Kubiczek <mailto:miroslav.kubic...@adaptivemobile.com>> wrote: Hi, I have finally implemented flows with check_pkt_larger action. Partial flow dump is here:table=0, priority=100 actions=check_pkt_larger(60)->NXM_NX_REG0[0],resubmit(,1) table=1, priority=1000,reg0=0x1 actions=resubmit(,2) table=1, priority=100,reg0=0 actions=resubmit(,3) I run a test which sends UDP packets (with VLAN) with size: 58, 59, 62, 63 and 69 in a loop. Only the packet with 69 match the action (1st line in table=1). In 2nd test I set check_pkt_larger just by one byte less to 59 and then all the above packets match. So the precision seems to be rounded to 8 bytes or something like that. Can this be fixed to be more precise ideally to exact 1 byte? Can you try without VLAN and see the accuracy ? I tried without VLAN, it's not accurate. man ovs-actions for check_pkt_larger says Syntax: check_pkt_larger(pkt_len)->dst Checks if the packet is larger than the specified length in pkt_len. If so, stores 1 in dst, which should be a 1-bit field; if not, stores 0. The packet length to check againt the argument pkt_len includes the L2 header and L2 payload of the packet, but not the VLAN tag (if present). Examples: · check_pkt_larger(1500)->reg0[0] · check_pkt_larger(8000)->reg9[10] ** Thanks Numan Thanks, Miro ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] check_pkt_larger precision
Hi, I have finally implemented flows with check_pkt_larger action. Partial flow dump is here:table=0, priority=100 actions=check_pkt_larger(60)->NXM_NX_REG0[0],resubmit(,1) table=1, priority=1000,reg0=0x1 actions=resubmit(,2) table=1, priority=100,reg0=0 actions=resubmit(,3) I run a test which sends UDP packets (with VLAN) with size: 58, 59, 62, 63 and 69 in a loop. Only the packet with 69 match the action (1st line in table=1). In 2nd test I set check_pkt_larger just by one byte less to 59 and then all the above packets match. So the precision seems to be rounded to 8 bytes or something like that. Can this be fixed to be more precise ideally to exact 1 byte? Thanks, Miro ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] flow match reg0=1 is not working
On Wed, May 27, 2020 at 11:24:24AM +0200, Miroslav Kubiczek wrote: >> I'd like to configure flows to use different table based on packet size. I >> have configured the flows like this: >> >> #ovs-ofctl dump-flows br0 >> ... >> cookie=0x0, table=0, priority=2 >> actions=check_pkt_larger(100)->NXM_NX_REG0[0],resubmit(,1) >> cookie=0x1, table=1, priority=1000,udp,reg0=0,tp_dst=2123 >> actions=resubmit(,2) >> ... >> >> The problem is that the 2nd flow is always positive, i.e. it's always >> resubmitted to table 2. I tried it also with reg0=1 but it has the same >> effect. Am I doing anything wrong or is it a bug? >This makes it sound like the feature doesn't work at all, but we know >that it does, since it's used in OVN. In your place, I'd launch into >the general purpose troubleshooting procedure here, starting with >checking the "ofproto/trace" results, then looking at the datapath >flows, and moving on from there. Thanks for quick reply Ben. The ofproto/trace shows: # ovs-appctl ofproto/trace br0 in_port=1,udp,udp_dst=2123 -> output to native tunnel -> tunneling to 192.168.200.2 via br0 -> tunneling from f4:03:43:c3:a2:60 192.168.200.1 to ae:df:6c:75:18:8b 192.168.200.2 bridge("br0") -- 0. priority 2 check_pkt_larger(2)->NXM_NX_REG0[0] resubmit(,1) 1. in_port=LOCAL,dl_src=f4:03:43:c3:a2:60,dl_dst=ae:df:6c:75:18:8b, priority 1 output:4 resubmit(,1) 1. in_port=LOCAL,dl_src=f4:03:43:c3:a2:60,dl_dst=ae:df:6c:75:18:8b, priority 1 output:4 resubmit(,1) 1. priority 0 CONTROLLER:65535 Final flow: unchanged Megaflow: recirc_id=0,eth,udp,in_port=1,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,nw_src=0.0.0.0/2,nw_dst=0.0.0.0/2,nw_ecn=0,nw_frag=no,tp_dst=2123 Datapath actions: check_pkt_len(size=2,gt(clone(tnl_push(tnl_port(4),header(size=50,type=4,eth(dst=ae:df:6c:75:18:8b,src=f4:03:43:c3:a2:60,dl_type=0x0800),ipv4(src=192.168.200.1,dst=192.168.200.2,proto=17,tos=0,ttl=64,frag=0x4000),udp(src=0,dst=4789,csum=0x),vxlan(flags=0x800,vni=0x0)),out_port(3)),check_pkt_len(size=2,gt(5),le(5,le(userspace(pid=0,controller(reason=6,dont_send=1,continuation=0,recirc_id=1196,rule_cookie=0,controller_id=0,max_len=65535 How can I check the reg[0] value was set? I suspect that the register is set but the next flow ignores the value in the match. ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] flow match reg0=1 is not working
Hi, I'd like to configure flows to use different table based on packet size. I have configured the flows like this: #ovs-ofctl dump-flows br0 ... cookie=0x0, table=0, priority=2 actions=check_pkt_larger(100)->NXM_NX_REG0[0],resubmit(,1) cookie=0x1, table=1, priority=1000,udp,reg0=0,tp_dst=2123 actions=resubmit(,2) ... The problem is that the 2nd flow is always positive, i.e. it's always resubmitted to table 2. I tried it also with reg0=1 but it has the same effect. Am I doing anything wrong or is it a bug? Any help is appreciated. Regards, Miro ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] packet size
Hi, Is it possible to setup flow to perform different action if UDP packet size has certain value? I assume it's not but I would be more then happy if it somehow was. Thanks, Miro ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] connect vxlan to localhost
Thanks, no, it doesn't help. This changes also the src_port, unfortunately. On 02. 07. 19 12:41, Alin Gabriel Serdean wrote: I’m not sure if this will help, but you can change the destination port for the vxlan tunnel: http://docs.openvswitch.org/en/latest/faq/vxlan/ Alin. On 2 Jul 2019, at 11:46, Miroslav Kubiczek <mailto:miroslav.kubic...@adaptivemobile.com>> wrote: Hi Folks, I'm struggling with the %subj%. The problem is that OVS is allocating the same port on both sides (src and dst) for vxlan port. So if I'm running my UDP server on port 4789 and then starting the bridge, the following 'add-port' command will fail: #- # ovs-vsctl add-br br0 \ -- set bridge br0 other-config:datapath-id=0001 \ -- add-port br0 ens224 \ -- add-port br0 ens256 \ -- set-controller br0 tcp:127.0.0.1:6653 # ovs-vsctl add-port br0 vtep -- set interface vtep type=vxlan option:remote_ip=10.10.12.135 option:key=flow ofport_request=10 ovs-vsctl: Error detected while setting up 'vtep': could not add network device vtep to ofproto (Address already in use). See ovs-vswitchd log for details. ovs-vsctl: The default log directory is "/var/log/openvswitch". #- Can someone recommend a solution or a workaround (docker/kvm or anything simpler)? Thanks Miro ___ discuss mailing list disc...@openvswitch.org <mailto: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
[ovs-discuss] connect vxlan to localhost
Hi Folks, I'm struggling with the %subj%. The problem is that OVS is allocating the same port on both sides (src and dst) for vxlan port. So if I'm running my UDP server on port 4789 and then starting the bridge, the following 'add-port' command will fail: #- # ovs-vsctl add-br br0 \ -- set bridge br0 other-config:datapath-id=0001 \ -- add-port br0 ens224 \ -- add-port br0 ens256 \ -- set-controller br0 tcp:127.0.0.1:6653 # ovs-vsctl add-port br0 vtep -- set interface vtep type=vxlan option:remote_ip=10.10.12.135 option:key=flow ofport_request=10 ovs-vsctl: Error detected while setting up 'vtep': could not add network device vtep to ofproto (Address already in use). See ovs-vswitchd log for details. ovs-vsctl: The default log directory is "/var/log/openvswitch". #- Can someone recommend a solution or a workaround (docker/kvm or anything simpler)? Thanks Miro ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] OVS and vxlan processor on the same host
Hello, Is it possible to setup openvswitch with a server which process vxlan traffic on the same host? I'd like to setup vxlan with: sudo ovs-vsctl add-port br0 vtep -- set interface vtep type=vxlan option:remote_ip=127.0.0.1 option:key=flow ofport_request=10 Then I'd like to start my server listening for UDP packets on the vxlan port 4789 but it fails because the port is already allocated by openvswitch. So is there a way to configure vxlan port where the OVS is listening on and the remote port on which the vxlan data are sent to? Thanks in advance Miroslav ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
[ovs-discuss] losing packets when vxlan port is used
Hello, I'm experiencing packets loss on OpenvSwitch host during transmission to vxlan port under higher traffic load. Some statistics from 2 machines are here (30 seconds run): 10.10.12.148-ens224-TX 625 100 %, 2130008249 bytes 10.10.12.150-ens224-RX 5999429 99 %, 2129796705 bytes 10.10.12.150-vxlan_sys_4789-TX 5641293 94 %, 1923680913 bytes 10.10.12.148 - is traffic generator machine 10.10.12.150 - is OvS host So as you can see about 5% of traffic is lost on OvS. Does anybody have a clue why this is happening? More configuration details are below. Thank you in advance for any help, Miroslav /-\ /\ |10.0.0.2 | | | | ens224|-|ens224 | \_/ | | | OVS-host | /-\ | | /-\ |10.0.0.3 | | vxlan_sys_4789||vxlan traffix server | | ens224|-|ens256 | |10.10.12.135 | \_/ \/ \_/ $ sudo ovs-vsctl show 68e0245f-1a5f-48ec-a027-a69d839a9b11 Bridge "br0" Controller "tcp:127.0.0.1:6653" is_connected: true Port "ens256" Interface "ens256" Port "br0" Interface "br0" type: internal Port vtep Interface vtep type: vxlan options: {key=flow, remote_ip="10.10.12.135"} Port "ens224" Interface "ens224" ovs_version: "2.5.0" $ sudo ovs-ofctl dump-flows br0 -O OpenFlow13 OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=1265.517s, table=0, n_packets=42029479, n_bytes=14920464750, priority=1,in_port=10 actions=resubmit(,2) cookie=0x1, duration=1265.518s, table=0, n_packets=1223020, n_bytes=434172100, priority=1000,udp actions=resubmit(,1) cookie=0x0, duration=79826.502s, table=0, n_packets=1236672, n_bytes=439008720, priority=10,dl_dst=00:0c:29:42:63:9d actions=output:2 cookie=0x0, duration=79794.509s, table=0, n_packets=46, n_bytes=7757, priority=10,dl_dst=00:0c:29:ec:54:7b actions=output:1 cookie=0x0, duration=79826.501s, table=0, n_packets=11, n_bytes=850, priority=1,in_port=2,dl_dst=00:0c:29:ec:54:7b actions=output:2 cookie=0x0, duration=79836.182s, table=0, n_packets=2, n_bytes=158, priority=0 actions=CONTROLLER:65535 cookie=0x0, duration=1265.517s, table=1, n_packets=49579226, n_bytes=17600625230, actions=output:10 cookie=0x0, duration=79826.501s, table=2, n_packets=42029478, n_bytes=14920464690, priority=100,ip,dl_dst=00:0c:29:42:63:9d actions=output:2 cookie=0x0, duration=79794.509s, table=2, n_packets=0, n_bytes=0, priority=100,ip,dl_dst=00:0c:29:ec:54:7b actions=output:1 $ ovs-vsctl --version ovs-vsctl (Open vSwitch) 2.5.0 Compiled Apr 28 2016 10:25:38 DB Schema 7.12.1 ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss