mbox series

[ovs-dev,0/2] avoid using xport_lookup() in case of recirculation

Message ID 20180112133411.27721-1-zoltan.balogh@ericsson.com
Headers show
Series avoid using xport_lookup() in case of recirculation | expand

Message

Zoltan Balogh Jan. 12, 2018, 1:34 p.m. UTC
The main goal of this series is to avoid invocation of xlate_lookup() in case
of recirculation (except recirc due to bond), because it can return pointer to
a wrong xport.
For instance, if L3 packet with MPLS label is received on a L3 tunnel port and
pop_mpls + resubmit actions are performed, then first packet_type is changed
due to pushing a dummy ethernet header, MPLS label is removed, then resubmit
action is processed. This triggers recirculation, where xport_lookup() fails
due to former change of packet_type. 

The series introduces UUID for xport and stores the UUID of first xport packet
was received on in frozen state in case of recirculation. So, when upcall is
processed due to recirculation then xport can be found by using the saved UUID
and xlate_lookup() should not be invoked.

Zoltan Balogh (2):
  ofproto-dpif-xlate: add uuid to xports
  xlate: fix xport lookup for recirc

 ofproto/ofproto-dpif-rid.c   |   5 +-
 ofproto/ofproto-dpif-rid.h   |   1 +
 ofproto/ofproto-dpif-xlate.c |  64 +++++++++++++++++++++++
 ofproto/ofproto-dpif-xlate.h |   4 ++
 tests/packet-type-aware.at   | 122 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 195 insertions(+), 1 deletion(-)

Comments

Ben Pfaff Jan. 23, 2018, 7:14 p.m. UTC | #1
On Fri, Jan 12, 2018 at 02:34:09PM +0100, Zoltan Balogh wrote:
> The main goal of this series is to avoid invocation of xlate_lookup() in case
> of recirculation (except recirc due to bond), because it can return pointer to
> a wrong xport.
> For instance, if L3 packet with MPLS label is received on a L3 tunnel port and
> pop_mpls + resubmit actions are performed, then first packet_type is changed
> due to pushing a dummy ethernet header, MPLS label is removed, then resubmit
> action is processed. This triggers recirculation, where xport_lookup() fails
> due to former change of packet_type. 
> 
> The series introduces UUID for xport and stores the UUID of first xport packet
> was received on in frozen state in case of recirculation. So, when upcall is
> processed due to recirculation then xport can be found by using the saved UUID
> and xlate_lookup() should not be invoked.

Thanks for the bug fix!  I applied this series to master and branch-2.9.