2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Commit Graph

14466 Commits

Author SHA1 Message Date
Alin Serdean
2eed4f1893 windows: add definition of getpid and getcwd
getcwd - is used in lib/util.c. getcwd is deprecated on Windows but has
_getcwd which is defined in <direct.h>:
https://msdn.microsoft.com/en-us/library/sf98bd4y(v=vs.120).aspx

getpid - is used in several files (i.e. lib/vlog.c). getpid
is also and deprecated and _getpid should be used:
https://msdn.microsoft.com/en-us/library/t2y34y40(v=vs.120).aspx
The problem using _getpid is that the definition is in <process.h>.
A file called process.h also exists in the lib folder. This will mess up
includes.
An option would be to use a wrapper like we use for lib/string.h(.in) but
that would mean to also add it to the automake chain.
A simple solution would be to map it to GetCurrentProcessId
https://msdn.microsoft.com/en-us/library/windows/desktop/ms683180(v=vs.85).aspx

_getpid uses GetCurrentProcessId behind the scenes, casting the result
is not required.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Co-authored-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-25 14:33:13 -07:00
Ben Pfaff
13f4d25a6a pinctrl: Be more careful in parsing DHCPv6 and DNS.
pinctrl_handle_put_dhcpv6_opts() and pinctrl_handle_dns_lookup() were not
checking that a full UDP header was present before reading its udp_len
field.  This patch fixes the problem.

I don't think that the system as a whole, as normally installed, was
exploitable.  This is because pinctrl processes a packet sent to it from
ovs-vswitchd.  ovs-vswitchd only sends it UDPv6 DHCPv6 packets.  To
determine that the packets are DHCPv6, ovs-vswitchd has to see its UDP port
numbers are those for DHCPv6, and it's only going to see that if an entire
UDP header is present.  Therefore, this part of pinctrl will only ever
process a packet for which udp_len is there.

I believe that pinctrl_handle_dns_lookup() is similar.

Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
2017-05-25 14:23:55 -07:00
Ben Pfaff
fafbfa6ea4 ofp-util: Fix buffer overread in ofputil_pull_queue_get_config_reply10().
msg->size isn't the relevant measurement here because we're only supposed
to read 'len' bytes.  Reading more than that causes 'len' to underflow to a
large number at the end of the loop.

Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
2017-05-25 14:23:55 -07:00
Joe Stringer
b95d82bf93 checkpatch: Check for stdlib usage.
Many standard library functions are wrapped in OVS, so check for usage
of the original versions and suggest that authors replace them with the
OVS versions.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-05-25 13:32:16 -07:00
Alin Serdean
2f839c0257 appveyor: Add new make target
This patch adds the new make target 'datapath_windows_analyze' (static
analysis over the windows datapath code) to the appveyor build.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-25 08:50:12 -07:00
Alin Serdean
0a1f9718a3 datapath-windows: add two new build targets for code analysis
Add two new build targets: 'Win8Analyze' and 'Win8.1Analyze'.
The new build targets have the static code analyzer (built in Visual
Studio feature).

This patch also introduces a new make target ('datapath_windows_analyze')
this can be added to the CI jobs to get a list warnings/errors issued
by the code analyzer.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-25 08:49:35 -07:00
Alin Serdean
ad91a8e61c datapath-windows: Remove Strsafe usage from datapath
The removal is mandatory to use the VStudio 2013 static code analyzer.

The only function that was used from the include is: 'StringCbLengthA'.
We were not checking the result of that function, nor will the
'vportGet->name' exceed the 'OVS_MAX_PORT_NAME_LENGTH' limitation.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-By: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-25 08:48:58 -07:00
Zhengwei Gao
c0527566fc Supporting ovn-northd HA colocated with OVNDB-HA
As ovn-northd parse network element between ovnnb_db and ovnsb_db,
ovn-northd need connect to ovnnb_db and ovnsb_db. OVNDB-HA feather
was implemented depend on pacemaker, ovn-northd will failover following
OVNDB-HA.

