]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: IPoIB, Fix child PKEY interface stats on rx path
authorDragos Tatulea <dtatulea@nvidia.com>
Wed, 23 Nov 2022 14:59:13 +0000 (16:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:30 +0000 (11:58 +0100)
commita1b254da7079010c23333f89e822dcc0b829c624
tree8766bbd9a46820b002efca250cd63aa7a4e2cc3b
parent95ecdb6eea9bf4fb60860ad4059dbd3113b83f2a
net/mlx5e: IPoIB, Fix child PKEY interface stats on rx path

[ Upstream commit bf8dc879718174044812d6f4ff53b84e8d300f27 ]

The current code always does the accounting using the
stats from the parent interface (linked in the rq). This
doesn't work when there are child interfaces configured.

Fix this behavior by always using the stats from the child
interface priv. This will also work for parent only
interfaces: the child (netdev) and parent netdev (rq->netdev)
will point to the same thing.

Fixes: d8c04fd59ea2 ("net/mlx5e: Use dynamic per-channel allocations in stats")
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c