]> git.proxmox.com Git - mirror_ovs.git/log
mirror_ovs.git
6 years agotests: Avoid OVN environment variables leaking into tests.
Ben Pfaff [Wed, 9 May 2018 18:18:15 +0000 (11:18 -0700)]
tests: Avoid OVN environment variables leaking into tests.

If $OVN_NB_DB or $OVN_SB_DB happened to be set in the environment in which
"make check" was invoked, then their values would leak into the tests'
environment and interfere with the tests.  This commit avoids that problem.

OVS has a number of environment variables too, such as OVS_RUNDIR, but
the tests already set those to custom values.

Reported-by: Han Zhou <zhouhan@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Han Zhou <hzhou8@ebay.com>
6 years agoovn: support applying ACLs to port groups
Han Zhou [Sun, 22 Apr 2018 16:52:34 +0000 (09:52 -0700)]
ovn: support applying ACLs to port groups

Although port group can be used in match conditions of ACLs, it is
still inconvenient for clients to figure out the lswitches that each
ACL should be applied to.

This patch supports applying ACLs to port groups directly instead of
applying to each related lswitch individually. It provides convenience
for clients such as k8s and OpenStack Neutron.

Requested-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-March/344856.html
Requested-by: Guru Shetty <guru@ovn.org>
Requested-by: Daniel Alvarez Sanchez <dalvarez@redhat.com>
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agocompat: Fix upstream 4.4.119 kernel
Greg Rose [Fri, 20 Apr 2018 18:13:07 +0000 (11:13 -0700)]
compat: Fix upstream 4.4.119 kernel

The Linux 4.4.119 kernel (and perhaps others) from kernel.org
backports some dst_cache code that breaks the openvswitch kernel
due to a duplicated name "dst_cache_destroy".  For most cases the
"USE_UPSTREAM_TUNNEL" covers this but in this case the dst_cache
feature needs to be separated out.

Add the necessary compatibility detection layer in acinclude.m4 and
then fixup the source files so that if the built-in kernel includes
dst_cache support then exclude our own compatibility code.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
6 years agoovn.at: fix occasional dns lookup test failure
Han Zhou [Mon, 30 Apr 2018 17:04:54 +0000 (10:04 -0700)]
ovn.at: fix occasional dns lookup test failure

The option "--wait=hv" was missed when adding back the DNS options
for ls1-lp1 using ovn-nbctl, so the test case failed occasionally.
This commit fix the same.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agovswitch.xml: Add details for mac option.
Tonghao Zhang [Thu, 3 May 2018 13:06:14 +0000 (06:06 -0700)]
vswitch.xml: Add details for mac option.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn.at: fix timing in test case /32 router IP address
Han Zhou [Fri, 4 May 2018 02:39:33 +0000 (19:39 -0700)]
ovn.at: fix timing in test case /32 router IP address

After mac binding is populated in SB, before sending a packet, we
should ensure HVs processed this SB change. This patch ensures it
by: ovn-nbctl --wait=hv sync.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn.at: fix occasional failure - options:requested-chassis for logical port
Han Zhou [Tue, 8 May 2018 16:42:07 +0000 (09:42 -0700)]
ovn.at: fix occasional failure - options:requested-chassis for logical port

There are two problems in this test case that lead to occasional
failures.

Firstly, hv1_uuid or hv2_uuid could be empty because they
may be assigned before SB is updated, so adding ovn-sbctl wait-until
fixes it.

Secondly, when port-binding chassis is queried from SB,
it could be in the transient state - updated by the releasing chassis
to empty, but not yet updated by the requested chassis to the new
uuid. Although it is retried by OVS_WAIT_UNTIL, an empty string leads
to syntax error of the "test ... = ..." command and errors out immediately
in that case. So adding prefix "x" to both side of the test command
fixes it.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn.at: fix occasional failure - options:requested-chassis with hostname
Han Zhou [Tue, 8 May 2018 16:48:22 +0000 (09:48 -0700)]
ovn.at: fix occasional failure - options:requested-chassis with hostname

hv1_hostname could be empty because it may be assigned before SB is
updated, so adding ovn-sbctl wait-until fixes it.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn-controller.at: fix occasional ovn-bridge-mappings test failure
Han Zhou [Tue, 8 May 2018 17:29:40 +0000 (10:29 -0700)]
ovn-controller.at: fix occasional ovn-bridge-mappings test failure

This patch fixes the time issue in the test case so that when external-ids
is updated in Open_vSwitch OVSDB, give some time for SB OVSDB to get
updated by ovn-controller.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovs-vsctl: Extend manager_options documentation.
Darrell Ball [Tue, 8 May 2018 17:22:23 +0000 (10:22 -0700)]
ovs-vsctl: Extend manager_options documentation.

Add ovsdb-server command option to the manager_options
documentation.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovs-sandbox: Support managers in sandbox.
Ben Pfaff [Tue, 8 May 2018 15:30:11 +0000 (08:30 -0700)]
ovs-sandbox: Support managers in sandbox.

Until now, ovsdb-server in the sandbox ignored the Managers table.  This
commit adds support.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Darrell Ball <dlu00998@gmail.com>
6 years agoovn: Fix occasional failure in gratuitous ARP for NAT rules test.
Han Zhou [Tue, 8 May 2018 01:09:57 +0000 (18:09 -0700)]
ovn: Fix occasional failure in gratuitous ARP for NAT rules test.

In this test case it didn't wait for all HVs to catch up, which
leads to occasional failures due to timing. This fix updates
the --wait=sb to --wait=hv, which fixes the problem.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agowindows: Fix return value in case of named pipe send failure
Alin Gabriel Serdean [Mon, 30 Apr 2018 20:44:00 +0000 (23:44 +0300)]
windows: Fix return value in case of named pipe send failure

Named pipes should emulate UNIX socket behavior.

Until now the named pipes returned WSA (Windows implementation of BSD sockets
errors) return codes, for send errors.

In case of a disconnected named pipe (UNIX socket) send error, we should return
EPIPE.

Fixes: `check_logs` transient errors when checking for EPIPE.
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
Acked-by: Ben Pfaff <blp@ovn.org>
6 years agoovs-vsctl: Fix segfault when attempting to del-port from parent bridge.
Flavio Fernandes [Tue, 1 May 2018 23:07:36 +0000 (19:07 -0400)]
ovs-vsctl: Fix segfault when attempting to del-port from parent bridge.

The error message in the check for improper bridge param is de-referencing
parent from the wrong bridge. Also, the message itself had the parent and
child bridges reversed, so that got a small tweak as well.

Also, add a regression test.

Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn-ctl: Handle whitespaces when using eval for start_ovsdb:
aginwala [Tue, 17 Apr 2018 04:55:38 +0000 (21:55 -0700)]
ovn-ctl: Handle whitespaces when using eval for start_ovsdb:

eval doesn't understand white space for local var which was introduced in commit
79c7961b8b3c4b7ea0251dea2ffacfa84c84fecb for starting clustered ovn dbs.
As ovn-ctl uses sh instead of bash, parsing local var with white space will fail.

e.g. /usr/share/openvswitch/scripts/ovn-ctl --db-nb-addr=192.168.220.101 --db-nb-create-insecure-remote=yes \
     --db-sb-addr=192.168.220.101 --db-sb-create-insecure-remote=yes \
     --db-nb-cluster-local-addr=192.168.220.101 \
     --db-sb-cluster-local-addr=192.168.220.101 \
     --ovn-northd-nb-db=tcp:192.168.220.101:6641,tcp:192.168.220.102:6641,tcp:192.168.220.103:6641 \
     --ovn-northd-sb-db=tcp:192.168.220.101:6642,tcp:192.168.220.102:6642,tcp:192.168.220.103:6642 \
     start_northd

