From patchwork Fri Jan 12 13:34:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Balogh X-Patchwork-Id: 859924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zJ3cs6T0Nz9s9Y for ; Sat, 13 Jan 2018 00:34:21 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 3BFE8F16; Fri, 12 Jan 2018 13:34:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 381CFF16 for ; Fri, 12 Jan 2018 13:34:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E3655124 for ; Fri, 12 Jan 2018 13:34:14 +0000 (UTC) X-AuditID: c1b4fb30-d31ff70000006bc7-b1-5a58b955dba8 Received: from ESESSHC008.ericsson.se (Unknown_Domain [153.88.183.42]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id E7.13.27591.559B85A5; Fri, 12 Jan 2018 14:34:13 +0100 (CET) Received: from labserv2.eth.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.44) with Microsoft SMTP Server id 14.3.352.0; Fri, 12 Jan 2018 14:34:12 +0100 Received: from dell11.sdn.hu.eld.ericsson.se (unknown [10.58.48.15]) by labserv2.eth.ericsson.se (Postfix) with ESMTP id 79BD929C72C; Fri, 12 Jan 2018 14:27:15 +0100 (CET) From: Zoltan Balogh To: Date: Fri, 12 Jan 2018 14:34:09 +0100 Message-ID: <20180112133411.27721-1-zoltan.balogh@ericsson.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplluLIzCtJLcpLzFFi42KZGbFdSzd0Z0SUwdRFfBZHT+9hdmD0eHbz P2MAYxSXTUpqTmZZapG+XQJXRvu5D4wFdzkrNr8raGD8zN7FyMkhIWAi8fBEM3MXIxeHkMBh Rol/q3sZQRJCAlsYJa78coKw1zNK7DiSCGKzCRhI/Lj8hQnEFhGQlPi3eAsbiM0soCfx5OgR sLiwgIfE8v79rCA2i4CqxImjW1hAbF4Be4k19/4xQyyWl5iwpQkqLihxcuYTFog5EhIHX7xg htirLnGo5TXbBEa+WUjKZiEpW8DItIpRtDi1OCk33chIL7UoM7m4OD9PLy+1ZBMjMHAObvlt sIPx5XPHQ4wCHIxKPLwX1kRECbEmlhVX5h5ilOBgVhLhPboUKMSbklhZlVqUH19UmpNafIhR moNFSZz3pCdvlJBAemJJanZqakFqEUyWiYNTqoHR7LCjP/Oipyd9a3U0PhbcCvdbEXSuX0w9 4LV1ZEOl8uQHz4wDXE/Zf82bd13t9z2WHN/KbWqPXWIMpeadb4tN+1zebbtX6NYWbYP5J/9u mdCUPd9/4sYbn77u+fGty9llW/DxhmquXUtsbtt+Cnt09FRl3A//RcvLAq+ufvHI5dIvCb49 bzT0lViKMxINtZiLihMBcS90eBgCAAA= X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 0/2] avoid using xport_lookup() in case of recirculation X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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(-)