Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Issue with service reporting on a 4G modem (Bassem BOUBAKER)
   2. [PATCH 0/1] Configure flag for disabling stats file
      generation (Chris Novakovic)
   3. [PATCH 1/1] build: Add --disable-stats option (Chris Novakovic)
   4. Re: [PATCH 1/1] build: Add --disable-stats option (Jonas Bonn)


----------------------------------------------------------------------

Message: 1
Date: Fri, 16 Feb 2018 10:24:00 +0000
From: Bassem BOUBAKER <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Issue with service reporting on a 4G modem
Message-ID:
        
<am4pr01mb18739e5535492213f423a9719c...@am4pr01mb1873.eurprd01.prod.exchangelabs.com>
        
Content-Type: text/plain; charset="iso-8859-1"

Hello community,

I'm having connman version 1.31 along side with ofono running on my board.

When I activate a context on my 4G modem using ofono, connman creates two 
services: one is cellular and the other is ethernet.

*AR Wired ethernet_XX_cable
*AO XXX cellular_XXX_context1

In this case, the ideal state is that connman reports only one cellular 
technology related to the modem.

When digging into the logs, I feels like a new ethernet device is enumerated 
and connman creates the appropriate service for it.

Knowing that my modem net interface is using "cdc_ether" driver, does anyone 
have an idea about what could be the issue here?


Regards,
Bassem

------------------------------

Message: 2
Date: Fri, 16 Feb 2018 12:38:51 +0000
From: Chris Novakovic <[email protected]>
To: [email protected]
Subject: [PATCH 0/1] Configure flag for disabling stats file
        generation
Message-ID: <[email protected]>

In August 2016, Feng Wang posted a patch that allowed the generation of
interface statistics files to be disabled at compile-time. It was never merged,
but I rediscovered it recently and realised it'd be useful to have a way to stop
those files from being generated on embedded systems, where file systems are
often on flash storage (putting writes at a premium) and the interface stats
themselves might not even be needed.

This is Feng's patch from 2016, cleaned up and updated for the current master
branch.

Chris Novakovic (1):
  build: Add --disable-stats option

 Makefile.am  |  4 ++++
 configure.ac |  5 +++++
 src/stats.c  | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)

-- 
2.14.1



------------------------------

Message: 3
Date: Fri, 16 Feb 2018 12:38:52 +0000
From: Chris Novakovic <[email protected]>
To: [email protected]
Subject: [PATCH 1/1] build: Add --disable-stats option
Message-ID: <[email protected]>

Generation of interface statistics files can now be controlled at
compile-time using the --{enable,disable}-stats configure options.
Statistics files remain enabled by default.
---
 Makefile.am  |  4 ++++
 configure.ac |  5 +++++
 src/stats.c  | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 97f1c87d..030b5b8f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -244,6 +244,10 @@ else
 AM_CPPFLAGS = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
 endif
 
+if STATS
+AM_CPPFLAGS += -DCONNMAN_WITH_STATS
+endif
+
 src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ \
                                @GNUTLS_CFLAGS@ $(builtin_cflags) \
                                -DCONNMAN_PLUGIN_BUILTIN \
diff --git a/configure.ac b/configure.ac
index 3cdf4b29..cb6512f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,6 +380,11 @@ AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
                                        [enable_tools=${enableval}])
 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
 
+AC_ARG_ENABLE(stats, AC_HELP_STRING([--disable-stats],
+                         [disable statistics round robin file generation]),
+                  [enable_stats=${enableval}])
+AM_CONDITIONAL(STATS, test "${enable_stats}" != "no")
+
 if (test "${enable_tools}" != "no"); then
        AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [],
                                                $PATH:/sbin:/usr/sbin)
diff --git a/src/stats.c b/src/stats.c
index 663bc382..70fd085d 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -37,6 +37,7 @@
 
 #include "connman.h"
 
+#ifdef CONNMAN_WITH_STATS
 #define MODE           (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | \
                        S_IXGRP | S_IROTH | S_IXOTH)
 
@@ -825,3 +826,38 @@ void __connman_stats_cleanup(void)
        g_hash_table_destroy(stats_hash);
        stats_hash = NULL;
 }
+
+#else
+
+int __connman_stats_service_register(struct connman_service *service)
+{
+       return -ENOTSUP;
+}
+
+void __connman_stats_service_unregister(struct connman_service *service)
+{
+}
+
+int  __connman_stats_update(struct connman_service *service,
+                               bool roaming,
+                               struct connman_stats_data *data)
+{
+       return 0;
+}
+
+int __connman_stats_get(struct connman_service *service,
+                               bool roaming,
+                               struct connman_stats_data *data)
+{
+       return 0;
+}
+
+int __connman_stats_init(void)
+{
+       return 0;
+}
+
+void __connman_stats_cleanup(void)
+{
+}
+#endif /* CONNMAN_WITH_STATS */
-- 
2.14.1



------------------------------

Message: 4
Date: Fri, 16 Feb 2018 14:15:14 +0100
From: Jonas Bonn <[email protected]>
To: Chris Novakovic <[email protected]>, [email protected]
Subject: Re: [PATCH 1/1] build: Add --disable-stats option
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

On 02/16/2018 01:38 PM, Chris Novakovic wrote:
> Generation of interface statistics files can now be controlled at
> compile-time using the --{enable,disable}-stats configure options.
> Statistics files remain enabled by default.

If this is Feng Wang's patch, then you should have him as the patch 
author... if you've massaged it into something unrecognizable, just 
mention him as your source of inspiration in the patch comment.

> ---
>   Makefile.am  |  4 ++++
>   configure.ac |  5 +++++
>   src/stats.c  | 36 ++++++++++++++++++++++++++++++++++++
>   3 files changed, 45 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 97f1c87d..030b5b8f 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -244,6 +244,10 @@ else
>   AM_CPPFLAGS = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
>   endif
>   
> +if STATS
> +AM_CPPFLAGS += -DCONNMAN_WITH_STATS
> +endif
> +
>   src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ \
>                               @GNUTLS_CFLAGS@ $(builtin_cflags) \
>                               -DCONNMAN_PLUGIN_BUILTIN \
> diff --git a/configure.ac b/configure.ac
> index 3cdf4b29..cb6512f5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -380,6 +380,11 @@ AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
>                                       [enable_tools=${enableval}])
>   AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
>   
> +AC_ARG_ENABLE(stats, AC_HELP_STRING([--disable-stats],
> +                       [disable statistics round robin file generation]),
> +                  [enable_stats=${enableval}])
> +AM_CONDITIONAL(STATS, test "${enable_stats}" != "no")

Here you are setting a makefile variable in order to have your makefile 
pass a definition to the preprocessor.  This might be better done with 
AC_DEFINE(...) and making sure to #include "config.h" in src/stats.c.

/Jonas


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 28, Issue 11
***************************************

Reply via email to