gives error: /usr/share/openvswitch/scripts/ovn-ctl: 1: local: -vfile:info: bad variable name

As a result ovsdb fails to even initialize and start. Hence, we need to seperate local keyword for all
variables used with eval to make it work with both dash and bash.

Signed-off-by: aginwala <aginwala@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovs-vswitchd: Better document that ovs-vswitchd manages its own datapaths.
Ben Pfaff [Fri, 4 May 2018 06:27:26 +0000 (23:27 -0700)]
ovs-vswitchd: Better document that ovs-vswitchd manages its own datapaths.

More explicitly discourage users from managing them themselves.

Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoofproto-dpif-xlate: Fix segmentation fault caused by tun_table
Yi-Hung Wei [Thu, 3 May 2018 16:49:50 +0000 (09:49 -0700)]
ofproto-dpif-xlate: Fix segmentation fault caused by tun_table

Currently, the revalidator thread may hit segmentation fault when geneve
TLV map is updated.  It is because we may store the old TLV map (struct
tun_table) in the frozen state for recirculation, and we may access the
already freed old tun_table in xlate_actions().

This patch update the logic of getting tun_table so that we will use
the latest tun_table instead of the frozen one.

VMWare-BZ: #2106987
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agorhel: user/group openvswitch does not exist
Alan Pevec [Thu, 19 Apr 2018 15:27:09 +0000 (11:27 -0400)]
rhel: user/group openvswitch does not exist

Default ownership[1] for config files is failing on an empty system:
  Running scriptlet: openvswitch-2.9.0-3.fc28.x86_64
warning: user openvswitch does not exist - using root
warning: group openvswitch does not exist - using root
...

Required user/group need to be created in %pre as documented in
Fedora guideline[2]

[1] https://github.com/openvswitch/ovs/commit/951d79e638ecdb3b1dcd19df1adb2ff91fe61af8

[2] https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Dynamic_allocation

Submitted-at: https://github.com/openvswitch/ovs/pull/223
Signed-off-by: Alan Pevec <alan.pevec@redhat.com>
Co-authored-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Markos Chandras <mchandras@suse.de>
Signed-off-by: Russell Bryant <russell@ovn.org>
6 years agoodp-util: Remove unnecessary TOS ECN bits rewrite for tunnels
Jianbo Liu [Tue, 1 May 2018 12:36:06 +0000 (12:36 +0000)]
odp-util: Remove unnecessary TOS ECN bits rewrite for tunnels

For tunnels, TOS ECN bits are never wildcard for the reason that they
are always inherited. OVS will create a rewrite action if we add rule
to modify other IP headers. But it also adds an extra ECN rewrite for
the action because of this ECN un-wildcarding.

It seems no error because the ECN bits to be changed are same in this
case. But as rule can't be offloaded to hardware, the unnecssary ECN
rewrite should be removed.

Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
6 years agodatapath-windows: Prevent ct-counters from getting redundantly incremented
Anand Kumar [Fri, 27 Apr 2018 17:00:30 +0000 (10:00 -0700)]
datapath-windows: Prevent ct-counters from getting redundantly incremented

The conntrack-counters ought to be incremented only if it's a new lookup
or if it's recirculated through a different zone for the first time.

Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
6 years agoMerge branch 'dpdk_merge' of https://github.com/istokes/ovs into HEAD
Ben Pfaff [Mon, 30 Apr 2018 15:34:47 +0000 (08:34 -0700)]
Merge branch 'dpdk_merge' of https://github.com/istokes/ovs into HEAD

6 years agoovsdb.7: Clarify description of OVSDB.
Ben Pfaff [Thu, 26 Apr 2018 16:39:30 +0000 (09:39 -0700)]
ovsdb.7: Clarify description of OVSDB.

A reader reported that "network database system" made it sound like OVSDB
was specialized for databases about networks.  It's not, it's just
accessible over the network.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
6 years agoMakefile.am: Distribute poc/playbook-fedora-builder.yml.
Ben Pfaff [Wed, 25 Apr 2018 19:48:07 +0000 (12:48 -0700)]
Makefile.am: Distribute poc/playbook-fedora-builder.yml.

This fixes a broken build.

CC: Ansis Atteka <aatteka@ovn.org>
Fixes: 3a2ceb01c81b ("poc: Automate building of Fedora rpm packages")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ansis Atteka <aatteka@ovn.org>
6 years agoovs-ofctl: Fix "ovs-ofctl snoop".
Ashish Varma [Fri, 20 Apr 2018 22:28:38 +0000 (15:28 -0700)]
ovs-ofctl: Fix "ovs-ofctl snoop".

In case where "use_names" is set (e.g. in an interactive session) to show
the port and table names when ovs-ofctl is run with snoop command,
ovs-ofctl would get stuck in an endless loop inside "table_iterator_next"
function's while loop checking for "while (ti->send_xid != recv_xid)".
This would happening because the "vconn" to "<bridge>.snoop" socket would
not respond to TABLE_FEATURES_REQUEST sent by ovs-ofctl.

This commit disables showing port or table names in the snoop command.

Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agopoc: Automate building of Fedora rpm packages
Ansis Atteka [Mon, 23 Apr 2018 21:53:25 +0000 (14:53 -0700)]
poc: Automate building of Fedora rpm packages

This patch automates building of Fedora rpm packages (Just
like we are already doing this for for CentOS and Ubuntu).

Signed-off-by: Ansis Atteka <aatteka@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
6 years agocheckpatch: Don't do line length or whitespace checks on debian/rules.
Ben Pfaff [Mon, 16 Apr 2018 20:00:03 +0000 (13:00 -0700)]
checkpatch: Don't do line length or whitespace checks on debian/rules.

debian/rules is a Makefile with a funny name.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Aaron Conole <aconole@redhat.com>
6 years agolib/tc: Remove unnecessary icmp recalculation
Jianbo Liu [Wed, 25 Apr 2018 08:09:08 +0000 (08:09 +0000)]
lib/tc: Remove unnecessary icmp recalculation

ICMP checksum is calculated from ICMP headers and data, so hardware doesn't
need to calculate it again because we only rewrite IP headers.

Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
6 years agopoc: update the documentation
Aaron Conole [Tue, 24 Apr 2018 20:10:51 +0000 (16:10 -0400)]
poc: update the documentation

Misc. fixes to the Proof of Concepts section to help render the
information a bit nicer.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ansis Atteka <aatteka@ovn.org>
6 years agodatapath: Prevent panic
Greg Rose [Tue, 17 Apr 2018 19:34:08 +0000 (12:34 -0700)]
datapath: Prevent panic

On RHEL 7.x kernels we observe a panic induced by a paging error
when the timer kicks off a job that subsequently accesses memory
that belonged to the openvswitch kernel module but was since
unloaded - thus the paging error.

The panic can be induced on any RHEL 7.x kernel with the following test:

while `true`
do
    make check-kmod TESTSUITEFLAGS="-k \!gre"
done

On the systems I've been testing on it generally takes anywhere from a
minute to 15 minutes or so to repro but never longer than that.  Similar
results have been seen by other testers.

This patch does not fix the underlying bug, which does need to be
investigated and fixed, but it does prevent it from occurring. We
would like to prevent customer systems from panicking while we do
futher investigation to find the root cause.

