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

Commit 7193a141 authored by Eran Ben Elisha's avatar Eran Ben Elisha Committed by David S. Miller
Browse files

IB/mlx4: Set VF to read from QP counters



As IB VFs are not capable to read the port counters through MADs,
move there to read their own QP counters to gather statistics.

Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: default avatarHadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3abb51b
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -869,8 +869,10 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
			struct ib_wc *in_wc, struct ib_grh *in_grh,
			struct ib_wc *in_wc, struct ib_grh *in_grh,
			struct ib_mad *in_mad, struct ib_mad *out_mad)
			struct ib_mad *in_mad, struct ib_mad *out_mad)
{
{
	struct mlx4_ib_dev *dev = to_mdev(ibdev);
	switch (rdma_port_get_link_layer(ibdev, port_num)) {
	switch (rdma_port_get_link_layer(ibdev, port_num)) {
	case IB_LINK_LAYER_INFINIBAND:
	case IB_LINK_LAYER_INFINIBAND:
		if (!mlx4_is_slave(dev->dev))
			return ib_process_mad(ibdev, mad_flags, port_num, in_wc,
			return ib_process_mad(ibdev, mad_flags, port_num, in_wc,
					      in_grh, in_mad, out_mad);
					      in_grh, in_mad, out_mad);
	case IB_LINK_LAYER_ETHERNET:
	case IB_LINK_LAYER_ETHERNET: