Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next] qed: Add srq core support for RoCE and iWARP
From: Leon Romanovsky @ 2018-05-31 17:33 UTC (permalink / raw)
  To: Yuval Bason
  Cc: davem, netdev, jgg, dledford, linux-rdma, Michal Kalderon,
	Ariel Elior
In-Reply-To: <20180530131137.4653-1-yuval.bason@cavium.com>

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

On Wed, May 30, 2018 at 04:11:37PM +0300, Yuval Bason wrote:
> This patch adds support for configuring SRQ and provides the necessary
> APIs for rdma upper layer driver (qedr) to enable the SRQ feature.
>
> Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
> Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
> Signed-off-by: Yuval Bason <yuval.bason@cavium.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_cxt.c   |   5 +-
>  drivers/net/ethernet/qlogic/qed/qed_cxt.h   |   1 +
>  drivers/net/ethernet/qlogic/qed/qed_hsi.h   |   2 +
>  drivers/net/ethernet/qlogic/qed/qed_iwarp.c |  23 ++++
>  drivers/net/ethernet/qlogic/qed/qed_main.c  |   2 +
>  drivers/net/ethernet/qlogic/qed/qed_rdma.c  | 179 +++++++++++++++++++++++++++-
>  drivers/net/ethernet/qlogic/qed/qed_rdma.h  |   2 +
>  drivers/net/ethernet/qlogic/qed/qed_roce.c  |  17 ++-
>  include/linux/qed/qed_rdma_if.h             |  12 +-
>  9 files changed, 235 insertions(+), 8 deletions(-)
>

...

> +	struct qed_sp_init_data init_data;

...

> +	memset(&init_data, 0, sizeof(init_data));

This patter is so common in this patch, why?

"struct qed_sp_init_data init_data = {};" will do the trick.

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework
From: Michael S. Tsirkin @ 2018-05-31 17:34 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Samudrala, Sridhar, davem, netdev, virtualization, virtio-dev,
	jesse.brandeburg, alexander.h.duyck, kubakici, jasowang,
	loseweigh, jiri, aaron.f.brown, anjali.singhai
In-Reply-To: <20180531085812.0b13afef@shemminger-XPS-13-9360>

On Thu, May 31, 2018 at 08:58:12AM -0400, Stephen Hemminger wrote:
> On Wed, 30 May 2018 20:03:11 -0700
> "Samudrala, Sridhar" <sridhar.samudrala@intel.com> wrote:
> 
> > On 5/30/2018 7:06 PM, Stephen Hemminger wrote:
> > > On Thu, 24 May 2018 09:55:14 -0700
> > > Sridhar Samudrala <sridhar.samudrala@intel.com> wrote:
> > >  
> > >> Use the registration/notification framework supported by the generic
> > >> failover infrastructure.
> > >>
> > >> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>  
> > > Why was this merged? It was never signed off by any of the netvsc maintainers,
> > > and there were still issues unresolved.
> > >
> > > There are also namespaces issues I am fixing and this breaks them.
> > > Will start my patch set with a revert for this. Sorry  
> > 
> > I would appreciate if you can make the fixes on top of this patch series. I tried hard
> > to make sure that netvsc functionality and behavior doesn't change.
> > 
> > It is possible that there could be some bugs introduced, but they can be fixed.
> > Looks like Wei already found a bug and submitted a fix for that.
> > 
> 
> Ok, but several of these may clash with what you want for virtio.
> Like:
> 	- VF should be moved to namespace of virt device
> 	- VF should be associated based on message from host with serial # not
> 	  registration notifier and MAC address.
> 	- control operations should use master device reference rather than
> 	  searching based on MAC.
> 
> As you can see these are structural changes.

We might want to do these for virtio as well, at least as
an option.

-- 
MST

^ permalink raw reply

* Re: [PATCH net-next] virtio_net: fix error return code in virtnet_probe()
From: Michael S. Tsirkin @ 2018-05-31 17:37 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Jason Wang, Sridhar Samudrala, virtualization, netdev,
	kernel-janitors
In-Reply-To: <1527732307-145609-1-git-send-email-weiyongjun1@huawei.com>

