All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: grygorii.strashko@ti.com, davem@davemloft.net, corbet@lwn.net,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, vinicius.gomes@intel.com,
	henrik@austad.us, jesus.sanchez-palencia@intel.com,
	ilias.apalodimas@linaro.org, p-varis@ti.com, spatton@ti.com,
	francois.ozog@linaro.org, yogeshs@ti.com, nsekhar@ti.com
Subject: Re: [PATCH net-next 3/6] net: ethernet: ti: cpsw: add MQPRIO Qdisc offload
Date: Tue, 12 Jun 2018 23:35:34 +0300	[thread overview]
Message-ID: <20180612203533.GB9473@khorivan> (raw)
In-Reply-To: <20180612163658.GC12251@lunn.ch>

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@linaro.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
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: grygorii.strashko@ti.com, davem@davemloft.net, corbet@lwn.net,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, vinicius.gomes@intel.com,
	henrik@austad.us, jesus.sanchez-palencia@intel.com,
	ilias.apalodimas@linaro.org, p-varis@ti.com, spatton@ti.com,
	francois.ozog@linaro.org, yogeshs@ti.com, nsekhar@ti.com
Subject: Re: [PATCH net-next 3/6] net: ethernet: ti: cpsw: add MQPRIO Qdisc offload
Date: Tue, 12 Jun 2018 23:35:34 +0300	[thread overview]
Message-ID: <20180612203533.GB9473@khorivan> (raw)
In-Reply-To: <20180612163658.GC12251@lunn.ch>

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@linaro.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

  reply	other threads:[~2018-06-12 20:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 13:30 [PATCH net-next 0/6] net: ethernet: ti: cpsw: add MQPRIO and CBS Qdisc offload Ivan Khoronzhuk
2018-06-11 13:30 ` Ivan Khoronzhuk
2018-06-11 13:30 ` [PATCH net-next 1/6] net: ethernet: ti: cpsw: use cpdma channels in backward order for txq Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-11 13:30 ` [PATCH net-next 2/6] net: ethernet: ti: cpdma: fit rated channels in backward order Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-11 13:30 ` [PATCH net-next 3/6] net: ethernet: ti: cpsw: add MQPRIO Qdisc offload Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-12 16:36   ` Andrew Lunn
2018-06-12 16:36     ` Andrew Lunn
2018-06-12 20:35     ` Ivan Khoronzhuk [this message]
2018-06-12 20:35       ` Ivan Khoronzhuk
2018-06-11 13:30 ` [PATCH net-next 4/6] net: ethernet: ti: cpsw: add CBS " Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-12 10:18   ` Ilias Apalodimas
2018-06-12 10:18     ` Ilias Apalodimas
2018-06-11 13:30 ` [PATCH net-next 5/6] net: ethernet: ti: cpsw: restore shaper configuration while down/up Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-11 13:30 ` [PATCH net-next 6/6] Documentation: networking: cpsw: add MQPRIO & CBS offload examples Ivan Khoronzhuk
2018-06-11 13:30   ` Ivan Khoronzhuk
2018-06-12 19:55   ` Grygorii Strashko
2018-06-12 19:55     ` Grygorii Strashko
2018-06-12 19:55     ` Grygorii Strashko
2018-06-12 20:36     ` Ivan Khoronzhuk
2018-06-12 20:36       ` Ivan Khoronzhuk

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=20180612203533.GB9473@khorivan \
    --to=ivan.khoronzhuk@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=francois.ozog@linaro.org \
    --cc=grygorii.strashko@ti.com \
    --cc=henrik@austad.us \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jesus.sanchez-palencia@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=p-varis@ti.com \
    --cc=spatton@ti.com \
    --cc=vinicius.gomes@intel.com \
    --cc=yogeshs@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.