From 88d2ac50aa4e3383e185b698a1b3a44a6f7b4f80 Mon Sep 17 00:00:00 2001 From: Yi-Hung Wei Date: Fri, 21 Jun 2019 10:51:23 -0700 Subject: ofproto-dpif: Fix continuation with patch port This patch fixes the ofp_port to odp_port translation issue on patch port with nxt_resume. When OVS resumes processing a packet from nxt_resume, OVS does not translate the ofp in_port to odp in_port correctly if the packet is originally received from a patch port. Currently,OVS sets the odp in_port for this resume pakcet as ODPP_NONE and push the resume packet back to the datapath. Later on, if the packet goes through a recirc, OVS will generate the following message since it can not translate odp in_port (ODPP_NONE) back to ofp in_port during upcall, and push down a datapath rule to drop the packet. ofproto_dpif_upcall(handler16)|INFO|received packet on unassociated datapath port 4294967295 When OVS revalidates the drop datapath flow with ODPP_NONE in_port, we will see the following warning. ofproto_dpif_upcall(revalidator18)|WARN|Failed to acquire udpif_key corresponding to unexpected flow (Invalid argument): ufid:.... This patch resolves this issue by storing the odp in_port in the continuation messages, and restores the odp in_port before push the packet back to the datapath. VMWare-BZ: 2364696 Signed-off-by: Yi-Hung Wei Signed-off-by: Ben Pfaff --- include/openvswitch/ofp-packet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/openvswitch') diff --git a/include/openvswitch/ofp-packet.h b/include/openvswitch/ofp-packet.h index 67001cb3f..77128d829 100644 --- a/include/openvswitch/ofp-packet.h +++ b/include/openvswitch/ofp-packet.h @@ -140,6 +140,9 @@ struct ofputil_packet_in_private { /* NXCPT_ACTION_SET. */ struct ofpact *action_set; size_t action_set_len; + + /* NXCPT_ODP_PORT. */ + odp_port_t odp_port; }; struct ofpbuf *ofputil_encode_packet_in_private( -- cgit v1.2.1