* [Buildroot] [PATCH] package/connman: add an option to disable stats generation
@ 2022-07-28 17:50 John Keeping
2022-07-28 20:59 ` Thomas Petazzoni via buildroot
2022-09-01 12:28 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: John Keeping @ 2022-07-28 17:50 UTC (permalink / raw)
To: buildroot; +Cc: John Keeping, Martin Bark
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. Statistics are enabled by default to avoid
changing the behaviour of existing configs.
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>
---
package/connman/Config.in | 9 +++++++++
package/connman/connman.mk | 6 ++++++
2 files changed, 15 insertions(+)
diff --git a/package/connman/Config.in b/package/connman/Config.in
index 72b76bf19d..f45851f94a 100644
--- a/package/connman/Config.in
+++ b/package/connman/Config.in
@@ -94,6 +94,15 @@ 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"
+ default y
+ 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
diff --git a/package/connman/connman.mk b/package/connman/connman.mk
index 1b6fd611f5..a76a339e6f 100644
--- a/package/connman/connman.mk
+++ b/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
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/connman: add an option to disable stats generation
2022-07-28 17:50 [Buildroot] [PATCH] package/connman: add an option to disable stats generation John Keeping
@ 2022-07-28 20:59 ` Thomas Petazzoni via buildroot
2022-09-01 12:28 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-28 20:59 UTC (permalink / raw)
To: John Keeping; +Cc: Martin Bark, buildroot
On Thu, 28 Jul 2022 18:50:36 +0100
John Keeping <john@metanate.com> wrote:
> 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. Statistics are enabled by default to avoid
> changing the behaviour of existing configs.
Based on this description, I have chosen to not make it "default y". It
is unlikely that it is useful to anybody, and seems potentially
problematic.
So applied, after removing the "default y".
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/connman: add an option to disable stats generation
2022-07-28 17:50 [Buildroot] [PATCH] package/connman: add an option to disable stats generation John Keeping
2022-07-28 20:59 ` Thomas Petazzoni via buildroot
@ 2022-09-01 12:28 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-09-01 12:28 UTC (permalink / raw)
To: John Keeping; +Cc: Martin Bark, buildroot
>>>>> "John" == John Keeping <john@metanate.com> writes:
> 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. Statistics are enabled by default to avoid
> changing the behaviour of existing configs.
> 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>
Committed to 2022.05.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-01 12:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-28 17:50 [Buildroot] [PATCH] package/connman: add an option to disable stats generation John Keeping
2022-07-28 20:59 ` Thomas Petazzoni via buildroot
2022-09-01 12:28 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox