* [PATCH net 0/3] mlx4 fixes
@ 2012-10-25 11:12 Or Gerlitz
2012-10-25 11:12 ` [PATCH net 1/3] net/mlx4_en: Fix double-release-range in tx-rings Or Gerlitz
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Or Gerlitz @ 2012-10-25 11:12 UTC (permalink / raw)
To: davem; +Cc: netdev, Or Gerlitz
Hi Dave,
Few mlx4 driver fixes for net.
thanks,
Or.
Dotan Barak (1):
net/mlx4_core: Unmap UAR also in the case of error flow
Jack Morgenstein (1):
net/mlx4_en: Fix double-release-range in tx-rings
Moni Shoua (1):
net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 3 +--
drivers/net/ethernet/mellanox/mlx4/eq.c | 18 ++++++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 1/3] net/mlx4_en: Fix double-release-range in tx-rings
2012-10-25 11:12 [PATCH net 0/3] mlx4 fixes Or Gerlitz
@ 2012-10-25 11:12 ` Or Gerlitz
2012-10-25 11:12 ` [PATCH net 2/3] net/mlx4_en: Don't use vlan tag value as an indication for vlan presence Or Gerlitz
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Or Gerlitz @ 2012-10-25 11:12 UTC (permalink / raw)
To: davem; +Cc: netdev, Jack Morgenstein, Or Gerlitz
From: Jack Morgenstein <jackm@dev.mellanox.co.il>
The QP range is reserved as a single block. However, when freeing the
en resources, the tx-ring QPs are released both in mlx4_en_destroy_tx_ring
(one at a time) and in mlx4_en_free_resources (as a block release).
Fix by eliminating the one-at-a-time release in mlx4_en_destroy_tx_ring.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index c10e3a6..0a51095 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -143,7 +143,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv,
mlx4_bf_free(mdev->dev, &ring->bf);
mlx4_qp_remove(mdev->dev, &ring->qp);
mlx4_qp_free(mdev->dev, &ring->qp);
- mlx4_qp_release_range(mdev->dev, ring->qpn, 1);
mlx4_en_unmap_buffer(&ring->wqres.buf);
mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
kfree(ring->bounce_buf);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 2/3] net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
2012-10-25 11:12 [PATCH net 0/3] mlx4 fixes Or Gerlitz
2012-10-25 11:12 ` [PATCH net 1/3] net/mlx4_en: Fix double-release-range in tx-rings Or Gerlitz
@ 2012-10-25 11:12 ` Or Gerlitz
2012-10-25 11:12 ` [PATCH net 3/3] net/mlx4_core: Unmap UAR also in the case of error flow Or Gerlitz
2012-10-26 7:34 ` [PATCH net 0/3] mlx4 fixes David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Or Gerlitz @ 2012-10-25 11:12 UTC (permalink / raw)
To: davem; +Cc: netdev, Moni Shoua, Moni Shoua, Or Gerlitz
From: Moni Shoua <monis@mellanox.co.il>
The vlan tag can be zero. This is why it can't serve as an indication
that packet requires VLAN header in the TX flow.
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 0a51095..b35094c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -711,7 +711,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
if (bounce)
tx_desc = mlx4_en_bounce_to_desc(priv, ring, index, desc_size);
- if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) {
+ if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tx_tag_present(skb)) {
*(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn);
op_own |= htonl((bf_index & 0xffff) << 8);
/* Ensure new descirptor hits memory
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net 3/3] net/mlx4_core: Unmap UAR also in the case of error flow
2012-10-25 11:12 [PATCH net 0/3] mlx4 fixes Or Gerlitz
2012-10-25 11:12 ` [PATCH net 1/3] net/mlx4_en: Fix double-release-range in tx-rings Or Gerlitz
2012-10-25 11:12 ` [PATCH net 2/3] net/mlx4_en: Don't use vlan tag value as an indication for vlan presence Or Gerlitz
@ 2012-10-25 11:12 ` Or Gerlitz
2012-10-26 7:34 ` [PATCH net 0/3] mlx4 fixes David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Or Gerlitz @ 2012-10-25 11:12 UTC (permalink / raw)
To: davem; +Cc: netdev, Dotan Barak, Uri Habusha, Or Gerlitz
From: Dotan Barak <dotanb@dev.mellanox.co.il>
If a failure takes place during the EQ creation, we need to unmap the
UAR memory block too.
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Uri Habusha <urih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/eq.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 51c7649..083767b 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -843,6 +843,18 @@ static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4);
}
+static void mlx4_unmap_uar(struct mlx4_dev *dev)
+{
+ struct mlx4_priv *priv = mlx4_priv(dev);
+ int i;
+
+ for (i = 0; i < mlx4_num_eq_uar(dev); ++i)
+ if (priv->eq_table.uar_map[i]) {
+ iounmap(priv->eq_table.uar_map[i]);
+ priv->eq_table.uar_map[i] = NULL;
+ }
+}
+
static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
u8 intr, struct mlx4_eq *eq)
{
@@ -1207,6 +1219,7 @@ err_out_unmap:
mlx4_free_irqs(dev);
err_out_bitmap:
+ mlx4_unmap_uar(dev);
mlx4_bitmap_cleanup(&priv->eq_table.bitmap);
err_out_free:
@@ -1231,10 +1244,7 @@ void mlx4_cleanup_eq_table(struct mlx4_dev *dev)
if (!mlx4_is_slave(dev))
mlx4_unmap_clr_int(dev);
- for (i = 0; i < mlx4_num_eq_uar(dev); ++i)
- if (priv->eq_table.uar_map[i])
- iounmap(priv->eq_table.uar_map[i]);
-
+ mlx4_unmap_uar(dev);
mlx4_bitmap_cleanup(&priv->eq_table.bitmap);
kfree(priv->eq_table.uar_map);
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net 0/3] mlx4 fixes
2012-10-25 11:12 [PATCH net 0/3] mlx4 fixes Or Gerlitz
` (2 preceding siblings ...)
2012-10-25 11:12 ` [PATCH net 3/3] net/mlx4_core: Unmap UAR also in the case of error flow Or Gerlitz
@ 2012-10-26 7:34 ` David Miller
3 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-10-26 7:34 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu, 25 Oct 2012 13:12:46 +0200
> Dotan Barak (1):
> net/mlx4_core: Unmap UAR also in the case of error flow
>
> Jack Morgenstein (1):
> net/mlx4_en: Fix double-release-range in tx-rings
>
> Moni Shoua (1):
> net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
All applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 0/3] mlx4 fixes
@ 2014-03-12 15:16 Or Gerlitz
2014-03-12 20:14 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Or Gerlitz @ 2014-03-12 15:16 UTC (permalink / raw)
To: davem; +Cc: netdev, amirv, Or Gerlitz
Hi Dave,
These short series fixes two bugs related to the vxlan support and
a missing req module call for the IB driver which is needed to support
IB/RDMA over Ethernet.
Pathes done over the net tree, commit dd38743 "vlan: Set correct source MAC address
with TX VLAN offload enabled"
Or.
Or Gerlitz (3):
net/mlx4_core: Fix wrong dump of the vxlan offloads device capability
net/mlx4_en: Handle vxlan steering rules for mac address changes
net/mlx4_core: Load the IB driver when the device supports IBoE
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 ++++++++
drivers/net/ethernet/mellanox/mlx4/fw.c | 5 +++--
drivers/net/ethernet/mellanox/mlx4/main.c | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net 0/3] mlx4 fixes
2014-03-12 15:16 Or Gerlitz
@ 2014-03-12 20:14 ` David Miller
2014-03-12 20:25 ` Or Gerlitz
2014-03-13 11:10 ` Or Gerlitz
0 siblings, 2 replies; 9+ messages in thread
From: David Miller @ 2014-03-12 20:14 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, amirv
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Wed, 12 Mar 2014 17:16:29 +0200
> These short series fixes two bugs related to the vxlan support and a
> missing req module call for the IB driver which is needed to support
> IB/RDMA over Ethernet.
>
> Pathes done over the net tree, commit dd38743 "vlan: Set correct
> source MAC address with TX VLAN offload enabled"
Series applied, thanks Or.
I wonder though, if a MAC address change results in a VLAN steering
rule insertion failure, won't we be left in an inconsistent state?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net 0/3] mlx4 fixes
2014-03-12 20:14 ` David Miller
@ 2014-03-12 20:25 ` Or Gerlitz
2014-03-13 11:10 ` Or Gerlitz
1 sibling, 0 replies; 9+ messages in thread
From: Or Gerlitz @ 2014-03-12 20:25 UTC (permalink / raw)
To: David Miller; +Cc: Or Gerlitz, netdev@vger.kernel.org, Amir Vadai
On Wed, Mar 12, 2014 at 10:14 PM, David Miller <davem@davemloft.net> wrote:
> From: Or Gerlitz <ogerlitz@mellanox.com>
> Date: Wed, 12 Mar 2014 17:16:29 +0200
>
>> These short series fixes two bugs related to the vxlan support and a
>> missing req module call for the IB driver which is needed to support
>> IB/RDMA over Ethernet.
>>
>> Pathes done over the net tree, commit dd38743 "vlan: Set correct
>> source MAC address with TX VLAN offload enabled"
>
> Series applied, thanks Or.
>
> I wonder though, if a MAC address change results in a VLAN steering
> rule insertion failure, won't we be left in an inconsistent state?
in that case non-VXLAN traffic will fly in OK, but not VXLAN traffic.
I don't think we want to close the shop when this happens but probably
print some warning or a like, will send a patch...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net 0/3] mlx4 fixes
2014-03-12 20:14 ` David Miller
2014-03-12 20:25 ` Or Gerlitz
@ 2014-03-13 11:10 ` Or Gerlitz
1 sibling, 0 replies; 9+ messages in thread
From: Or Gerlitz @ 2014-03-13 11:10 UTC (permalink / raw)
To: David Miller; +Cc: netdev, amirv
On 12/03/2014 22:14, David Miller wrote:
> I wonder though, if a MAC address change results in a VLAN steering
> rule insertion failure, won't we be left in an inconsistent state?
So eventually when mlx4_en_replace_mac() returns with error, there is a
printout, so users
will at least be notified that something went wrong.
Or.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-13 11:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 11:12 [PATCH net 0/3] mlx4 fixes Or Gerlitz
2012-10-25 11:12 ` [PATCH net 1/3] net/mlx4_en: Fix double-release-range in tx-rings Or Gerlitz
2012-10-25 11:12 ` [PATCH net 2/3] net/mlx4_en: Don't use vlan tag value as an indication for vlan presence Or Gerlitz
2012-10-25 11:12 ` [PATCH net 3/3] net/mlx4_core: Unmap UAR also in the case of error flow Or Gerlitz
2012-10-26 7:34 ` [PATCH net 0/3] mlx4 fixes David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-03-12 15:16 Or Gerlitz
2014-03-12 20:14 ` David Miller
2014-03-12 20:25 ` Or Gerlitz
2014-03-13 11:10 ` Or Gerlitz
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).