From: Andrew Lunn <andrew@lunn.ch>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: vivien.didelot@gmail.com, f.fainelli@gmail.com,
davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] net: dsa: mv88e6xxx: Implement .port_change_mtu/.port_max_mtu
Date: Thu, 23 Jul 2020 15:31:22 +0200 [thread overview]
Message-ID: <20200723133122.GB1553578@lunn.ch> (raw)
In-Reply-To: <20200723035942.23988-4-chris.packham@alliedtelesis.co.nz>
On Thu, Jul 23, 2020 at 03:59:41PM +1200, Chris Packham wrote:
> Add implementations for the mv88e6xxx switches to connect with the
> generic dsa operations for configuring the port MTU.
Hi Chris
What tree is this against?
commit 2a550aec36543b20f087e4b3063882e9465f7175
Author: Andrew Lunn <andrew@lunn.ch>
Date: Sat Jul 11 22:32:05 2020 +0200
net: dsa: mv88e6xxx: Implement MTU change
The Marvell Switches support jumbo packages. So implement the
callbacks needed for changing the MTU.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d995f5bf0d40..6f019955ae42 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2693,6 +2693,31 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_DEFAULT_VLAN, 0);
}
+static int mv88e6xxx_get_max_mtu(struct dsa_switch *ds, int port)
+{
+ struct mv88e6xxx_chip *chip = ds->priv;
+
+ if (chip->info->ops->port_set_jumbo_size)
+ return 10240;
+ return 1522;
+}
+
+static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
+{
...
Andrew
next prev parent reply other threads:[~2020-07-23 13:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 3:59 [PATCH 0/4] net: dsa: mv88e6xxx: port mtu support Chris Packham
2020-07-23 3:59 ` [PATCH 1/4] net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration Chris Packham
2020-07-23 13:31 ` Andrew Lunn
2020-07-23 3:59 ` [PATCH 2/4] net: dsa: mv88e6xxx: Support jumbo configuration on 6190/6190X Chris Packham
2020-07-23 13:32 ` Andrew Lunn
2020-07-23 3:59 ` [PATCH 3/4] net: dsa: mv88e6xxx: Implement .port_change_mtu/.port_max_mtu Chris Packham
2020-07-23 13:31 ` Andrew Lunn [this message]
2020-07-23 20:50 ` Chris Packham
2020-07-23 21:02 ` Andrew Lunn
2020-07-23 21:16 ` Chris Packham
2020-07-23 3:59 ` [PATCH 4/4] net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU Chris Packham
2020-07-23 13:34 ` Andrew Lunn
2020-07-23 20:54 ` Chris Packham
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=20200723133122.GB1553578@lunn.ch \
--to=andrew@lunn.ch \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.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
all inboxes | Powered by JetHome®