If user wants to enable ovn-northd HA colocated with OVNDB-HA depend on
pacemaker, setting parameter MANAGE_NORTHD_DEFAULT="yes" in ovndb-servers.ocf

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-May/332509.html
Submitted-at: https://github.com/openvswitch/ovs/pull/180
Signed-off-by: Zhengwei Gao <multi_task@163.com>
Co-authored-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
2017-05-25 10:18:18 -04:00
Joe Stringer
b50fcaa0d9 dpif-netlink-rtnl: Use OVS_NOT_REACHED in verify.
The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify()
ensures that these cases can never be hit, so use OVS_NOT_REACHED()
instead of setting the err to EOPNOTSUPP.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Joe Stringer
caeda3489e dpif-netlink-rtnl: Use getlink() in common verify path.
The calls here were duplicated across each tunnel protocol.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Joe Stringer
9db6b04e66 dpif-netlink-rtnl: Tidy up some code.
Simplify and refactor a couple of bits of code for improved readability.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Eric Garver <e@erig.me>
2017-05-23 15:44:27 -07:00
Alin Serdean
42409aae15 datapath-windows: Fix possible null dereference in ipfragment
Found using static analysis tools.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-23 15:29:57 -07:00
Alin Serdean
aa341b9f86 datapath-windows: Update the key after defragmentation
Update the key used by the actions which follow up defragmentation, with
no fragment set in the IP header.

Found while testing OVN with two VMs on the same host.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Anand Kumar kumaranand@vmware.com
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-23 15:28:15 -07:00
Alin Serdean
82db51ef49 datapath-windows: Report success for conntrack actions over frags
When a conntrack action is applied over an IP fragment we pend the fragment
which will be consumed later. This should be transparent to the userspace.

Report that the action was applied successfully so it does not spam
the ovs-vswitchd log.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-23 15:27:12 -07:00
Alin Serdean
23bea5ffab datapath-windows: Fix alignment in actions
Found by inspection.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Acked-by: Anand Kumar <kumaranand at vmware.com>
2017-05-23 15:25:19 -07:00
Alin Serdean
1b4f56e088 tests: fix hanging test on windows
'multiple bridges share a controller' hangs on windows because it is
lacking the exit information (it will hang when the test has finished)

Introduce a pidfile to 'ovs-testcontroller' and end it on exit based on
the pidfile.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Andy Zhou <azhou@ovn.org>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-05-23 12:36:52 -07:00
Numan Siddique
ca9c2c56ff python ovs: Fix SSL exceptions with pyOpenSSL v0.13
Centos provides pyOpenSSL version pyOpenSSL-0.13.1-3.el7.x86_64.
There are 2 issues using this version, which this patch fixes

 - The test case "simple idl verify notify - SSL" is skipped.
   This is because "python -m OpenSSL.SSL" is used to detect the
   presence of pyOpenSSL package. pyOpenSSL v0.13 has C python
   modules because of which the above command returns 1.
   So this patch fixes this by using 'python -c "import OpenSSL.SSL"'.

 - The SSL.Context class does not have the function "set_session_cache_mode"
   defined.  Our usage here was only relevant for server-side connections,
   (pssl), which is not yet supported by python-ovs, so just remove the
   usage of this function.  The default cache mode (server) will just
   be ignored.

I have not tested with older versions (< 0.13) of pyOpenSSL.

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Acked-by: Lance Richardson <lrichard@redhat.com>
Tested-by: Marcin Mirecki <mmirecki@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
2017-05-23 13:34:03 -04:00
Russell Bryant
66a8b4beaa ovn-nb.xml: Fix minor typo.
Signed-off-by: Russell Bryant <rbryant@redhat.com>
2017-05-23 13:15:40 -04:00
Numan Siddique
126fb3e8ab ovn-ctl: Start ovn-northd even if ovsdb-servers are not running
When '--ovn-manage-ovsdb=no' is passed to "ovn-ctl start_northd", it
doesn't start ovsdb-servers, but it expects the ovsdb-servers to be
running. If the ovsdb-servers are not running, ovn-ctl exits without
starting ovn-northd. This could create problems when ovn-northd and
ovsdb-servers are managed separately, for example when pacemaker is
used to manage ocf:ovndb-servers and ovn-northd as separate resources.
In the cases where a slave is promoted as master, it is possible that
pacemaker might start ovn-northd service before starting
ovsdb-servers.

This patch addresses this issue by not checking the status of
ovsdb-server pids when ovn-manage-ovsdb is set to true when
'start_northd' is called. ovn-northd will eventually connect to the
ovsdb-servers when they are started. So there is no harm in removing
this check.

Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-05-22 16:48:52 -07:00
Numan Siddique
52727f4858 ovn pacemaker: Fix return code errors in start/stop action
start action returns OCF_RUNNING_MASTER in certain scenarios.
But as per the OCF guidelines, status code OCF_RUNNING_MASTER shoud
be returned only in monitor action [1].

