2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 21:38:13 +00:00

9773 Commits

Author SHA1 Message Date
Thomas Graf
526df7d854 tunnel: Provide framework for tunnel extensions for VXLAN-GBP and others
Supports a new "exts" field in the tunnel configuration which takes a
comma separated list of enabled extensions.

The only extension supported so far is GBP but this can be used to
enable RCO and possibly others as soon as the OVS datapath supports
them.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-06 21:10:45 +01:00
Thomas Graf
adfaaeaced datapath: Allow building against 3.19.x
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-06 21:10:44 +01:00
Thomas Graf
44e1f2a897 datapath: Account for "vxlan: Eliminate dependency on UDP socket in transmit path"
Excludes VXLAN_F_REMCSUM_TX bits as OVS currently doesn't support it.

Upstream commit:
    vxlan: Eliminate dependency on UDP socket in transmit path

    In the vxlan transmit path there is no need to reference the socket
    for a tunnel which is needed for the receive side. We do, however,
    need the vxlan_dev flags. This patch eliminate references
    to the socket in the transmit path, and changes VXLAN_F_UNSHAREABLE
    to be VXLAN_F_RCV_FLAGS. This mask is used to store the flags
    applicable to receive (GBP, CSUM6_RX, and REMCSUM_RX) in the
    vxlan_sock flags.

    Signed-off-by: Tom Herbert <therbert@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: af33c1adae1e ("vxlan: Eliminate dependency on UDP socket in transmit path")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-06 21:10:44 +01:00
Thomas Graf
0c7930a365 datapath: Support VXLAN Group Policy extension
Upstream commit:
    openvswitch: Support VXLAN Group Policy extension

    Introduces support for the group policy extension to the VXLAN virtual
    port. The extension is disabled by default and only enabled if the user
    has provided the respective configuration.

      ovs-vsctl add-port br0 vxlan0 -- \
         set Interface vxlan0 type=vxlan options:exts=gbp

    The configuration interface to enable the extension is based on a new
    attribute OVS_VXLAN_EXT_GBP nested inside OVS_TUNNEL_ATTR_EXTENSION
    which can carry additional extensions as needed in the future.

    The group policy metadata is stored as binary blob (struct ovs_vxlan_opts)
    internally just like Geneve options but transported as nested Netlink
    attributes to user space.

    Renames the existing TUNNEL_OPTIONS_PRESENT to TUNNEL_GENEVE_OPT with the
    binary value kept intact, a new flag TUNNEL_VXLAN_OPT is introduced.

    The attributes OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS and existing
    OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS are implemented mutually exclusive.

    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: 1dd144 ("openvswitch: Support VXLAN Group Policy extension")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-06 21:10:44 +01:00
Gurucharan Shetty
274231631a appveyor: Build windows kernel datapath.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Nithin Raju <nithin@vmware.com>
2015-02-06 07:34:01 -08:00
Nithin Raju
978ce0e92c Update INSTALL.Windows to build datapath
In a previous commit, support had been added to support building
the kernel datapath from command line. In this patch, we document
it.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2015-02-06 06:59:51 -08:00
Gurucharan Shetty
d8a2492726 appveyor: Provide a autobuild service for Windows.
The appveyor.yml file added through this commit lets
AppVeyor auto build service to run a build of OVS on
Windows platform.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2015-02-05 11:21:16 -08:00
Gurucharan Shetty
bb996e5b78 INSTALL.Windows: Don't specify the openssl version.
Windows openssl libraries are distributed through slproweb.
The maintainer there is very strict about retiring unsafe
versions of openssl and only lets the latest versions of
openssl to be downloaded. Instead of updating INSTALL.Windows
everytime there is a change in latest version, leave it to
user's discretion to download the latest version.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-05 11:20:48 -08:00
Thomas Graf
4ceb6c8796 datapath: Fix missing symbols when required to use own VXLAN stack
Fixes an insufficient ifdef in compat/vxlan.c which caused required
symbols not to be included in the build. The declarations were properly
enabled so the build would succeed but the module would spit missing
symbols when being inserted.