Here is the trace:
[252257.801809] BUG: unable to handle kernel paging request at ffffffffc07c6298
[252257.802451] IP: [<ffffffff810996e0>] run_timer_softirq+0xe0/0x310
[252257.803055] PGD 19f5067 PUD 19f7067 PMD 2fb5fc2067 PTE 0
[252257.803559] Oops: 0002 [#1] SMP
[252257.804138] Modules linked in: geneve ip6_udp_tunnel xt_statistic xt_physdev xt_nat xt_recent xt_comment xt_mark ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat xt_addrtype ipt_REJECT nf_reject_ipv4 xt_conntrack iptable_filter ip_tables nf_conntrack_netlink br_netfilter overlay(T) sch_htb veth udp_tunnel 8021q garp mrp tun ip_set nfnetlink bridge stp llc nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iTCO_wdt iTCO_vendor_support dcdbas mxm_wmi sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd joydev mei_me sg mei ipmi_ssif pcspkr shpchp lpc_ich ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter wmi nfsd auth_rpcgss
[252257.808079] nfs_acl lockd grace sunrpc xfs libcrc32c sr_mod sd_mod cdrom crc_t10dif crct10dif_generic uas usb_storage mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crct10dif_pclmul crct10dif_common crc32c_intel ahci libahci ixgbe libata igb megaraid_sas mdio ptp i2c_algo_bit pps_core i2c_core dca dm_mirror dm_region_hash dm_log dm_mod [last unloaded: openvswitch]
[252257.811056] CPU: 33 PID: 0 Comm: swapper/33 Tainted: G OE ------------ T 3.10.0-693.el7.x86_64 #1
[252257.811826] Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 04/11/2016
[252257.812605] task: ffff8830b7708fd0 ti: ffff8830b7718000 task.ti: ffff8830b7718000
[252257.813447] RIP: 0010:[<ffffffff810996e0>] [<ffffffff810996e0>] run_timer_softirq+0xe0/0x310
[252257.814298] RSP: 0018:ffff885fbe203e68 EFLAGS: 00010082
[252257.815122] RAX: ffff8830b66bc838 RBX: ffff8830b66bc000 RCX: ffffffffc07c6290
[252257.815933] RDX: ffff8830b66bc810 RSI: ffff885fbe203e90 RDI: ffff8830b66bc000
[252257.816733] RBP: ffff885fbe203ed0 R08: 0000e56b5701d800 R09: ffff885fbe203da0
[252257.817568] R10: 0000000000000002 R11: ffff885fbe203da8 R12: 0000000000000081
[252257.818429] R13: 0000e56b56fb2eca R14: ffffffff819eb0c8 R15: 0000000000000001
[252257.819297] FS: 0000000000000000(0000) GS:ffff885fbe200000(0000) knlGS:0000000000000000
[252257.820174] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[252257.821156] CR2: ffffffffc07c6298 CR3: 00000000019f2000 CR4: 00000000003407e0
[252257.822012] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[252257.822869] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[252257.823720] Stack:
[252257.824678] ffff8830b66bdc28 ffff8830b66bd828 ffff8830b66bd428 ffff8830b66bd028
[252257.825699] ffff885fbe20fe80 ffff885fbe203eb0 ffffffff8132bfe0 28a56c277c4fe974
[252257.826623] 0000000000000001 0000000000000001 0000e56b56fb2eca ffffffff819eb0c8
[252257.827524] Call Trace:
[252257.828410] <IRQ>
[252257.828417]
[252257.829292] [<ffffffff8132bfe0>] ? timerqueue_add+0x60/0xb0
[252257.830164] [<ffffffff81090b3f>] __do_softirq+0xef/0x280
[252257.831010] [<ffffffff816b6a5c>] call_softirq+0x1c/0x30
[252257.831849] [<ffffffff8102d3c5>] do_softirq+0x65/0xa0
[252257.832669] [<ffffffff81090ec5>] irq_exit+0x105/0x110
[252257.833501] [<ffffffff816b76c2>] smp_apic_timer_interrupt+0x42/0x50
[252257.834330] [<ffffffff816b5c1d>] apic_timer_interrupt+0x6d/0x80
[252257.835152] <EOI>
[252257.835159]
[252257.835944] [<ffffffff81527a02>] ? cpuidle_enter_state+0x52/0xc0
[252257.837231] [<ffffffff81527b48>] cpuidle_idle_call+0xd8/0x210
[252257.838224] [<ffffffff81034fee>] arch_cpu_idle+0xe/0x30
[252257.839133] [<ffffffff810e7bca>] cpu_startup_entry+0x14a/0x1c0
[252257.839933] [<ffffffff81051af6>] start_secondary+0x1b6/0x230
[252257.840684] Code: 00 00 00 44 0f b6 e0 45 85 e4 0f 84 a7 01 00 00 49 63 d4 48 83 43 10 01 48 8d 75 c0 48 c1 e2 04 48 01 da 48 8b 4a 28 48 8d 42 28 <48> 89 71 08 48 89 4d c0 48 8b 4a 30 48 89 4d c8 48 89 31 48 89
[252257.842366] RIP [<ffffffff810996e0>] run_timer_softirq+0xe0/0x310
[252257.843183] RSP <ffff885fbe203e68>
[252257.843955] CR2: ffffffffc07c6298

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
6 years agotests: Add system-dpdk-testsuite
Marcin Rybka [Fri, 20 Apr 2018 13:46:27 +0000 (14:46 +0100)]
tests: Add system-dpdk-testsuite

New OVS-DPDK testsuite, which can be launched via `make check-dpdk`,
tests OVS using a DPDK datapath. The testsuite contains already
initial tests:
 1. EAL init
 2. Add standard DPDK PHY port
 3. Add vhost-user-client port

Signed-off-by: Marcin Rybka <marcinx.rybka@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodocs: Clarify changes in Rx queue allocation
Stephen Finucane [Fri, 20 Apr 2018 09:24:32 +0000 (10:24 +0100)]
docs: Clarify changes in Rx queue allocation

Two mistakes here:

- Automatic assignment of Rx queues to PMD threads has always existed -
  it was simply switched from round-robin allocation to
  utilization-based allocation
- The above, along with the 'pmd-rxq-rebalance' command, was added in
  OVS 2.9.0 - not OVS 2.8.0 - while the 'pmd-rxq-show' command was added
  in OVS 2.6.0 and modified in OVS 2.9.0

Correct both of these and modify the NEWS entry for this to clarify
things a little (it took a bit of git spelunking and bothering people on
IRC to figure out).

Signed-off-by: Stephen Finucane <stephen@that.guru>
Cc: Kevin Traynor <ktraynor@redhat.com>
Cc: Ian Stokes <ian.stokes@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Add "jumbo frames" topic document
Stephen Finucane [Thu, 19 Apr 2018 12:57:28 +0000 (13:57 +0100)]
doc: Add "jumbo frames" topic document

We include references from the physical and vhost-user interface guides.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Move "pdump" guide to its own document
Stephen Finucane [Thu, 19 Apr 2018 12:57:27 +0000 (13:57 +0100)]
doc: Move "pdump" guide to its own document

Yet another section that's far too detailed for someone getting started
with DPDK in OVS. Split it out.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Add "bridge" topic document
Stephen Finucane [Thu, 19 Apr 2018 12:57:26 +0000 (13:57 +0100)]
doc: Add "bridge" topic document

This details configuration steps that apply to the entire bridge, rather
than individual ports.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Move "QoS" guide to its own document
Stephen Finucane [Thu, 19 Apr 2018 12:57:25 +0000 (13:57 +0100)]
doc: Move "QoS" guide to its own document

Again, this stuff is too detailed for a high-level howto.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Add "vdev" topic document
Stephen Finucane [Thu, 19 Apr 2018 12:57:24 +0000 (13:57 +0100)]
doc: Add "vdev" topic document

These are separate things from physical, ring and vhost-user interfaces
and deserve their own documents. A couple of small typos are fixed along
the way.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Move additional sections to "physical ports" doc
Stephen Finucane [Thu, 19 Apr 2018 12:57:23 +0000 (13:57 +0100)]
doc: Move additional sections to "physical ports" doc

The "hotplugging", "flow control", and "Rx checksum offload" sections
only apply to 'dpdk' ports and are too detailed to include in a
high-level howto. Move them, reworking some aspects of this in the
process.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Add "PMD" topic document
Stephen Finucane [Thu, 19 Apr 2018 12:57:22 +0000 (13:57 +0100)]
doc: Add "PMD" topic document

This continues the breakup of the huge DPDK "howto" into smaller
components. There are a couple of related changes included, such as
using "Rx queue" instead of "rxq" and noting how Tx queues cannot be
configured.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodoc: Add an overview of the 'dpdk' port
Stephen Finucane [Thu, 19 Apr 2018 12:57:21 +0000 (13:57 +0100)]
doc: Add an overview of the 'dpdk' port

These ports are used to allow ingress/egress from the host and are
therefore _reasonably_ important. However, there is no clear overview of
what these ports actually are or why things are done the way they are.
Start closing this gap by providing a standalone example of using these
ports along with a little more detailed overview of the binding process.

There is additional cleanup to be done for the DPDK howto, but that will
be done separately.

We enable the TODO directive so we can actually start calling out some
TODOs.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodocs: Fix urls in index.rst.
Ian Stokes [Wed, 18 Apr 2018 12:30:42 +0000 (13:30 +0100)]
docs: Fix urls in index.rst.

This patch prepends 'www' to openvswitch urls in index.rst. Without this
make check-docs fails when verifying url liveness. Also remove url
referencing ovsdb-server(5) as these are no longer accessible.

Cc: Stephen Finucane <stephen@that.guru>
Fixes: 4f6ec357c ("doc: Populate 'ref' section")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Stephen Finucane <stephen@that.guru>
6 years agodocs: Fix sphinx urls.
Ian Stokes [Wed, 18 Apr 2018 10:17:12 +0000 (11:17 +0100)]
docs: Fix sphinx urls.

Update dead url links for sphinx documentation to avoid
make check-docs failing.

Cc: Stephen Finucane <stephen@that.guru>
Fixes: 26ea2d409 ("docs: Add writing guide")
Fixes: 73c76b447 ("doc: Add info on building documentation")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Stephen Finucane <stephen@that.guru>
6 years agodocs: Fix style guide url in DocumentationStyle.rst.
Ian Stokes [Wed, 18 Apr 2018 10:17:12 +0000 (11:17 +0100)]
docs: Fix style guide url in DocumentationStyle.rst.

The link used for IBM Style Guide is no longer valid. As there is no
longer a valid link via redbooks remove the url to avoid make
check-docs failing.

Cc: Stephen Finucane <stephen@that.guru>
Fixes: 26ea2d409 ("docs: Add writing guide")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Stephen Finucane <stephen@that.guru>
6 years agodocs: Fix sflow documentation url and markup.
Ian Stokes [Wed, 18 Apr 2018 09:54:09 +0000 (10:54 +0100)]
docs: Fix sflow documentation url and markup.

The link url link for the blog in sflow documentation causes make
check-docs to fail with a broken link warning. Fix this by correcting
the url address. Also use correct markup for note regarding the
configuration of sflow.

CC: Stephen Finucane <stephen@that.guru>
Fixes: 198c5d3d0 ("doc: Add sFlow cookbook from website")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Stephen Finucane <stephen@that.guru>
6 years agonetdev-dpdk: Free mempool only when no in-use mbufs.
Kevin Traynor [Fri, 13 Apr 2018 17:40:13 +0000 (18:40 +0100)]
netdev-dpdk: Free mempool only when no in-use mbufs.

DPDK mempools are freed when they are no longer needed.
This can happen when a port is removed or a port's mtu
is reconfigured so that a new mempool is used.

It is possible that an mbuf is attempted to be returned
to a freed mempool from NIC Tx queues and this can lead
to a segfault.

In order to prevent this, only free mempools when they
are not needed and have no in-use mbufs. As this might
not be possible immediately, create a free list of
mempools and sweep it anytime a port tries to get a
mempool.

Fixes: 8d38823bdf8b ("netdev-dpdk: fix memory leak")
Cc: mark.b.kavanagh81@gmail.com
Cc: Ilya Maximets <i.maximets@samsung.com>
Reported-by: Venkatesan Pradeep <venkatesan.pradeep@ericsson.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodpdk docs: Drop file share in libvirt config.
Tiago Lam [Wed, 11 Apr 2018 10:25:52 +0000 (11:25 +0100)]
dpdk docs: Drop file share in libvirt config.

When explaining on how to add vhost-user ports to a guest, using
libvirt, the following piece of configuration is used:
    <disk type='dir' device='disk'>
      <driver name='qemu' type='fat'/>
      <source dir='/usr/src/dpdk-stable-17.11.1'/>
      <target dev='vdb' bus='virtio'/>
      <readonly/>
    </disk>

This is used to facilitate sharing of a DPDK directory between the host
and the guest. However, for this to work selinux also needs to be
configured (or disabled).  Furthermore, if one is using Ubuntu, libvirtd
would need to be added to complain only in AppArmor. Instead, in [1] it
is advised to use wget to get the DPDK sources over the internet, which
avoids this differentiation. Thus, we drop this piece of configuration
here as well and keep the example configuration as simple as possible.

This has been verified on both a Fedora 27 image and a Ubuntu 16.04 LTS
image.

[1] http://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/#dpdk-in-the-guest

Signed-off-by: Tiago Lam <tiago.lam@intel.com>
Acked-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agodpdk docs: Drop qemu-kvm for qemu-system-x86_64.
Tiago Lam [Wed, 11 Apr 2018 10:25:51 +0000 (11:25 +0100)]
dpdk docs: Drop qemu-kvm for qemu-system-x86_64.

When explaining on how to add vhost-user ports to a guest, using
libvirt, point to the qemu-system-x86_64 binary by default, instead of
using qemu-kvm. The latter has been made obsolete and dropped from a
number of distributions (although it is still available on Fedora).

This has been verified on both a Fedora 27 image and a Ubuntu 16.04 LTS
image.

Signed-off-by: Tiago Lam <tiago.lam@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agonetdev-dpdk: fix MAC address in port addr example
Marcelo Ricardo Leitner [Mon, 9 Apr 2018 17:20:50 +0000 (14:20 -0300)]
netdev-dpdk: fix MAC address in port addr example

The MAC address is always 6-bytes long, never 7. The extra :01 and :02
doesn't belong in there as it doesn't mean selecting one port or
another.

Instead, use an incrementing MAC address, which is what usually happens
on such cards.

See-also: http://www.dpdk.org/ml/archives/dev/2018-April/094976.html
Fixes: 5e7588186839 ("netdev-dpdk: fix port addition for ports sharing same PCI id")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
6 years agoovn-sbctl: add support for --bootstrap-ca-cert
Dan Williams [Fri, 20 Apr 2018 19:40:18 +0000 (14:40 -0500)]
ovn-sbctl: add support for --bootstrap-ca-cert

Signed-off-by: Dan Williams <dcbw@redhat.com>
6 years agoovn-nbctl: show --bootstrap-ca-cert help text
Dan Williams [Fri, 20 Apr 2018 19:39:47 +0000 (14:39 -0500)]
ovn-nbctl: show --bootstrap-ca-cert help text

The option exists but was not shown with --help.

Signed-off-by: Dan Williams <dcbw@redhat.com>
6 years agoofproto-dpif-upcall: Only call ovsrcu_postpone() on active actions
Eelco Chaudron [Thu, 19 Apr 2018 11:24:06 +0000 (13:24 +0200)]
ofproto-dpif-upcall: Only call ovsrcu_postpone() on active actions

Currently, ovsrcu_postpone() is called even with a NULL argument,
i.e. when there is no data to be freed. This is causing additional
overhead because work is scheduled for the urcu thread. This change
avoids adding the postpone callback if no work needs to be done.

This especially helps for the OVS-DPDK case where the PMD threads
might no longer have to do a write() due to the latch_set(), and thus
saving a syscall.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agopython: Tighten the check if we need encoding
Jakub Sitnicki [Thu, 19 Apr 2018 09:33:21 +0000 (11:33 +0200)]
python: Tighten the check if we need encoding

Check if we are dealing with a Unicode string that needs
encoding for both Python 2 & 3.

Also, do the encoding the same way for Python 2 & 3 and avoid using
negation to make the code simpler.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agorpm: depend on /bin/sed instead of /usr/bin/sed for compatibility
Isaac Freeman [Mon, 16 Apr 2018 21:12:54 +0000 (17:12 -0400)]
rpm: depend on /bin/sed instead of /usr/bin/sed for compatibility

The sed package in RHEL/CentOS 7 only provides /bin/sed and not
/usr/bin/sed, but later versions (including Fedora) provide both.

Signed-off-by: Isaac Freeman <memotype@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoxlate: Move tnl_neigh_snoop() to terminate_native_tunnel()
Zoltan Balogh [Wed, 4 Apr 2018 21:57:54 +0000 (23:57 +0200)]
xlate: Move tnl_neigh_snoop() to terminate_native_tunnel()

Currently OVS snoops any ARP or ND packets in any bridge and populates
the tunnel neighbor cache with the retreived data. For instance, when
an ARP reply originated by a tenant is received in an overlay bridge, the
ARP packet is snooped and tunnel neighbor cache is filled with tenant
address information. This is at best useless as tunnel endpoints can only
reside on an underlay bridge.

The real problem starts if different tenants on the overlay bridge have
overlapping IP addresses such that they keep overwriting each other's
pseudo tunnel neighbor entries. These frequent updates are treated as
configuration changes and trigger revalidation each time, thus causing
a lot of useless revalidation load on the system.

To keep the ARP neighbor cache clean, this patch moves tunnel neighbor
snooping from the generic function do_xlate_actions() to the specific
funtion terminate_native_tunnel() in compose_output_action(). Thus,
only ARP and Neighbor Advertisement packets addressing a local
tunnel endpoint (on the LOCAL port of the underlay bridge) are snooped.

In order to achieve this, IP addresses of the bridge ports are retrieved
and then stored in xbridge by calling xlate_xbridge_set(). The
destination address extracted from the ARP or Neighbor Advertisement
packet is then matched against the known xbridge addresses in
is_neighbor_reply_correct() to filter the snooped packets further.

Signed-off-by: Zoltan Balogh <zoltan.balogh.eth@gmail.com>
Co-authored-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Inject ARP replies for snoop tests on different port
Zoltan Balogh [Wed, 4 Apr 2018 21:57:53 +0000 (23:57 +0200)]
tests: Inject ARP replies for snoop tests on different port

The ARP replies injected into the underlay bridge 'br0' to trigger
ARP snooping should be destined to the the bridges LOCAL port. So far
the tests injected them on LOCAL port 'br0' itself, which didn't matter
as OVS snooped on all ARP packets passing the bridge.

This patch injects the ARP replies on a different port in preparation for
an upcoming commit that will make OVS only snoop on ARP packets output
to the LOCAL port.

The clone() wrapper must be added to the generated datapath flows now as
the traced packets would actually be transmitted through the tunnel port.
Previously the underlay bridge dropped the packets as the learned egress
port for the tunnel nexthop was the LOCAL port, which also served as
virtual ingress port for the encapsulated traffic. The translation
end result was an expensive way to say 'drop'.

Signed-off-by: Zoltan Balogh <zoltan.balogh.eth@gmail.com>
Co-authored-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoofproto-dpif-xlate: makes OVS native tunneling honor tunnel-specified source addresses
wenxu [Wed, 18 Apr 2018 03:03:47 +0000 (11:03 +0800)]
ofproto-dpif-xlate: makes OVS native tunneling honor tunnel-specified source addresses

It makes OVS native tunneling honor tunnel-specified source addresses,
in the same way that Linux kernel tunneling honors them.

This patch made valid tun_src specified by flow-action can be used for
tunnel_src of packet. add a "local" property for a route entry and enhance
the priority of local route higher than user route.
Like the kernel space when lookup the route, if there are tun_src specified
by flow-action or port options. Check the tun_src wheather is a local
address, then lookup the route.

Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: frank.zeng <frank.zeng@ucloud.cn>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agolacp: New command "lacp/show-stats" fordisplaying LACP counters.
Nitin Katiyar [Wed, 18 Apr 2018 18:27:43 +0000 (23:57 +0530)]
lacp: New command "lacp/show-stats" fordisplaying LACP counters.

Currently OVS does not provide any command to display stats for LACP
without which it is difficult to debug LACP issues. Here we propose
to display various statistics about LACP PDUs and slave state change.

Sample output:

ovs_lacp # ovs-appctl lacp/stats-show
---- bond-prv statistics ----

slave: dpdk0:
        RX PDUs: 128
        RX Bad PDUs: 0
        TX PDUs: 5
        Link Expired: 2
        Link Defaulted: 1
        Carrier Status Changed: 0

Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotutorial: skip passing .db for backup option for ovn_start_ovsdb_server:
aginwala [Thu, 12 Apr 2018 00:43:01 +0000 (17:43 -0700)]
tutorial: skip passing .db for backup option for ovn_start_ovsdb_server:

current params uses two sb1.db which is redundant:
e.g. ovsdb-server --remote=punix:sb1.ovsdb sb1.db sb1.db
expected:
e.g. ovsdb-server --remote=punix:sb1.ovsdb sb1.db

tested and works as expected:
ovn-sbctl --db=unix:/root/ovs/tutorial/sandbox/sb2.ovsdb show
Chassis "chassis-1"
    hostname: sandbox
    Encap geneve
        ip: "127.0.0.1"
        options: {csum="true"}

Signed-off-by: aginwala <aginwala@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Extend Python IDL checks to also run with SSL
Jakub Sitnicki [Wed, 18 Apr 2018 16:01:13 +0000 (18:01 +0200)]
tests: Extend Python IDL checks to also run with SSL

Extend the macro for running a Python IDL test against an OVSDB server
that uses SSL so that it can be used for regular IDL tests and for the
notify tests.

This makes it easy to generate additional Python IDL tests that run
using SSL, so do it.

As it turns out, newly added SSL tests unearth a pre-existing issue with
unicode encoding when SSL is used, which will be fixed in the following
patch.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agopython: Fix a double encoding attempt on an Unicode string
Jakub Sitnicki [Wed, 18 Apr 2018 16:01:14 +0000 (18:01 +0200)]
python: Fix a double encoding attempt on an Unicode string

Encoding from 'unicode' to 'str' that has been added to the Stream class
in commit 2254074e3067 ("python: fix python3 encode/decode on Windows")
conflicts with SSLStream which already contains a quirk for pyopenssl
that does the same thing.

This results in a double encoding attempt when SSL is used and we crash
and burn due to:

Traceback (most recent call last):
  File "../.././test-ovsdb.py", line 874, in <module>
    main(sys.argv)
  File "../.././test-ovsdb.py", line 869, in main
    func(*args)
  File "../.././test-ovsdb.py", line 655, in do_idl
    idl_set(idl, command, step)
  File "../.././test-ovsdb.py", line 526, in idl_set
    status = txn.commit_block()
  File "/home/jkbs/src/ovs/python/ovs/db/idl.py", line 1405, in commit_block
    status = self.commit()
  File "/home/jkbs/src/ovs/python/ovs/db/idl.py", line 1388, in commit
    if not self.idl._session.send(msg):
  File "/home/jkbs/src/ovs/python/ovs/jsonrpc.py", line 540, in send
    return self.rpc.send(msg)
  File "/home/jkbs/src/ovs/python/ovs/jsonrpc.py", line 244, in send
    self.run()
  File "/home/jkbs/src/ovs/python/ovs/jsonrpc.py", line 203, in run
    retval = self.stream.send(self.output)
  File "/home/jkbs/src/ovs/python/ovs/stream.py", line 808, in send
    return super(SSLStream, self).send(buf)
  File "/home/jkbs/src/ovs/python/ovs/stream.py", line 391, in send
    buf = buf.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 83: ordinal not in range(128)

Remove the quirk from SSLStream as the base class now does encoding.

Reported-by: Marcin Mirecki <mmirecki@redhat.com>
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Reuse OVSDB_CHECK_IDL_PYN macro for IDL notify tests
Jakub Sitnicki [Wed, 18 Apr 2018 16:01:12 +0000 (18:01 +0200)]
tests: Reuse OVSDB_CHECK_IDL_PYN macro for IDL notify tests

OVSDB_CHECK_IDL_NOTIFY_PYN macro is the same as OVSDB_CHECK_IDL_PYN
except it doesn't support PRE-IDL-TXN parameter. Reuse the more generic
OVSDB_CHECK_IDL_PYN macro.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Remove useless run-if-fail commands passed to AT_CHECK
Jakub Sitnicki [Wed, 18 Apr 2018 16:01:11 +0000 (18:01 +0200)]
tests: Remove useless run-if-fail commands passed to AT_CHECK

Path to ovsdb-server's pidfile has changed long ago when
ovsdb_start_idltest() helper was introduced in commit 561205007e17
("tests: Get rid of overly specific --pidfile and --unixctl options.")
but the run-if-fail commands were left behind.

Besides, we don't need to kill the ovs-db-server from the AT_CHECK
anymore since ovsdb_start_idltest() registers an on_exit hook that will
do it.

Clean up any run-if-fail commands that attempt to kill ovsdb-server
using an invalid pidfile.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Complain if key and certs not provided for SSL connection
Jakub Sitnicki [Wed, 18 Apr 2018 16:01:10 +0000 (18:01 +0200)]
tests: Complain if key and certs not provided for SSL connection

Add an argument check to test-ovsdb.py to ensure that the user has
provided the private key, the certificate, and the peer CA certificate
needed to set up an SSL connection.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agonetdev: If MTU set fails, issue warn log.
Darrell Ball [Wed, 18 Apr 2018 17:52:58 +0000 (10:52 -0700)]
netdev: If MTU set fails, issue warn log.

Recently, an issue was debugged that was thought to be a bond
failover triggered issue.  It turned out to an vlan interface MTU set issue
that had nothing to do with bonding or most other likely possibilities.
Besides the effect of not setting the MTU to the desired value, this can
result in increased netlink traffic and processing with associated wasted
work. Let us flag a configuration issue at warn level (rather than dbg) to
catch the problem early.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agopython: Fix reporting that test-ovsdb.py command needs more args
Jakub Sitnicki [Wed, 18 Apr 2018 10:35:08 +0000 (12:35 +0200)]
python: Fix reporting that test-ovsdb.py command needs more args

In Python OVSDB tester, we are not unpacking a value from n_args tuple
that holds the accepted range of arguments. This causes an error:

  $ python tests/test-ovsdb.py idl tests/idltest.schema
  Traceback (most recent call last):
    File "./tests/test-ovsdb.py", line 869, in <module>
      main(sys.argv)
    File "./tests/test-ovsdb.py", line 852, in main
      n_args, len(args)))
  TypeError: %d format: a number is required, not tuple

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agocheckpatch: add checks for new rst docs
Flavio Leitner [Tue, 17 Apr 2018 21:46:24 +0000 (18:46 -0300)]
checkpatch: add checks for new rst docs

