Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1523373/?format=api
http://patchwork.ozlabs.org/api/patches/1523373/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210901191304.532.97471.stgit@dceara.remote.csb/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/projects/68/?format=api", "name": "Open Virtual Network development", "link_name": "ovn", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20210901191304.532.97471.stgit@dceara.remote.csb>", "list_archive_url": null, "date": "2021-09-01T19:13:09", "name": "[ovs-dev,2/2] ovn-controller: Access OVS Datapath table only if supported.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5cd49987d68eb653164ec13ee115745322b4ce0f", "submitter": { "id": 76591, "url": "http://patchwork.ozlabs.org/api/people/76591/?format=api", "name": "Dumitru Ceara", "email": "dceara@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210901191304.532.97471.stgit@dceara.remote.csb/mbox/", "series": [ { "id": 260617, "url": "http://patchwork.ozlabs.org/api/series/260617/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=260617", "date": "2021-09-01T19:12:33", "name": "ovn-controller: Reintroduce null-SNAT usage.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/260617/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1523373/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/1523373/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "ovs-dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=NWN2b6FB;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)", "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dceara@redhat.com" ], "Received": [ "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H0DHD49ggz9sVq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 2 Sep 2021 05:13:28 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 34E428272D;\n\tWed, 1 Sep 2021 19:13:26 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n\tby localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 6TxBRMC7gVWX; Wed, 1 Sep 2021 19:13:22 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 8C79F81027;\n\tWed, 1 Sep 2021 19:13:21 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 67204C001A;\n\tWed, 1 Sep 2021 19:13:21 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 0C1F8C001A\n for <ovs-dev@openvswitch.org>; Wed, 1 Sep 2021 19:13:20 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id EFF52823EB\n for <ovs-dev@openvswitch.org>; Wed, 1 Sep 2021 19:13:19 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id XARuS6dtu1Zl for <ovs-dev@openvswitch.org>;\n Wed, 1 Sep 2021 19:13:19 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 095E781027\n for <ovs-dev@openvswitch.org>; Wed, 1 Sep 2021 19:13:18 +0000 (UTC)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-298-9wwSXazvPOW333K-KbnqaQ-1; Wed, 01 Sep 2021 15:13:14 -0400", "from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com\n [10.5.11.16])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CE911854E2D;\n Wed, 1 Sep 2021 19:13:14 +0000 (UTC)", "from dceara.remote.csb (unknown [10.39.194.141])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 8B72B5C1BB;\n Wed, 1 Sep 2021 19:13:12 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1630523598;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=B+7oJ06GlIfhDbTBu7cKdI6S+OkQVVJfzeqgbv+oRZQ=;\n b=NWN2b6FBSD0ycq+RbgJf911Y3kBGgMuG2CLaiX/cgbmRDi3t+mpCu9a2BuwM/EvPBUsZW4\n KY0aEtapbXfvWcGeZG7IwPQOIDpB9bpWH1UIMfHkp/ubwvP/cajRg+2BAXPTQ13FaN+3EQ\n 6t72JK4h4hZ5IqT3Lqpydapt9sp4RqE=", "X-MC-Unique": "9wwSXazvPOW333K-KbnqaQ-1", "From": "Dumitru Ceara <dceara@redhat.com>", "To": "ovs-dev@openvswitch.org", "Date": "Wed, 1 Sep 2021 21:13:09 +0200", "Message-Id": "<20210901191304.532.97471.stgit@dceara.remote.csb>", "In-Reply-To": "<20210901191224.532.12009.stgit@dceara.remote.csb>", "References": "<20210901191224.532.12009.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.16", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Cc": "trozet@redhat.com", "Subject": "[ovs-dev] [PATCH ovn 2/2] ovn-controller: Access OVS Datapath table\n\tonly if supported.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "Use the newly added IDL API, ovsdb_idl_server_has_table(), through the\nauto generated ovsrec_server_has_datapath_table() to determine if it's\nOK to read and potentially create a Datapath record in the local OVS DB.\n\nIn order to do that we also need to bump the OVS submodule to include\n7502849e9581 (\"ovsdb-idl: Add APIs to query if a table and a column is\npresent.\").\n\nFixes: 56e2cd3a2f06 (\"ovn-controller: Detect OVS datapath capabilities.\")\nReported-at: https://bugzilla.redhat.com/1992705\nSigned-off-by: Dumitru Ceara <dceara@redhat.com>\n---\n controller/ovn-controller.c | 32 +++++++++++++++++++-------------\n lib/features.c | 5 +++++\n ovs | 2 +-\n 3 files changed, 25 insertions(+), 14 deletions(-)", "diff": "diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c\nindex 739048cf8..0031a1035 100644\n--- a/controller/ovn-controller.c\n+++ b/controller/ovn-controller.c\n@@ -439,12 +439,11 @@ process_br_int(struct ovsdb_idl_txn *ovs_idl_txn,\n const struct ovsrec_bridge_table *bridge_table,\n const struct ovsrec_open_vswitch_table *ovs_table,\n const struct ovsrec_bridge **br_int_,\n- const struct ovsrec_datapath **br_int_dp_)\n+ const struct ovsrec_datapath **br_int_dp)\n {\n const struct ovsrec_bridge *br_int = get_br_int(bridge_table, ovs_table);\n- const struct ovsrec_datapath *br_int_dp = NULL;\n \n- ovs_assert(br_int_ && br_int_dp_);\n+ ovs_assert(br_int_);\n if (ovs_idl_txn) {\n if (!br_int) {\n br_int = create_br_int(ovs_idl_txn, ovs_table);\n@@ -476,15 +475,16 @@ process_br_int(struct ovsdb_idl_txn *ovs_idl_txn,\n ovsrec_bridge_set_fail_mode(br_int, \"secure\");\n VLOG_WARN(\"Integration bridge fail-mode changed to 'secure'.\");\n }\n- br_int_dp = get_br_datapath(cfg, datapath_type);\n- if (!br_int_dp) {\n- br_int_dp = create_br_datapath(ovs_idl_txn, cfg,\n- datapath_type);\n+ if (br_int_dp) {\n+ *br_int_dp = get_br_datapath(cfg, datapath_type);\n+ if (!(*br_int_dp)) {\n+ *br_int_dp = create_br_datapath(ovs_idl_txn, cfg,\n+ datapath_type);\n+ }\n }\n }\n }\n *br_int_ = br_int;\n- *br_int_dp_ = br_int_dp;\n }\n \n static const char *\n@@ -3519,8 +3519,10 @@ main(int argc, char *argv[])\n ovsrec_open_vswitch_table_get(ovs_idl_loop.idl);\n const struct ovsrec_bridge *br_int = NULL;\n const struct ovsrec_datapath *br_int_dp = NULL;\n- process_br_int(ovs_idl_txn, bridge_table, ovs_table,\n- &br_int, &br_int_dp);\n+ process_br_int(ovs_idl_txn, bridge_table, ovs_table, &br_int,\n+ ovsrec_server_has_datapath_table(ovs_idl_loop.idl)\n+ ? &br_int_dp\n+ : NULL);\n \n /* Enable ACL matching for double tagged traffic. */\n if (ovs_idl_txn) {\n@@ -3563,9 +3565,13 @@ main(int argc, char *argv[])\n &chassis_private);\n }\n \n- /* If any OVS feature support changed, force a full recompute. */\n- if (br_int_dp\n- && ovs_feature_support_update(&br_int_dp->capabilities)) {\n+ /* If any OVS feature support changed, force a full recompute.\n+ * 'br_int_dp' is valid only if an OVS transaction is possible.\n+ */\n+ if (ovs_idl_txn\n+ && ovs_feature_support_update(br_int_dp\n+ ? &br_int_dp->capabilities\n+ : NULL)) {\n VLOG_INFO(\"OVS feature set changed, force recompute.\");\n engine_set_force_recompute(true);\n }\ndiff --git a/lib/features.c b/lib/features.c\nindex 87d04ee3f..fddf4c450 100644\n--- a/lib/features.c\n+++ b/lib/features.c\n@@ -62,8 +62,13 @@ ovs_feature_is_supported(enum ovs_feature_value feature)\n bool\n ovs_feature_support_update(const struct smap *ovs_capabilities)\n {\n+ static struct smap empty_caps = SMAP_INITIALIZER(&empty_caps);\n bool updated = false;\n \n+ if (!ovs_capabilities) {\n+ ovs_capabilities = &empty_caps;\n+ }\n+\n for (size_t i = 0; i < ARRAY_SIZE(all_ovs_features); i++) {\n enum ovs_feature_value value = all_ovs_features[i].value;\n const char *name = all_ovs_features[i].name;\ndiff --git a/ovs b/ovs\nindex daf627f45..7502849e9 160000\n--- a/ovs\n+++ b/ovs\n@@ -1 +1 @@\n-Subproject commit daf627f459ffbc7171d42a2c01f80754bfd54edc\n+Subproject commit 7502849e9581a1dabe53eac51fd34521126c7b3f\n", "prefixes": [ "ovs-dev", "2/2" ] }{ "id": 1523373, "url": "