[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7da2de5-5e25-6284-0b35-fd2dbceb9c4f@gmail.com>
Date: Thu, 9 Apr 2020 19:27:06 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: DENG Qingfang <dqfext@...il.com>,
David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org,
René van Dorst <opensource@...rst.com>,
John Crispin <john@...ozen.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Sean Wang <sean.wang@...iatek.com>,
Weijie Gao <weijie.gao@...iatek.com>,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next] net: dsa: mt7530: enable jumbo frame
On 4/9/2020 7:19 PM, DENG Qingfang wrote:
> So, since nothing else uses the mt7530_set_jumbo function, should I
> remove the function and just add a single rmw to mt7530_setup?
(please do not top-post on netdev)
There is a proper way to support the MTU configuration for DSA switch
drivers which is:
/*
* MTU change functionality. Switches can also adjust their MRU
through
* this method. By MTU, one understands the SDU (L2 payload) length.
* If the switch needs to account for the DSA tag on the CPU
port, this
* method needs to to do so privately.
*/
int (*port_change_mtu)(struct dsa_switch *ds, int port,
int new_mtu);
int (*port_max_mtu)(struct dsa_switch *ds, int port);
>
> On Fri, Apr 10, 2020 at 1:20 AM David Miller <davem@...emloft.net> wrote:
>>
>> From: DENG Qingfang <dqfext@...il.com>
>> Date: Thu, 9 Apr 2020 23:54:09 +0800
>>
>>> +static void
>>> +mt7530_set_jumbo(struct mt7530_priv *priv, u8 kilobytes)
>>> +{
>>> + if (kilobytes > 15)
>>> + kilobytes = 15;
>> ...
>>> + /* Enable jumbo frame up to 15 KB */
>>> + mt7530_set_jumbo(priv, 15);
>>
>> You've made the test quite pointless, honestly.
--
Florian
Powered by blists - more mailing lists