Whenever the start action returns OCF_RUNNING_MASTER, it is observed
in the testing that, pacemaker stops the ovsdb-server ocf resource
in that node. This patch fixes this issue by returning OCF_SUCESS in
such cases.

stop action returns OCF_RUNNING_MASTER if the ovsdb-servers are
running as master. But as per the OCF guidelines [2], stop action
should only return OCF_SUCCESS. If any other code is returned,
pacemaker cluster would block that resource in that node.

This patch fixes this issue by stopping the ovsdb-servers when they
are running as masters (which is the expected case) and returns
OCF_SUCCESS.

[1] - http://www.linux-ha.org/doc/dev-guides/_literal_ocf_running_master_literal_8.html
[2] - http://www.linux-ha.org/doc/dev-guides/_literal_stop_literal_action.html

CC: Andy Zhou <azhou@ovn.org>
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-05-22 16:48:45 -07:00
Przemyslaw Szczerbik
0b4f83e2dc ofproto-dpif-ipfix: add support for per-flow TCP counters
This patch implements support for per-flow TCP IPFIX counters. It's based on RFC
5102, section 5.10.

Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-20 09:31:27 -07:00
Shashank Ram
95c36eb766 Use xmalloc instead of malloc in some Windows code.
xmalloc checks if the size is valid before allocating
memory, and also if the allocation was successful.

Signed-off-by: Shashank Ram <rams@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
2017-05-19 15:19:32 -07:00
Eric Garver
921c370a9d dpif-netlink: Probe for out-of-tree tunnels, decides used interface
On dpif init, probe for whether tunnels are created using in-tree
(upstream linux) or out-of-tree (OVS). This is done by probing for the
existence of "ovs_geneve" via rtnetlink. This is used to determine how
to create the tunnel devices.

For out-of-tree tunnels, only try genetlink/compat.
For in-tree kernel tunnels, try rtnetlink then fallback to genetlink.

Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
b6d6830d29 dpif-netlink-rtnl: Support GENEVE creation
Creates GENEVE devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
f658f95e73 dpif-netlink-rtnl: Support GRE creation
Creates GRE devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
825e45e010 dpif-netlink-rtnl: Support VXLAN creation
Creates VXLAN devices using rtnetlink and tunnel metadata.

Co-Authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:58 -07:00
Eric Garver
c4e087530e dpif-netlink: Support rtnetlink port creation.
In order to be able to add those tunnels, we need to add code to create
the tunnels and add them as NETDEV vports. And when there is no support
to create them, we need to fallback to compatibility code and add them
as tunnel vports.

When removing those tunnels, we need to remove the interfaces as well,
and detecting the right type might be important, at least to distinguish
the tunnel vports that we should remove and the interfaces that we
shouldn't.

Co-authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 12:51:57 -07:00
Eric Garver
20c57607b3 dpif-netlink: Refactor code to create compat ports
This breaks up creating compat ports so we can reuse some of the code to
create ports with rtnetlink.

Co-authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 09:46:40 -07:00
Thadeu Lima de Souza Cascardo
33d80cf955 netdev: get device type from vport prefix if it uses one
If the device name uses a vport prefix, then use that vport type.

Since these names are reserved, we can assume this is the right type.

This is important when we are querying the datapath right after vswitch has
started and using the right type will be even more important when we add support
to creating tunnel ports with rtnetlink.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
2017-05-19 09:46:39 -07:00
Stephen Finucane
56cb734293 doc: Resolve pep8 warnings in conf.py
flake8 doesn't like us redefining variables in loops.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Reported-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Fixes: f15010f ("doc: Reduce duplication in 'man_pages'")
Acked-by: Bhanuprakash Bodireddy <Bhanuprakash.bodireddy@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-19 09:13:18 -07:00
Ben Pfaff
0972b49960 AUTHORS: Correct spelling of Przemyslaw.
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-19 09:11:46 -07:00
Ben Pfaff
064ccb0ce7 coding-style: Fix typo.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
2017-05-19 09:07:09 -07:00
Jan Scheurich
081617f0df ofproto-dpif-xlate: refactor compose_output_action__
The very long function compose_output_action__() has been re-factored to make
the different cases for output to patch-port, native tunnel port, kernel tunnel
port, recirculation, or termination of a native tunnel at output to LOCAL port
clearer. Larger, self-contained blocks have been split out into separate
functions.

Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Co-authored-by: Zoltan Balogh <zoltan.balogh@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 21:42:12 -07:00
Gábor Szűcs
aff6bbb82a bfd: Fix signs in ovs-appctl bfd/show Detect Time, Next Tx Time, Last TX Time
ovs-appctl bfd/show command printout
shows negative time lag from now for upcoming events:
Detect Time: now -2632ms
Next TX Time: now -800ms
and positive time lag from now for past event:
Last TX Time: now +150ms