When a new rst document is added under Documentation, check if the
new file is added to the proper index.rst and to the automake.mk.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoAdd multi-column index support for the Python IDL
Terry Wilson [Fri, 13 Apr 2018 00:24:27 +0000 (19:24 -0500)]
Add multi-column index support for the Python IDL

This adds multi-column index support for the Python IDL that is
similar to the feature in the C IDL. Since it adds sortedcontainers
as a dependency and some distros don't yet package it, the library
is copied in-tree and used if sortedcontainers is not installed.

Signed-off-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agorhel: Fix literal dollar sign usage in systemd service files
Timothy Redaelli [Mon, 16 Apr 2018 15:15:47 +0000 (17:15 +0200)]
rhel: Fix literal dollar sign usage in systemd service files

Currently (at least on RHEL 7.5) openvswitch fails to start (with DPDK
enabled) as non-root, since chown fails and "/dev/hugepages" group is not
changed.

Commit tested on Fedora 28 and RHEL 7.5, both as root as non-root user.

From man 5 systemd.service:

  To pass a literal dollar sign, use "$$". Variables whose value is not known
  at expansion time are treated as empty strings. Note that the first argument
  (i.e. the program to execute) may not be a variable.

CC: Aaron Conole <aconole@redhat.com>
Fixes: 4299145c1095 ("rhel: don't drop capabilities when running as root")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
6 years agonetdev: Fix typos in comment.
Ben Pfaff [Tue, 17 Apr 2018 15:33:41 +0000 (08:33 -0700)]
netdev: Fix typos in comment.

