Thread (6 messages) flat view 6 messages, 4 authors, 2018-02-17

Re: [PATCH v2] ravb: add support for changing MTU

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2018-02-16 19:42:18
Also in: linux-renesas-soc

On 02/16/2018 08:10 AM, Niklas Söderlund wrote:
Allow for changing the MTU within the limit of the maximum size of a
descriptor (2048 bytes). Add the callback to change MTU from user-space
and take the configurable MTU into account when configuring the
hardware.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 
+static int ravb_change_mtu(struct net_device *ndev, int new_mtu)
+{
+	if (netif_running(ndev))
+		return -EBUSY;
+
+	ndev->mtu = new_mtu;
+	netdev_update_features(ndev);
Don't you somehow need to quiesce the RX DMA and make sure you that you
re-allocate all RX buffers within priv->rx_skb[q][entry] such that they
will be able to accept a larger buffer size?

If we put the ravb interface under high RX load and we change the MTU on
the fly, can we crash the kernel?
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help