[ovs-git] [openvswitch/ovs] 29b5c0: Fix bugs in L3 protocol support.

GitHub noreply at github.com
Fri Jan 18 22:18:45 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 29b5c0c3648adce21ba0b24e0dfecc63aea820df
      https://github.com/openvswitch/ovs/commit/29b5c0c3648adce21ba0b24e0dfecc63aea820df
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2019-01-18 (Fri, 18 Jan 2019)

  Changed paths:
    M lib/odp-util.c
    M ofproto/ofproto-dpif-xlate.c
    M tests/nsh.at
    M tests/packet-type-aware.at

  Log Message:
  -----------
  Fix bugs in L3 protocol support.

Test 854 "tunnel_push_pop - action" showed problems in revalidation for
L3 protocol support in its L3 GRE test.  L3 packets (that is, packets
without an Ethernet header but only some L3 protocol such as IPv4 or IPv6)
have an Ethernet type that is kept in the dl_type member of the flow, and
the flows that they pass through can cause L3 and L4 fields to be matched.
However, the translation process incorrectly forced the dl_type to be
wildcarded, which caused a contradiction since it's not possible to match
on L3 and L4 fields if the dl_type is not known, and the code in
odp_flow_key_to_flow() and related functions therefore rejected these flows
at revalidation time.

This commit fixes the problem by treating dl_type the same for L2 and L3
flows in translation.  It also makes odp_flow_key_to_flow__() copy the
Ethernet type that comes from a packet_type field into dl_type, which is
the expected behavior.

The actual error that this fixes is only visible after applying an upcoming
commit that improves logging for bad datapath flows.

Acked-by: Justin Pettit <jpettit at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 3c61cc7ca9797212a9fcc17cda2bf9fc72a806e3
      https://github.com/openvswitch/ovs/commit/3c61cc7ca9797212a9fcc17cda2bf9fc72a806e3
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2019-01-18 (Fri, 18 Jan 2019)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Avoid revalidation error for masked NSH set action.

A masked NSH set action has mdtype 0 because the mdtype is not being
changed, but odp_nsh_key_from_attr() rejects this because mdtype 0 does
not match up with the OVS_NSH_KEY_ATTR_MD1 attribute being present.  This
fixes the problem.

The kernel datapath in flow_netlink function nsh_key_put_from_nlattr() has
a similar exception.

Acked-by: Justin Pettit <jpettit at ovn.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/99a542ea8bea...3c61cc7ca979
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list