The fix uses a new define USE_UPSTREAM_VXLAN which is set in the compat
header <net/vxlan.h> as required. This centralizes the decision when to
include VXLAN compat code to a single place which eases further changes.

Reported-by: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-05 10:27:38 -08:00
Jarno Rajahalme
4d9226a746 ofproto: Initialize tunnel module earlier.
The tunnel module can get called by the handler threads right after
they are started, so we need to call ofproto_tunnel_init() before
opening the backer.

Late initialization caused a spurious ovs-vswitchd handler thread
crash on start-up due to the tunnel module fat_rwlock not being
initialized yet.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-04 16:24:17 -08:00
Thomas Graf
b9aa727c9d travis: Add 32 bit (-m32) cross-compile build
Inspired by Ben Pfaff's email on 32 bit build environment, this adds a
32bit build to the travis build matrix to catch alignment and padding
issues.

The 32 bit build is only enabled for non-DPDK builds as DPDK itself is
currently not capable to be compiled with -m32.

The build also has SSL disabled as the Ubuntu libssl-devel package is
not multiarch compatible on the travis build system.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-04 23:14:05 +01:00
Flavio Leitner
8e04a33ffc mcast-snoop: Add support to control Reports forwarding
The RFC4541 section 2.1.1 item 1 allows the snooping switch
to provide an administrative control to allow Report messages
to be flooded to ports not connected to multicast routers.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-02-04 10:49:07 -08:00
Flavio Leitner
f4ae6e23c3 mcast_snoop: make mcast_fport_bundle generic
The struct mcast_fport_bundle will be used for ports
forwarding Reports too, so make it generic.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-02-04 09:59:25 -08:00
Alex Wang
ec97c2df3c ovs-dpctl: Do not report pmd info for 'dpif-netlink' datapath.
In 'ovs-dpctl dump-flows' output, we should only report the pmd
related info for 'dpif-netdev' datapath.  However, current
implementation also reports uninitialized pmd info for
'dpif-netlink' datapath, which is very confusing to users.

This commit fixes it.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-03 17:59:16 -08:00
Alex Wang
b8905bfa9d ovs-command-completion: Complete on file path by default.
This commit makes the bash completion script complete on file
path when there is no completion available.  The unit tests
are also adjusted accordingly.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-03 17:57:55 -08:00
Ben Pfaff
08ba081054 ofp-util: Issue error when OFPGC_DELETE command includes buckets.
An OFPGC_DELETE command deletes a whole group, including all of its
buckets, and so it doesn't make sense for the command itself to include any
specification of buckets.

ONF-JIRA: EXT-510
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-02-03 15:25:10 -08:00
Ben Pfaff
5dc6f8e18e NEWS: Mention group support in version 2.1.
Someone asked about support and I realized that we forgot to mention it,
so do so belatedly.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-02-03 14:57:06 -08:00
Andy Zhou
2846588763 datapath: update exact match lookup hash value to avoid hash collision
Currently, the exact match cache lookup uses 'skb->hash' as an index.
In most cases, this value will be the same for pre and post
recirculation lookup, threshing the exact match cache. This patch
avoid this hash collision by using the rehashed value, by mixing in
in the 'recirc_id', as the lookup index.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 15:10:04 -08:00
Thomas Graf
23b48dc182 datapath: Account for "netlink: make nlmsg_end() and genlmsg_end() void"
genlmsg_end() no longer returns an error value. Not a problem as it
never returned an error code anyway.

Upstream: 053c09 ("netlink: make nlmsg_end() and genlmsg_end() void")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 22:31:20 +01:00
Thomas Graf
6233a1bdf1 datapath: Account for "genetlink: pass only network namespace to genl_has_listeners()"
Upstream commit:
    genetlink: pass only network namespace to genl_has_listeners()

    There's no point to force the caller to know about the internal
    genl_sock to use inside struct net, just have them pass the network
    namespace. This doesn't really change code generation since it's
    an inline, but makes the caller less magic - there's never any
    reason to pass another socket.

    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: f8403a2 ("genetlink: pass only network namespace to genl_has_listeners()")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 22:31:20 +01:00
