[ovs-git] [openvswitch/ovs] efde18: odp-util: Print eth() for Ethernet flows if packet...
noreply at github.com
Wed Mar 14 23:45:03 UTC 2018
Author: Ben Pfaff <blp at ovn.org>
Date: 2018-03-14 (Wed, 14 Mar 2018)
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-by: Su Wang <suwang at vmware.com>
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