On Thu, May 31, 2018 at 02:05:07AM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the failover create fail error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: ba5e4426e80e ("virtio_net: Extend virtio to use VF datapath when available")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  drivers/net/virtio_net.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 8f08a3e..2d55e2a 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2935,8 +2935,10 @@ static int virtnet_probe(struct virtio_device *vdev)
>  
>  	if (virtio_has_feature(vdev, VIRTIO_NET_F_STANDBY)) {
>  		vi->failover = net_failover_create(vi->dev);
> -		if (IS_ERR(vi->failover))
> +		if (IS_ERR(vi->failover)) {
> +			err = PTR_ERR(vi->failover);
>  			goto free_vqs;
> +		}
>  	}
>  
>  	err = register_netdev(dev);

^ permalink raw reply

* [PATCH net-next 0/9] Test mirror-to-gretap with bridge in UL
From: Petr Machata @ 2018-05-31 17:51 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch

This patchset adds more tests to the mirror-to-gretap suite where bridge
is present in the underlay. Specifically it adds tests for bridge VLAN
handling, FDB, and bridge port STP status.

In patches #1-#3, the codebase is refactored to support the new tests.

In patch #4, an STP test is added to the mirroring library, that will
later be called from bridge tests.

In patches #5-#8, the test for mirror-to-gretap with an 802.1q bridge in
underlay is adapted and more tests are added.

In patch #9, an STP test is added to the test suite for mirror-to-gretap
with an 802.1d bridge in underlay.

Petr Machata (9):
  selftests: forwarding: lib: Move here vlan_capture_{,un}install()
  selftests: forwarding: mirror_lib: Move here
    do_test_span_vlan_dir_ips()
  selftests: forwarding: mirror_lib: skip_hw the VLAN capture
  selftests: forwarding: mirror_gre_lib: Add STP test
  selftests: forwarding: mirror_gre_vlan_bridge_1q: Fix tunnel name
  selftests: forwarding: mirror_gre_vlan_bridge_1q: Test final config
  selftests: forwarding: mirror_gre_vlan_bridge_1q: Rename two tests
  selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests
  selftests: forwarding: mirror_gre_bridge_1d_vlan: Add STP test

 tools/testing/selftests/net/forwarding/lib.sh      |  23 ++++
 .../net/forwarding/mirror_gre_bridge_1d_vlan.sh    |  12 ++
 .../selftests/net/forwarding/mirror_gre_lib.sh     |  32 +++++
 .../net/forwarding/mirror_gre_vlan_bridge_1q.sh    | 148 +++++++++++++++++++--
 .../testing/selftests/net/forwarding/mirror_lib.sh |  38 ++++++
 .../selftests/net/forwarding/mirror_vlan.sh        |  38 ------
 6 files changed, 244 insertions(+), 47 deletions(-)

-- 
2.4.11

^ permalink raw reply

* [PATCH net-next 1/9] selftests: forwarding: lib: Move here vlan_capture_{,un}install()
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Move vlan_capture_install() and vlan_capture_uninstall() from
mirror_vlan.sh test to lib.sh so that it can be reused in other tests.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 tools/testing/selftests/net/forwarding/lib.sh      | 23 ++++++++++++++++++++++
 .../selftests/net/forwarding/mirror_vlan.sh        | 23 ----------------------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 89ba4cd..7b18a53 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -514,6 +514,29 @@ icmp6_capture_uninstall()
 	__icmp_capture_add_del del 100 v6 "$@"
 }
 
+__vlan_capture_add_del()
+{
+	local add_del=$1; shift
+	local pref=$1; shift
+	local dev=$1; shift
+	local filter=$1; shift
+
+	tc filter $add_del dev "$dev" ingress \
+	   proto 802.1q pref $pref \
+	   flower $filter \
+	   action pass
+}
+
+vlan_capture_install()
+{
+	__vlan_capture_add_del add 100 "$@"
+}
+
+vlan_capture_uninstall()
+{
+	__vlan_capture_add_del del 100 "$@"
+}
+
 matchall_sink_create()
 {
 	local dev=$1; shift
diff --git a/tools/testing/selftests/net/forwarding/mirror_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_vlan.sh
index 1e10520..758b6d0 100755
--- a/tools/testing/selftests/net/forwarding/mirror_vlan.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_vlan.sh
@@ -76,29 +76,6 @@ test_vlan()
 	test_vlan_dir egress 0 8
 }
 
