[ovs-git] [openvswitch/ovs] 165962: odp-util: Print eth() for Ethernet flows if packet...

GitHub noreply at github.com
Wed Mar 14 23:47:31 UTC 2018


  Branch: refs/heads/branch-2.8
  Home:   https://github.com/openvswitch/ovs
  Commit: 16596279409827b2e0af2420888d7024d10ab99d
      https://github.com/openvswitch/ovs/commit/16596279409827b2e0af2420888d7024d10ab99d
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-03-14 (Wed, 14 Mar 2018)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Print eth() for Ethernet flows if packet_type is absent.

OVS datapaths have two different ways to indicate what kind of packet a
flow matches.  One way, used by the userspace datapath, is
OVS_KEY_ATTR_PACKET_TYPE.  Another way, used by the kernel datapath, is
OVS_KEY_ATTR_ETHERTYPE when used in the absence of OVS_KEY_ATTR_ETHERNET;
when the latter is present, the packet is always an Ethernet packet.  The
code to print datapath flows wasn't paying attention to this distinction
and always omitted eth() from the output when OVS_KEY_ATTR_ETHERNET was
fully wildcarded, which meant that upon later re-parsing the
OVS_KEY_ATTR_ETHERNET key was omitted, which made it look like a
non-Ethernet match was being described.

This commit makes odp_util_format() add eth() to the output when
OVS_KEY_ATTR_ETHERNET is present and OVS_KEY_ATTR_PACKET_TYPE is absent,
avoiding the problem.

Reported-by: Amar Padmanabhan <amarpadmanabhan at fb.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2017-December/045817.html
Reported-by: Su Wang <suwang at vmware.com>
VMWare-BZ: #2070488
Signed-off-by: Ben Pfaff <blp at ovn.org>
Tested-by: Yi-Hung Wei <yihung.wei at gmail.com>
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>




More information about the git mailing list