From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Murali Krishna Policharla <murali.policharla@broadcom.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
"open list:BROADCOM SYSTEMPORT ETHERNET DRIVER"
<bcm-kernel-feedback-list@broadcom.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE
Date: Fri, 18 Dec 2020 12:30:20 -0800 [thread overview]
Message-ID: <c178b5db-3de4-5f02-eee3-c9e69393174a@gmail.com> (raw)
In-Reply-To: <20201218202441.ppcxswvlix3xszsn@skbuf>
On 12/18/20 12:24 PM, Vladimir Oltean wrote:
> Hi Florian,
>
> On Fri, Dec 18, 2020 at 09:38:43AM -0800, Florian Fainelli wrote:
>> 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.
--
Florian
next prev parent reply other threads:[~2020-12-18 20:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 17:38 [PATCH net] net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE Florian Fainelli
2020-12-18 20:24 ` Vladimir Oltean
2020-12-18 20:30 ` Florian Fainelli [this message]
2020-12-18 20:52 ` Vladimir Oltean
2020-12-18 20:54 ` Florian Fainelli
2020-12-18 21:02 ` Vladimir Oltean
2020-12-18 21:08 ` Florian Fainelli
2020-12-18 21:14 ` Vladimir Oltean
2020-12-18 21:17 ` Florian Fainelli
2020-12-21 21:49 ` Florian Fainelli
2020-12-21 22:25 ` Vladimir Oltean
2020-12-21 22:55 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c178b5db-3de4-5f02-eee3-c9e69393174a@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=murali.policharla@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).