-vlan_capture_add_del()
-{
-	local add_del=$1; shift
-	local pref=$1; shift
-	local dev=$1; shift
-	local filter=$1; shift
-
-	tc filter $add_del dev "$dev" ingress \
-	   proto 802.1q pref $pref \
-	   flower $filter \
-	   action pass
-}
-
-vlan_capture_install()
-{
-	vlan_capture_add_del add 100 "$@"
-}
-
-vlan_capture_uninstall()
-{
-	vlan_capture_add_del del 100 "$@"
-}
-
 do_test_span_vlan_dir_ips()
 {
 	local expect=$1; shift
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 2/9] selftests: forwarding: mirror_lib: Move here do_test_span_vlan_dir_ips()
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Move the function do_test_span_vlan_dir_ips() from mirror_vlan.sh test
to a library file mirror_lib.sh to allow reuse. Fill in other entry
points similar to other testing functions in mirror_lib.sh, they will be
useful in following patches.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../testing/selftests/net/forwarding/mirror_lib.sh | 35 ++++++++++++++++++++++
 .../selftests/net/forwarding/mirror_vlan.sh        | 15 ----------
 2 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index 04cbc38..67efe25 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -92,3 +92,38 @@ test_span_dir()
 {
 	test_span_dir_ips "$@" 192.0.2.1 192.0.2.2
 }
+
+do_test_span_vlan_dir_ips()
+{
+	local expect=$1; shift
+	local dev=$1; shift
+	local vid=$1; shift
+	local direction=$1; shift
+	local ip1=$1; shift
+	local ip2=$1; shift
+
+	vlan_capture_install $dev "vlan_id $vid"
+	mirror_test v$h1 $ip1 $ip2 $dev 100 $expect
+	mirror_test v$h2 $ip2 $ip1 $dev 100 $expect
+	vlan_capture_uninstall $dev
+}
+
+quick_test_span_vlan_dir_ips()
+{
+	do_test_span_vlan_dir_ips 10 "$@"
+}
+
+fail_test_span_vlan_dir_ips()
+{
+	do_test_span_vlan_dir_ips 0 "$@"
+}
+
+quick_test_span_vlan_dir()
+{
+	quick_test_span_vlan_dir_ips "$@" 192.0.2.1 192.0.2.2
+}
+
+fail_test_span_vlan_dir()
+{
+	fail_test_span_vlan_dir_ips "$@" 192.0.2.1 192.0.2.2
+}
diff --git a/tools/testing/selftests/net/forwarding/mirror_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_vlan.sh
index 758b6d0..20b37a5 100755
--- a/tools/testing/selftests/net/forwarding/mirror_vlan.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_vlan.sh
@@ -76,21 +76,6 @@ test_vlan()
 	test_vlan_dir egress 0 8
 }
 
-do_test_span_vlan_dir_ips()
-{
-	local expect=$1; shift
-	local dev=$1; shift
-	local vid=$1; shift
-	local direction=$1; shift
-	local ip1=$1; shift
-	local ip2=$1; shift
-
-	vlan_capture_install $dev "vlan_id $vid"
-	mirror_test v$h1 $ip1 $ip2 $dev 100 $expect
-	mirror_test v$h2 $ip2 $ip1 $dev 100 $expect
-	vlan_capture_uninstall $dev
-}
-
 test_tagged_vlan_dir()
 {
 	local direction=$1; shift
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 3/9] selftests: forwarding: mirror_lib: skip_hw the VLAN capture
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

When the VLAN capture is installed on a front panel device and not a
soft device, the packets are counted twice: once in fast path, and once
after they are trapped to the kernel. Resolve the problem by passing
skip_hw flag to vlan_capture_install().

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_lib.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index 67efe25..d36dc26 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -102,7 +102,10 @@ do_test_span_vlan_dir_ips()
 	local ip1=$1; shift
 	local ip2=$1; shift
 
-	vlan_capture_install $dev "vlan_id $vid"
+	# Install the capture as skip_hw to avoid double-counting of packets.
+	# The traffic is meant for local box anyway, so will be trapped to
+	# kernel.
+	vlan_capture_install $dev "skip_hw vlan_id $vid"
 	mirror_test v$h1 $ip1 $ip2 $dev 100 $expect
 	mirror_test v$h2 $ip2 $ip1 $dev 100 $expect
 	vlan_capture_uninstall $dev
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Add a reusable full test that toggles STP state of a given bridge port
and checks that the mirroring reacts appropriately. The test will be
used by bridge tests in follow-up patches.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_lib.sh     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
index 92ef6dd..619b469 100644
--- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
@@ -96,3 +96,35 @@ full_test_span_gre_dir_vlan()
 {
 	full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2
 }
