Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb9def61 authored by Tariq Toukan's avatar Tariq Toukan Committed by David S. Miller
Browse files

net/mlx4_en: Fix user prio field in XDP forward



The user prio field is wrong (and overflows) in the XDP forward
flow.
This is a result of a bad value for num_tx_rings_p_up, which should
account all XDP TX rings, as they operate for the same user prio.

Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Reported-by: default avatarMartin KaFai Lau <kafai@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 693c5649
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1638,7 +1638,8 @@ int mlx4_en_start_port(struct net_device *dev)


	/* Configure tx cq's and rings */
	/* Configure tx cq's and rings */
	for (t = 0 ; t < MLX4_EN_NUM_TX_TYPES; t++) {
	for (t = 0 ; t < MLX4_EN_NUM_TX_TYPES; t++) {
		u8 num_tx_rings_p_up = t == TX ? priv->num_tx_rings_p_up : 1;
		u8 num_tx_rings_p_up = t == TX ?
			priv->num_tx_rings_p_up : priv->tx_ring_num[t];


		for (i = 0; i < priv->tx_ring_num[t]; i++) {
		for (i = 0; i < priv->tx_ring_num[t]; i++) {
			/* Configure cq */
			/* Configure cq */