[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220411144308.v343ykjkn7eutzbr@skbuf>
Date: Mon, 11 Apr 2022 17:43:08 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Geva, Erez" <erez.geva.ext@...mens.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"Sudler, Simon" <simon.sudler@...mens.com>,
"Meisinger, Andreas" <andreas.meisinger@...mens.com>,
"Schild, Henning" <henning.schild@...mens.com>,
"jan.kiszka@...mens.com" <jan.kiszka@...mens.com>
Subject: Re: [PATCH 1/1] DSA Add callback to traffic control information
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.
Powered by blists - more mailing lists