diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-08-03 19:38:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-03 19:38:59 -0400 |
commit | 06fa0a883a01a34a0449ec116c5288c1d196b4b0 (patch) | |
tree | 1cdff1f3079cd5e449a94b29cd93c8e348ad6a21 | |
parent | 5be1334062a2f358dc65016b5181e6edbfe3bd1e (diff) |
mlx4: Fixing Ethernet unicast packet steering
For older FW versions, fixing the usage of per port Mac table.
For each port we must define the base QP number, which is passed
to the HW.
Setting the correct value in SET_PORT FW command to enable the steering.
Reported-by: Roland Dreier <roland@purestorage.com>
Tested-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/mlx4/en_port.c | 2 | ||||
-rw-r--r-- | drivers/net/mlx4/main.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c index 5e7109178061..5ada5b469112 100644 --- a/drivers/net/mlx4/en_port.c +++ b/drivers/net/mlx4/en_port.c | |||
@@ -128,7 +128,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn, | |||
128 | memset(context, 0, sizeof *context); | 128 | memset(context, 0, sizeof *context); |
129 | 129 | ||
130 | context->base_qpn = cpu_to_be32(base_qpn); | 130 | context->base_qpn = cpu_to_be32(base_qpn); |
131 | context->n_mac = 0x7; | 131 | context->n_mac = 0x2; |
132 | context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | | 132 | context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | |
133 | base_qpn); | 133 | base_qpn); |
134 | context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT | | 134 | context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT | |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index c94b3426d355..f0ee35df4dd7 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -1117,6 +1117,8 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port) | |||
1117 | info->port = port; | 1117 | info->port = port; |
1118 | mlx4_init_mac_table(dev, &info->mac_table); | 1118 | mlx4_init_mac_table(dev, &info->mac_table); |
1119 | mlx4_init_vlan_table(dev, &info->vlan_table); | 1119 | mlx4_init_vlan_table(dev, &info->vlan_table); |
1120 | info->base_qpn = dev->caps.reserved_qps_base[MLX4_QP_REGION_ETH_ADDR] + | ||
1121 | (port - 1) * (1 << log_num_mac); | ||
1120 | 1122 | ||
1121 | sprintf(info->dev_name, "mlx4_port%d", port); | 1123 | sprintf(info->dev_name, "mlx4_port%d", port); |
1122 | info->port_attr.attr.name = info->dev_name; | 1124 | info->port_attr.attr.name = info->dev_name; |