+
+full_test_span_gre_stp_ips()
+{
+	local tundev=$1; shift
+	local nbpdev=$1; shift
+	local what=$1; shift
+	local ip1=$1; shift
+	local ip2=$1; shift
+	local h3mac=$(mac_get $h3)
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state disabled
+	sleep 1
+	fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state forwarding
+	sleep 1
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: STP state ($tcflags)"
+}
+
+full_test_span_gre_stp()
+{
+	full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2
+}
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 5/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Fix tunnel name
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

The "ip6gretap" in the test name refers to the tunnel device type that
the test is supposed to be testing. However test_ip6gretap_forbidden()
tests, due to a typo, a gretap tunnel. Fix the typo.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
index 01ec28a..29fde73 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
@@ -108,7 +108,7 @@ test_gretap_forbidden()
 
 test_ip6gretap_forbidden()
 {
-	test_span_gre_forbidden gt4 "mirror to ip6gretap"
+	test_span_gre_forbidden gt6 "mirror to ip6gretap"
 }
 
 test_all()
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 6/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Test final config
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

After the final change reestablishes the original configuration, make
sure the traffic flows again as it should.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
index 29fde73..0a3bac9 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
@@ -91,12 +91,13 @@ test_span_gre_forbidden()
 	# Now forbid the VLAN at the bridge and see it fail.
 	bridge vlan del dev br1 vid 555 self
 	sleep 1
-
 	fail_test_span_gre_dir $tundev ingress
-	mirror_uninstall $swp1 ingress
 
 	bridge vlan add dev br1 vid 555 self
 	sleep 1
+	quick_test_span_gre_dir $tundev ingress
+
+	mirror_uninstall $swp1 ingress
 
 	log_test "$what: vlan forbidden at a bridge ($tcflags)"
 }
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 7/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Rename two tests
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Rename test_gretap_forbidden() and test_ip6gretap_forbidden() to a more
specific test_gretap_forbidden_cpu() and test_ip6gretap_forbidden_cpu().
This will make it clearer which is which when further down a patch is
introduced that forbids a VLAN on regular bridge port.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh  | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
index 0a3bac9..d91b347 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
@@ -10,8 +10,8 @@
 ALL_TESTS="
 	test_gretap
 	test_ip6gretap
-	test_gretap_forbidden
-	test_ip6gretap_forbidden
+	test_gretap_forbidden_cpu
+	test_ip6gretap_forbidden_cpu
 "
 
 NUM_NETIFS=6
@@ -77,7 +77,7 @@ test_ip6gretap()
 	test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap"
 }
 
-test_span_gre_forbidden()
+test_span_gre_forbidden_cpu()
 {
 	local tundev=$1; shift
 	local what=$1; shift
@@ -102,14 +102,14 @@ test_span_gre_forbidden()
 	log_test "$what: vlan forbidden at a bridge ($tcflags)"
 }
 
-test_gretap_forbidden()
+test_gretap_forbidden_cpu()
 {
-	test_span_gre_forbidden gt4 "mirror to gretap"
+	test_span_gre_forbidden_cpu gt4 "mirror to gretap"
 }
 
-test_ip6gretap_forbidden()
+test_ip6gretap_forbidden_cpu()
 {
-	test_span_gre_forbidden gt6 "mirror to ip6gretap"
+	test_span_gre_forbidden_cpu gt6 "mirror to ip6gretap"
 }
 
 test_all()
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 8/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Offloading of mirror-to-gretap in mlxsw is tricky especially in cases
when the gretap underlay involves bridges. Add more tests that exercise
the bridge handling code:

- forbidden_egress tests that check vlan removal on bridge port in the
  underlay packet path
- untagged_egress tests that similarly check "egress untagged"
- fdb_roaming tests that check whether learning FDB on a different port
  is reflected
- stp tests for handling port STP status of bridge egress port

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../net/forwarding/mirror_gre_vlan_bridge_1q.sh    | 129 +++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
index d91b347..5dbc7a0 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
@@ -12,6 +12,14 @@ ALL_TESTS="
 	test_ip6gretap
 	test_gretap_forbidden_cpu
 	test_ip6gretap_forbidden_cpu
+	test_gretap_forbidden_egress
+	test_ip6gretap_forbidden_egress
+	test_gretap_untagged_egress
+	test_ip6gretap_untagged_egress
+	test_gretap_fdb_roaming
+	test_ip6gretap_fdb_roaming
+	test_gretap_stp
+	test_ip6gretap_stp
 "
 
 NUM_NETIFS=6
