浏览代码

package/connman: add an option to disable stats generation

By default connman periodically saves network interface statistics
into an mmap'd round robin file. These are not accessible over the
D-Bus interface and the only method to interact with this is
ResetCounters() which is marked as experimental.

Continually writing statistics will increase drive wear and may not be
desirable in some devices with limited flash erase cycles, so add an
option to disable this.

Note that connman does not provide any runtime control over this
facility, it can only be disabled via the configure script.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b573a7029523925746efbe056f7ff02b63edbb7f)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
John Keeping 3 年之前
父节点
当前提交
93ae35df72
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 8 0
      package/connman/Config.in
  2. 6 0
      package/connman/connman.mk

+ 8 - 0
package/connman/Config.in

@@ -94,6 +94,14 @@ comment "ofono support needs a toolchain w/ headers >= 4.12"
 config BR2_PACKAGE_CONNMAN_DEBUG
 	bool "enable compiling with debugging information"
 
+config BR2_PACKAGE_CONNMAN_STATS
+	bool "enable statistics round robin file generation"
+	help
+	  Enable generation of statistics in a round robin file.
+
+	  This is enabled by default upstream but is marked as
+	  experimental.
+
 config BR2_PACKAGE_CONNMAN_CLIENT
 	bool "enable command line client"
 	select BR2_PACKAGE_READLINE

+ 6 - 0
package/connman/connman.mk

@@ -65,6 +65,12 @@ else
 CONNMAN_CONF_OPTS += --disable-ofono
 endif
 
+ifeq ($(BR2_PACKAGE_CONNMAN_STATS),y)
+CONNMAN_CONF_OPTS += --enable-stats
+else
+CONNMAN_CONF_OPTS += --disable-stats
+endif
+
 ifeq ($(BR2_PACKAGE_CONNMAN_WIFI),y)
 CONNMAN_CONF_OPTS += --enable-wifi
 else