Thomas Graf
ec959cdcb9 datapath: Allow for any level of nesting in flow attributes
Upstream commit:
    openvswitch: Allow for any level of nesting in flow attributes

    nlattr_set() is currently hardcoded to two levels of nesting. This change
    introduces struct ovs_len_tbl to define minimal length requirements plus
    next level nesting tables to traverse the key attributes to arbitrary depth.

    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: 81bfe3 ("openvswitch: Allow for any level of nesting in flow attributes")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:57:02 +01:00
Thomas Graf
4b1632249f datapath: Rename GENEVE_TUN_OPTS() to TUN_METADATA_OPTS()
Backport of upstream commit:

    openvswitch: Rename GENEVE_TUN_OPTS() to TUN_METADATA_OPTS()

    Also factors out Geneve validation code into a new separate function
    validate_and_copy_geneve_opts().

    A subsequent patch will introduce VXLAN options. Rename the existing
    GENEVE_TUN_OPTS() to reflect its extended purpose of carrying generic
    tunnel metadata options.

    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: d91641d ("openvswitch: Rename GENEVE_TUN_OPTS() to TUN_METADATA_OPTS()")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:56:51 +01:00
Thomas Graf
2311260fc1 datapath: Account for "vxlan: add x-netns support"
Upstream commit:
    vxlan: add x-netns support

    This patch allows to switch the netns when packet is encapsulated or
    decapsulated.
    The vxlan socket is openned into the i/o netns, ie into the netns where
    encapsulated packets are received. The socket lookup is done into this netns to
    find the corresponding vxlan tunnel. After decapsulation, the packet is
    injecting into the corresponding interface which may stand to another netns.

    When one of the two netns is removed, the tunnel is destroyed.

    Configuration example:
    ip netns add netns1
    ip netns exec netns1 ip link set lo up
    ip link add vxlan10 type vxlan id 10 group 239.0.0.10 dev eth0 dstport 0
    ip link set vxlan10 netns netns1
    ip netns exec netns1 ip addr add 192.168.0.249/24 broadcast 192.168.0.255 dev vxlan10
    ip netns exec netns1 ip link set vxlan10 up

    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: f01ec1c017de ("vxlan: add x-netns support")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:56:41 +01:00
Thomas Graf
3174a818a1 datapath: Account for "vxlan: Group Policy extension"
Upstream commit:
    vxlan: Group Policy extension

    Implements supports for the Group Policy VXLAN extension [0] to provide
    a lightweight and simple security label mechanism across network peers
    based on VXLAN. The security context and associated metadata is mapped
    to/from skb->mark. This allows further mapping to a SELinux context
    using SECMARK, to implement ACLs directly with nftables, iptables, OVS,
    tc, etc.

    The group membership is defined by the lower 16 bits of skb->mark, the
    upper 16 bits are used for flags.

    SELinux allows to manage label to secure local resources. However,
    distributed applications require ACLs to implemented across hosts. This
    is typically achieved by matching on L2-L4 fields to identify the
    original sending host and process on the receiver. On top of that,
    netlabel and specifically CIPSO [1] allow to map security contexts to
    universal labels.  However, netlabel and CIPSO are relatively complex.
    This patch provides a lightweight alternative for overlay network
    environments with a trusted underlay. No additional control protocol
    is required.

               Host 1:                       Host 2:

          Group A        Group B        Group B     Group A
          +-----+   +-------------+    +-------+   +-----+
          | lxc |   | SELinux CTX |    | httpd |   | VM  |
          +--+--+   +--+----------+    +---+---+   +--+--+
          \---+---/                     \----+---/
              |                              |
          +---+---+                      +---+---+
          | vxlan |                      | vxlan |
          +---+---+                      +---+---+
              +------------------------------+

    Backwards compatibility:
    A VXLAN-GBP socket can receive standard VXLAN frames and will assign
    the default group 0x0000 to such frames. A Linux VXLAN socket will
    drop VXLAN-GBP  frames. The extension is therefore disabled by default
    and needs to be specifically enabled:

       ip link add [...] type vxlan [...] gbp

    In a mixed environment with VXLAN and VXLAN-GBP sockets, the GBP socket
    must run on a separate port number.

    Examples:
     iptables:
      host1# iptables -I OUTPUT -m owner --uid-owner 101 -j MARK --set-mark 0x200
      host2# iptables -I INPUT -m mark --mark 0x200 -j DROP

     OVS:
      # ovs-ofctl add-flow br0 'in_port=1,actions=load:0x200->NXM_NX_TUN_GBP_ID[],NORMAL'
      # ovs-ofctl add-flow br0 'in_port=2,tun_gbp_id=0x200,actions=drop'

    [0] https://tools.ietf.org/html/draft-smith-vxlan-group-policy
    [1] http://lwn.net/Articles/204905/

    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: 351149 ("vxlan: Group Policy extension")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:56:31 +01:00
