[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN2PR11MB009489AF2C64CD34DE5473A597120@SN2PR11MB0094.namprd11.prod.outlook.com>
Date: Mon, 15 Aug 2016 16:05:53 +0000
From: Yuval Mintz <Yuval.Mintz@...gic.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
"mugunthanvnm@...com" <mugunthanvnm@...com>,
"grygorii.strashko@...com" <grygorii.strashko@...com>
CC: linux-kernel <linux-kernel@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
"nsekhar@...com" <nsekhar@...com>
Subject: RE: [PATCH v2 1/4] net: ethernet: ti: davinci_cpdma: split descs num
between all channels
> 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.
> +/**
> + * 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.
> + /* 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.
Powered by blists - more mailing lists