1. 19 Jul, 2017 1 commit
  2. 18 Jul, 2017 1 commit
    • Han Zhou's avatar
      Revert "netdev: Fix netdev_open() to adhere to class type if given" · 9a036156
      Han Zhou authored
      This reverts commit d3b8f505.
      
      The commit introduced a problem that "File exists" will be reported
      when trying to open br0.
      
      The operation that adds eth0 to br0 while moving IP address from
      eth0 to bridge internal interface br0 reproduces this issue.
      
      $ ip a del <ip> dev eth0; ip a add <ip> dev br0; ovs-vsctl add-port br0 eth0
      $ ovs-dpctl show
      ...
      port 1: br0 (internal: open failed (File exists))
      ...
      
      At this point restarting OVS will result in connection lost for the
      node.
      
      Reverting the change fixes the problem. Since adding physical interface
      to OVS bridge is quite normal operation, the problem is more severe
      than the original problem fixed by commit d3b8f505, so revert this
      before a better fix is found for the original problem.
      Signed-off-by: default avatarHan Zhou <zhouhan@gmail.com>
      Signed-off-by: default avatarJustin Pettit <jpettit@ovn.org>
      9a036156
  3. 17 Jul, 2017 1 commit
  4. 14 Jul, 2017 1 commit
    • ZhiPeng Lu's avatar
      db-ctl-base: Fix reference-following feature in get_row_by_id(). · 29c7ec85
      ZhiPeng Lu authored
      If a particular column is supposed to be reached by following a reference
      from a UUID column, then that really needs to happen; if there's no
      reference, then we're probably starting from a row in the wrong table.
      
      This fixes an assertion failure in command "ovs-vsctl list netflow br0",
      if bridge br0 without any netflows.
      $ovs-vsctl list netflow br0
      ovs-vsctl: lib/ovsdb-idl.c:2407: assertion column_idx < class->n_columns failed
      in ovsdb_idl_read()
      Aborted
      
      Fixes: 3f5b5f7b ("db-ctl-base: Always support all tables in schema.")
      Signed-off-by: default avatarZhipeng Lu <lu.zhipeng@zte.com.cn>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      29c7ec85
  5. 13 Jul, 2017 1 commit
  6. 12 Jul, 2017 8 commits
  7. 07 Jul, 2017 5 commits
  8. 06 Jul, 2017 3 commits
  9. 29 Jun, 2017 1 commit
  10. 20 Jun, 2017 3 commits
  11. 19 Jun, 2017 2 commits
    • William Stevenson's avatar
      Documentation/topics/dpdk/vhost-user.rst small fixes · c6fda164
      William Stevenson authored
      A few trivial fixes to vhost-user documentation including a syntax
      error in the included xml file.
      Signed-off-by: default avatarWilliam Stevenson <yhvh2000@gmail.com>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      c6fda164
    • Greg Rose's avatar
      compat: Restrict __ro_after_init usage · 21d18d93
      Greg Rose authored
      The attribute __ro_after_init was introduced in Linux kernel 4.5.  If
      a data structure is given this attribute then after the driver module
      loads the memory page where the data resides will be marked read only.
      
      The compat code in cache.h always defines __ro_after_init if it is not
      already defined so that it can be used as an attribute for the datapath
      genl_family structure definitions.  If __ro_after_init is defined then
      it is used "as-is" where it will apply the read only attribute after
      driver initialization.
      
      This is incorrect usage for the Generic Netlink genl_family structure
      definitions prior to Linux kernel 4.10.  The genl_family structure
      in those kernels includes a list header member that will be written
      to when the generic netlink family is unregistered.  This will cause
      a subsequent page fault and kernel panic because at this time the
      genl_family structure data has been marked read only in the page
      descriptor.
      
      A new compat macro is introduced in acinclude.m4 to detect when the
      genl_family structure has the family_list list header as a member.
      In this case HAVE_GENL_FAMILY_LIST is defined and if __ro_after_init
      is also defined then it is undefined and redefined as empty.  This
      will prevent the genl_family data structure from being marked read
      only in kernels 4.5 through 4.9 and thus prevent the page fault when
      the generic netlink families in datapath.c are unregistered.
      
      [Committer notes]
      * Rolled a short explanation comment into the code.
      
      Fixes: ba63fe26 ("datapath: Allow compile against current net-next.")
      CC: Jarno Rajahalme <jarno@ovn.org>
      Signed-off-by: default avatarGreg Rose <gvrose8192@gmail.com>
      Signed-off-by: default avatarJoe Stringer <joe@ovn.org>
      21d18d93
  12. 14 Jun, 2017 6 commits
    • Ben Pfaff's avatar
      ofproto-dpif-xlate: Fix an additional misaligned reference to ovs_u128. · 2ff50592
      Ben Pfaff authored
      nl_msg_put_unspec_uninit() can return a pointer that is only 4-byte
      aligned.
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      Acked-by: default avatarLance Richardson <lrichard@redhat.com>
      2ff50592
    • Ben Pfaff's avatar
      netlink: Introduce helpers for 128-bit integer attributes. · 0236ef1e
      Ben Pfaff authored
      Use the helpers in appropriate places.  In most cases, this fixes a
      misaligned reference, since ovs_be128 and ovs_u128 require 8-byte alignment
      but Netlink only guarantees 4-byte.
      
      Found by GCC -fsanitize=undefined.
      Reported-by: default avatarLance Richardson <lrichard@redhat.com>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      Acked-by: default avatarLance Richardson <lrichard@redhat.com>
      0236ef1e
    • Ben Pfaff's avatar
      unaligned: Introduce helpers for 32-bit aligned 128-bit integers. · efa9b523
      Ben Pfaff authored
      These are analogous to the existing helpers for 32-bit aligned 64-bit
      integers, and will have users in upcoming commits.
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      Acked-by: default avatarLance Richardson <lrichard@redhat.com>
      efa9b523
    • Ben Pfaff's avatar
      odp-util: Avoid misaligned references to ip6_hdr. · 71107677
      Ben Pfaff authored
      Found by GCC -fsanitize=undefined.
      Reported-by: default avatarLance Richardson <lrichard@redhat.com>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      71107677
    • Eelco Chaudron's avatar
      netdev: Fix netdev_open() to adhere to class type if given · d3b8f505
      Eelco Chaudron authored
      When trying to configure a system port as type=internal it could start
      an infinite port creation loop. When this happens you will see the
      following log messages:
      
      2017-06-01T09:00:17.900Z|02813|dpif|WARN|system@ovs-system: failed to add ve01_1 as port: File exists
      2017-06-01T09:00:17.900Z|02814|bridge|WARN|could not add network device ve01_1 to ofproto (File exists)
      2017-06-01T09:00:17.907Z|02815|bridge|INFO|bridge bzb: added interface ve01_1 on port 2
      2017-06-01T09:00:17.909Z|02816|bridge|INFO|bridge bzb: deleted interface ve01_1 on port 2
      2017-06-01T09:00:17.914Z|02817|dpif|WARN|system@ovs-system: failed to add ve01_1 as port: File exists
      2017-06-01T09:00:17.914Z|02818|bridge|WARN|could not add network device ve01_1 to ofproto (File exists)
      2017-06-01T09:00:17.921Z|02819|bridge|INFO|bridge bzb: added interface ve01_1 on port 3
      2017-06-01T09:00:17.923Z|02820|bridge|INFO|bridge bzb: deleted interface ve01_1 on port 3
      2017-06-01T09:00:17.929Z|02821|dpif|WARN|system@ovs-system: failed to add ve01_1 as port: File exists
      2017-06-01T09:00:17.929Z|02822|bridge|WARN|could not add network device ve01_1 to ofproto (File exists)
      2017-06-01T09:00:17.936Z|02823|bridge|INFO|bridge bzb: added interface ve01_1 on port 4
      ...
      ...
      
      This is how to replicate it:
      
        ip link add name ve01_1 type veth peer name ve01_2
        ovs-vsctl add-br bzb
        ovs-vsctl add-port bzb ve01_1
        ovs-vsctl set interface ve01_1 type=internal
        ip link set dev ve01_1 up
        ip link set dev ve01_2 up
      
      When changing the type to internal, the async configuration logic get
      triggered and because the type has changed it will delete the
      interface and the ofproto port. Next it will call iface_do_create() to
      re-create the interface as internal. Because we just deleted the
      interface netdev_open() will try to recreate it as internal.
      
      However this will fail with EEXIST as a system interface already
      exists withe the name.
      
      Up till here all is fine...
      
      Now some ipv6 route change comes along for the ve01_1 interface, and
      the route infrastructure will call netdev_open(). This will create the
      interface of type system.
      
      Next the configuration verify process gets triggered due to
      if_notifier_changed() being true. We now retry the above, but because
      the interface exists (although in the system class) it will use it,
      and create the interface successfully.
      
      This triggers another if notification, causing yet another config
      update, and because the system != internal reconfiguration happens and
      it start from the top...
      
      So the fix as presented below is causing netdev_open() only to return
      the existing device for the class type requested (if the type is
      specified).
      Signed-off-by: default avatarEelco Chaudron <echaudro@redhat.com>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      d3b8f505
    • Ben Pfaff's avatar
      ovs-ofctl: Avoid read overrun in ofperr_decode_msg(). · f3f7e71b
      Ben Pfaff authored
      vconn_add_bundle_error() was keeping at most 64 bytes of an OpenFlow
      error message, then it was passing it to ofperr_decode_msg(), which assumed
      that the full message was available.  This led to a buffer overread.
      There's no good reason why it was only keeping the first 64 bytes, so this
      commit changes it to keep the whole error message, sidestepping the
      problem.
      
      struct vconn_bundle_error only existed for this special case, so remove it
      in favor of a chain of ofpbufs.
      
      Found via gcc's address sanitizer.
      Reported-by: default avatarLance Richardson <lrichard@redhat.com>
      Fixes: 506c1ddb ("vconn: Better bundle error management.")
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      Acked-by: default avatarJarno Rajahlame <jarno@ovn.org>
      f3f7e71b
  13. 13 Jun, 2017 1 commit
  14. 12 Jun, 2017 2 commits
  15. 07 Jun, 2017 1 commit
    • Timothy Redaelli's avatar
      tests: Export PYTHONCOERCECLOCALE=0 for python3 tests · 6180d2a5
      Timothy Redaelli authored
      This patch exports PYTHONCOERCECLOCALE=0 when you have Python3 tests
      enabled.
      This is needed since testsuite forces LC_ALL=C and Python 3, with PEP 538,
      prints the following warning on stderr:
      
      "Python runtime initialized with LC_CTYPE=C (a locale with default ASCII
      encoding), which may cause Unicode compatibility problems. Using C.UTF-8,
      C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is
      recommended."
      
      AT_CHECK reports it as an error since stderr is not empty as it should be.
      
      This patch is needed, at least, on Fedora 26 and Rawhide (backported PEP
      538 on Python 3.6).
      This will also be needed on any distribution with Python 3.7 (PEP 538).
      Signed-off-by: default avatarTimothy Redaelli <tredaelli@redhat.com>
      Signed-off-by: default avatarBen Pfaff <blp@ovn.org>
      6180d2a5
  16. 02 Jun, 2017 3 commits