@@ -43,12 +51,14 @@ setup_prepare()
 
 	ip link set dev $swp3 master br1
 	bridge vlan add dev $swp3 vid 555
+	bridge vlan add dev $swp2 vid 555
 }
 
 cleanup()
 {
 	pre_cleanup
 
+	ip link set dev $swp2 nomaster
 	ip link set dev $swp3 nomaster
 	vlan_destroy $h3 555
 	vlan_destroy br1 555
@@ -112,6 +122,125 @@ test_ip6gretap_forbidden_cpu()
 	test_span_gre_forbidden_cpu gt6 "mirror to ip6gretap"
 }
 
+test_span_gre_forbidden_egress()
+{
+	local tundev=$1; shift
+	local what=$1; shift
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir $tundev ingress
+
+	bridge vlan del dev $swp3 vid 555
+	sleep 1
+	fail_test_span_gre_dir $tundev ingress
+
+	bridge vlan add dev $swp3 vid 555
+	# Re-prime FDB
+	arping -I br1.555 192.0.2.130 -fqc 1
+	sleep 1
+	quick_test_span_gre_dir $tundev ingress
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: vlan forbidden at a bridge egress ($tcflags)"
+}
+
+test_gretap_forbidden_egress()
+{
+	test_span_gre_forbidden_egress gt4 "mirror to gretap"
+}
+
+test_ip6gretap_forbidden_egress()
+{
+	test_span_gre_forbidden_egress gt6 "mirror to ip6gretap"
+}
+
+test_span_gre_untagged_egress()
+{
+	local tundev=$1; shift
+	local what=$1; shift
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+
+	quick_test_span_gre_dir $tundev ingress
+	quick_test_span_vlan_dir $h3 555 ingress
+
+	bridge vlan add dev $swp3 vid 555 pvid untagged
+	sleep 1
+	quick_test_span_gre_dir $tundev ingress
+	fail_test_span_vlan_dir $h3 555 ingress
+
+	bridge vlan add dev $swp3 vid 555
+	sleep 1
+	quick_test_span_gre_dir $tundev ingress
+	quick_test_span_vlan_dir $h3 555 ingress
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: vlan untagged at a bridge egress ($tcflags)"
+}
+
+test_gretap_untagged_egress()
+{
+	test_span_gre_untagged_egress gt4 "mirror to gretap"
+}
+
+test_ip6gretap_untagged_egress()
+{
+	test_span_gre_untagged_egress gt6 "mirror to ip6gretap"
+}
+
+test_span_gre_fdb_roaming()
+{
+	local tundev=$1; shift
+	local what=$1; shift
+	local h3mac=$(mac_get $h3)
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir $tundev ingress
+
+	bridge fdb del dev $swp3 $h3mac vlan 555 master
+	bridge fdb add dev $swp2 $h3mac vlan 555 master
+	sleep 1
+	fail_test_span_gre_dir $tundev ingress
+
+	bridge fdb del dev $swp2 $h3mac vlan 555 master
+	# Re-prime FDB
+	arping -I br1.555 192.0.2.130 -fqc 1
+	sleep 1
+	quick_test_span_gre_dir $tundev ingress
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: MAC roaming ($tcflags)"
+}
+
+test_gretap_fdb_roaming()
+{
+	test_span_gre_fdb_roaming gt4 "mirror to gretap"
+}
+
+test_ip6gretap_fdb_roaming()
+{
+	test_span_gre_fdb_roaming gt6 "mirror to ip6gretap"
+}
+
+test_gretap_stp()
+{
+	full_test_span_gre_stp gt4 $swp3 "mirror to gretap"
+}
+
+test_ip6gretap_stp()
+{
+	full_test_span_gre_stp gt6 $swp3 "mirror to ip6gretap"
+}
+
 test_all()
 {
 	slow_path_trap_install $swp1 ingress
-- 
2.4.11

^ permalink raw reply related

* [PATCH net-next 9/9] selftests: forwarding: mirror_gre_bridge_1d_vlan: Add STP test
From: Petr Machata @ 2018-05-31 17:52 UTC (permalink / raw)
  To: netdev, linux-kselftest; +Cc: davem, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

To test offloading of mirror-to-gretap in mlxsw for cases that a
VLAN-unaware bridge is in underlay packet path, test that the STP status
of bridge egress port is reflected.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh    | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
index 3d47afc..3bb4c2b 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
@@ -11,6 +11,8 @@
 ALL_TESTS="
 	test_gretap
 	test_ip6gretap
+	test_gretap_stp
+	test_ip6gretap_stp
 "
 
 NUM_NETIFS=6
@@ -80,6 +82,16 @@ test_ip6gretap()
 	test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap"
 }
 
