Bluetooth: GATT: Add option to enable/disable database

This adds BT_GATT_DB option which can be used to enable/disable
registering/unregistering services dynamically:

with BT_GATT_DB=y (make ram_report):
      gatt.c                                    206     1.14%
        cf_cfg                                   32     0.18%
        db                                        8     0.04%
        db_hash                                  16     0.09%
        db_hash_work                             32     0.18%
        gatt_sc                                  80     0.44%
        init                                      4     0.02%
        last_static_handle                        2     0.01%
        sc_ccc_cfg                               32     0.18%

with BT_GATT_DB=n (make ram_report):
      gatt.c                                      6     0.03%
        init                                      4     0.02%
        last_static_handle                        2     0.01%

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2019-04-15 16:27:30 +03:00 committed by Johan Hedberg
commit b3a6da671f
2 changed files with 35 additions and 1 deletions

View file

@ -351,9 +351,16 @@ config BT_ATT_TX_MAX
amount the calls will block until an existing queued PDU gets
sent.
config BT_GATT_DB
bool "GATT dynamic database support"
default y
help
This option enables registering/unregistering services at runtime.
config BT_GATT_CACHING
bool "GATT Caching support"
default y
depends on BT_GATT_DB
select TINYCRYPT
select TINYCRYPT_AES
select TINYCRYPT_AES_CMAC