diff mbox series

[v7,1/3] dsa: marvell: Define .set_max_frame_size() function for mv88e6250 SoC family

Message ID 20230523142912.2086985-2-lukma@denx.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series dsa: marvell: Add support for mv88e6071 and 6020 switches | expand

Checks

Context Check Description
netdev/series_format warning Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Lukasz Majewski May 23, 2023, 2:29 p.m. UTC
Switches from mv88e6250 family (the marketing name - "Link Street",
including mv88e6020 and mv88e6071) need the possibility to setup the
maximal frame size, as they support frames up to 2048 bytes.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v6:
- New patch

Changes for v7:
- Update commit message
---
 drivers/net/dsa/mv88e6xxx/chip.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Russell King (Oracle) May 23, 2023, 2:38 p.m. UTC | #1
On Tue, May 23, 2023 at 04:29:10PM +0200, Lukasz Majewski wrote:
> Switches from mv88e6250 family (the marketing name - "Link Street",
> including mv88e6020 and mv88e6071) need the possibility to setup the
> maximal frame size, as they support frames up to 2048 bytes.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Adding this function doesn't allow the "possibility" for a larger frame
size. Adding it changes the value returned from mv88e6xxx_get_max_mtu()
to be a larger frame size, so all switches that make use of
mv88e6250_ops will be expected to support this larger frame size. Do
we know whether that is true?

There were patches floating about a while ago that specified the
maximum size in struct mv88e6xxx_info, but it seems those died a death.
Russell King (Oracle) May 23, 2023, 2:43 p.m. UTC | #2
Also, subject line should be "net: dsa: ..."
Lukasz Majewski May 24, 2023, 12:06 p.m. UTC | #3
Hi Russell,

> Also, subject line should be "net: dsa: ..."
> 

Ok, I will correct that subject line.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Russell King (Oracle) May 24, 2023, 12:08 p.m. UTC | #4
On Wed, May 24, 2023 at 02:06:36PM +0200, Lukasz Majewski wrote:
> Hi Russell,
> 
> > Also, subject line should be "net: dsa: ..."
> > 
> 
> Ok, I will correct that subject line.

Also, please use "mv88e6xxx" rather than "marvell" - consistency in the
subject lines, particularly when referring to a part of the kernel tree
is desirable.
Lukasz Majewski May 24, 2023, 12:53 p.m. UTC | #5
Hi Russell,

> On Tue, May 23, 2023 at 04:29:10PM +0200, Lukasz Majewski wrote:
> > Switches from mv88e6250 family (the marketing name - "Link Street",
> > including mv88e6020 and mv88e6071) need the possibility to setup the
> > maximal frame size, as they support frames up to 2048 bytes.
> > 
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>  
> 
> Adding this function doesn't allow the "possibility" for a larger
> frame size. Adding it changes the value returned from
> mv88e6xxx_get_max_mtu() to be a larger frame size, so all switches
> that make use of mv88e6250_ops will be expected to support this
> larger frame size. Do we know whether that is true?
> 

According to functional specification - the 6070, 6071, 6250, 6020 and
6220 have "Max Frame Size" of 2048 bytes.

The mv88e6xxx_get_max_mtu() now will:
return 1632 - VLAN_ETH_HLEN - EDSA_HLEN - ETH_FCS_LEN;

which is acceptable and safe for this family of chips.

> There were patches floating about a while ago that specified the
> maximum size in struct mv88e6xxx_info, but it seems those died a
> death.
> 

Those patches seems to not be strictly required after Vladimir's work.

The v7 provides what I need, so yes - extra patches from v6 can be
discarded.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff mbox series

Patch

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 64a2f2f83735..b5e43dd40431 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -5043,6 +5043,7 @@  static const struct mv88e6xxx_ops mv88e6250_ops = {
 	.avb_ops = &mv88e6352_avb_ops,
 	.ptp_ops = &mv88e6250_ptp_ops,
 	.phylink_get_caps = mv88e6250_phylink_get_caps,
+	.set_max_frame_size = mv88e6185_g1_set_max_frame_size,
 };
 
 static const struct mv88e6xxx_ops mv88e6290_ops = {