All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] be2net: avoid vxlan offloading on multichannel configs
@ 2015-08-14 20:30 Ivan Vecera
  2015-08-14 20:53 ` Ajit Kumar Khaparde
  2015-08-17 21:30 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Ivan Vecera @ 2015-08-14 20:30 UTC (permalink / raw)
  To: netdev
  Cc: Sathya Perla, Ajit Khaparde, Padmanabh Ratnakar, Sriharsha Basavapatna

VxLAN offloading is not functional if the NIC is running in multichannel
mode (UMC, FLEX-10, VNIC...). Enabling this additionally kills whole
connectivity through the NIC and the device needs to be down and up to
restore it. The firmware should take care about it and does not allow
the conversion of interface to tunnel type (be_cmd_manage_iface) or should
support VxLAN offloading if multichannel config is enabled.
I have tested this on the latest available firmware (10.6.144.21).

Result:
[root@sm-04 ~]# ip link set enp5s0f0 up[root@sm-04 ~]# ip addr add 172.30.10.50/24 dev enp5s0f0
[root@sm-04 ~]# ping -c 3 172.30.10.254PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
64 bytes from 172.30.10.254: icmp_seq=1 ttl=64 time=0.317 ms
64 bytes from 172.30.10.254: icmp_seq=2 ttl=64 time=0.187 ms
64 bytes from 172.30.10.254: icmp_seq=3 ttl=64 time=0.188 ms

 --- 172.30.10.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.187/0.230/0.317/0.063 ms
[root@sm-04 ~]# ip link add link enp5s0f0 vxlan10 type vxlan id 10 remote 172.30.10.60 dstport 4789
[root@sm-04 ~]# ip link set vxlan10 up
[ 7900.442811] be2net 0000:05:00.0: Enabled VxLAN offloads for UDP port 4789
[ 7900.455722] be2net 0000:05:00.1: Enabled VxLAN offloads for UDP port 4789
[ 7900.468635] be2net 0000:05:00.2: Enabled VxLAN offloads for UDP port 4789
[ 7900.481553] be2net 0000:05:00.3: Enabled VxLAN offloads for UDP port 4789
[root@sm-04 ~]# ping -c 3 172.30.10.254
PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.

 --- 172.30.10.254 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

[root@sm-04 ~]# ip link set vxlan10 down
[ 7959.434093] be2net 0000:05:00.0: Disabled VxLAN offloads for UDP port 4789
[ 7959.444792] be2net 0000:05:00.1: Disabled VxLAN offloads for UDP port 4789
[ 7959.455592] be2net 0000:05:00.2: Disabled VxLAN offloads for UDP port 4789
[ 7959.466416] be2net 0000:05:00.3: Disabled VxLAN offloads for UDP port 4789
[root@sm-04 ~]# ip link del vxlan10
[root@sm-04 ~]# ping -c 3 172.30.10.254
PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.

 --- 172.30.10.254 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

[root@sm-04 ~]# ip link set enp5s0f0 down
[root@sm-04 ~]# ip link set enp5s0f0 up
[ 8071.019003] be2net 0000:05:00.0 enp5s0f0: Link is Up
[root@sm-04 ~]# ping -c 3 172.30.10.254
PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
64 bytes from 172.30.10.254: icmp_seq=1 ttl=64 time=0.318 ms
64 bytes from 172.30.10.254: icmp_seq=2 ttl=64 time=0.196 ms
64 bytes from 172.30.10.254: icmp_seq=3 ttl=64 time=0.194 ms

 --- 172.30.10.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.194/0.236/0.318/0.057 ms

Cc: Sathya Perla <sathya.perla@avagotech.com>
Cc: Ajit Khaparde <ajit.khaparde@avagotech.com>
Cc: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
Cc: Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index c28e3bf..6ca693b 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5174,7 +5174,7 @@ static void be_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
 	struct device *dev = &adapter->pdev->dev;
 	int status;
 
-	if (lancer_chip(adapter) || BEx_chip(adapter))
+	if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter))
 		return;
 
 	if (adapter->flags & BE_FLAGS_VXLAN_OFFLOADS) {
@@ -5221,7 +5221,7 @@ static void be_del_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
 {
 	struct be_adapter *adapter = netdev_priv(netdev);
 
-	if (lancer_chip(adapter) || BEx_chip(adapter))
+	if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter))
 		return;
 
 	if (adapter->vxlan_port != port)
-- 
2.4.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] be2net: avoid vxlan offloading on multichannel configs
  2015-08-14 20:30 [PATCH net] be2net: avoid vxlan offloading on multichannel configs Ivan Vecera
@ 2015-08-14 20:53 ` Ajit Kumar Khaparde
  2015-08-17 21:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Ajit Kumar Khaparde @ 2015-08-14 20:53 UTC (permalink / raw)
  To: Ivan Vecera; +Cc: netdev


