From: Vladimir Oltean <olteanv@gmail.com>
To: "Geva, Erez" <erez.geva.ext@siemens.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"Sudler, Simon" <simon.sudler@siemens.com>,
"Meisinger, Andreas" <andreas.meisinger@siemens.com>,
"Schild, Henning" <henning.schild@siemens.com>,
"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>
Subject: Re: [PATCH 1/1] DSA Add callback to traffic control information
Date: Mon, 11 Apr 2022 17:43:08 +0300 [thread overview]
Message-ID: <20220411144308.v343ykjkn7eutzbr@skbuf> (raw)
In-Reply-To: <VI1PR10MB2446B3B9EC2441B962691D67ABEA9@VI1PR10MB2446.EURPRD10.PROD.OUTLOOK.COM>
On Mon, Apr 11, 2022 at 02:23:59PM +0000, Geva, Erez wrote:
> As I mention, I do not own the tag driver code.
>
> But for example for ETF, is like:
>
> ... tag_xmit(struct sk_buff *skb, struct net_device *dev)
> + struct tc_etf_qopt_offload etf;
> ...
> + etf.queue = skb_get_queue_mapping(skb);
> + if (dsa_slave_fetch_tc(dev, TC_SETUP_QDISC_ETF, &etf) == 0 && etf.enable) {
> ...
>
> The port_fetch_tc callback is similar to port_setup_tc, only it reads the configuration instead of setting it.
>
> I think it is easier to add a generic call back, so we do not need to add a new callback each time we support a new TC.
>
> Erez
Since kernel v5.17 there exists struct dsa_device_ops :: connect() which
allows tagging protocol drivers to store persistent data for each switch.
Switch drivers also have a struct dsa_switch_ops :: connect_tag_protocol()
through which they can fix up or populate stuff in the tagging protocol
driver's private storage.
What you could do is set up something lockless, or even a function
pointer, to denote whether TX queue X is set up for ETF or not.
In any case, demanding that code with no in-kernel user gets accepted
will get a hard no, no matter how small it is.
next prev parent reply other threads:[~2022-04-11 14:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 13:11 [PATCH 0/1] Add DSA callback to traffic control information Erez Geva
2022-04-11 13:11 ` [PATCH 1/1] DSA Add " Erez Geva
2022-04-11 13:29 ` Andrew Lunn
2022-04-11 14:17 ` Geva, Erez
2022-04-11 14:25 ` Andrew Lunn
2022-04-11 14:29 ` Geva, Erez
2022-04-11 14:48 ` Andrew Lunn
2022-04-11 13:29 ` Vladimir Oltean
2022-04-11 14:23 ` Geva, Erez
2022-04-11 14:43 ` Vladimir Oltean [this message]
2022-04-11 14:49 ` Geva, Erez
2022-04-11 14:57 ` Geva, Erez
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=20220411144308.v343ykjkn7eutzbr@skbuf \
--to=olteanv@gmail.com \
--cc=andreas.meisinger@siemens.com \
--cc=andrew@lunn.ch \
--cc=erez.geva.ext@siemens.com \
--cc=f.fainelli@gmail.com \
--cc=henning.schild@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=netdev@vger.kernel.org \
--cc=simon.sudler@siemens.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