[ovs-git] [openvswitch/ovs] ce4b83: ofproto-dpif-xlate: Fix revalidation in execute_co...

GitHub noreply at github.com
Tue Dec 15 01:16:00 UTC 2015


  Branch: refs/heads/branch-2.4
  Home:   https://github.com/openvswitch/ovs
  Commit: ce4b834e7f0728402559819a53423c7f16102b5c
      https://github.com/openvswitch/ovs/commit/ce4b834e7f0728402559819a53423c7f16102b5c
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-11 (Fri, 11 Dec 2015)

  Changed paths:
    M ofproto/ofproto-dpif-xlate.c

  Log Message:
  -----------
  ofproto-dpif-xlate: Fix revalidation in execute_controller_action().

If there's no actual packet (e.g. during revalidation),
execute_controller_action() exits right away, without calling
commit_odp_actions().

commit_odp_actions() might have an influence on slow_path reason
(which is included in the generated ODP actions), meaning that the
revalidation will not generate the same actions than the original
translation.

Fix the problem by making execute_controller_action() call
commit_odp_actions() even without a packet.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: ed24b01f505ecfcbc73510f36cdc1c7eea2716a5
      https://github.com/openvswitch/ovs/commit/ed24b01f505ecfcbc73510f36cdc1c7eea2716a5
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-11 (Fri, 11 Dec 2015)

  Changed paths:
    M lib/tnl-ports.c

  Log Message:
  -----------
  tnl-ports: Generate mask with correct prerequisites.

We should match on the transport ports only if the tunnel has a UDP
header.  It doesn't make sense to match on transport port for GRE
tunnels.

Also, to match on fragment bits we should use FLOW_NW_FRAG_MASK instead
of 0xFF.  FLOW_NW_FRAG_MASK is what we get if we convert to the ODP
netlink format and back.

Adding the correct masks in the tunnel router classifier helps in making
sure that the translation generates masks that respect prerequisites.

If the mask has some fields that do not respect prerequisites, the flow
will get deleted by revalidation, because translating to ODP format and
back will generate a more generic mask, which will be perceived as too
generic (compared with the one generated by the translation).

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: f5d5eae4f388c9f30986b5e9f58a78b906d6a357
      https://github.com/openvswitch/ovs/commit/f5d5eae4f388c9f30986b5e9f58a78b906d6a357
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-11 (Fri, 11 Dec 2015)

  Changed paths:
    M lib/dpctl.c
    M lib/dpif-netdev.c
    M lib/odp-util.c
    M lib/odp-util.h
    M ofproto/ofproto-dpif-upcall.c
    M tests/test-odp.c

  Log Message:
  -----------
  odp-util: Return exact mask if netlink mask attribute is missing.

In the ODP context an empty mask netlink attribute usually means that
the flow should be an exact match.

odp_flow_key_to_mask() instead returns a struct flow_wildcards
with matches only on recirc_id and vlan_tci.

A more appropriate behavior is to handle a missing (zero length) netlink
mask specially (like we do in userspace and Linux datapath) and create
an exact match flow_wildcards from the original flow.

This fixes a bug in revalidate_ukey(): every flow created with
megaflows disabled would be revalidated away, because the mask would
seem too generic. (Another possible fix would be to handle the special
case of a missing mask in revalidate_ukey(), but this seems a more
generic solution).

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 442baef5074b45ecc245431e96490e08a9e2d76a
      https://github.com/openvswitch/ovs/commit/442baef5074b45ecc245431e96490e08a9e2d76a
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-11 (Fri, 11 Dec 2015)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Correctly [de]serialize mask for ND attributes.

When converting between ODP attributes and struct flow_wildcards, we
check that all the prerequisites are exact matched on the mask.

For ND(ICMPv6) attributes, an exact match on tp_src and tp_dst
(which in this context are the icmp type and code) shold look like
htons(0xff), not htons(0xffff).  Fix this in two places.

The consequences were that the ODP mask wouldn't include the ND
attributes and the flow would be deleted by the revalidation.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/8a5ac499f4a2...442baef5074b


More information about the git mailing list