if (coalesce) { /* Use 1st FIFO for coalescing, if requested. * * Either use complete FIFO (and FIFO Full IRQ) for * coalescing or only half of FIFO (FIFO Half Full * IRQ) and use remaining half for normal objects.
*/
ret = min_t(u8, coalesce * 2, config->fifo_depth);
val -= ret;
fifo_num--;
}
for (i = 0; i < fifo_num && val; i++) {
u8 n;
n = min_t(u8, rounddown_pow_of_two(val),
config->fifo_depth);
/* skip small FIFOs */ if (n < obj->fifo_depth_min) return ret;
if (ring) {
u8 num_rx_coalesce = 0, num_tx_coalesce = 0;
/* If the ring parameters have been configured in * CAN-CC mode, but and we are in CAN-FD mode now, * they might be to big. Use the default CAN-FD values * in this case.
*/
num_rx = ring->rx_pending; if (num_rx > layout->max_rx)
num_rx = layout->default_rx;
/* The ethtool doc says: * To disable coalescing, set usecs = 0 and max_frames = 1.
*/ if (ec && !(ec->rx_coalesce_usecs_irq == 0 &&
ec->rx_max_coalesced_frames_irq == 1)) {
u8 max;
/* use only max half of available objects for coalescing */
max = min_t(u8, num_rx / 2, config->fifo_depth);
num_rx_coalesce = clamp(ec->rx_max_coalesced_frames_irq,
(u32)config->rx.fifo_depth_coalesce_min,
(u32)max);
num_rx_coalesce = rounddown_pow_of_two(num_rx_coalesce);
/* The ethtool doc says: * To disable coalescing, set usecs = 0 and max_frames = 1.
*/ if (ec && !(ec->tx_coalesce_usecs_irq == 0 &&
ec->tx_max_coalesced_frames_irq == 1)) {
u8 max;
/* use only max half of available objects for coalescing */
max = min_t(u8, num_tx / 2, config->fifo_depth);
num_tx_coalesce = clamp(ec->tx_max_coalesced_frames_irq,
(u32)config->tx.fifo_depth_coalesce_min,
(u32)max);
num_tx_coalesce = rounddown_pow_of_two(num_tx_coalesce);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.