From patchwork Thu Aug 26 22:55:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1521430 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.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GwdW565WKz9sRf for ; Fri, 27 Aug 2021 08:56:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CDB146058B; Thu, 26 Aug 2021 22:56:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TmeGYCO9VMT0; Thu, 26 Aug 2021 22:56:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 368AD6149C; Thu, 26 Aug 2021 22:56:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EC5A8C001A; Thu, 26 Aug 2021 22:56:10 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 36A34C000E for ; Thu, 26 Aug 2021 22:56:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2DEBB6149C for ; Thu, 26 Aug 2021 22:56:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gt1BhgjOJGoN for ; Thu, 26 Aug 2021 22:56:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by smtp3.osuosl.org (Postfix) with ESMTPS id EF1E96058B for ; Thu, 26 Aug 2021 22:56:03 +0000 (UTC) Received: (Authenticated sender: numans@ovn.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id F00D8100004; Thu, 26 Aug 2021 22:55:59 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Thu, 26 Aug 2021 18:55:55 -0400 Message-Id: <20210826225555.1739236-1-numans@ovn.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v6 0/1] ovsdb-idl: Address (partially) missing table and column issues. 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" From: Numan Siddique This patch partially addresses the transaction issues seen when the C IDL client is running compiled with newer schema and ovsdb-server is still running with older schema. Patch 1: Adds the API to query for table and column names. v5 -> v6 ----- * Addresses the review comments from Ilya for v5 patch 1. * Patch 2 which addresses the transaction errors is dropped from v6 as this would require some more work. Patch 1 can be independently considered. v4 -> v5 ----- * Addressed the review comments from Ilya for v4 patch 1. * patch 2 is unchanged. v3 -> v4 ------ * Addressed the review comment from Ilya for patch 2. ovsdb_idl_txn_insert() will not return NULL for missing tables. v2 -> v3 ------ * Patch 2 is added in v3. * Patch 1 implementation in v2 was wrong. This patch fixes it and enhances the test cases. v1 -> v2 ------ * Added the test cases. Numan Siddique (1): ovsdb-idl : Add APIs to query if a table and a column is present or not. lib/ovsdb-idl-provider.h | 4 ++ lib/ovsdb-idl.c | 49 +++++++++++++++++++++++ lib/ovsdb-idl.h | 5 ++- ovsdb/ovsdb-idlc.in | 28 ++++++++++++- tests/idltest.ovsschema | 9 +++++ tests/idltest2.ovsschema | 7 ++++ tests/ovsdb-idl.at | 40 +++++++++++++++++++ tests/test-ovsdb.c | 86 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 226 insertions(+), 2 deletions(-)