Thomas Graf
ababf4247a datapath: Account for now exposed VXLAN definitions
This brings the compat version of vxlan_udp_encap_recv() and
vxlan_xmit_skb() in line with upstream commit:

	commit 3bf3947526c1053ddf2523f261395d682718f56c
	Author: Tom Herbert <therbert@google.com>
	Date:   Thu Jan 8 12:31:18 2015 -0800

    vxlan: Improve support for header flags

    This patch cleans up the header flags of VXLAN in anticipation of
    defining some new ones:

    - Move header related definitions from vxlan.c to vxlan.h
    - Change VXLAN_FLAGS to be VXLAN_HF_VNI (only currently defined flag)
    - Move check for unknown flags to after we find vxlan_sock, this
      assumes that some flags may be processed based on tunnel
      configuration
    - Add a comment about why the stack treating unknown set flags as an
      error instead of ignoring them

    Signed-off-by: Tom Herbert <therbert@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: 3bf394 ("vxlan: Improve support for header flags")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:56:21 +01:00
Thomas Graf
efd8a18e8d datapath: Account for "rename vlan_tx_* helpers since "tx" is misleading there"
Upstream commit:
    net: rename vlan_tx_* helpers since "tx" is misleading there

    The same macros are used for rx as well. So rename it.

    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: df8a39d ("net: rename vlan_tx_* helpers since "tx" is misleading there")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-02-03 21:55:38 +01:00
Ben Pfaff
4fe0f20391 ofproto-dpif: Revalidate when sFlow probability changes.
Until now, when the sFlow selection probability changed, OVS failed to
immediately revalidate the flow table, delaying the new probability taking
effect.  This commit fixes the problem.

Reported-by: K 華 <k940545@hotmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-02-03 11:20:01 -08:00
YAMAMOTO Takashi
c1419aa1d8 vlog: Fix "/dev/log" test
commit 7905aae3fc1633c2c44c8fdb9e9d3a3d6e63439b
("vlog: Don't fail syslog initialization in chroot.")
uses os.path.isfile("/dev/log"), which tests if the given path
is a regular file, to see if syslog can be usable.

However, /dev/log is not a regular file for platforms I looked at.
    * On Ubuntu 14.04 and CentOS 6.5, /dev/log is a socket
    * On NetBSD-6, /dev/log is a symlink to a socket

Replace the test with os.path.exists() so that it can work
as intended for these platforms.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2015-02-03 14:17:45 +09:00
Jarno Rajahalme
115f248163 miniflow: Fix miniflow push of L4 port numbers.
Replace a 64 bit copy of L4 src/dst ports that was also
including additional packet params (e.g. TCP Seq Num). This
was later resulting in all packets from the flow missing in
the EMC.

