qmi_wwan: add MTU default to qmap network interface
PATCH 1/1 qmi_wwan: add MTU default to qmap network interface
This patch adds MTU default value to qmap network interface in order to avoid "RTNETLINK answers: No buffer space available" error when setting an ipv6 address.
--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/qmi_wwan.c +1 -0
@@ -123,6 +123,7 @@ static void qmimux_setup(struct net_device *dev) dev->addr_len =0 ; dev->flags =IFF_POINTOPOINT |IFF_NOARP |IFF_MULTICAST ; dev->netdev_ops = &qmimux_netdev_ops; + dev->mtu =1500 ; dev->needs_free_netdev = true; }
Signature · 1 line
2.7.4
Quoted 14 lines · Daniele Palmas
This patch adds MTU default value to qmap network interface in order to avoid "RTNETLINK answers: No buffer space available" error when setting an ipv6 address.
Signed-off-by Daniele Palmas <[email protected]>--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)drivers/net/usb/qmi_wwan.c +0
-0
drivers/net/usb/qmi_wwan.c static void qmimux_setup(struct net_device *dev) · line 128
Quoted 6 lines
drivers/net/usb/qmi_wwan.c +1
-0@@ -123,6 +123,7 @@ static void qmimux_setup(struct net_device *dev) dev->addr_len =0 ; dev->flags =IFF_POINTOPOINT |IFF_NOARP |IFF_MULTICAST ; dev->netdev_ops = &qmimux_netdev_ops; + dev->mtu =1500 ; dev->needs_free_netdev = true; }
Setting some value makes sense, but hard coding 1500 feels wrong. Should this relate to the real device mtu somehow? Do we need a ndo_change_mtu to enforce this relationship? Should qmimux_rx_fixup() respect the qmap device mtu?
I'm fine with this patch as a first step and immediate fix, so
Hi Bjørn,
Il giorno ven 4 gen 2019 alle ore 14:24 Bjørn Mork <[email protected]> ha scritto:
Quoted 12 lines
Quoted 9 lines · Daniele Palmas
This patch adds MTU default value to qmap network interface in order to avoid "RTNETLINK answers: No buffer space available" error when setting an ipv6 address.
Signed-off-by Daniele Palmas <[email protected]>--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
Quoted 17 lines
drivers/net/usb/qmi_wwan.c static void qmimux_setup(struct net_device *dev) · line 128
Quoted 11 lines
drivers/net/usb/qmi_wwan.c +1
-0@@ -123,6 +123,7 @@ static void qmimux_setup(struct net_device *dev) dev->addr_len =0 ; dev->flags =IFF_POINTOPOINT |IFF_NOARP |IFF_MULTICAST ; dev->netdev_ops = &qmimux_netdev_ops; + dev->mtu =1500 ; dev->needs_free_netdev = true; }Setting some value makes sense, but hard coding 1500 feels wrong. Should this relate to the real device mtu somehow? Do we need a
ndo_change_mtuto enforce this relationship? Shouldqmimux_rx_fixup()respect the qmap device mtu?
yes, all your questions seem relevant to me: in the the first draft of my patch qmap mtu was related to the real dev mtu, considering also the qmap header, but then I took a look at how the rmnet driver is managing mtu.
If I'm not wrong, it seems that mtu is hardcoded also for rmnet (RMNET_DFLT_PACKET_SIZE = 1500 defined in drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h and applied in rmnet_vnd_setup function at rmnet_vnd.c).
I do not see any part of code in which the rmnet mtu is related to the mtu of the underlying device (but maybe it's me that is missing something obvious) so I used the same approach, hard coding the value.
Maybe should usbnet_change_mtu be called with the qmap network interface mtu (+ qmap header size ?) when creating a qmap device, like in qmi_wwan_netdev_setup?
Sorry in advance if I'm writing silly things...
Thanks,
Daniele
Quoted 3 lines
I'm fine with this patch as a first step and immediate fix, so
Acked-by Bjørn Mork <[email protected]>
From: Daniele Palmas <[email protected]>
Date: Fri, 4 Jan 2019 13:26:10 +0100
Quoted 5 lines
This patch adds MTU default value to qmap network interface in order to avoid "RTNETLINK answers: No buffer space available" error when setting an ipv6 address.
Signed-off-by Daniele Palmas <[email protected]>
Applied.