Thread (12 messages) flat view 12 messages, 2 authors, 2020-12-21

Re: [PATCH net] net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2020-12-18 20:53:06
Also in: lkml

On Fri, Dec 18, 2020 at 12:30:20PM -0800, Florian Fainelli wrote:
On 12/18/20 12:24 PM, Vladimir Oltean wrote:
quoted
Hi Florian,

On Fri, Dec 18, 2020 at 09:38:43AM -0800, Florian Fainelli wrote:
quoted
The driver is already allocating receive buffers of 2KiB and the
Ethernet MAC is configured to accept frames up to UMAC_MAX_MTU_SIZE.

Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 0fdd19d99d99..b1ae9eb8f247 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -2577,6 +2577,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
 			 NETIF_F_HW_VLAN_CTAG_TX;
 	dev->hw_features |= dev->features;
 	dev->vlan_features |= dev->features;
+	dev->max_mtu = UMAC_MAX_MTU_SIZE;
 
 	/* Request the WOL interrupt and advertise suspend if available */
 	priv->wol_irq_disabled = 1;
-- 
2.25.1
Do you want to treat the SYSTEMPORT Lite differently?

	/* Set maximum frame length */
	if (!priv->is_lite)
		umac_writel(priv, UMAC_MAX_MTU_SIZE, UMAC_MAX_FRAME_LEN);
	else
		gib_set_pad_extension(priv);
SYSTEMPORT Lite does not actually validate the frame length, so setting
a maximum number to the buffer size we allocate could work, but I don't
see a reason to differentiate the two types of MACs here.
And if the Lite doesn't validate the frame length, then shouldn't it
report a max_mtu equal to the max_mtu of the attached DSA switch, plus
the Broadcom tag length? Doesn't the b53 driver support jumbo frames?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help