Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe 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. Re: [PATCH] iwd: Propagete signal strength values (Daniel Wagner)
   2. Re: [PATCH] mnlg: Define NETLINK socket options (Daniel Wagner)
   3. [PATCH 0/2] Add support to provision MTU (Daniel Wagner)
   4. [PATCH 1/2] config: Add support to provision MTU (Daniel Wagner)
   5. [PATCH 2/2] doc: Add provisioning information on MTU
      (Daniel Wagner)
   6. Re: MTU (Daniel Wagner)


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

Date: Sat, 8 Feb 2020 14:57:43 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] iwd: Propagete signal strength values
To: [email protected]
Cc: Maxime Roussin-BĂ©langer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

patch applied.

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

Date: Sat, 8 Feb 2020 14:57:54 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] mnlg: Define NETLINK socket options
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

patch applied

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

Date: Sat,  8 Feb 2020 17:52:01 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 0/2] Add support to provision MTU
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

This is relatively easy to support. I left away the D-Bus interface
for this for now. This would be a bit more of work.

Daniel Wagner (2):
  config: Add support to provision MTU
  doc: Add provisioning information on MTU

 doc/config-format.txt |  7 +++++++
 src/config.c          | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

-- 
2.25.0

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

Date: Sat,  8 Feb 2020 17:52:02 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 1/2] config: Add support to provision MTU
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Allow to define the MTU. 10gb ethernet devices are common these days
even in embedded devices, e.g. webcams. By setting larger MTU the CPU
processing overhead is smaller.
---
 src/config.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/config.c b/src/config.c
index 62023b1072da..c668bd0cc39b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -72,6 +72,7 @@ struct connman_config_service {
        char *ipv6_gateway;
        char *ipv6_privacy;
        char *mac;
+       unsigned short mtu;
        char *devname;
        bool mdns;
        char **nameservers;
@@ -120,6 +121,7 @@ static bool cleanup = false;
 #define SERVICE_KEY_IPv6               "IPv6"
 #define SERVICE_KEY_IPv6_PRIVACY       "IPv6.Privacy"
 #define SERVICE_KEY_MAC                "MAC"
+#define SERVICE_KEY_MTU                       "MTU"
 #define SERVICE_KEY_DEVICE_NAME               "DeviceName"
 #define SERVICE_KEY_NAMESERVERS        "Nameservers"
 #define SERVICE_KEY_SEARCH_DOMAINS     "SearchDomains"
@@ -156,6 +158,7 @@ static const char *service_possible_keys[] = {
        SERVICE_KEY_IPv6,
        SERVICE_KEY_IPv6_PRIVACY,
        SERVICE_KEY_MAC,
+       SERVICE_KEY_MTU,
        SERVICE_KEY_DEVICE_NAME,
        SERVICE_KEY_MDNS,
        SERVICE_KEY_NAMESERVERS,
@@ -482,6 +485,18 @@ static bool load_service_generic(GKeyFile *keyfile,
                service->mac = str;
        }
 
+       str = __connman_config_get_string(keyfile, group, SERVICE_KEY_MTU, 
NULL);
+       if (str) {
+               long int value;
+               char *ptr;
+
+               value = strtol(str, &ptr, 10);
+               if (ptr != mask && *ptr == '\0' && value >= 64)
+                       service->mtu = value;
+
+               g_free(str);
+       }
+
        str = __connman_config_get_string(keyfile, group, 
SERVICE_KEY_DEVICE_NAME, NULL);
        if (str) {
                g_free(service->devname);
@@ -1300,6 +1315,23 @@ static int try_provision_service(struct 
connman_config_service *config,
                        return -ENOENT;
        }
 
+       if (config->mtu != 0) {
+               struct connman_device *device;
+               int index;
+
+               device = connman_network_get_device(network);
+               if (!device) {
+                       connman_error("Network device is missing");
+                       return -ENODEV;
+               }
+
+               index = connman_device_get_index(device);
+               if (connman_inet_set_mtu(index, config->mtu)) {
+                       connman_warn("Failed to set MTU size %d index %d",
+                               config->mtu, index);
+               }
+       }
+
        if (!config->ipv6_address) {
                connman_network_set_ipv6_method(network,
                                                CONNMAN_IPCONFIG_METHOD_AUTO);
-- 
2.25.0

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

Date: Sat,  8 Feb 2020 17:52:03 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 2/2] doc: Add provisioning information on MTU
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Document new feature to provision the MTU.
---
 doc/config-format.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/config-format.txt b/doc/config-format.txt
index cdde9cbcf676..1309aeb9093d 100644
--- a/doc/config-format.txt
+++ b/doc/config-format.txt
@@ -59,6 +59,8 @@ an identifier unique to the config file.
   interface is used. The byte values must have prefix 0 added,
   the bytes must be separated by ":" char and its length must be
   exactly 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 = 17 characters.
+- MTU: Maximum transmission unit. Value is an integer in the range of
+  [64, 65536].
 - DeviceName: The interface name where this setting should be applied, e.g.
   eth0. The MAC address will take preference over DeviceName in matching.
 - Nameservers: Comma separated list of nameservers
@@ -170,3 +172,8 @@ Name = my_home_wifi
 Passphrase = secret
 IPv4 = 192.168.2.2/255.255.255.0/192.168.2.1
 MAC = 06:05:04:03:02:01
+
+[service_jumbo_frames]
+Type = ethernet
+MTU = 9018
+IPv4 = dhcp
-- 
2.25.0

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

Date: Sat, 8 Feb 2020 17:57:09 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: MTU
To: Damien LEFEVRE <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi Damien,

On 03.02.20 12:45, Damien LEFEVRE wrote:
> What's the correct way to set the MTU with connman? All I see from the 
> doc is that the value is reported as read-only

So far there was no way to set the MTU. I've just posted
a patch which allows to set the MTU via provisioning.

> I have a yocto system where I tried to use systemd-networkd for setting 
> the MTU only. Out of 2 interfaces, one goes crazy after the DHCP request 
> goes through and I'm not able to ping from it or the device from another 
> PC. The network adapter led is flashing until I restart the connman service.

Having two network manager running is surely good for some
entertainment :)

Can you check if the patch would work for you? I've chicken out
implementing the writing part via D-Bus because that's bit
more complex and if you are happy with the provision approach
than there is no need to go an extra mile.

https://lists.01.org/hyperkitty/list/[email protected]/message/E5FSVIP3DWRDG6MNC2UAOD5VSVBA4GL5/

Thanks,
Daniel

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

Subject: Digest Footer

_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]


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

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

Reply via email to