lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH 16/19] net: dsa: qca8k: enable mtu_enforcement_ingress
On Wed, Nov 17, 2021 at 10:04:48PM +0100, Ansuel Smith wrote:
> qca8k have a global MTU. Inform DSA of this as the change MTU port
> function checks the max MTU across all port and sets the max value
> anyway as this switch doesn't support per port MTU.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
> drivers/net/dsa/qca8k.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index c3234988aabf..cae58753bb1f 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -1315,6 +1315,9 @@ qca8k_setup(struct dsa_switch *ds)
> /* Set max number of LAGs supported */
> ds->num_lag_ids = QCA8K_NUM_LAGS;
>
> + /* Global MTU. Inform dsa that per port MTU is not supported */
> + ds->mtu_enforcement_ingress = true;
> +
> return 0;
> }
>
> --
> 2.32.0
>

This doesn't do what you think it does. If you want the dev->mtu of all
interfaces to get updated at once, you need to do that yourself. Setting
ds->mtu_enforcement_ingress will only update the MTU for ports belonging
to the same bridge, and for a different reason. Or I'm missing the
reason why you're making this change now.

\
 
 \ /
  Last update: 2021-11-19 03:20    [W:0.283 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site