Fixes: ee4776b8bce1 ("netdev: New function netdev_get_ip_by_name().")
Suggested-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agosocket-util: Improve comments on (host,port) parsing functions.
Ben Pfaff [Tue, 17 Apr 2018 15:30:13 +0000 (08:30 -0700)]
socket-util: Improve comments on (host,port) parsing functions.

Fixes: 0b043300dbad ("Make <host>:<port> parsing uniform treewide.")
Suggested-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agotests: Added NSH related unit test cases for datapath
Ashish Varma [Thu, 29 Mar 2018 23:46:09 +0000 (16:46 -0700)]
tests: Added NSH related unit test cases for datapath

Added test cases for encap, decap, replace and forwarding of NSH packets.
Also added a python script 'sendpkt.py' to send hex ethernet frames.

Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
6 years agoovn-nbctl: Use common code for sockaddr_storage.
Ben Pfaff [Fri, 13 Apr 2018 17:14:40 +0000 (10:14 -0700)]
ovn-nbctl: Use common code for sockaddr_storage.

This better reuses existing code.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoovn-nbctl: Simplify lb_info_add_smap().
Ben Pfaff [Wed, 11 Apr 2018 18:36:50 +0000 (11:36 -0700)]
ovn-nbctl: Simplify lb_info_add_smap().

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoofproto-dpif-slow: Add IPv6 agent address support.
Ben Pfaff [Fri, 13 Apr 2018 17:04:26 +0000 (10:04 -0700)]
ofproto-dpif-slow: Add IPv6 agent address support.