> On Aug 14, 2015, at 3:30 PM, Ivan Vecera <ivecera@redhat.com> wrote:
> 
> VxLAN offloading is not functional if the NIC is running in multichannel
> mode (UMC, FLEX-10, VNIC...). Enabling this additionally kills whole
> connectivity through the NIC and the device needs to be down and up to
> restore it. The firmware should take care about it and does not allow
> the conversion of interface to tunnel type (be_cmd_manage_iface) or should
> support VxLAN offloading if multichannel config is enabled.
> I have tested this on the latest available firmware (10.6.144.21).
> 
> Result:
> [root@sm-04 ~]# ip link set enp5s0f0 up[root@sm-04 ~]# ip addr add 172.30.10.50/24 dev enp5s0f0
> [root@sm-04 ~]# ping -c 3 172.30.10.254PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
> 64 bytes from 172.30.10.254: icmp_seq=1 ttl=64 time=0.317 ms
> 64 bytes from 172.30.10.254: icmp_seq=2 ttl=64 time=0.187 ms
> 64 bytes from 172.30.10.254: icmp_seq=3 ttl=64 time=0.188 ms
> 
> --- 172.30.10.254 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
> rtt min/avg/max/mdev = 0.187/0.230/0.317/0.063 ms
> [root@sm-04 ~]# ip link add link enp5s0f0 vxlan10 type vxlan id 10 remote 172.30.10.60 dstport 4789
> [root@sm-04 ~]# ip link set vxlan10 up
> [ 7900.442811] be2net 0000:05:00.0: Enabled VxLAN offloads for UDP port 4789
> [ 7900.455722] be2net 0000:05:00.1: Enabled VxLAN offloads for UDP port 4789
> [ 7900.468635] be2net 0000:05:00.2: Enabled VxLAN offloads for UDP port 4789
> [ 7900.481553] be2net 0000:05:00.3: Enabled VxLAN offloads for UDP port 4789
> [root@sm-04 ~]# ping -c 3 172.30.10.254
> PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
> 
> --- 172.30.10.254 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 1999ms
> 
> [root@sm-04 ~]# ip link set vxlan10 down
> [ 7959.434093] be2net 0000:05:00.0: Disabled VxLAN offloads for UDP port 4789
> [ 7959.444792] be2net 0000:05:00.1: Disabled VxLAN offloads for UDP port 4789
> [ 7959.455592] be2net 0000:05:00.2: Disabled VxLAN offloads for UDP port 4789
> [ 7959.466416] be2net 0000:05:00.3: Disabled VxLAN offloads for UDP port 4789
> [root@sm-04 ~]# ip link del vxlan10
> [root@sm-04 ~]# ping -c 3 172.30.10.254
> PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
> 
> --- 172.30.10.254 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 1999ms
> 
> [root@sm-04 ~]# ip link set enp5s0f0 down
> [root@sm-04 ~]# ip link set enp5s0f0 up
> [ 8071.019003] be2net 0000:05:00.0 enp5s0f0: Link is Up
> [root@sm-04 ~]# ping -c 3 172.30.10.254
> PING 172.30.10.254 (172.30.10.254) 56(84) bytes of data.
> 64 bytes from 172.30.10.254: icmp_seq=1 ttl=64 time=0.318 ms
> 64 bytes from 172.30.10.254: icmp_seq=2 ttl=64 time=0.196 ms
> 64 bytes from 172.30.10.254: icmp_seq=3 ttl=64 time=0.194 ms
> 
> --- 172.30.10.254 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
> rtt min/avg/max/mdev = 0.194/0.236/0.318/0.057 ms
> 
> Cc: Sathya Perla <sathya.perla@avagotech.com>
> Cc: Ajit Khaparde <ajit.khaparde@avagotech.com>
> Cc: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
> Cc: Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@avagotech.com>

 
> ---
> drivers/net/ethernet/emulex/benet/be_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index c28e3bf..6ca693b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -5174,7 +5174,7 @@ static void be_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
> 	struct device *dev = &adapter->pdev->dev;
> 	int status;
> 
> -	if (lancer_chip(adapter) || BEx_chip(adapter))
> +	if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter))
> 		return;
> 
> 	if (adapter->flags & BE_FLAGS_VXLAN_OFFLOADS) {
> @@ -5221,7 +5221,7 @@ static void be_del_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
> {
> 	struct be_adapter *adapter = netdev_priv(netdev);
> 
> -	if (lancer_chip(adapter) || BEx_chip(adapter))
> +	if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter))
> 		return;
> 
> 	if (adapter->vxlan_port != port)
> -- 
> 2.4.6
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] be2net: avoid vxlan offloading on multichannel configs
  2015-08-14 20:30 [PATCH net] be2net: avoid vxlan offloading on multichannel configs Ivan Vecera
  2015-08-14 20:53 ` Ajit Kumar Khaparde
@ 2015-08-17 21:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-08-17 21:30 UTC (permalink / raw)
  To: ivecera
  Cc: netdev, sathya.perla, ajit.khaparde, padmanabh.ratnakar,
	sriharsha.basavapatna

From: Ivan Vecera <ivecera@redhat.com>
Date: Fri, 14 Aug 2015 22:30:01 +0200

> VxLAN offloading is not functional if the NIC is running in multichannel
> mode (UMC, FLEX-10, VNIC...). Enabling this additionally kills whole
> connectivity through the NIC and the device needs to be down and up to
> restore it. The firmware should take care about it and does not allow
> the conversion of interface to tunnel type (be_cmd_manage_iface) or should
> support VxLAN offloading if multichannel config is enabled.
> I have tested this on the latest available firmware (10.6.144.21).
 ...
> Cc: Sathya Perla <sathya.perla@avagotech.com>
> Cc: Ajit Khaparde <ajit.khaparde@avagotech.com>
> Cc: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
> Cc: Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-17 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 20:30 [PATCH net] be2net: avoid vxlan offloading on multichannel configs Ivan Vecera
2015-08-14 20:53 ` Ajit Kumar Khaparde
2015-08-17 21:30 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.