[ovs-dev] [PATCH] vswitchd: Restore the packet metadata when the packet is resumed

Jarno Rajahalme jarno at ovn.org
Tue May 10 23:11:02 UTC 2016


> On May 10, 2016, at 7:34 AM, Numan Siddique <nusiddiq at redhat.com> wrote:
> 
> Recirculations due to NXT_RESUME are failing if the packet metadata is not
> restored prior to the packet execution.
> 
> Reported-at: http://openvswitch.org/pipermail/dev/2016-May/070723.html
> Signed-Off-by: Numan Siddique <nusiddiq at redhat.com>
> ---
> ofproto/ofproto-dpif.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index 0c65df2..c131e9d 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -4399,6 +4399,15 @@ nxt_resume(struct ofproto *ofproto_,
>     dp_packet_init(&packet, pin->public.packet_len);
>     dp_packet_put(&packet, pin->public.packet, pin->public.packet_len);
> 
> +    pkt_metadata_from_flow(&packet.md, &pin->public.flow_metadata.flow);
> +    ofp_port_t in_port;
> +    /* Fix up in_port. */
> +    in_port = pin->public.flow_metadata.flow.in_port.ofp_port;
> +    if (in_port == OFPP_NONE) {
> +        in_port = OFPP_LOCAL;
> +    }
> +    packet.md.in_port.odp_port = ofp_port_to_odp_port(ofproto, in_port);
> +

I re-factored the in_port fix-up code that was copied from elsewhere in the file to a new helper and pushed this to master.

Thanks for the fix!

   Jarno

>     struct flow headers;
>     flow_extract(&packet, &headers);
> 
> -- 
> 2.5.5
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list