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

GitHub noreply at github.com
Wed Mar 14 23:45:03 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: efde188622aea5c2137e931f4a446c511676ba32
      https://github.com/openvswitch/ovs/commit/efde188622aea5c2137e931f4a446c511676ba32
  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