From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: davem@davemloft.net, Rob Herring <robh+dt@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Luka Perkov <luka.perkov@sartura.hr>,
Robert Marko <robert.marko@sartura.hr>
Subject: Re: [PATCH net-next 2/5] net: dsa: add out-of-band tagging protocol
Date: Tue, 26 Apr 2022 15:57:32 +0200 [thread overview]
Message-ID: <20220426155732.223e0446@pc-19.home> (raw)
In-Reply-To: <68c4710d-013e-85e0-154d-413f4e13b27e@gmail.com>
Hello Florian,
On Fri, 22 Apr 2022 11:28:30 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:
Thanks for the review :)
> On 4/22/22 11:03, Maxime Chevallier wrote:
> > This tagging protocol is designed for the situation where the link
> > between the MAC and the Switch is designed such that the Destination
> > Port, which is usually embedded in some part of the Ethernet
> > Header, is sent out-of-band, and isn't present at all in the
> > Ethernet frame.
> >
> > This can happen when the MAC and Switch are tightly integrated on an
> > SoC, as is the case with the Qualcomm IPQ4019 for example, where
> > the DSA tag is inserted directly into the DMA descriptors. In that
> > case, the MAC driver is responsible for sending the tag to the
> > switch using the out-of-band medium. To do so, the MAC driver needs
> > to have the information of the destination port for that skb.
> >
> > This tagging protocol relies on a new set of fields in skb->shinfo
> > to transmit the dsa tagging information to and from the MAC driver.
> >
> > Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
>
> First off, I am not a big fan of expanding skb::shared_info because
> it is sensitive to cache line sizes and is critical for performance
> at much higher speeds, I would expect Eric and Jakub to not be
> terribly happy about it.
No problem, I'm testing with the skb->cb approach as you suggested and
see how it goes.
> The Broadcom systemport (bcmsysport.c) has a mode where it can
> extract the Broadcom tag and put it in front of the actual packet
> contents which appears to be very similar here. From there on, you
> can have two strategies:
>
> - have the Ethernet controller mangle the packet contents such that
> the QCA tag is located in front of the actual Ethernet frame and
> create a new tagging protocol variant for QCA, similar to the
> TAG_BRCM versus TAG_BRCM_PREPEND
>
> - provide the necessary information for the tagger to work using an
> out of band mechanism, which is what you have done, in which case,
> maybe you can use skb->cb[] instead of using skb::shared_info?
One of the reason why I chose the second is to support possible future
cases where another controller would face a similar situation, and also
make use of the out-of-band tagger.
I understand that it's not very elegant in the sense that this breaks
the nice tagging model we have, but adding/removing data before the
payload also seems convoluted to achieve the same thing :) It seems
that this approach comes with a bit of an overhead since it implies
mangling the skb a bit, but I've yet to test this myself.
That's actually what I wanted your opinion on, it also seems like
Andrew likes the idea of putting the tag ahead of the frame to stick
with the actual model.
I don't have strong feelings myself on the way of doing this, I'm
looking for an approach that is efficient but yet easily maintainable.
Thanks,
Maxime
next prev parent reply other threads:[~2022-04-26 13:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 18:03 [PATCH net-next 0/5] net: ipqess: introduce Qualcomm IPQESS driver Maxime Chevallier
2022-04-22 18:03 ` [PATCH net-next 1/5] net: ipqess: introduce the " Maxime Chevallier
2022-04-22 20:19 ` Andrew Lunn
2022-04-26 13:59 ` Maxime Chevallier
2022-04-22 18:03 ` [PATCH net-next 2/5] net: dsa: add out-of-band tagging protocol Maxime Chevallier
2022-04-22 18:28 ` Florian Fainelli
2022-04-26 13:57 ` Maxime Chevallier [this message]
2022-04-26 18:52 ` Vladimir Oltean
2022-04-22 18:03 ` [PATCH net-next 3/5] net: ipqess: Add out-of-band DSA tagging support Maxime Chevallier
2022-04-22 18:03 ` [PATCH net-next 4/5] net: dt-bindings: Introduce the Qualcomm IPQESS Ethernet controller Maxime Chevallier
2022-04-22 21:10 ` Rob Herring
2022-04-23 17:49 ` Krzysztof Kozlowski
2022-04-26 14:02 ` Maxime Chevallier
2022-04-22 18:03 ` [PATCH net-next 5/5] ARM: dts: qcom: ipq4019: Add description for the " Maxime Chevallier
2022-04-22 20:29 ` [PATCH net-next 0/5] net: ipqess: introduce Qualcomm IPQESS driver Andrew Lunn
2022-04-26 12:12 ` Robert Marko
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=20220426155732.223e0446@pc-19.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luka.perkov@sartura.hr \
--cc=netdev@vger.kernel.org \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.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).