+test_gretap_stp()
+{
+	full_test_span_gre_stp gt4 $swp3.555 "mirror to gretap"
+}
+
+test_ip6gretap_stp()
+{
+	full_test_span_gre_stp gt6 $swp3.555 "mirror to ip6gretap"
+}
+
 test_all()
 {
 	slow_path_trap_install $swp1 ingress
-- 
2.4.11

^ permalink raw reply related

* Re: [pull request][net-next 0/7] Mellanox, mlx5e & FPGA updates 2018-05-29
From: David Miller @ 2018-05-31 17:53 UTC (permalink / raw)
  To: saeedm; +Cc: netdev
In-Reply-To: <20180530004650.15029-1-saeedm@mellanox.com>

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 29 May 2018 17:46:43 -0700

> The following series includes some minor FPGA and mlx5e netdev updates,
> for more information please see tag log below.
> 
> Please pull and let me know if there's any problem.
> 
> Note: This series doesn't include nor require any mlx5-next shared code
> and can be applied as is to net-next tree.

Pulled, thanks Saeed.

^ permalink raw reply

* Re: [PATCH ethtool] ethtool: fix stack clash in do_get_phy_tunable and do_set_phy_tunable
From: John W. Linville @ 2018-05-31 17:51 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: netdev, Raju Lakkaraju, Allan W. Nielsen
In-Reply-To: <20180509120146.C7408A0C6F@unicorn.suse.cz>

On Wed, May 09, 2018 at 02:01:46PM +0200, Michal Kubecek wrote:
> Users reported stack clash detected when using --get-phy-tunable on
> ppc64le. Problem is caused by local variable ds of type struct
> ethtool_tunable which has last member "void *data[0]". Accessing data[0]
> (as do_get_phy_tunable() does) or adding requested value at the end (which
> is what kernel ioctl does) writes past allocated space for the variable.
> 
> Make ds part of an anonymous structure to make sure there is enough space
> for tunable value and drop the (pointless) access to ds.data[0]. The same
> problem also exists in do_set_phy_tunable().
> 
> Fixes: b0fe96dec90f ("Ethtool: Implements ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE and PHY downshift")
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

LGTM -- queued for next release...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: suspicius csum initialization in vmxnet3_rx_csum
From: Ronak Doshi @ 2018-05-31 18:02 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: Guolin Yang, Neil Horman, Boon Ang, Louis Luo, netdev
In-Reply-To: <4aab239242c841b8cbff08eea5f340f89f368a42.camel@redhat.com>


On Wed, 30 May 2018, Paolo Abeni wrote:

> Hi,
> 
> On Thu, 2018-05-24 at 21:48 +0000, Guolin Yang wrote:
> > Yes, that code  is not correct, we should fix that code
> 
> Did you have any chance to address the issue and/or to give a more in-
> deepth look to the change proposed in my initial email?
>  
Hi Paolo,

Can you provide the esx build you are using? It can be found using 
"vmware -vl" on ESX host.

Did you try your proposed fix and did it work? Are you sure the packet
hits the below if block and not the else block? I still don't think the
ICMP packet will go through the below if block.

   if (gdesc->rcd.csum) {
	skb->csum = htons(gdesc->rcd.csum);
	skb->ip_summed = CHECKSUM_PARTIAL;
   } else {
	skb_checksum_none_assert(skb);
   }

The vmxnet3 emulation does not calculate rcd.csum for ICMP packet and
hence should go through the else block i.e. checksum none.

Thanks,
Ronak

^ permalink raw reply

* Re: [PATCH net-next 1/1] qed*: Add link change count value to ethtool statistics display.
From: David Miller @ 2018-05-31 18:02 UTC (permalink / raw)
  To: sudarsana.kalluru; +Cc: netdev, ariel.elior
In-Reply-To: <20180529093124.22950-1-sudarsana.kalluru@cavium.com>

From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Date: Tue, 29 May 2018 02:31:24 -0700

> This patch adds driver changes for capturing the link change count in
> ethtool statistics display.
> 
> Please consider applying this to "net-next".
> 
> Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
> Signed-off-by: Ariel Elior <ariel.elior@cavium.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net-next 0/5] net: aquantia: various ethtool ops implementation
From: David Miller @ 2018-05-31 18:09 UTC (permalink / raw)
  To: igor.russkikh; +Cc: netdev, darcari, pavel.belous
