From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"mugunthanvnm@ti.com" <mugunthanvnm@ti.com>,
"grygorii.strashko@ti.com" <grygorii.strashko@ti.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"nsekhar@ti.com" <nsekhar@ti.com>
Subject: Re: [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels
Date: Mon, 15 Aug 2016 19:30:28 +0300 [thread overview]
Message-ID: <7426a9f3-a93e-5ae4-da00-48caf0dc86b8@linaro.org> (raw)
In-Reply-To: <SN2PR11MB009489AF2C64CD34DE5473A597120@SN2PR11MB0094.namprd11.prod.outlook.com>
On 15.08.16 19:05, Yuval Mintz wrote:
>> Currently the tx channels share same pool of descriptors. Thus one channel can
>> block another if pool is emptied by one. But, the shaper should decide which
>> channel is allowed to send packets. To avoid such impact of one channel on
>> another, let every channel to have its own peace of pool.
> Piece.
Yep.
>
>> +/**
>> + * cpdma_chan_split_pool - Splits ctrl pool between all channels.
>> + * Has to be called under ctlr lock
>> + *
>> + */
> No need for the extra empty comment line.
Ok.
>
>> + /* calculate average size of pool slice */
>> + ch_desc_num = pool->num_desc / ctlr->chan_num;
>> +
>> + /* split ctlr pool */
>> + for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) {
>> + chan = ctlr->channels[i];
>> + if (chan)
>> + chan->desc_num = ch_desc_num;
> Is this 'if' needed? If there's some route where the channel can be NULL,
> You're splitting the value incorrectly.
If chan == NULL it's not active and pool->chan_num doesn't include it.
The descriptors are split between active channels only.
>
--
Regards,
Ivan Khoronzhuk
next prev parent reply other threads:[~2016-08-15 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 15:16 [PATCH v2 0/4] net: ethernet: ti: cpsw: add cpdma multi-queue support Ivan Khoronzhuk
2016-08-15 15:16 ` [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels Ivan Khoronzhuk
2016-08-15 16:05 ` Yuval Mintz
2016-08-15 16:30 ` Ivan Khoronzhuk [this message]
2016-08-15 15:16 ` [PATCH v2 2/4] net: ethernet: ti: cpsw: add multi queue support Ivan Khoronzhuk
2016-08-15 15:16 ` [PATCH v2 3/4] net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals Ivan Khoronzhuk
2016-08-15 15:16 ` [PATCH v2 4/4] net: ethernet: ti: cpsw: add ethtool channels support 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=7426a9f3-a93e-5ae4-da00-48caf0dc86b8@linaro.org \
--to=ivan.khoronzhuk@linaro.org \
--cc=Yuval.Mintz@qlogic.com \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=nsekhar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®