Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462983
| From | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels |
| Date | 2016-08-15 18:40 +0200 |
| Message-ID | <s6t5E-7Vx-57@gated-at.bofh.it> (permalink) |
| References | <s6rQe-7ef-11@gated-at.bofh.it> <s6rQe-7ef-15@gated-at.bofh.it> <s6t5E-7Vx-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-08-15 17:20 +0200 Re: [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-08-15 18:40 +0200 RE: [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num between all channels Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-08-15 19:50 +0200
csiph-web