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

GitHub noreply at github.com
Mon Apr 16 17:54:20 UTC 2018


  Branch: refs/heads/branch-2.8
  Home:   https://github.com/openvswitch/ovs
  Commit: b8935383526682031df39ebdf1bd1db4a0116e9e
      https://github.com/openvswitch/ovs/commit/b8935383526682031df39ebdf1bd1db4a0116e9e
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-16 (Mon, 16 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: 6489348e16a2575654daa2d235411806900d0a82
      https://github.com/openvswitch/ovs/commit/6489348e16a2575654daa2d235411806900d0a82
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-04-16 (Mon, 16 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 decap 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/3325f943ca22...6489348e16a2


More information about the git mailing list