Suggested-by: Neil McKee <neil.mckee@inmon.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agonetdev: New function netdev_get_ip_by_name().
Ben Pfaff [Fri, 13 Apr 2018 17:03:12 +0000 (10:03 -0700)]
netdev: New function netdev_get_ip_by_name().

This is like netdev_get_in4_by_name() but accepts any IP address instead
of just an IPv4 address.

It will acquire its first user in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agosocket-util: Add more functions for IPv[46] sockaddr and sockaddr_storage.
Ben Pfaff [Fri, 13 Apr 2018 16:51:37 +0000 (09:51 -0700)]
socket-util: Add more functions for IPv[46] sockaddr and sockaddr_storage.

The existing functions for working with sockaddr_storage that contain an
IPv4 or IPv6 address are useful.  This commit adds more functions for
working with them, as well as a parallel set of functions for struct
sockaddr.

This also adds an initial user for some of the new sockaddr functions in
netdev.c.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoMake <host>:<port> parsing uniform treewide.
Ben Pfaff [Wed, 11 Apr 2018 18:12:21 +0000 (11:12 -0700)]
Make <host>:<port> parsing uniform treewide.

I didn't realize until now that the tree had two different ways of parsing
strings in the form <host>:<port> and <port>:<host>.  There are the
long-standing inet_parse_active() and inet_parse_passive() functions, and
more recently the ipv46_parse() function.  This commit eliminates the
latter and changes the code to use the former.

