* [PATCH] mlx4: Fixing Ethernet unicast packet steering
@ 2011-08-03 14:21 Yevgeny Petrilin
2011-08-03 18:58 ` Roland Dreier
[not found] ` <4E39594C.4090808-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
0 siblings, 2 replies; 7+ messages in thread
From: Yevgeny Petrilin @ 2011-08-03 14:21 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
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-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Signed-off-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
drivers/net/mlx4/en_port.c | 2 +-
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 5e71091..5ada5b4 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,
memset(context, 0, sizeof *context);
context->base_qpn = cpu_to_be32(base_qpn);
- context->n_mac = 0x7;
+ context->n_mac = 0x2;
context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT |
base_qpn);
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 c94b342..f0ee35d 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)
info->port = port;
mlx4_init_mac_table(dev, &info->mac_table);
mlx4_init_vlan_table(dev, &info->vlan_table);
+ info->base_qpn = dev->caps.reserved_qps_base[MLX4_QP_REGION_ETH_ADDR] +
+ (port - 1) * (1 << log_num_mac);
sprintf(info->dev_name, "mlx4_port%d", port);
info->port_attr.attr.name = info->dev_name;
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] mlx4: Fixing Ethernet unicast packet steering
@ 2011-08-03 14:24 Yevgeny Petrilin
[not found] ` <4E395A18.8070600-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Yevgeny Petrilin @ 2011-08-03 14:24 UTC (permalink / raw)
To: roland-DgEjT+Ai2ygdnm+yROfE0A
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
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-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Signed-off-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
drivers/net/mlx4/en_port.c | 2 +-
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 5e71091..5ada5b4 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,
memset(context, 0, sizeof *context);
context->base_qpn = cpu_to_be32(base_qpn);
- context->n_mac = 0x7;
+ context->n_mac = 0x2;
context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT |
base_qpn);
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 c94b342..f0ee35d 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)
info->port = port;
mlx4_init_mac_table(dev, &info->mac_table);
mlx4_init_vlan_table(dev, &info->vlan_table);
+ info->base_qpn = dev->caps.reserved_qps_base[MLX4_QP_REGION_ETH_ADDR] +
+ (port - 1) * (1 << log_num_mac);
sprintf(info->dev_name, "mlx4_port%d", port);
info->port_attr.attr.name = info->dev_name;
-- 1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
2011-08-03 14:21 [PATCH] mlx4: Fixing Ethernet unicast packet steering Yevgeny Petrilin
@ 2011-08-03 18:58 ` Roland Dreier
[not found] ` <CAL1RGDU+=wX40J_uktWxMiHNx5Sed-d3b2J4_4JTg=tyqbKsEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[not found] ` <4E39594C.4090808-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2011-08-03 18:58 UTC (permalink / raw)
To: Yevgeny Petrilin; +Cc: Roland Dreier, linux-rdma, netdev
> 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>
Thanks, testing this now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
[not found] ` <CAL1RGDU+=wX40J_uktWxMiHNx5Sed-d3b2J4_4JTg=tyqbKsEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-08-03 19:06 ` Roland Dreier
[not found] ` <CAL1RGDVHnd2x2pWgaYG2vKKJk-qYfQp3T5pgJ-48HeaMA=9_EA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2011-08-03 19:06 UTC (permalink / raw)
To: Yevgeny Petrilin, David Miller
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
On Wed, Aug 3, 2011 at 11:58 AM, Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
>> 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.
> Thanks, testing this now.
Yep, works well on my backrev FW boards. Dave, you want to merge this
or should I?
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
[not found] ` <CAL1RGDVHnd2x2pWgaYG2vKKJk-qYfQp3T5pgJ-48HeaMA=9_EA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-08-03 23:28 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-08-03 23:28 UTC (permalink / raw)
To: roland-BHEL68pLQRGGvPXPguhicg
Cc: yevgenyp-VPRAkNaXOzVS1MOuV/RT9w,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Date: Wed, 3 Aug 2011 12:06:56 -0700
> On Wed, Aug 3, 2011 at 11:58 AM, Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
>>> 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.
>
>> Thanks, testing this now.
>
> Yep, works well on my backrev FW boards. Dave, you want to merge this
> or should I?
I'll take it, thanks for testing.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
[not found] ` <4E39594C.4090808-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
@ 2011-08-03 23:39 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2011-08-03 23:39 UTC (permalink / raw)
To: yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
Cc: rdreier-FYB4Gu1CFyUAvxtiuMwx3w, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
From: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Date: Wed, 3 Aug 2011 17:21:00 +0300
>
> 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-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
> Signed-off-by: Yevgeny Petrilin <yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mlx4: Fixing Ethernet unicast packet steering
[not found] ` <4E395A18.8070600-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
@ 2011-08-04 2:53 ` Roland Dreier
0 siblings, 0 replies; 7+ messages in thread
From: Roland Dreier @ 2011-08-04 2:53 UTC (permalink / raw)
To: Yevgeny Petrilin
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hi Yevgeny!
Actually on further testing it seems that things are still not perfect
with my old firmware at least.
If I do "ifconfig eth6 mtu 1450" (where eth6 is a mlx4_en interface)
then I am no longer able to get traffic through the interface; if I
have a ping running it stops immediately. It seems any mtu change
triggers this (increasing the mtu above the default has the same
effect, and restoring the mtu to the default doesn't fix it).
Haven't tried to debug further.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-04 2:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 14:21 [PATCH] mlx4: Fixing Ethernet unicast packet steering Yevgeny Petrilin
2011-08-03 18:58 ` Roland Dreier
[not found] ` <CAL1RGDU+=wX40J_uktWxMiHNx5Sed-d3b2J4_4JTg=tyqbKsEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-03 19:06 ` Roland Dreier
[not found] ` <CAL1RGDVHnd2x2pWgaYG2vKKJk-qYfQp3T5pgJ-48HeaMA=9_EA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-03 23:28 ` David Miller
[not found] ` <4E39594C.4090808-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2011-08-03 23:39 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2011-08-03 14:24 Yevgeny Petrilin
[not found] ` <4E395A18.8070600-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2011-08-04 2:53 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).