/* This is a workaround needed only for the mlx5e_netdev_change_profile * flow that zeroes out the whole priv without unregistering the netdev * and without preventing ndo_select_queue from being called.
*/ if (unlikely(!selq)) return 0;
if (likely(!selq->is_special_queues)) { /* No special queues, netdev_pick_tx returns one of the regular ones. */
txq_ix = netdev_pick_tx(dev, skb, NULL);
if (selq->num_tcs <= 1) return txq_ix;
up = mlx5e_get_up(priv, skb);
/* Normalize any picked txq_ix to [0, num_channels), * So we can return a txq_ix that matches the channel and * packet UP.
*/ return mlx5e_txq_to_ch_ix(txq_ix, selq->num_channels) +
up * selq->num_channels;
}
if (unlikely(selq->htb_maj_id)) { /* num_tcs == 1, shortcut for PTP */
if (unlikely(selq->is_ptp && mlx5e_use_ptpsq(skb))) return selq->num_channels;
txq_ix = netdev_pick_tx(dev, skb, NULL);
/* Fix netdev_pick_tx() not to choose ptp_channel and HTB txqs. * If they are selected, switch to regular queues. * Driver to select these queues only at mlx5e_select_ptpsq() * and mlx5e_select_htb_queue().
*/ return mlx5e_txq_to_ch_ix_htb(txq_ix, selq->num_channels);
}
/* PTP is enabled */
if (mlx5e_use_ptpsq(skb)) return mlx5e_select_ptpsq(dev, skb, selq);
txq_ix = netdev_pick_tx(dev, skb, NULL);
/* Normalize any picked txq_ix to [0, num_channels). Queues in range * [0, num_regular_queues) will be mapped to the corresponding channel * index, so that we can apply the packet's UP (if num_tcs > 1). * If netdev_pick_tx() picks ptp_channel, switch to a regular queue, * because driver should select the PTP only at mlx5e_select_ptpsq().
*/
txq_ix = mlx5e_txq_to_ch_ix(txq_ix, selq->num_channels);
if (selq->num_tcs <= 1) return txq_ix;
up = mlx5e_get_up(priv, skb);
return txq_ix + up * selq->num_channels;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet)
¤
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.