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)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 10 Jan 2023 06:08:35 +0000 (22:08 -0800)
commitb5e23931c45a2f99f60a2f2b98a9e4d5a62a5b13
tree1282912a6d8160b0157a8bf230e6b3eaaade8d13
parent31c70bfe58ef09fe36327ddcced9143a16e9e83d
net/mlx5e: IPoIB, Fix child PKEY interface stats on rx path

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: be98737a4faa ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c