Signed-off-by: Kevin Traynor <kevin.traynor@intel.com>
Reported-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2015-02-02 18:06:50 -08:00
Alex Wang
1b8c7b961c ovs-command-completion: Avoid using negative subscript.
Negative subscript causes error in bash version 4.1.2(1)-release
(x86_64-redhat-linux-gnu).  This commit fixes it.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-02-01 21:21:38 -08:00
Alex Wang
08d425488a ovs-command-completion: Autotest integration.
This commit integrates the unit tests defined in
utilities/ovs-command-compgen-test.bash into 'make check'.
The tests will be skipped if the current shell is not bash.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-30 15:28:22 -08:00
Alex Wang
9530457f24 ovs-vsctl.at: Fix intermittent failure.
This commit fixes the intermittent test failure caused by the
race between the test thread and logging thread.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-30 14:59:27 -08:00
Ben Pfaff
5989a51c88 ovs-dpctl: Mention use of ovs-appctl instead for netdev datapath.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2015-01-30 13:38:45 -08:00
Sorin Vinturis
448d667b7b datapath-windows: Solved BSOD when loading an activated extension
If the OVS extension was previously enabled and the driver unloaded,
when the driver is loaded again a BSOD is triggered.

This happens because the OVS extension registers its FilterXxx routines
to NDIS, by calling NdisFRegisterFilterDriver, before performing all
the necessary initialization. Because drivers that call
NdisFRegisterFilterDriver must be prepared for an immediate call to any
of their FilterXxx functions.

The BSOD is triggered because the FilterAttach routine, OvsExtAttach,
tries to acquire the control lock, when the lock is not yet initialized.
This happens because the FilterAttach is called before the driver
finishes initialization, in OvsInit().

The solution is to perform all necessary initialization before
registering OVS FilterXxx routines.

If device object creation fails, all allocated resources during init
phase are released by calling OvsCleanup and NdisFDeregisterFilterDriver
functions.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/67
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-01-30 13:26:57 -08:00
Ben Pfaff
7be0b8a0b0 ovs-bugtool: Add --help message.
Seemed a little embarrassing when I realized that ovs-bugtool has no usage
message on a customer call this morning.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-01-30 13:22:33 -08:00
Christoph Jaeger
95bad473da autotest: Use modprobe for kernel module unloading
rmmod fails if the module is not loaded; thus, Vagrant aborts provisioning
when started from a clean slate. Use modprobe, which does not fail, instead.
Unloading unused modules the to-be-unloaded module depends on may also be
desirable.

Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
2015-01-29 13:39:08 -08:00
Gurucharan Shetty
7905aae3fc vlog: Don't fail syslog initialization in chroot.
When OVS unit tests are run inside chroot environment,
there is no syslog infrastructure available. In a
situation like that, don't fail or log additional messages
to syslog by increasing the severity level of syslog very high
(log messages would continue to be logged to console and file).

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-29 11:00:35 -08:00
Mark D. Gray
491c2ea323 INSTALL.DPDK: Update documentation to indicate VFIO support
Since DPDK 1.7, VFIO is supported in place of UIO. This allows
a user to avoid having to insert a non-standard kernel module.

This patch updates the documentation with instructions for
setting up OVS with VFIO. As part of this work, VFIO was also
successfully tested with OVS and the DPDK netdev.

[tgraf: Added some more markdown formatting]

Signed-off-by: Mark D. Gray <mark.d.gray@intel.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-29 16:34:36 +01:00
Christoph Jaeger
ebdabd05e9 autotest: Fix kernel module unit test teardown
Due to a misnaming, the macro calls

  OVS_SWITCHD_STOP([$1])
  AT_CHECK([modprobe -r openvswitch])

in OVS_KMOD_VSWITCHD_STOP make up a syntactically correct function definition
(OVS_SWITCHD_STOP does not exist, and therefore the call does not expand):

  OVS_SWITCHD_STOP()
  { set +x
  $as_echo "$at_srcdir/kmod-traffic.at:15: modprobe -r openvswitch"
  ...
  $at_traceon; }

