All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: mt7530: enable MTU normalization
@ 2020-12-10 17:03 ` DENG Qingfang
  0 siblings, 0 replies; 8+ messages in thread
From: DENG Qingfang @ 2020-12-10 17:03 UTC (permalink / raw)
  To: netdev, linux-mediatek, Sean Wang, Landen Chao, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Jakub Kicinski, Matthias Brugger, Russell King

MT7530 has a global RX length register, so we are actually changing its
MRU.
Enable MTU normalization for this reason.

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
---
 drivers/net/dsa/mt7530.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 99bf8fed6536..a67cac15a724 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1657,6 +1657,7 @@ mt7530_setup(struct dsa_switch *ds)
 	 */
 	dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
 	ds->configure_vlan_while_not_filtering = true;
+	ds->mtu_enforcement_ingress = true;
 
 	if (priv->id == ID_MT7530) {
 		regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
@@ -1895,6 +1896,7 @@ mt7531_setup(struct dsa_switch *ds)
 	}
 
 	ds->configure_vlan_while_not_filtering = true;
+	ds->mtu_enforcement_ingress = true;
 
 	/* Flush the FDB table */
 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net-next] net: dsa: mt7530: enable MTU normalization
@ 2020-12-10 17:03 ` DENG Qingfang
  0 siblings, 0 replies; 8+ messages in thread
From: DENG Qingfang @ 2020-12-10 17:03 UTC (permalink / raw)
  To: netdev, linux-mediatek, Sean Wang, Landen Chao, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Jakub Kicinski, Matthias Brugger, Russell King

MT7530 has a global RX length register, so we are actually changing its
MRU.
Enable MTU normalization for this reason.

Signed-off-by: DENG Qingfang <dqfext@gmail.com>
---
 drivers/net/dsa/mt7530.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 99bf8fed6536..a67cac15a724 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1657,6 +1657,7 @@ mt7530_setup(struct dsa_switch *ds)
 	 */
 	dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
 	ds->configure_vlan_while_not_filtering = true;
+	ds->mtu_enforcement_ingress = true;
 
 	if (priv->id == ID_MT7530) {
 		regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
@@ -1895,6 +1896,7 @@ mt7531_setup(struct dsa_switch *ds)
 	}
 
 	ds->configure_vlan_while_not_filtering = true;
+	ds->mtu_enforcement_ingress = true;
 
 	/* Flush the FDB table */
 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
  2020-12-10 17:03 ` DENG Qingfang
@ 2020-12-11 12:11   ` Landen Chao
  -1 siblings, 0 replies; 8+ messages in thread
From: Landen Chao @ 2020-12-11 12:11 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: netdev, linux-mediatek, Sean Wang, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S . Miller,
	Jakub Kicinski, Matthias Brugger, Russell King

On Fri, 2020-12-11 at 01:03 +0800, DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
> 
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> ---
Acked-by: Landen Chao <landen.chao@mediatek.com>

Best regards,
landen



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
@ 2020-12-11 12:11   ` Landen Chao
  0 siblings, 0 replies; 8+ messages in thread
From: Landen Chao @ 2020-12-11 12:11 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: Andrew Lunn, Florian Fainelli, netdev, Sean Wang, Russell King,
	David S . Miller, linux-mediatek, Matthias Brugger,
	Jakub Kicinski, Vladimir Oltean, Vivien Didelot

On Fri, 2020-12-11 at 01:03 +0800, DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
> 
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> ---
Acked-by: Landen Chao <landen.chao@mediatek.com>

Best regards,
landen


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
  2020-12-10 17:03 ` DENG Qingfang
