[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180612203533.GB9473@khorivan>
Date: Tue, 12 Jun 2018 23:35:34 +0300
From: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: grygorii.strashko@...com, davem@...emloft.net, corbet@....net,
akpm@...ux-foundation.org, netdev@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, vinicius.gomes@...el.com,
henrik@...tad.us, jesus.sanchez-palencia@...el.com,
ilias.apalodimas@...aro.org, p-varis@...com, spatton@...com,
francois.ozog@...aro.org, yogeshs@...com, nsekhar@...com
Subject: Re: [PATCH net-next 3/6] net: ethernet: ti: cpsw: add MQPRIO Qdisc
offload
On Tue, Jun 12, 2018 at 06:36:58PM +0200, Andrew Lunn wrote:
>On Mon, Jun 11, 2018 at 04:30:44PM +0300, Ivan Khoronzhuk wrote:
>> That's possible to offload vlan to tc priority mapping with
>> assumption sk_prio == L2 prio.
>>
>> Example:
>> $ ethtool -L eth0 rx 1 tx 4
>>
>> $ qdisc replace dev eth0 handle 100: parent root mqprio num_tc 3 \
>> map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 1
>>
>> $ tc -g class show dev eth0
>> +---(100:ffe2) mqprio
>> | +---(100:3) mqprio
>> | +---(100:4) mqprio
>> |
>> +---(100:ffe1) mqprio
>> | +---(100:2) mqprio
>> |
>> +---(100:ffe0) mqprio
>> +---(100:1) mqprio
>>
>> Here, 100:1 is txq0, 100:2 is txq1, 100:3 is txq2, 100:4 is txq3
>> txq0 belongs to tc0, txq1 to tc1, txq2 and txq3 to tc2
>> The offload part only maps L2 prio to classes of traffic, but not
>> to transmit queues, so to direct traffic to traffic class vlan has
>> to be created with appropriate egress map.
>>
>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
>> ---
>> drivers/net/ethernet/ti/cpsw.c | 82 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 82 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
>> index 406537d74ec1..fd967d2bce5d 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
>> @@ -39,6 +39,7 @@
[...]
>>
>> +static int cpsw_set_tc(struct net_device *ndev, void *type_data)
>> +{
>
>Hi Ivan
>
>Maybe this is not the best of names. What if you add support for
>another TC qdisc? So you have another case in the switch statement
>below?
>
>Maybe call it cpsw_set_mqprio?
Yes, proposed name is more suitable.
--
Regards,
Ivan Khoronzhuk
Powered by blists - more mailing lists