The fix negates the signs.

Signed-off-by: Gábor Szűcs <gabor.sz.cs@ericsson.com>
Co-authored-by: Csaba Ihllye <csaba.ihllye@ericsson.com>
Signed-off-by: Csaba Ihllye <csaba.ihllye@ericsson.com>
Signed-off-by: Andy Zhou <azhou@ovn.org>
2017-05-18 16:10:02 -07:00
Joe Stringer
b9b56b27b2 rhel: Fix openvswitch.spec install.
This is the equivalent change of 2f4f43bfdd ("rhel: fix the fedora
spec") for the regular openvswitch.spec. From that patch:

When commit d0c961a99f ("lib/automake.mk: don't install runtime
directories") landed, it broke RPM based builds since the requisite
directories were no longer available.  This commit adds those
directories back when making RPMs so that the packagemanager can see
them.

Fixes: d0c961a99f ("lib/automake.mk: don't install runtime directories")
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
2017-05-18 16:02:02 -07:00
Stephen Finucane
f15010f663 doc: Reduce duplication in 'man_pages'
All these entries are going to be roughly the same, with only two key
differences. Clarify things by focusing on those differences.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 15:49:09 -07:00
Eelco Chaudron
34d8e04bec dpif-netdev: The pmd-*-show commands will show info in core order
The "ovs-appctl dpif-netdev/pmd-rxq-show" and "ovs-appctl
dpif-netdev/pmd-stats-show" commands show their output per core_id,
sorted on the hash location. My OCD was kicking in when using these
commands, hence this change to display them in natural core_id order.

In addition I had to change a test case that would fail if the cores
where not in order in the hash list. This is due to OVS assigning
queues to cores based on the order in the hash list. The test case now
checks if any core has the set of queues in the given order.

Manually tested this on my setup, and ran clang-analyze.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 15:40:33 -07:00
Ben Pfaff
679d34757b docs: Improve formatting for daemon options in a few manpages.
daemon.man is meant to have a heading above it, but in a few manpages its
text was running directly into the previous documentation because this had
been overlooked.

By adding .PP to daemon.man, we make this problem less severe if the
heading is similarly omitted in future manpages, since at least it will
then have its own paragraph instead of running into the previous one.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
2017-05-18 15:20:17 -07:00
Ben Pfaff
343dc06145 sparse: Avoid warnings compiling stream-ssl.c.
This change avoids the following "sparse" warnings:

/usr/include/inttypes.h:105:10: warning: preprocessor token PRIu64 redefined
/usr/include/openssl/e_os2.h:275:12: this was the original definition

With this change, the build is again "sparse" clean.

I did not look into the details of this particular issue.  However, the
upshot is that including <inttypes.h> before any OpenSSL header avoids the
warning and the opposite order provokes it.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Darrell Ball <dlu998@gmail.com>
2017-05-18 15:19:05 -07:00
Ben Pfaff
7876916a46 AUTHORS: Add PrzemyslawX Szczerbik.
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 14:22:58 -07:00
Przemyslaw Szczerbik
d57f777f5d netdev-dpdk: add support for rx_multicast_packets counter
This patch enables already implemented ifInMulticastPkts counter in sFlow for
DPDK interfaces. Metric is retrieved from DPDK by using extended statistic API
and stored in 'multicast' member of netdev_stats structure, which represents
number of incoming packets that were addressed to a multicast address.

Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 14:20:30 -07:00
Bhanuprakash Bodireddy
1859876c04 dpif-netdev: Fix comments for dp_netdev_pmd_thread struct.
The sorted subtable ranking patch introduced a classifier instance per
ingress port with its subtables ranked on the frequency of hits. The PMD
thread can have more classifier instances now and solely depends on the
number of ingress ports currently handled by the pmd thread.

Fixes: 3453b4d62a ("dpif-netdev: dpcls per in_port with sorted subtables")
Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 14:17:38 -07:00
Bhanuprakash Bodireddy
3ca6d30d91 Documentation: Update DPDK doc EMC conditional insert section.
Update the documentation with the information on the megaflow hits
observed with the default 'emc-insert-inv-prob' value. Also add the
recommended setting for achieving higher forwarding performance.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
CC: Ciara Loftus <ciara.loftus@intel.com>
CC: Georg Schmuecking <georg.schmuecking@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2017-05-18 14:14:21 -07:00
Bhanuprakash Bodireddy
65dcf3da40 dpif-netdev: Reorder elements in dp_netdev structure.
'emc_insert_min' variable is made to align on a 64-byte boundary and this
introduces a 24 byte hole.

This patch moves the emc_insert_min member variable slightly higher in
the order to remove the hole and thus saves a cache line with the new
ordering.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
CC: Ciara Loftus <ciara.loftus@intel.com>
CC: Georg Schmuecking <georg.schmuecking@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2017-05-18 14:13:06 -07:00
Bhanuprakash Bodireddy
f79b1ddb84 dpif-netdev: Skip EMC lookup when EMC is disabled.
Conditional EMC insert patch gives the flexibility to configure the
probability of flow insertion in to EMC. This also allows an option to
entirely disable EMC by setting 'emc-insert-inv-prob=0' which can be
useful at large number of parallel flows.

This patch skips EMC lookup when EMC is disabled. This is useful to
avoid wasting CPU cycles and also improve performance considerably.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com>
CC: Ciara Loftus <ciara.loftus@intel.com>
CC: Georg Schmuecking <georg.schmuecking@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Darrell Ball dlu998@gmail.com
2017-05-18 14:09:28 -07:00
Ben Pfaff
49f173446b ofproto-dpif-xlate: Fix typos in comment.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
2017-05-18 14:03:46 -07:00
Kevin Traynor
47a45d868f dpif-netdev/netdev-dpdk: Fix line lengths.
Fix line lengths to be <= 79 as per coding style and so that checkpatch
will not show up existing warnings on these files.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2017-05-18 13:48:38 -07:00
Przemyslaw Lal
12d0d1242c netdev-dpdk: fix ifindex assignment for DPDK ports
In current implementation port_id is used as an ifindex for all netdev-dpdk
interfaces.

For physical DPDK interfaces using port_id as ifindex causes that '0' is set as
ifindex for 'dpdk0' interface, '1' for 'dpdk1' and so on. For the DPDK vHost
interfaces ifindexes are not even assigned (0 is used by default) due to the
fact that vHost ports don't use port_id field from the DPDK library.

This causes multiple negative side-effects. First of all 0 is an invalid
ifindex value. The other issue is possible overlapping of 'dpdkX' interfaces
ifindex values with the ifindexes of kernel space interfaces which may cause
problems in any external tools that use those values. Neither 'dpdk0', nor any
DPDK vHost interfaces are visible in sFlow collector tools, as all interfaces
with ifindexes smaller than 1 are ignored.

Proposed solution to these issues is to calculate a hash of interface's name
and use calculated value as an ifindex. This way interfaces keep their
ifindexes during OVS-DPDK restarts, ports re-initialization events, etc., show
up in sFlow collectors and meet RFC 2863 specification regarding re-using
ifindex values by the same virtual interfaces and maximum ifindex value.

Signed-off-by: Przemyslaw Lal <przemyslawx.lal@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked by: Darrell Ball <dlu998@gmail.com>
2017-05-18 13:40:50 -07:00
Joe Stringer
ce8d95546e travis: Update kernel build targets.
3.18 and 3.12 have been EOLed, 4.11 is new, and there are some minor
revisions to other kernels. Update the list.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Greg Rose <gvrose8192@gmail.com>
2017-05-18 13:40:09 -07:00
Joe Stringer
bf824a02ec configure: Reset libtool CURRENT version.
Since commit f12e09b7b2 ("libopenvswitch: Rename to libfoo-X.Y."), the
CURRENT libtool number is no longer derived from the OVS MINOR (from
vMAJOR.MINOR.MICRO) version, so it can be reset to 0.

Developers should attempt to avoid introducing ABI-breaking changes
within a particular OVS-X.Y release series. Occasionally due to the
nature of a particular bug, this is not possible. In such a case,
developers must update the libtool CURRENT version to indicate this
breakage to library users.

In most OVS library releases, this is expected to remain 0.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2017-05-17 15:26:08 -07:00