[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y2m3txox.fsf@intel.com>
Date: Mon, 24 Aug 2020 16:45:50 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Kurt Kanzenbach <kurt@...utronix.de>,
Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Richard Cochran <richardcochran@...il.com>,
Kamil Alkhouri <kamil.alkhouri@...offenburg.de>,
ilias.apalodimas@...aro.org
Subject: Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support
Hi Kurt,
Kurt Kanzenbach <kurt@...utronix.de> writes:
>>> +static void hellcreek_setup_tc_mapping(struct hellcreek *hellcreek,
>>> + struct net_device *netdev)
>>> +{
>>> + int i, j;
>>> +
>>> + /* Setup mapping between traffic classes and port queues. */
>>> + for (i = 0; i < netdev_get_num_tc(netdev); ++i) {
>>> + for (j = 0; j < netdev->tc_to_txq[i].count; ++j) {
>>> + const int queue = j + netdev->tc_to_txq[i].offset;
>>> +
>>> + hellcreek_select_prio(hellcreek, i);
>>> + hellcreek_write(hellcreek,
>>> + queue << HR_PRTCCFG_PCP_TC_MAP_SHIFT,
>>> + HR_PRTCCFG);
>>> + }
>>> + }
>>> +}
>>
>> What other driver have you seen that does this?
>>
>
> Probably none.
>
> With TAPRIO traffic classes and the mapping to queues can be
> configured. The switch can also map traffic classes. That sounded like a
> good match to me.
The only reason I could think that you would need this that *right now*
taprio has pretty glaring oversight: that in the offload parameters each entry
'gate_mask' reference the "Traffic Class" (i.e. bit 0 is Traffic Class
0), and it really should be the HW queue.
I have a patch that does the conversion on taprio before talking to the
driver. Do you think it would help you avoid doing this on the driver
side?
>
> Thanks,
> Kurt
Cheers,
--
Vinicius
Powered by blists - more mailing lists