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

GitHub noreply at github.com
Fri Apr 13 18:18:46 UTC 2018


  Branch: refs/heads/branch-2.9
  Home:   https://github.com/openvswitch/ovs
  Commit: fe849396a66917f2e2f4d032d7b410a29675c9e6
      https://github.com/openvswitch/ovs/commit/fe849396a66917f2e2f4d032d7b410a29675c9e6
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-13 (Fri, 13 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: ad3eadd5a2a2c27f588224adaf9f869ac3daf2ae
      https://github.com/openvswitch/ovs/commit/ad3eadd5a2a2c27f588224adaf9f869ac3daf2ae
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-13 (Fri, 13 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/656208e735cf...ad3eadd5a2a2


More information about the git mailing list