In-Reply-To: <cover.1527596210.git.igor.russkikh@aquantia.com>

From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 29 May 2018 15:56:57 +0300

> In this patchset Anton Mikaev and I added some useful ethtool operations:
> - ring size changes
> - link renegotioation
> - flow control management
> 
> The patch also improves init/deinit sequence.

As noted the locking in patch #1 needs to be resolved.

^ permalink raw reply

* Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events
From: Doug Ledford @ 2018-05-31 18:08 UTC (permalink / raw)
  To: Saeed Mahameed, netdev, linux-rdma; +Cc: Leon Romanovsky, Jason Gunthorpe
In-Reply-To: <20180530175950.9488-1-saeedm@mellanox.com>

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

On Wed, 2018-05-30 at 10:59 -0700, Saeed Mahameed wrote:
> Hi, 
> 
> The following series is for mlx5-next tree [1], it adds the support of two
> new device events, from Ilan Tayari:
> 
> 1. High temperature warnings.
> 2. FPGA QP error event.
> 
> In case of no objection this series will be applied to mlx5-next tree
> and will be sent later as a pull request to both rdma and net trees.
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-next
> 
> v1->v2:
>   - improve commit message of the FPGA QP error event patch.
> 
> Thanks,
> Saeed.
> 
> Ilan Tayari (2):
>   net/mlx5: Add temperature warning event to log
>   net/mlx5: Add FPGA QP error event
> 
>  drivers/net/ethernet/mellanox/mlx5/core/eq.c | 28 +++++++++++++++++++-
>  include/linux/mlx5/device.h                  |  8 ++++++
>  include/linux/mlx5/mlx5_ifc.h                |  3 ++-
>  include/linux/mlx5/mlx5_ifc_fpga.h           | 16 +++++++++++
>  4 files changed, 53 insertions(+), 2 deletions(-)
> 

For the RDMA community, series ack:

Acked-by: Doug Ledford <dledford@redhat.com>

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH net-next v4 0/8] net: bridge: Notify about bridge VLANs
From: David Miller @ 2018-05-31 18:14 UTC (permalink / raw)
  To: petrm
  Cc: netdev, devel, bridge, jiri, idosch, razvan.stefanescu, gregkh,
	stephen, andrew, vivien.didelot, f.fainelli, nikolay,
	dan.carpenter
In-Reply-To: <cover.1527641426.git.petrm@mellanox.com>

From: Petr Machata <petrm@mellanox.com>
Date: Wed, 30 May 2018 02:55:34 +0200

> In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap
> mirror"), mlxsw got support for offloading mirror-to-gretap such that
> the underlay packet path involves a bridge. In that case, the offload is
> also influenced by PVID setting of said bridge. However, changes to VLAN
> configuration of the bridge itself do not generate switchdev
> notifications, so there's no mechanism to prod mlxsw to update the
> offload when these settings change.
> 
> In this patchset, the problem is resolved by distributing the switchdev
> notification SWITCHDEV_OBJ_ID_PORT_VLAN also for configuration changes
> on bridge VLANs. Since stacked devices distribute the notification to
> lower devices, such event eventually reaches the driver, which can
> determine whether it's a bridge or port VLAN by inspecting orig_dev.
> 
> To keep things consistent, the newly-distributed notifications observe
> the same protocol as the existing ones: dual prepare/commit, with
> -EOPNOTSUPP indicating lack of support, even though there's currently
> nothing to prepare for and nothing to support. Correspondingly, all
> switchdev drivers have been updated to return -EOPNOTSUPP for bridge
> VLAN notifications.
> 
> In patches #1 and #2, the code base is changed to support the following
> additions: functions br_switchdev_port_vlan_add() and
> br_switchdev_port_vlan_del() are introduced to simplify sending
> notifications; and br_vlan_add_existing() is introduced to later make it
> simpler to add error-handling code for the case of configuring a
> preexisting VLAN on bridge CPU port.
> 
> In patches #3-#6, respectively for mlxsw, rocker, DSA and DPAA2 ethsw,
> the new notifications (which are not enabled yet) are ignored to
> maintain the current behavior.
> 
> In patch #7, the notification is actually enabled.
> 
> In patch #8, mlxsw is changed to update offloads of mirror-to-gre also
> for bridge-related notifications.
 ...

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH net] net/sonic: Use dma_mapping_error()
From: David Miller @ 2018-05-31 18:18 UTC (permalink / raw)
  To: fthain; +Cc: tsbogend, netdev, linux-kernel
