From patchwork Tue Jun 30 21:41:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1320132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OfnMtJwv; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49xHqg3MSnz9sPF for ; Wed, 1 Jul 2020 07:41:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B800688162; Tue, 30 Jun 2020 21:41:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4M5wZxBisWl0; Tue, 30 Jun 2020 21:41:32 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 7290B87686; Tue, 30 Jun 2020 21:41:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5ED98C0865; Tue, 30 Jun 2020 21:41:32 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DD57CC016E for ; Tue, 30 Jun 2020 21:41:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D938C88183 for ; Tue, 30 Jun 2020 21:41:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1F5c0xlrcOaI for ; Tue, 30 Jun 2020 21:41:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by hemlock.osuosl.org (Postfix) with ESMTPS id 173BC88137 for ; Tue, 30 Jun 2020 21:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593553288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+V5iUBCc59rLs39ufj70jCtwuG/7HZREvL+MQwMUlsQ=; b=OfnMtJwv5DoOAxwY9/Ao1+BSgPoklKFZfn3QB45//4Bs3bwP2Dg0wUhuvnnKWXu8Y1dNQj RpTJF+fB+0PzCFn4ECGB0BX4Vd5eIqD5LjD1l2dmLE4yqTuNAIuhlrlcMrMKaVvSjNTpYI Ge6A6dwfpXzb7ARUyPB4toDJ+0/+rcc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-xnIK6qEbOfmocemHQClbKw-1; Tue, 30 Jun 2020 17:41:20 -0400 X-MC-Unique: xnIK6qEbOfmocemHQClbKw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10E401932480; Tue, 30 Jun 2020 21:41:19 +0000 (UTC) Received: from dceara.remote.csb (ovpn-112-145.ams2.redhat.com [10.36.112.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC0506106A; Tue, 30 Jun 2020 21:41:17 +0000 (UTC) From: Dumitru Ceara To: dev@openvswitch.org Date: Tue, 30 Jun 2020 23:41:15 +0200 Message-Id: <20200630214107.26800.21305.stgit@dceara.remote.csb> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: hzhou@ovn.org Subject: [ovs-dev] [PATCH v2 ovn 0/5] Reduce number of flows in IN_IP_INPUT table for DNAT. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Patch 1 documents and refactors the usage of OVS registers in logical flows. Patches 2-4 refactor the ARP/NS responder code for logical routers in order to make it easier for patch 5 to configure the flows with different priorities depending on logical port type. Suggested-by: Han Zhou Reported-by: Girish Moodalbail Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-June/050186.html Signed-off-by: Dumitru Ceara Dumitru Ceara (5): ovn-northd: Document OVS register usage in logical flows. ovn-northd: Store ETH address of router inport in xreg0. ovn-northd: Refactor ARP/NS responder in router pipeline. ovn-northd: Refactor NAT address parsing. ovn-northd: Minimize number of ARP/NS responder flows for DNAT. northd/ovn-northd.8.xml | 46 ++- northd/ovn-northd.c | 733 +++++++++++++++++++++++++++++------------------ tests/ovn-northd.at | 149 ++++++++++ tests/ovn.at | 8 - 4 files changed, 634 insertions(+), 302 deletions(-) --- v2: - Addressed Numan's comments: - Inserted a new patch in the beginning of the series to document OVS register usage in logical flows. Also refactored the code to avoid using bare register names. - Added unit tests to ovn-northd.at in every patch that changed logical flows. - Added/updated documentation in ovn-northd.8.xml in every patch that changed logical flows.