diff mbox

Backport and commit for bug #1407760 - for SRU process

Message ID CALvSwJ5ed2kWwr_38wpszR+GYgg-EMA_1sy-mKcFbo4ue-=96Q@mail.gmail.com
State New
Headers show

Commit Message

Brian Fromme Jan. 5, 2015, 8:45 p.m. UTC
Re bug:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1407760

Joe S. asked for the backport patch and commit.  Mellanox did the backport,
which I'll include here.  From Leann's email, here's more about the
upstream commit:

Patch details are:

~/linux$ git describe --contains 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
v3.18-rc6~9^2~12

  commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
  Author: Or Gerlitz <ogerlitz@mellanox.com>
  Date:   Tue Nov 18 17:51:27 2014 +0200

    net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too

Comments

Chris J Arges Jan. 6, 2015, 3:06 p.m. UTC | #1
Brian,
I've edited the bug to follow the kernel SRU procedure:
https://wiki.ubuntu.com/KernelTeam/KernelUpdates

In addition its helpful to indicate [SRU][PATCH] and for what series
[Utopic] this SRU request is for in the subject.

I see that this line was removed from the original patch, so the patch
should read "backported from" instead of "cherry-picked from":
.ndo_gso_check          = mlx4_en_gso_check,

Finally, the patch needs to have a BugLink line in it, but that can be
added by the committer.

With the above changes made to the PATCH, please add the following:
Acked-By: Chris J Arges <chris.j.arges@canonical.com>

Thanks,
--chris j arges

On 01/05/2015 02:45 PM, Brian Fromme wrote:
> Re bug:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1407760
> 
> Joe S. asked for the backport patch and commit.  Mellanox did the backport,
> which I'll include here.  From Leann's email, here's more about the
> upstream commit:
> 
> Patch details are:
> 
> ~/linux$ git describe --contains 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
> v3.18-rc6~9^2~12
> 
>   commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
>   Author: Or Gerlitz <ogerlitz@mellanox.com>
>   Date:   Tue Nov 18 17:51:27 2014 +0200
> 
>     net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too
> 
> 
>
Seth Forshee Jan. 7, 2015, 5:34 p.m. UTC | #2
On Mon, Jan 05, 2015 at 01:45:34PM -0700, Brian Fromme wrote:
> Re bug:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1407760
> 
> Joe S. asked for the backport patch and commit.  Mellanox did the backport,
> which I'll include here.  From Leann's email, here's more about the
> upstream commit:
> 
> Patch details are:
> 
> ~/linux$ git describe --contains 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
> v3.18-rc6~9^2~12
> 
>   commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
>   Author: Or Gerlitz <ogerlitz@mellanox.com>
>   Date:   Tue Nov 18 17:51:27 2014 +0200
> 
>     net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too

Assuming the points which Chris mentioned are addressed:

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Brad Figg Jan. 7, 2015, 9:36 p.m. UTC | #3
On Mon, Jan 05, 2015 at 01:45:34PM -0700, Brian Fromme wrote:
> Re bug:  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1407760
> 
> Joe S. asked for the backport patch and commit.  Mellanox did the backport,
> which I'll include here.  From Leann's email, here's more about the
> upstream commit:
> 
> Patch details are:
> 
> ~/linux$ git describe --contains 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
> v3.18-rc6~9^2~12
> 
>   commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4
>   Author: Or Gerlitz <ogerlitz@mellanox.com>
>   Date:   Tue Nov 18 17:51:27 2014 +0200
> 
>     net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too


> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team


Applied to Utopic master-next
diff mbox

Patch

From de6f7617d5eea73bc621a48049fa5791b3882b9a Mon Sep 17 00:00:00 2001
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Tue, 18 Nov 2014 17:51:27 +0200
Subject: [PATCH] net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too

This is currently missing, which results in a crash when one attempts
to set VXLAN tunnel over the mlx4_en when acting as PF.

	[ 2408.785472] BUG: unable to handle kernel NULL pointer dereference at (null)
	[...]
	[ 2408.994104] Call Trace:
	[ 2408.996584]  [<ffffffffa021f7f5>] ? vxlan_get_rx_port+0xd6/0x103 [vxlan]
	[ 2409.003316]  [<ffffffffa021f71f>] ? vxlan_lowerdev_event+0xf2/0xf2 [vxlan]
	[ 2409.010225]  [<ffffffffa0630358>] mlx4_en_start_port+0x862/0x96a [mlx4_en]
	[ 2409.017132]  [<ffffffffa063070f>] mlx4_en_open+0x17f/0x1b8 [mlx4_en]

While here, make sure to invoke vxlan_get_rx_port() only when VXLAN
offloads are actually enabled and not when they are only supported.

Reported-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4)
Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index dc85102..0432368 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1730,7 +1730,7 @@  int mlx4_en_start_port(struct net_device *dev)
 	mlx4_set_stats_bitmap(mdev->dev, &priv->stats_bitmap);
 
 #ifdef CONFIG_MLX4_EN_VXLAN
-	if (priv->mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS)
+	if (priv->mdev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN)
 		vxlan_get_rx_port(dev);
 #endif
 	priv->port_up = true;
@@ -2440,6 +2440,10 @@  static const struct net_device_ops mlx4_netdev_ops_master = {
 	.ndo_rx_flow_steer	= mlx4_en_filter_rfs,
 #endif
 	.ndo_get_phys_port_id	= mlx4_en_get_phys_port_id,
+#ifdef CONFIG_MLX4_EN_VXLAN
+	.ndo_add_vxlan_port	= mlx4_en_add_vxlan_port,
+	.ndo_del_vxlan_port	= mlx4_en_del_vxlan_port,
+#endif
 };
 
 int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
-- 
1.8.4.3