netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: DENG Qingfang <dqfext@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
	Mauri Sandberg <sandberg@mailfence.com>
Subject: Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag
Date: Wed, 17 Feb 2021 12:01:04 +0100	[thread overview]
Message-ID: <CACRpkdYQthFgjwVzHyK3DeYUOdcYyWmdjDPG=Rf9B3VrJ12Rzg@mail.gmail.com> (raw)
In-Reply-To: <e395ad31-9aeb-0afe-7058-103c6dce942d@gmail.com>

On Wed, Feb 17, 2021 at 8:08 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:

> > +#define RTL8366S_HDR_LEN     4
> > +#define RTL8366S_ETHERTYPE   0x8899
>
> I found this protocol referenced as Realtek Remote Control Protocol (RRCP)
> and it seems to be used by few Realtek chips. Not sure whether this
> protocol is officially registered. If yes, then it should be added to
> the list of ethernet protocol id's in include/uapi/linux/if_ether.h.
> If not, then it may be better to define it using the usual naming
> scheme as ETH_P_RRCP in realtek-smi-core.h.

It's actually quite annoying, Realtek use type 0x8899 for all their
custom stuff, including RRCP and internal DSA tagging inside
switches, which are two completely different use cases.

When I expose raw DSA frames to wireshark it identifies it
as "Realtek RRCP" and then naturally cannot decode the
frames since this is not RRCP but another protocol identified
by the same ethertype.

Inside DSA it works as we explicitly asks tells the kernel using the
tagging code in net/dsa/tag_rtl4_a.c that this is the DSA version
of ethertype 0x8899 and it then goes to dissect the actual
4 bytes tag.

There are at least four protocols out there using ethertype 0x8899.

Yours,
Linus Walleij

  reply	other threads:[~2021-02-17 11:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  6:21 [RFC net-next 0/2] DSA driver for Realtek RTL8366S/SR DENG Qingfang
2021-02-17  6:21 ` [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag DENG Qingfang
2021-02-17  7:07   ` Heiner Kallweit
2021-02-17 11:01     ` Linus Walleij [this message]
2021-02-17 11:28       ` Heiner Kallweit
2021-02-17 10:55   ` Linus Walleij
2021-02-17 12:28     ` DENG Qingfang
2021-02-27 23:47   ` Linus Walleij
2021-02-28 11:32     ` DENG Qingfang
2021-03-01 13:06       ` Linus Walleij
2021-02-17  6:21 ` [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver DENG Qingfang
2021-02-17 11:12   ` Linus Walleij
2021-02-17 12:45     ` DENG Qingfang
2021-02-17 12:25   ` Vladimir Oltean
2021-02-17 15:44     ` Linus Walleij

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='CACRpkdYQthFgjwVzHyK3DeYUOdcYyWmdjDPG=Rf9B3VrJ12Rzg@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=sandberg@mailfence.com \
    --cc=vivien.didelot@gmail.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).