Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4508915ybi; Mon, 15 Jul 2019 10:01:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPNFmi//4MuF9YVzjFRlUYPiqFZCFdYmYt7HWqxbnmlJf/uA4jWYPdHUyZd+r7rkKYKBF3 X-Received: by 2002:a65:654f:: with SMTP id a15mr27270751pgw.73.1563210079659; Mon, 15 Jul 2019 10:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563210079; cv=none; d=google.com; s=arc-20160816; b=yTS9bO+YkBlA+w/TVgQPE64LI/0OKY3L9FTPqpvAQ4Q7jYAklyuBxjWVIgmN6ZG8B0 yIi5BZW5F/NbU9lgaaeEy/wHI/HfZf0qzogII2OXQbd/wJTpk4s4pOHGB9wXHeuHkgQo uRU0UI8ZPeX4pvs0cV53we+GoG5/ofRAVTJghUSM4NJ1yOudP+toSOh+RNXp9Pj+Hmfj 3s3X7+3fGrMmKC3TMoIdWlOL3PooArC/0loBEZHQQo+FzEmCcFZhQjb/79PIjR5r+sIK IRRSEaNV9FfixXDUIrxlYDDXBPrkzah9BsSnX4pJl6DRPN1/KAQ2FrPuN7rrSsvCLZpM zk3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=Guu+smdwrW9kQj9R88uZurYKjuEjxLLHCOs8p1/tCqY=; b=ZgEEhcHTi7OFzmUvxmsgHwx8eRwS245SzJ8qhKw+K6/0Xk5ksWyBqBUZ0M15LH0anV b6jG6Y7XA2+cwEn/X85GRGswcLnP1lH73+Rq0mGF4POQVXsKoH+CASWmZExhxsnibJbl Md28kbhLJxSr2yRANNuX38pp35EyR6xvY9uwEJWfret8BFCDEeA5zkbd6IaA4Wp4mRJt LGipshlAxz2gFu7Bzl0jMDi77aA85XtNsgzQ9Z/rxWs9EbIp5SufDWvJq9shBSNRdvUh odYjRBG0M/fqXMrHvrKxhsgeoeyslp4TqgFBp8MbKRuOGhp/4YxbP9rwo7IFNpKwn3y7 U75w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si16508007plx.200.2019.07.15.10.00.46; Mon, 15 Jul 2019 10:01:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730782AbfGORAA (ORCPT + 99 others); Mon, 15 Jul 2019 13:00:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:43061 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730436AbfGORAA (ORCPT ); Mon, 15 Jul 2019 13:00:00 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 09:59:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="p7s'?scan'208";a="318732847" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga004.jf.intel.com with ESMTP; 15 Jul 2019 09:59:59 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.44]) by ORSMSX107.amr.corp.intel.com ([169.254.1.186]) with mapi id 14.03.0439.000; Mon, 15 Jul 2019 09:59:59 -0700 From: "Stotland, Inga" To: "michal.lowas-rzechonek@silvair.com" CC: "jakub.witowski@silvair.com" , "linux-bluetooth@vger.kernel.org" , "Gix, Brian" Subject: Re: [PATCH BlueZ 00/10 v3] mesh: Configuration storage re-org Thread-Topic: [PATCH BlueZ 00/10 v3] mesh: Configuration storage re-org Thread-Index: AQHVOpsjTTsYd8zyFEamJHERh+G4nKbLyMqAgACUygA= Date: Mon, 15 Jul 2019 16:59:58 +0000 Message-ID: <6155440ebc5a3bfd987a48b0b26c132449a3b3c0.camel@intel.com> References: <20190714232320.20921-1-inga.stotland@intel.com> <20190715080721.a4fcaqsdcqimeajc@mlowasrzechonek2133> In-Reply-To: <20190715080721.a4fcaqsdcqimeajc@mlowasrzechonek2133> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.251.157.2] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-UT+SslpGmr9de6W71dSf" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-UT+SslpGmr9de6W71dSf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Michal, On Mon, 2019-07-15 at 10:07 +0200, Micha=C5=82 Lowas-Rzechonek wrote: > Hello, >=20 > On 07/14, Inga Stotland wrote: > > + rebase off the tip > >=20 > > This set of patches introduces the notion of generic mesh-config > > API > > that allows the daemon to be agnostic of the underlying node > > configuration > > directory layout and the format of the file(s) in which node > > configuration > > is saved.=20 > >=20 > > Currently, the daemon supports only JSON-based configuration > > format. > > It is expected that other configuration formats may be added in > > future. > >=20 > > As a result of these changes, storage.c and storage.h are obsolete > > and are removed. > >=20 > > Inga Stotland (10): > > mesh: Move network config setup from storage.c to node.c > > mesh: Rename mesh-db.c to mesh-config-json.c > > mesh: Change mesh_db prefix to mesh_config > > mesh: Move load from storage functionality into node.c > > mesh: Confine dependency on json-c to mesh-config-json.c > > mesh: Replace storage_save_config with mesh_config_save_config > > mesh: Use mesh_config APIs to store node configuration > > mesh: Manage node config directory in mesh-config > > mesh: Create or re-use a node storage directory for keyring > > mesh: Rename mesh_config_srv_init() to cfgmod_server_init() > >=20 > > Makefile.mesh | 3 +- > > mesh/appkey.c | 19 +- > > mesh/cfgmod-server.c | 31 +- > > mesh/cfgmod.h | 2 +- > > mesh/keyring.c | 36 +- > > mesh/{mesh-db.c =3D> mesh-config-json.c} | 1071 +++++++++++++++++--- > > ---- > > mesh/mesh-config.h | 172 ++++ > > mesh/mesh-db.h | 157 ---- > > mesh/mesh.c | 15 +- > > mesh/mesh.h | 1 + > > mesh/model.c | 23 +- > > mesh/net.c | 26 +- > > mesh/node.c | 224 +++-- > > mesh/node.h | 13 +- > > mesh/storage.c | 656 --------------- > > mesh/storage.h | 51 -- > > mesh/util.c | 39 +- > > mesh/util.h | 1 + > > 18 files changed, 1219 insertions(+), 1321 deletions(-) > > rename mesh/{mesh-db.c =3D> mesh-config-json.c} (58%) > > create mode 100644 mesh/mesh-config.h > > delete mode 100644 mesh/mesh-db.h > > delete mode 100644 mesh/storage.c > > delete mode 100644 mesh/storage.h > >=20 > > --=20 > > 2.21.0 > >=20 >=20 > Reviewed-by: Micha=C5=82 Lowas-Rzechonek < > michal.lowas-rzechonek@silvair.com> >=20 >=20 > I have a style question (as usual, unrelated to this patchset ;) - do > we > have a preferred way for verb usage in (public) function names? >=20 > At the moment I see: > - mesh_config_create vs mesh_net_new - my preference is _new/_free > - mesh_net_node_get vs mesh_net_get_io - my preference is to place > verbs at the end >=20 My preference is to have verb at the end, but it seems (and maybe I am mistaken), that bluez in general favors this style: uint16_t bt_att_get_mtu(struct bt_att *att); bool bt_att_set_mtu(struct bt_att *att, uint16_t mtu); I personally don't relly like mixing the styles (although I am guilty of this myself). So in this patch set tried to stick to the one that's prevalent in bluez. Best regards, Inga --=-UT+SslpGmr9de6W71dSf Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKbDCCBOsw ggPToAMCAQICEDabxALowUBS+21KC0JI8fcwDQYJKoZIhvcNAQEFBQAwbzELMAkGA1UEBhMCU0Ux FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5hbCBUVFAgTmV0 d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9vdDAeFw0xMzEyMTEwMDAwMDBa Fw0yMDA1MzAxMDQ4MzhaMHkxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEUMBIGA1UEBxMLU2Fu dGEgQ2xhcmExGjAYBgNVBAoTEUludGVsIENvcnBvcmF0aW9uMSswKQYDVQQDEyJJbnRlbCBFeHRl cm5hbCBCYXNpYyBJc3N1aW5nIENBIDRCMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA yzuW/y/g0bznz8BD48M94luFzqHaqY9yGN9H/W0J7hOVBpl0rTQJ6kZ7z7hyDb9kf2UW4ZU25alC i+q5m6NwHg+z9pcN7bQ84SSBueaYF7cXlAg7z3XyZbzSEYP7raeuWRf5fYvYzq8/uI7VNR8o/43w PtDP10YDdO/0J5xrHxnC/9/aU+wTFSVsPqxsd7C58mnu7G4VRJ0n9PG4SfmYNC0h/5fLWuOWhxAv 6MuiK7MmvTPHLMclULgJqVSqG1MbBs0FbzoRHne4Cx0w6rtzPTrzo+bTRqhruaU18lQkzBk6OnyJ UthtaDQIlfyGy2IlZ5F6QEyjItbdKcHHdjBX8wIDAQABo4IBdzCCAXMwHwYDVR0jBBgwFoAUrb2Y ejS0Jvf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