From: Pavel Machek <pavel@ucw.cz>
To: Anderson Luiz Alves <alacn1@gmail.com>
Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
f.fainelli@gmail.com, davem@davemloft.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 net] mv88e6060: disable hardware level MAC learning
Date: Fri, 28 Dec 2018 09:22:55 +0100 [thread overview]
Message-ID: <20181228082255.GB6341@amd> (raw)
In-Reply-To: <20181130235836.11741-1-alacn1@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
On Fri 2018-11-30 21:58:36, Anderson Luiz Alves wrote:
> Disable hardware level MAC learning because it breaks station roaming.
> When enabled it drops all frames that arrive from a MAC address
> that is on a different port at learning table.
>
> Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
Will not this effectively disable the hardware switching leading to
serious performance implications?
AFAICT the e6060 driver does not support ATU access from the kernel,
so we'll fall back to "all software" bridging....
Pavel
> ---
>
> Notes:
> v2: Updated code comments.
> v3: Sent with correct whitespaces.
>
> drivers/net/dsa/mv88e6060.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c
> index 65f10fec2..0b3e51f24 100644
> --- a/drivers/net/dsa/mv88e6060.c
> +++ b/drivers/net/dsa/mv88e6060.c
> @@ -116,8 +116,7 @@ static int mv88e6060_switch_reset(struct dsa_switch *ds)
> /* Reset the switch. */
> REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
> GLOBAL_ATU_CONTROL_SWRESET |
> - GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
> - GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
> + GLOBAL_ATU_CONTROL_LEARNDIS);
>
> /* Wait up to one second for reset to complete. */
> timeout = jiffies + 1 * HZ;
> @@ -142,13 +141,10 @@ static int mv88e6060_setup_global(struct dsa_switch *ds)
> */
> REG_WRITE(REG_GLOBAL, GLOBAL_CONTROL, GLOBAL_CONTROL_MAX_FRAME_1536);
>
> - /* Enable automatic address learning, set the address
> - * database size to 1024 entries, and set the default aging
> - * time to 5 minutes.
> + /* Disable automatic address learning.
> */
> REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
> - GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
> - GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
> + GLOBAL_ATU_CONTROL_LEARNDIS);
>
> return 0;
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-12-28 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 23:58 [PATCH v3 net] mv88e6060: disable hardware level MAC learning Anderson Luiz Alves
2018-12-01 15:39 ` Andrew Lunn
2018-12-04 0:04 ` David Miller
2018-12-28 8:22 ` Pavel Machek [this message]
2018-12-28 9:06 ` Andrew Lunn
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=20181228082255.GB6341@amd \
--to=pavel@ucw.cz \
--cc=alacn1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).