@ 2020-12-11 19:11   ` Vladimir Oltean
  -1 siblings, 0 replies; 8+ messages in thread
From: Vladimir Oltean @ 2020-12-11 19:11 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: netdev, linux-mediatek, Sean Wang, Landen Chao, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, David S . Miller,
	Jakub Kicinski, Matthias Brugger, Russell King

On Fri, Dec 11, 2020 at 01:03:22AM +0800, DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
>
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> ---

Makes sense. Since it's global and not per port, this also helps the
stack to be aware of the fact that all bridged interfaces have the same
MTU. We could probably do a little bit better by also informing the
standalone interfaces about the updated MTU, but since the value that we
program into the standalone ports is >= than what the stack knows about,
there isn't an issue really.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

>  drivers/net/dsa/mt7530.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 99bf8fed6536..a67cac15a724 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -1657,6 +1657,7 @@ mt7530_setup(struct dsa_switch *ds)
>  	 */
>  	dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
>  	ds->configure_vlan_while_not_filtering = true;
> +	ds->mtu_enforcement_ingress = true;
>
>  	if (priv->id == ID_MT7530) {
>  		regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
> @@ -1895,6 +1896,7 @@ mt7531_setup(struct dsa_switch *ds)
>  	}
>
>  	ds->configure_vlan_while_not_filtering = true;
> +	ds->mtu_enforcement_ingress = true;
>
>  	/* Flush the FDB table */
>  	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
@ 2020-12-11 19:11   ` Vladimir Oltean
  0 siblings, 0 replies; 8+ messages in thread
From: Vladimir Oltean @ 2020-12-11 19:11 UTC (permalink / raw)
  To: DENG Qingfang
  Cc: Andrew Lunn, Landen Chao, Florian Fainelli, netdev, Sean Wang,
	Russell King, David S . Miller, linux-mediatek, Matthias Brugger,
	Jakub Kicinski, Vivien Didelot

On Fri, Dec 11, 2020 at 01:03:22AM +0800, DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
>
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> ---

Makes sense. Since it's global and not per port, this also helps the
stack to be aware of the fact that all bridged interfaces have the same
MTU. We could probably do a little bit better by also informing the
standalone interfaces about the updated MTU, but since the value that we
program into the standalone ports is >= than what the stack knows about,
there isn't an issue really.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

>  drivers/net/dsa/mt7530.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 99bf8fed6536..a67cac15a724 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -1657,6 +1657,7 @@ mt7530_setup(struct dsa_switch *ds)
>  	 */
>  	dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
>  	ds->configure_vlan_while_not_filtering = true;
> +	ds->mtu_enforcement_ingress = true;
>
>  	if (priv->id == ID_MT7530) {
>  		regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
> @@ -1895,6 +1896,7 @@ mt7531_setup(struct dsa_switch *ds)
>  	}
>
>  	ds->configure_vlan_while_not_filtering = true;
> +	ds->mtu_enforcement_ingress = true;
>
>  	/* Flush the FDB table */
>  	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
> --
> 2.25.1
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
  2020-12-10 17:03 ` DENG Qingfang
@ 2020-12-13  1:01   ` Jakub Kicinski
  -1 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-13  1:01 UTC (permalink / raw)
  To: DENG Qingfang, Landen Chao, Vladimir Oltean
  Cc: netdev, linux-mediatek, Sean Wang, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, David S . Miller, Matthias Brugger,
	Russell King

On Fri, 11 Dec 2020 01:03:22 +0800 DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
> 
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>

Applied, thanks and thanks for the reviews.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net-next] net: dsa: mt7530: enable MTU normalization
@ 2020-12-13  1:01   ` Jakub Kicinski
  0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2020-12-13  1:01 UTC (permalink / raw)
  To: DENG Qingfang, Landen Chao, Vladimir Oltean
  Cc: Andrew Lunn, Florian Fainelli, netdev, Sean Wang, Russell King,
	David S . Miller, linux-mediatek, Matthias Brugger,
	Vivien Didelot

On Fri, 11 Dec 2020 01:03:22 +0800 DENG Qingfang wrote:
> MT7530 has a global RX length register, so we are actually changing its
> MRU.
> Enable MTU normalization for this reason.
> 
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>

Applied, thanks and thanks for the reviews.

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-13  1:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 17:03 [PATCH net-next] net: dsa: mt7530: enable MTU normalization DENG Qingfang
2020-12-10 17:03 ` DENG Qingfang
2020-12-11 12:11 ` Landen Chao
2020-12-11 12:11   ` Landen Chao
2020-12-11 19:11 ` Vladimir Oltean
2020-12-11 19:11   ` Vladimir Oltean
2020-12-13  1:01 ` Jakub Kicinski
2020-12-13  1:01   ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.