netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Tristram.Ha@microchip.com,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Simon Horman <horms@kernel.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	"Ricardo B. Marliere" <ricardo@marliere.net>,
	Casper Andersson <casper.casan@gmail.com>,
	linux-kernel@vger.kernel.org,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH v2 net-next] net: dsa: Allow only up to two HSR HW offloaded ports for KSZ9477
Date: Thu, 20 Jun 2024 14:00:44 +0200	[thread overview]
Message-ID: <20240620140044.07191e24@wsk> (raw)
In-Reply-To: <20240620090210.drop6jwh7e5qw556@skbuf>

[-- Attachment #1: Type: text/plain, Size: 3648 bytes --]

Hi Vladimir,

> On Thu, Jun 20, 2024 at 09:59:20AM +0200, Lukasz Majewski wrote:
> > > It will return -EOPNOTSUPP for port 0,   
> > 
> > This comment is for xrs700x_hsr_join()?  
> 
> Yes.
> 
> > For the ksz_hsr_join() we do explicitly check for the
> > KSZ9477_CHIP_ID.
> > 
> > I do regard this fix as a ksz9477 specific one, as there are some
> > issues (IMHO - this is the "unexpected behaviour" case for this IC)
> > when we add interlink to SoC VLAN.
> > 
> > I don't understand why you bring up xrs700x case here? Is it to get
> > a "broader context"?  
> 
> You have the Fixes: tag set to a HSR driver change, the fix to which
> you provide in an offloading device driver. What I'm trying to tell
> you is to look around and see that KSZ9477 is not the only one which
> is confused by the addition of an interlink port.

As of now - the HSR interlink was tested with hsr_redbox.sh script with
QEMU setup and with KSZ9477 IC with and without offloading enabled.

> So is XRS700X, yet
> for another reason.
> 
> > > falling back to
> > > software mode for the first ring port, then accept offload for
> > > ring ports 1 and 2. But it doesn't match what user space
> > > requested, because port 2 should be interlink...  
> > 
> > Please correct me if I'm wrong, but this seems to not be the case
> > for ksz9477 - as I stated in the other mail - the ordering is
> > correct (I've checked it).  
> 
> I was never claiming it to be about KSZ9477.

Ok.

> 
> > > I think you really should pass the port type down to drivers and
> > > reject offloading interlink ports...  
> > 
> > As stated above - IMHO I do provide a fix for this particular IC
> > (KSZ9477). With xrs700x we do have fixed ports supporting HSR (port
> > 1,2), so there is no other choice. As a result the HSR Interlink
> > would be supporting only SW emulation.  
> 
> But there is another choice, and I think I've already explained it.
> 
>         HSR_PT_SLAVE_A    HSR_PT_SLAVE_B      HSR_PT_INTERLINK
>  ----------------------------------------------------------------
>  user
>  space        0                 1                   2
>  requests
>  ----------------------------------------------------------------
>  XRS700X
>  driver       1                 2                   -
>  understands
> 
> I am bringing this as an argument for the fact that you should pass
> the port type explicitly from HSR to the offload, and use it
> throughout the offloading drivers. The hweight(ports) >= 2 happens to
> work for KSZ9477,

And hence it is added to ksz_hsr_join() function, which for now only
checks if we use this particular IC.

> but IMO misidentifies the problem as having to do
> with the number of ports rather than the port type.

In general I do understand your concerns - however, as I've stated this
patch fixes oddity of the KSZ9477. I can test it with it.

> Because of this,
> a largely similar issue introduced by the same blamed commit but in
> XRS700X is left unaddressed and unidentified (the fixed ports check
> which is already present masks the fact that it's not really about
> the ports, but their type, which must still be checked, otherwise the
> driver has no idea what HSR wants from it).

To keep it short: I do see your point, but I believe that it is out of
the scope for this particular patch.


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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-06-20 12:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 13:42 [PATCH v2 net-next] net: dsa: Allow only up to two HSR HW offloaded ports for KSZ9477 Lukasz Majewski
2024-06-19 13:54 ` Dan Carpenter
2024-06-19 14:27 ` Andrew Lunn
2024-06-19 14:42 ` Vladimir Oltean
2024-06-19 15:10   ` Lukasz Majewski
2024-06-19 15:48     ` Vladimir Oltean
2024-06-19 15:59       ` Vladimir Oltean
2024-06-20  7:59         ` Lukasz Majewski
2024-06-20  9:02           ` Vladimir Oltean
2024-06-20 12:00             ` Lukasz Majewski [this message]
2024-06-20 12:06               ` Vladimir Oltean
2024-06-20 13:28                 ` Lukasz Majewski
2024-06-20 14:33                   ` Vladimir Oltean
2024-06-21  8:31                     ` Lukasz Majewski
2024-06-21  8:43                       ` Vladimir Oltean
2024-06-19 21:54       ` Vladimir Oltean

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=20240620140044.07191e24@wsk \
    --to=lukma@denx.de \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=casper.casan@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=ricardo@marliere.net \
    --cc=woojung.huh@microchip.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).