Consequently, neither of the calls has the intended effect, i.e., stopping
ovs-vswitchd and ovsdb-server, checking their log files, and unloading the
datapath kernel module. Fix the misnaming, so all calls expand properly.

Fixes: 69c2bdfef9 ("autotest: add autotest framework for adding kernel module unit tests")
Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>

Author: add Christoph Jaeger
2015-01-28 21:26:06 -08:00
Gurucharan Shetty
d69d61c7c1 vlog: Ability to override the default log facility.
When Open vSwitch is run in hundreds of hypervisors, it is
useful to collect log messages through log collectors. To
collect log messages like this, it is useful to log them
in a particular RFC5424 facility in the local system. The
log collectors can then be used to collect logs anytime
desired.

This commit provides a sysadmin the ability to specify the
facility through which the log messages are logged.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-28 08:32:37 -08:00
Simon Horman
1667bb3498 ofp-util: constify buckets parameter of ofputil_append*_group_desc_reply()
This parameter is not modified so it may be marked as const.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-27 15:47:38 +01:00
Gurucharan Shetty
a52b0492a4 INSTALL.DPDK.md: Provide a little a more consistency to documentation.
A few users (based on the reports in discuss@openvswitch.org) have been
literally following the instructions in INSTALL.DPDK.md and mixing up
pre-installed utilities and daemons with freshly compiled utilities
because the current documentation does not consistently call out
using utilities from the compiled sources.

This commit updates DPDK documentation to ask users to do a 'make install'
and then use the utilities and daemons directly from Linux PATH.
It also adds github markup where applicable.

Reported-by: Arkajit Ghosh <arkajit.ghosh@tcs.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-01-26 14:44:24 -08:00
Gurucharan Shetty
47ff8abb5f vlog: Logging option '--syslog-target' needs one argument.
Without this commit, starting a daemon with just '--syslog-target'
causes a segmentation fault.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-26 13:20:42 -08:00
Ben Pfaff
2dd88e5d65 test-sflow: Fix error message when a socket cannot be opened.
The error message should name the socket, which is 'target', not argv[1],
which might be anything.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-23 14:11:28 -08:00
Ben Pfaff
20e4ec1a2b ofp-errors: Use OFPERR_OFPBRC_IS_SLAVE to reject slave controllers.
This error code was just overlooked before.

Reported-by: Anup Khadka <khadka.py@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-22 09:08:27 -08:00
Ben Pfaff
4ba1522163 ofp-errors: Explain the whole "expected duplications" thing.
That way I won't have to figure it out again the next time.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-22 09:08:15 -08:00
Gao feng
a78f446a94 setup n_upcall_pids for vport_request when destroy all channels
Setup the n_upcall_pids to 1, otherwise the
OVS_VPORT_ATTR_UPCALL_PID nlattr will be incorrect.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-22 12:14:22 +01:00
Ben Pfaff
679126501f ofproto-dpif: Fix memory leak of mirrors in bundle_destroy().
The mirrors are added in bundle_set() with 'bundle' as aux so they must
be removed with the same aux, but the call used 'bundle->aux' instead.

Reported-by: Sabyasachi Sengupta <Sabyasachi.Sengupta@alcatel-lucent.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-01-21 21:09:56 -08:00
Joe Stringer
70f07728ed upcall: Simplify enable_ufid debug option.
We previously tracked the debug enable/disable of UFID in each udpif,
and allowed the ovs-appctl debug option to turn on UFID features even if
the datapath doesn't support it.

This commit shifts the enable_ufid debug flag to a single flag, and
provides a helper to determine whether UFID features should be used on a
per-udpif basis.

Suggested-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-20 12:47:29 -08:00
Ben Pfaff
dc707e6684 vconn: Move struct definitions back to provider interface.
Commit 4a1f523f2d760 (lib: Move vconn.h to <openvswitch/vconn.h>) moved
the definitions of struct vconn and struct pvconn into the public vconn.h
header.  This is unnecessary because the size and content of these structs
is not part of the ABI.  This commit moves them back.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-01-20 04:49:09 -08:00