In-Reply-To: <cba8175deaf9d631ae000088aea1ccf1c444909b.1527649393.git.fthain@telegraphics.com.au>

From: Finn Thain <fthain@telegraphics.com.au>
Date: Wed, 30 May 2018 13:03:51 +1000

> With CONFIG_DMA_API_DEBUG=y, calling sonic_open() produces the
> message, "DMA-API: device driver failed to check map error".
> Add the missing dma_mapping_error() call.
> 
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume
From: Andrew Lunn @ 2018-05-31 18:30 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev@vger.kernel.org
In-Reply-To: <1d79c2ae-6f63-694f-6c63-6369c854de69@gmail.com>

> By the way: The problem is related to an experimental patch series for
> splitting r8169/r8168 drivers and switching r8168 to phylib.
> Therefore the change to r8168.c won't apply to existing kernel code.

Hi Heiner

I still think you are trying to fix the wrong problem.

Lets take a look at these patches, particularly your code for
interfacing to phylib.

Thanks
	Andrew

^ permalink raw reply

* Re: [PATCH net-next v12 2/5] netvsc: refactor notifier/event handling code to use the failover framework
From: Michael S. Tsirkin @ 2018-05-31 18:35 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Sridhar Samudrala, davem, netdev, virtualization, virtio-dev,
	jesse.brandeburg, alexander.h.duyck, kubakici, jasowang,
	loseweigh, jiri, aaron.f.brown, anjali.singhai
In-Reply-To: <20180530220635.206ee6d7@shemminger-XPS-13-9360>

On Wed, May 30, 2018 at 10:06:35PM -0400, Stephen Hemminger wrote:
> On Thu, 24 May 2018 09:55:14 -0700
> Sridhar Samudrala <sridhar.samudrala@intel.com> wrote:
> 
> > Use the registration/notification framework supported by the generic
> > failover infrastructure.
> > 
> > Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> 
> Why was this merged? It was never signed off by any of the netvsc maintainers,
> and there were still issues unresolved.
> 
> There are also namespaces issues I am fixing and this breaks them.
> Will start my patch set with a revert for this. Sorry

As long as you finish the patch set with re-integrating with failover,
that's fine IMHO.

I suspect it's easier to add the code to failover though - namespace
things likely affect virtio as well. Lookup by ID would be an optional
feature for virtio, but probably a useful one - I won't ask you
to add it to virtio but it could be a mode in failover
that virtio will activate down the road. And reducing the number of
times we look cards up based on ID can only be a good thing.

-- 
MST

^ permalink raw reply

* Re: [PATCH net-next 0/2] cls_flower: Various fixes
From: David Miller @ 2018-05-31 18:36 UTC (permalink / raw)
  To: paulb
  Cc: jiri, xiyou.wangcong, jhs, netdev, kliteyn, roid, shahark, markb,
	ogerlitz
In-Reply-To: <1527668258-27174-1-git-send-email-paulb@mellanox.com>

From: Paul Blakey <paulb@mellanox.com>
Date: Wed, 30 May 2018 11:17:36 +0300

> Two of the fixes are for my multiple mask patch

This series doesn't apply cleanly to net-next.

Please respin.

^ permalink raw reply

* Re: [PATCH net-next] netfilter: nf_tables: check msg_type before nft_trans_set(trans)
From: Florian Westphal @ 2018-05-31 19:07 UTC (permalink / raw)
  To: Alexey Kodanev
  Cc: netfilter-devel, Pablo Neira Ayuso, Jozsef Kadlecsik,
	Florian Westphal, coreteam, netdev
In-Reply-To: <1527785613-32005-1-git-send-email-alexey.kodanev@oracle.com>

Alexey Kodanev <alexey.kodanev@oracle.com> wrote:
> The patch moves the "trans->msg_type == NFT_MSG_NEWSET" check before
> using nft_trans_set(trans). Otherwise we can get out of bounds read.

Indeed, thanks for fixining this.

Acked-by: Florian Westphal <fw@strlen.de>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox