netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: DENG Qingfang <dqfext@gmail.com>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, "René van Dorst" <opensource@vdorst.com>,
	"John Crispin" <john@phrozen.org>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Sean Wang" <sean.wang@mediatek.com>,
	"Weijie Gao" <weijie.gao@mediatek.com>,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next] net: dsa: mt7530: enable jumbo frame
Date: Thu, 9 Apr 2020 19:27:06 -0700	[thread overview]
Message-ID: <c7da2de5-5e25-6284-0b35-fd2dbceb9c4f@gmail.com> (raw)
In-Reply-To: <CALW65jbrg1doaRBPdGQkQ-PG6dnh_L4va7RxcMxyKKMqasN7bQ@mail.gmail.com>



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@davemloft.net> wrote:
>>
>> From: DENG Qingfang <dqfext@gmail.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

  reply	other threads:[~2020-04-10  2:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 15:54 [PATCH net-next] net: dsa: mt7530: enable jumbo frame DENG Qingfang
2020-04-09 17:20 ` David Miller
2020-04-10  2:19   ` DENG Qingfang
2020-04-10  2:27     ` Florian Fainelli [this message]
2020-04-10  2:49       ` DENG Qingfang
2020-04-10 10:46         ` Vladimir Oltean
2020-04-14  3:03           ` DENG Qingfang
2020-04-14  9:38             ` Vladimir Oltean

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=c7da2de5-5e25-6284-0b35-fd2dbceb9c4f@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=john@phrozen.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=opensource@vdorst.com \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@gmail.com \
    --cc=weijie.gao@mediatek.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).