From: Kyle Switch <kyle.switch@motor-comm.com>
To: David Yang <mmyangfl@gmail.com>
Cc: andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ming.xu@motor-comm.com,
xiaolin.xu@motor-comm.com, jianmin.wang@motor-comm.com,
de.ge@motor-comm.com
Subject: Re: [RESEND PATCH v1] net: dsa: motorcomm: add yt92xx dsa driver
Date: Thu, 18 Jun 2026 17:59:43 +0800 [thread overview]
Message-ID: <c853b074-20e5-46fd-9b37-1195a9de7a8a@motor-comm.com> (raw)
In-Reply-To: <CAAXyoMMYxRTwHD6QmpAkspCtiY853KkYuOAUR=qV0v9g5w9v+g@mail.gmail.com>
On 6/17/26 19:15, David Yang wrote:
> On Wed, Jun 17, 2026 at 10:37 AM Kyle Switch <kyle.switch@motor-comm.com> wrote:
>>>> +/* To define the from cpu tag format 8 bytes:
>>>> + *
>>>> + * 0 1 2 3 4 5 6 7 | 0 1 2 3 4 5 6 7
>>>> + *|<----------TPID 0x9988---------->|
>>>> + *|<--RESERVE-->|<-----DST PORT---->|
>>>> + *|-|<---------RESERVE------------->|
>>>> + *|<------------------------------->|
>>>> + */
>>>> +#define YT922X_TAG_FORMAT2_NAME "yt922x-8b"
>>>> +#define YT922X_FORMAT2_TAG_LEN 8
>>>> +#define YT922X_PKT_TYPE GENMASK(15, 14)
>>>> +#define YT922X_8B_CPUTAG_PKT_FROM_CPU 0x1
>>>> +#define YT922X_8B_CPUTAG_SRC_PORT GENMASK(6, 2)
>>>> +#define YT922X_8B_CPUTAG_DST_PORTMASK GENMASK(8, 0)
>>>> +#define YT922X_8B_CPUTAG_DST_PORTMASK_0 BIT(15)
>>>> +#define YT922X_8B_CPUTAG_DST_PORTMASK_0_EN 0x1
>>>> +#define YT922X_8B_CPUTAG_FORCE_DST BIT(9)
>>>> +#define YT922X_8B_CPUTAG_FORCE_DST_EN 0x1
>>>
>>> If yt922x tag format shares no common with yt921x, make a new tag driver.
>>
>> Ans: thank you for your suggestion, we will consider whether to create a new driver in the new file.
>
> I'm not an expert in this, but if yt922x tag does support cpu codes
> and priority, please consider updating yt921x tagger to support it,
> even if you don't use or test these features for now.
>
Ans: here "updating yt921x tagger" you mean yt922x tag driver to support cpu code and dscp prio? We consider
implementing it in the subsequent patch, but no matter what, when we submit the yt922x dsa driver ,it will support it.
>>>
>>>> +static struct dsa_tag_driver *dsa_tag_driver_array[] = {
>>>> + &DSA_TAG_DRIVER_NAME(yt921x_netdev_ops),
>>>> + &DSA_TAG_DRIVER_NAME(yt922x_4b_netdev_ops),
>>>> + &DSA_TAG_DRIVER_NAME(yt922x_8b_netdev_ops),
>>>> +};
>>>
>>> If both are supported by the chip and 4b does nothing more than 8b
>>> does, do not bother with it.
>>
>> Ans: 4b and 8b dsa tag may have different application scenarios. from my opinion,
>> 1. 4b dsa tag can save 4 bytes of payload
>> 2. 8b dsa tag carry more package info.
>
> We do not support every tag protocol. For DSA switches,
> - the conduit interface supports jumbo frames so there is room for
> the DSA header, or
> - you end up with MTU less than 1500 anyway.
> 4-byte reduction does not make a practical difference here. An
> alternative protocol poses 2x work to everyone else, and unnecessarily
> exposes your driver to interoperability issues, as pointed by Andrew.
>
> As I've commented before, if there is a particular reason to add
> 4-byte protocol, leave it behind for the moment, and focus on a
> minimal yt922x_dsa_switch_ops + yt922x_netdev_ops for your first
> patchset without any offloading supports. This way, others can easily
> see your changes and move the work forward efficiently.
Ans: Thank you for your advise, 8bytes dsa tag driver will be supported firstly.
prev parent reply other threads:[~2026-06-18 9:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 11:12 Kyle Switch
2026-06-15 11:34 ` Andrew Lunn
2026-06-17 2:00 ` Kyle Switch
2026-06-17 9:19 ` Andrew Lunn
2026-06-15 15:01 ` Julian Braha
2026-06-17 2:41 ` Kyle Switch
2026-06-15 15:56 ` Andrew Lunn
2026-06-15 18:55 ` David Yang
2026-06-15 19:27 ` David Yang
2026-06-17 2:37 ` Kyle Switch
2026-06-17 9:07 ` Andrew Lunn
2026-06-18 9:53 ` Kyle Switch
2026-06-18 11:10 ` Andrew Lunn
2026-06-18 12:44 ` David Yang
2026-06-17 11:15 ` David Yang
2026-06-18 9:59 ` Kyle Switch [this message]
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=c853b074-20e5-46fd-9b37-1195a9de7a8a@motor-comm.com \
--to=kyle.switch@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=de.ge@motor-comm.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianmin.wang@motor-comm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.xu@motor-comm.com \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=xiaolin.xu@motor-comm.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
all inboxes | Powered by JetHome®