Yep.Currently the tx channels share same pool of descriptors. Thus one channel canPiece.
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.
Ok.
+/**No need for the extra empty comment line.
+ * cpdma_chan_split_pool - Splits ctrl pool between all channels.
+ * Has to be called under ctlr lock
+ *
+ */
If chan == NULL it's not active and pool->chan_num doesn't include it.
+ /* calculate average size of pool slice */Is this 'if' needed? If there's some route where the channel can be NULL,
+ 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;
You're splitting the value incorrectly.