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

Commit 015465f8 authored by Hadar Hen Zion's avatar Hadar Hen Zion Committed by David S. Miller
Browse files

net/mlx4_core: Directly expose fields of HW flow steering rule control segment



Some of the fields for struct mlx4_net_trans_rule_hw_ctrl were packed into u32
and accessed through bit field operations. Expose and access them directly as
u8.

Signed-off-by: default avatarHadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1b13c97f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -664,7 +664,7 @@ static void trans_rule_ctrl_to_hw(struct mlx4_net_trans_rule *ctrl,
	dw |= ctrl->priority << 16;

	hw->ctrl = cpu_to_be32(dw);
	hw->vf_vep_port = cpu_to_be32(ctrl->port);
	hw->port = ctrl->port;
	hw->qpn = cpu_to_be32(ctrl->qpn);
}

+5 −2
Original line number Diff line number Diff line
@@ -696,9 +696,12 @@ struct mlx4_steer {

struct mlx4_net_trans_rule_hw_ctrl {
	__be32 ctrl;
	__be32 vf_vep_port;
	u8 rsvd1;
	u8 funcid;
	u8 vep;
	u8 port;
	__be32 qpn;
	__be32 reserved;
	__be32 rsvd2;
};

struct mlx4_net_trans_rule_hw_ib {
+1 −1
Original line number Diff line number Diff line
@@ -3018,7 +3018,7 @@ static int add_eth_header(struct mlx4_dev *dev, int slave,
	__be64 mac_msk = cpu_to_be64(MLX4_MAC_MASK << 16);

	ctrl = (struct mlx4_net_trans_rule_hw_ctrl *)inbox->buf;
	port = be32_to_cpu(ctrl->vf_vep_port) & 0xff;
	port = ctrl->port;
	eth_header = (struct mlx4_net_trans_rule_hw_eth *)(ctrl + 1);

	/* Clear a space in the inbox for eth header */