The two implementations interpreted some input differently.  In particular,
the older functions required IPv6 addresses to be [bracketed], but the
newer ones do not.  For compatibility this patch changes the merged code to
use the more liberal interpretation.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agosocket-util: Make inet_parse_active() and inet_parse_passive() more alike.
Ben Pfaff [Wed, 11 Apr 2018 18:24:59 +0000 (11:24 -0700)]
socket-util: Make inet_parse_active() and inet_parse_passive() more alike.

Until now, the default_port parameters to these functions have had
different types and different behavior.  There is a reason for this, since
it makes sense to listen on a kernel-selected port but it does not make
sense to connect to a kernel-selected port, but this overlooks the
possibility that a caller might want to parse a string in the format
understood by inet_parse_active() without actually using it to connect to
a remote host.  This commit makes the behavior consistent and updates all
the callers to work with the new semantics.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agosocket-util: New function inet_parse_address().
Ben Pfaff [Wed, 11 Apr 2018 18:05:58 +0000 (11:05 -0700)]
socket-util: New function inet_parse_address().

This will acquire its first user in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoovn-northd: Use common code for sockaddr_storage.
Ben Pfaff [Wed, 11 Apr 2018 17:39:38 +0000 (10:39 -0700)]
ovn-northd: Use common code for sockaddr_storage.

This better reuses existing code.  It does require adding a slight variant
on ss_format_address(), but it still seems like a net win.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agosocket-util: Make address parser check for trailing garbage.
Ben Pfaff [Wed, 11 Apr 2018 17:23:36 +0000 (10:23 -0700)]
socket-util: Make address parser check for trailing garbage.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agosocket-util: Fix error in comment on ss_format_address().
Ben Pfaff [Wed, 11 Apr 2018 17:42:34 +0000 (10:42 -0700)]
socket-util: Fix error in comment on ss_format_address().

The output for this function is a dynamic string and doesn't have a
fixed buffer size, so the comment was wrong.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoovsdb-tool.at: Drop monitor argument
Alin Gabriel Serdean [Mon, 16 Apr 2018 20:26:37 +0000 (23:26 +0300)]
ovsdb-tool.at: Drop monitor argument

This patch drops the '--monitor' argument when running the ovsdb-server.

This can potentially increase the bug detection since the process will not
be restarted in certain situations.

Also, fixes the test under Windows since daemons do not have '--monitor'
argument.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Suggested-by: Ben Pfaff <blp@ovn.org>
Suggested-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/346135.html

6 years agoovn: Support address sets generated from port groups
Han Zhou [Sat, 14 Apr 2018 00:07:27 +0000 (17:07 -0700)]
ovn: Support address sets generated from port groups

Address sets are automatically generated from corresponding port
groups, and can be used directly in ACL match conditions.

There are two address sets generated for each port group:

<port group name>_ip4
<port group name>_ip6

For example, if port_group1 is created, we can directly use below
match condition in ACL:
    "outport == @port_group1 && ip4.src == $port_group1_ip4"

This will simplify OVN client implementation, and avoid some tricky
problems such as race conditions when maintaining address set
memberships as discussed in the link below.

Reported-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046174.html
Reviewed-by: Mark Michelson <mmichels@redhat.com>
Reviewed-by: Daniel Alvarez <dalvarez@redhat.com>
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agopython-windows: Update python3 environment variables on Windows
Alin Gabriel Serdean [Mon, 16 Apr 2018 19:42:09 +0000 (22:42 +0300)]
python-windows: Update python3 environment variables on Windows

Starting from Python 3.6 two new environment variables have been introduced
on Windows:
PYTHONLEGACYWINDOWSFSENCODING
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONLEGACYWINDOWSFSENCODING
PYTHONLEGACYWINDOWSSTDIO
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONLEGACYWINDOWSSTDIO

To keep backwards compatibility when running tests under Windows we define and
set the two variables thus ensuring default filesystem encoding (mbcs).

Fixes tests on Python version >=3.6:
2030: simple idl, writing via IDL with unicode - Python3
2032: simple idl, writing via IDL with unicode - Python3 - register_columns
2034: simple idl, writing via IDL with unicode - Python3 - tcp

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
Acked-by: Ben Pfaff <blp@ovn.org>
6 years agoovn: Set router lifetime value for IPv6 periodic RA.
Numan Siddique [Mon, 16 Apr 2018 13:56:53 +0000 (19:26 +0530)]
ovn: Set router lifetime value for IPv6 periodic RA.

ovn-controller when it sends out periodic RA packets, sets '0' in the
Router lifetime field. As per the RFC 4861,  lifetime of 0 indicates that
the router is not a default router and SHOULD NOT appear on the default
router list. Without the default route, a VM will not able to reach to
other router ports attached to the same router unless a default route
is added by the user.

ovn-controller when encoding the 'put_nd_ra_opts' action sets the Router
Lifetime field to 0xffff. So this patch also sets the same value when
sending out the periodic RAs.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1567735
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
6 years agoAUTHORS: Add Andrea Kao.
Ben Pfaff [Mon, 16 Apr 2018 20:02:53 +0000 (13:02 -0700)]
AUTHORS: Add Andrea Kao.

Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoEdit Open vSwitch license info so that GitHub recognizes it.
Andrea Kao [Fri, 13 Apr 2018 18:09:39 +0000 (11:09 -0700)]
Edit Open vSwitch license info so that GitHub recognizes it.

GitHub uses a library called Licensee to identify a project's license
type. It shows this information in the status bar and via the API if it
can unambiguously identify the license.

This commit creates a LICENSE file that stores the full text of the
Apache license. It also removes the COPYING file and transfers its
contents to a new "License" section in the README.

Collectively, these changes allow Licensee to successfully identify the
license type of Open vSwitch's codebase as Apache.

Submitted-at: https://github.com/openvswitch/ovs/pull/224
Signed-off-by: Andrea Kao <eirinikos@gmail.com>
[blp@ovn.org removed references to COPYING and updated Makefile.am]
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
6 years agoovn.at: Fix IPv6 periodic RA test on Windows
Alin Gabriel Serdean [Sun, 14 Jan 2018 17:05:16 +0000 (19:05 +0200)]
ovn.at: Fix IPv6 periodic RA test on Windows

One issue with this test is that MSYS mangles the shorter form of the IPv6 address.
To solve this, we switch to the longer notation of it.

Another issue is that `printf` command does not add the leading `0` to the packet.
We switch to a more platform independent `awk` substitution.

Co-authored-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
6 years agoovn: Recirculate packets after a unSNAT.
Gurucharan Shetty [Mon, 19 Mar 2018 20:35:21 +0000 (13:35 -0700)]
ovn: Recirculate packets after a unSNAT.

commit f6fabcc6245 (ofproto-dpif: Mark packets as "untracked"
after call to ct().) changed the behavior after a call to ct().
The +trk bit would automatically be unset if packet is sent to
ct() and not forked.  This caused a bug in the OVN gateway
pipeline when there is SNAT rule as well as load-balancing rule.

In the OVN gateway pipeline for the gateway router, we had an
optimization where the packets sent to unSNAT need not go through
a recirculation. But since doing this now means that the +trk bit
gets unset, the DNAT rules for load-balancing a new packet in the next
table won't get hit.

This commit removes the optimization for unSNAT packets so that
there is always a recirculation.

Signed-off-by: Gurucharan Shetty <guru@ovn.org>
6 years agoovn: Support port groups in ACLs
Han Zhou [Thu, 5 Apr 2018 00:51:47 +0000 (17:51 -0700)]
ovn: Support port groups in ACLs

This patch enables using port group names in ACL match conditions.
Users can create a port group in northbound DB Port_Group table,
and then use the name of the port group in ACL match conditions
for "inport" or "outport". It can help reduce the number of ACLs
for CMS clients such as OpenStack Neutron, for the use cases
where a group of logical ports share same ACL rules except the
"inport"/"outport" part. Without this patch, the clients have to
create N (N = number of lports) ACLs, and this patch helps achieve
the same goal with only one ACL. E.g.:

to-lport 1000 "outport == @port_group1 && ip4.src == {IP1, IP2, ...}" allow-related

There was a similar attempt by Zong Kai Li in 2016 [1]. This patch
takes a slightly different approach by using weak refs instead of
strings, which requires a new table instead of reusing the address
set table. This way it will also benefit for a follow up patch that
enables generating address sets automatically from port groups to
avoid a lot a trouble from client perspective [2].

An extra benefit of this patch is that it could enable conjunctive
match effectively. As reported at [3], this patch was tested together
with the conjunctive match enhancement patch [4], and huge performance
improvement (more than 10x faster) was seen because of this.

[1] https://mail.openvswitch.org/pipermail/ovs-dev/2016-August/077118.html
[2] https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046260.html
[3] https://mail.openvswitch.org/pipermail/ovs-dev/2018-March/344873.html
[4] https://patchwork.ozlabs.org/patch/874433/

Reported-by: Daniel Alvarez Sanchez <dalvarez@redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-February/046166.html
Tested-by: Mark Michelson <mmichels@redhat.com>
Reviewed-by: Mark Michelson <mmichels@redhat.com>
Reviewed-by: Daniel Alvarez <dalvarez@redhat.com>
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agonetns: Add documentation and update NEWS.
Flavio Leitner [Wed, 11 Apr 2018 23:50:56 +0000 (20:50 -0300)]
netns: Add documentation and update NEWS.

Create a document to describe the how it works and known
limitations and update the NEWS accordingly.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agostopwatch: Add latch_poll to stopwatch loop.
Mark Michelson [Wed, 11 Apr 2018 14:15:22 +0000 (09:15 -0500)]
stopwatch: Add latch_poll to stopwatch loop.

Nothing was clearing the latch, so the loop was busy. This makes it so
the loop only runs on new calls to latch_set() by a separate thread.

Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoovn-controller: Handle Port_Binding's "requested-chassis" option in physical.c
Numan Siddique [Tue, 20 Mar 2018 11:29:42 +0000 (16:59 +0530)]
ovn-controller: Handle Port_Binding's "requested-chassis" option in physical.c

When a Logical_Switch_Port P's options is set with 'requested-chassis=hv1'
and if the user has bound this logical port to two OVS interfaces each in
different host (eg. hv1 and hv2), then ovn-controller in hv1 sets the
P's Port_Binding.chassis to hv1 which is as expected. But on hv2, ovn-controller
is adding OF flows in table 0 and table 65 for the OVS interface instead of
considering 'P' as a remote port. When another logical port bound on hv2,
pings to the logical port 'P', the packet gets delivered to hv2 OVS interface
instead of hv1 OVS interface, which is wrong.

This scenario is most likely to happen when requested-chassis option is used
by CMS during migration of a VM from one chassis to another.

This patch fixes this issue by checking the Port_Binding's "requested-chassis"
option in physical.c before adding the flows in table 0 an 65.

Reported-by: Marcin Mirecki <mmirecki@redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-March/345266.html
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Marcin Mirecki <mmirecki@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agonetdev-tc-offloads: Add offloading of multiple outputs
Chris Mi [Tue, 10 Apr 2018 05:18:09 +0000 (14:18 +0900)]
netdev-tc-offloads: Add offloading of multiple outputs

Currently, we support offloading of one output port. Remove that
limitation by use of mirred mirror action for all output ports,
except that the last one is mirred redirect action.

Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
6 years agotc: Make the actions order consistent
Chris Mi [Tue, 10 Apr 2018 05:18:08 +0000 (14:18 +0900)]
tc: Make the actions order consistent

When OVS DP passes the actions to TC library, we save all the
actions in data structure tc_flower and each action type has its
own field in tc_flower. So when TC library passes the actions to
kernel, actually the actions order is lost.

We add an actions array in tc_flower to keep the actions order
in this patch.

Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
6 years agoFix AUTHORS.rst
Lucas Alvares Gomes [Wed, 11 Apr 2018 09:30:17 +0000 (10:30 +0100)]
Fix AUTHORS.rst

The commit 9afc6f14ee7b2622703d98689acb0044d4a5492e added a new author
which name was too long that broke the column size. Runinng "make
docs-checks" was failing because of that.

All this patch does is to enlarge the "Name" column to fit the new
author's name.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Daniel Alvarez <dalvarez@redhat.com>
6 years agotc: Change filter error to debug once
Roi Dayan [Wed, 11 Apr 2018 07:57:30 +0000 (10:57 +0300)]
tc: Change filter error to debug once

Also update the message to be more correct.
Before this commit if there were tc rules that are not of type
flower the log was getting filled quickyl with errors about it
and always appeared to the user when dumping flows from user space.
This commit moves the error to debug and logs it only once.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
6 years agoOVN: add icmp6 action to ovn acl reject support
Lorenzo Bianconi [Mon, 9 Apr 2018 10:00:25 +0000 (12:00 +0200)]
OVN: add icmp6 action to ovn acl reject support

Whenever the acl reject rule is hit by an IPv6 packet send back
an ICMPv6 destination unreachable packet using the icmp6 action

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoOVN: add icmp6{} action support
Lorenzo Bianconi [Mon, 9 Apr 2018 10:00:24 +0000 (12:00 +0200)]
OVN: add icmp6{} action support

icmp6 action is used to replace the IPv6 packet been processed with
an ICMPv6 packet initialized based on incoming IPv6 one.
Ethernet and IPv6 fields not listed are not changed:
- ip.proto = 58 (ICMPv6)
- ip.ttl = 255
- icmp6.type = 1 (destination unreachable)
- icmp6.code = 1 (communication administratively prohibited)
Prerequisite: ip6

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
6 years agoAUTHORS: Add Manohar Krishnappa Chidambaraswamy.
Ben Pfaff [Tue, 10 Apr 2018 23:28:10 +0000 (16:28 -0700)]
AUTHORS: Add Manohar Krishnappa Chidambaraswamy.

Signed-off-by: Ben Pfaff <blp@ovn.org>