[ovs-git] [openvswitch/ovs] 88ec1e: xlate: Correct handling of double encap() actions

GitHub noreply at github.com
Fri Apr 6 16:35:31 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 88ec1e0aa31d4cb4a3eb5b0aad3d23834ffbd642
      https://github.com/openvswitch/ovs/commit/88ec1e0aa31d4cb4a3eb5b0aad3d23834ffbd642
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-06 (Fri, 06 Apr 2018)

  Changed paths:
    M lib/odp-util.c
    M lib/odp-util.h
    M ofproto/ofproto-dpif-xlate.c

  Log Message:
  -----------
  xlate: Correct handling of double encap() actions

When the same encap() header was pushed twice onto a packet (e.g in the
case of NSH in NSH), the translation logic only generated a datapath push
action for the first encap() action. The second encap() did not emit a
push action because the packet type was unchanged.

commit_encap_decap_action() (renamed from commit_packet_type_change) must
solely rely on ctx->pending_encap to generate an datapath push action.

Similarly, the first decap() action on a double header packet does not
change the packet_type either. Add a corresponding ctx->pending_decap
flag and use that to trigger emitting a datapath pop action.

Fixes: f839892a2 ("OF support and translation of generic encap and decap")
Fixes: 1fc11c594 ("Generic encap and decap support for NSH")

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: a5b3e2a6f219c98601b9a80b162eecf28e52ac1f
      https://github.com/openvswitch/ovs/commit/a5b3e2a6f219c98601b9a80b162eecf28e52ac1f
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-06 (Fri, 06 Apr 2018)

  Changed paths:
    M tests/nsh.at

  Log Message:
  -----------
  nsh: Add unit test for double NSH encap and decap

The added test verifies that OVS correctly encapsulates an Ethernet
packet with two NSH (MD1) headers, sends it with an Ethernet header
over a patch port and decaps the Ethernet and the two NSH headers on
the receiving bridge to reveal the original packet.

The test case performs the encap() operations in a sequence of three
chained groups to test the correct handling of encap() actions in
group buckets recently fixed in commit ce4a16ac0.

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/4b337e489b0e...a5b3e2a6f219


More information about the git mailing list