Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] hsr: fix coding style issues
From: David Miller @ 2017-06-06 20:09 UTC (permalink / raw)
  To: m-karicheri2; +Cc: arvid.brodin, netdev, linux-kernel
In-Reply-To: <1496701907-29376-1-git-send-email-m-karicheri2@ti.com>


Please do not mix cleanups with legitimate bug fixes.  Also, when posting
a multi-patch series, you must always provide an appropriate "[PATCH 0/N]"
header posting that describes what you series is doing at a high level,
how it is doing it, and why it is doing it that way.

For this, submit the erroneous warning removal against 'net' as a single
patch.  And then once that propagates into the 'net-next' tree you can
submit the coding style cleanups against 'net-next', thanks.

^ permalink raw reply

* Re: [PATCH v2 3/4] net: macb: macb.c changed to macb_main.c
From: Richard Cochran @ 2017-06-06 20:22 UTC (permalink / raw)
  To: David Miller
  Cc: rafalo-vna1KIf7WgpBDgjK7y7TUQ,
	nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	harini.katakam-gjFFaj9aHVfQT0dZR+AlfA,
	andrei.pistirica-UWL1GkI3JZL3oGB3hsPCZA
In-Reply-To: <20170606.150015.1247326483451270973.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Tue, Jun 06, 2017 at 03:00:15PM -0400, David Miller wrote:
> He's adjusting the Makefile so that it build macb_main.c into macb.o

Duh, sorry, brain shutting down...

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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

* Re: [PATCH] net: ethoc: enable NAPI before poll may be scheduled
From: David Miller @ 2017-06-06 20:24 UTC (permalink / raw)
  To: jcmvbkbc; +Cc: netdev, f.fainelli, thierry.reding, tklauser, stable
In-Reply-To: <1496712676-11862-1-git-send-email-jcmvbkbc@gmail.com>

From: Max Filippov <jcmvbkbc@gmail.com>
Date: Mon,  5 Jun 2017 18:31:16 -0700

> ethoc_reset enables device interrupts, ethoc_interrupt may schedule a
> NAPI poll before NAPI is enabled in the ethoc_open, which results in
> device being unable to send or receive anything until it's closed and
> reopened. In case the device is flooded with ingress packets it may be
> unable to recover at all.
> Move napi_enable above ethoc_reset in the ethoc_open to fix that.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net-next] tun: use symmetric hash
From: David Miller @ 2017-06-06 20:24 UTC (permalink / raw)
  To: jasowang; +Cc: netdev, linux-kernel, mst
In-Reply-To: <1496729389-15221-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Tue,  6 Jun 2017 14:09:49 +0800

> Tun actually expects a symmetric hash for queue selecting to work
> correctly, otherwise packets belongs to a single flow may be
> redirected to the wrong queue. So this patch switch to use
> __skb_get_hash_symmetric().
> 
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] net: stmmac: fix completely hung TX when using TSO
From: David Miller @ 2017-06-06 20:25 UTC (permalink / raw)
  To: niklas.cassel
  Cc: peppe.cavallaro, alexandre.torgue, niklass, netdev, linux-kernel
In-Reply-To: <20170606072501.16560-1-niklas.cassel@axis.com>

From: Niklas Cassel <niklas.cassel@axis.com>
Date: Tue, 6 Jun 2017 09:25:00 +0200

> stmmac_tso_allocator can fail to set the Last Descriptor bit
> on a descriptor that actually was the last descriptor.
> 
> This happens when the buffer of the last descriptor ends
> up having a size of exactly TSO_MAX_BUFF_SIZE.
> 
> When the IP eventually reaches the next last descriptor,
> which actually has the bit set, the DMA will hang.
> 
> When the DMA hangs, we get a tx timeout, however,
> since stmmac does not do a complete reset of the IP
> in stmmac_tx_timeout, we end up in a state with
> completely hung TX.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>

Applied and queued up for -stable, thank you.

^ permalink raw reply

* Re: [PATCH net-next v2 1/2] bpf: Allow CGROUP_SKB eBPF program to access sk_buff
From: David Miller @ 2017-06-06 20:26 UTC (permalink / raw)
  To: fengc; +Cc: daniel, chenbofeng.kernel, netdev, lorenzo, ast
In-Reply-To: <CAMOXUJ=mUKvMMFnjfOUHuGms+p2fE+NkwEcORdV9eLBsFwyREQ@mail.gmail.com>

From: Chenbo Feng <fengc@google.com>
Date: Tue, 6 Jun 2017 13:24:11 -0700

> On Tue, Jun 6, 2017 at 9:40 AM, Daniel Borkmann <daniel@iogearbox.net>
> wrote:
> 
>> On 06/06/2017 02:04 PM, Daniel Borkmann wrote:
>>
>>> On 06/01/2017 03:15 AM, Chenbo Feng wrote:
>>>
>>>> From: Chenbo Feng <fengc@google.com>
>>>>
>>>> This allows cgroup eBPF program to classify packet based on their
>>>> protocol or other detail information. Currently program need
>>>> CAP_NET_ADMIN privilege to attach a cgroup eBPF program, and A
>>>> process with CAP_NET_ADMIN can already see all packets on the system,
>>>> for example, by creating an iptables rules that causes the packet to
>>>> be passed to userspace via NFLOG.
>>>>
>>>> Signed-off-by: Chenbo Feng <fengc@google.com>
>>>>
>>>
>>> Sorry, but I am puzzled what above change log has to do with the
>>> below diff?! Back then we decided not to add BPF_PROG_TYPE_CGROUP_SKB
>>> to may_access_skb(), since one can already use bpf_skb_load_bytes()
>>> helper to access pkt data, which is a much more flexible interface.
>>> Mind to elaborate why you cannot use bpf_skb_load_bytes() instead?
>>>
>>
>> See my other email [1], this one is also problematic wrt SKF_LL_OFF.
>>
>>   [1] http://patchwork.ozlabs.org/patch/771946/
> 
> 
> Oh sorry I just find out the bpf_skb_load_bytes helper already can achieve
> the goal. There is no point to add my patch then. Thanks you for pointing
> it out and fixing it.

If something now needs to be reverted, you need to send that revert to me.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next v2 1/2] bpf: Allow CGROUP_SKB eBPF program to access sk_buff
From: Daniel Borkmann @ 2017-06-06 20:27 UTC (permalink / raw)
  To: David Miller, fengc; +Cc: chenbofeng.kernel, netdev, lorenzo, ast
In-Reply-To: <20170606.162602.345656836042086290.davem@davemloft.net>

On 06/06/2017 10:26 PM, David Miller wrote:
> From: Chenbo Feng <fengc@google.com>
> Date: Tue, 6 Jun 2017 13:24:11 -0700
>
>> On Tue, Jun 6, 2017 at 9:40 AM, Daniel Borkmann <daniel@iogearbox.net>
>> wrote:
>>
>>> On 06/06/2017 02:04 PM, Daniel Borkmann wrote:
>>>
>>>> On 06/01/2017 03:15 AM, Chenbo Feng wrote:
>>>>
>>>>> From: Chenbo Feng <fengc@google.com>
>>>>>
>>>>> This allows cgroup eBPF program to classify packet based on their
>>>>> protocol or other detail information. Currently program need
>>>>> CAP_NET_ADMIN privilege to attach a cgroup eBPF program, and A
>>>>> process with CAP_NET_ADMIN can already see all packets on the system,
>>>>> for example, by creating an iptables rules that causes the packet to
>>>>> be passed to userspace via NFLOG.
>>>>>
>>>>> Signed-off-by: Chenbo Feng <fengc@google.com>
>>>>>
>>>>
>>>> Sorry, but I am puzzled what above change log has to do with the
>>>> below diff?! Back then we decided not to add BPF_PROG_TYPE_CGROUP_SKB
>>>> to may_access_skb(), since one can already use bpf_skb_load_bytes()
>>>> helper to access pkt data, which is a much more flexible interface.
>>>> Mind to elaborate why you cannot use bpf_skb_load_bytes() instead?
>>>>
>>>
>>> See my other email [1], this one is also problematic wrt SKF_LL_OFF.
>>>
>>>    [1] http://patchwork.ozlabs.org/patch/771946/
>>
>>
>> Oh sorry I just find out the bpf_skb_load_bytes helper already can achieve
>> the goal. There is no point to add my patch then. Thanks you for pointing
>> it out and fixing it.
>
> If something now needs to be reverted, you need to send that revert to me.

It's sitting here: http://patchwork.ozlabs.org/patch/771946/

^ permalink raw reply

* Re: [PATCH] net: stmmac: fix a broken u32 less than zero check
From: David Miller @ 2017-06-06 20:27 UTC (permalink / raw)
  To: colin.king
  Cc: peppe.cavallaro, alexandre.torgue, netdev, kernel-janitors,
	linux-kernel
In-Reply-To: <20170606131049.26887-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Tue,  6 Jun 2017 14:10:49 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The check that queue is less or equal to zero is always true
> because queue is a u32; queue is decremented and will wrap around
> and never go -ve. Fix this by making queue an int.
> 
> Detected by CoverityScan, CID#1428988 ("Unsigned compared against 0")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks Colin.

^ permalink raw reply

* Re: [PATCH v4] net: don't call strlen on non-terminated string in dev_set_alias()
From: David Miller @ 2017-06-06 20:36 UTC (permalink / raw)
  To: glider; +Cc: dvyukov, kcc, edumazet, stephen, linux-kernel, netdev
In-Reply-To: <20170606135654.111884-1-glider@google.com>

From: Alexander Potapenko <glider@google.com>
Date: Tue,  6 Jun 2017 15:56:54 +0200

> KMSAN reported a use of uninitialized memory in dev_set_alias(),
> which was caused by calling strlcpy() (which in turn called strlen())
> on the user-supplied non-terminated string.
> 
> Signed-off-by: Alexander Potapenko <glider@google.com>

We should not be allowing non-NULL terminated strings for the
IFLA_IFALIAS attribute.  It's defined as type NLA_STRING in
the ifla_policy[] array.

Please figure out why we aren't enforcing the attribute policy
properly, rather than adding a workaround.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] bpf: cgroup skb progs cannot access ld_abs/ind
From: David Miller @ 2017-06-06 20:40 UTC (permalink / raw)
  To: daniel; +Cc: netdev, fengc, ast
In-Reply-To: <1851c3df45588eb96803995a3ceff32819612386.1496766858.git.daniel@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Tue,  6 Jun 2017 18:38:04 +0200

> Commit fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to
> access sk_buff") enabled programs of BPF_PROG_TYPE_CGROUP_SKB
> type to use ld_abs/ind instructions. However, at this point,
> we cannot use them, since offsets relative to SKF_LL_OFF will
> end up pointing skb_mac_header(skb) out of bounds since in the
> egress path it is not yet set at that point in time, but only
> after __dev_queue_xmit() did a general reset on the mac header.
> bpf_internal_load_pointer_neg_helper() will then end up reading
> data from a wrong offset.
> 
> BPF_PROG_TYPE_CGROUP_SKB programs can use bpf_skb_load_bytes()
> already to access packet data, which is also more flexible than
> the insns carried over from cBPF.
> 
> Fixes: fb9a307d11d6 ("bpf: Allow CGROUP_SKB eBPF program to access sk_buff")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Acked-by: Alexei Starovoitov <ast@kernel.org>

Aha, I see, applied.

Thanks!

^ permalink raw reply

* Re: [PATCH net-next v2 1/2] bpf: Allow CGROUP_SKB eBPF program to access sk_buff
From: David Miller @ 2017-06-06 20:40 UTC (permalink / raw)
  To: daniel; +Cc: fengc, chenbofeng.kernel, netdev, lorenzo, ast
In-Reply-To: <59371023.605@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Tue, 06 Jun 2017 22:27:15 +0200

> On 06/06/2017 10:26 PM, David Miller wrote:
>> From: Chenbo Feng <fengc@google.com>
>> Date: Tue, 6 Jun 2017 13:24:11 -0700
>>
>>> On Tue, Jun 6, 2017 at 9:40 AM, Daniel Borkmann <daniel@iogearbox.net>
>>> wrote:
>>>
>>>> On 06/06/2017 02:04 PM, Daniel Borkmann wrote:
>>>>
>>>>> On 06/01/2017 03:15 AM, Chenbo Feng wrote:
>>>>>
>>>>>> From: Chenbo Feng <fengc@google.com>
>>>>>>
>>>>>> This allows cgroup eBPF program to classify packet based on their
>>>>>> protocol or other detail information. Currently program need
>>>>>> CAP_NET_ADMIN privilege to attach a cgroup eBPF program, and A
>>>>>> process with CAP_NET_ADMIN can already see all packets on the system,
>>>>>> for example, by creating an iptables rules that causes the packet to
>>>>>> be passed to userspace via NFLOG.
>>>>>>
>>>>>> Signed-off-by: Chenbo Feng <fengc@google.com>
>>>>>>
>>>>>
>>>>> Sorry, but I am puzzled what above change log has to do with the
>>>>> below diff?! Back then we decided not to add BPF_PROG_TYPE_CGROUP_SKB
>>>>> to may_access_skb(), since one can already use bpf_skb_load_bytes()
>>>>> helper to access pkt data, which is a much more flexible interface.
>>>>> Mind to elaborate why you cannot use bpf_skb_load_bytes() instead?
>>>>>
>>>>
>>>> See my other email [1], this one is also problematic wrt SKF_LL_OFF.
>>>>
>>>>    [1] http://patchwork.ozlabs.org/patch/771946/
>>>
>>>
>>> Oh sorry I just find out the bpf_skb_load_bytes helper already can
>>> achieve
>>> the goal. There is no point to add my patch then. Thanks you for
>>> pointing
>>> it out and fixing it.
>>
>> If something now needs to be reverted, you need to send that revert to
>> me.
> 
> It's sitting here: http://patchwork.ozlabs.org/patch/771946/

I see that now, applied to net-next, thanks!

^ permalink raw reply

* Re: [PATCH v2 1/1] e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails
From: Jeff Kirsher @ 2017-06-06 20:46 UTC (permalink / raw)
  To: David Miller, jani.nikula
  Cc: daniel.vetter, airlied, intel-gfx, dri-devel, jani.nikula,
	intel-wired-lan, netdev, linux-kernel, chris, tvrtko.ursulin,
	davidx.m.ertman, bruce.w.allan
In-Reply-To: <20170602.141426.713378366601051907.davem@davemloft.net>

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

On Fri, 2017-06-02 at 14:14 -0400, David Miller wrote:
> From: Jani Nikula <jani.nikula@intel.com>
> Date: Wed, 31 May 2017 18:50:43 +0300
> 
> > From: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > An error during suspend (e100e_pm_suspend),
> 
>  ...
> > lead to complete failure:
> 
>  ...
> > The unwind failures stems from commit 2800209994f8 ("e1000e:
> > Refactor PM
> > flows"), but it may be a later patch that introduced the non-
> > recoverable
> > behaviour.
> > 
> > Fixes: 2800209994f8 ("e1000e: Refactor PM flows")
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99847
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > Cc: Dave Ertman <davidx.m.ertman@intel.com>
> > Cc: Bruce Allan <bruce.w.allan@intel.com>
> > Cc: intel-wired-lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > [Jani: bikeshed repainted]
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> Jeff, please make sure this gets submitted to me soon.

Expect it later tonight, just finishing up testing.

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

^ permalink raw reply

* Re: [PATCH net-next v2 2/3] udp: avoid a cache miss on dequeue
From: Eric Dumazet @ 2017-06-06 20:53 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: netdev, David S. Miller, Eric Dumazet
In-Reply-To: <25a17e660ebc766ef6af918d7607dde4706f0c23.1496756090.git.pabeni@redhat.com>

On Tue, 2017-06-06 at 16:23 +0200, Paolo Abeni wrote:
> Since UDP no more uses sk->destructor, we can clear completely
> the skb head state before enqueuing. Amend and use
> skb_release_head_state() for that.
> 
> All head states share a single cacheline, which is not
> normally used/accesses on dequeue. We can avoid entirely accessing
> such cacheline implementing and using in the UDP code a specialized
> skb free helper which ignores the skb head state.
> 
> This saves a cacheline miss at skb deallocation time.

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* [PATCH net-next 0/5] net: dsa: add cross-chip VLAN support
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot

The current code in DSA does not support cross-chip VLAN. This means
that in a multi-chip environment such as this one (similar to ZII Rev B)

         [CPU].................... (mdio)
    (eth0) |   :       :          :
          _|_____    _______    _______
         [__sw0__]--[__sw1__]--[__sw2__]
          |  |  |    |  |  |    |  |  |
          v  v  v    v  v  v    v  v  v
          p1 p2 p3   p4 p5 p6   p7 p8 p9 

adding a VLAN to p9 won't be enough to reach the CPU, until at least one
port of sw0 and sw1 join the VLAN as well and become aware of the VID.

This patchset makes the DSA core program the VLAN on the CPU and DSA
links itself, which brings seamlessly cross-chip VLAN support to DSA.

With this series applied*, the hardware VLAN tables of a 3-switch setup
look like this after adding a VLAN to only one port of the end switch:

    # cat /sys/class/net/br0/bridge/default_pvid 
    42
    # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu
    # ip link set up master br0 dev lan6
    # cat /sys/kernel/debug/mv88e6xxx/sw{0,1,2}/vtu
     VID  FID  SID  0  1  2  3  4  5  6
      42    1    0  x  x  x  x  x  =  =
     VID  FID  SID  0  1  2  3  4  5  6
      42    1    0  x  x  x  x  x  =  =
     VID  FID  SID  0  1  2  3  4  5  6  7  8  9
      42    1    0  u  x  x  x  x  x  x  x  x  =

('x' is excluded, 'u' is untagged, '=' is unmodified DSA and CPU ports.)

Completely removing a VLAN entry (which is currently the responsibility
of drivers anyway) is not supported yet since it requires some caching.

(*) the output is shown from this out-of-tree debugfs patch:
https://github.com/vivien/linux/commit/7b61a684b9d6b6a499135a587c7f62a1fddceb8b.patch

Vivien Didelot (5):
  net: dsa: mv88e6xxx: define membership on VLAN add
  net: dsa: check VLAN capability of every switch
  net: dsa: add CPU and DSA ports as VLAN members
  net: dsa: mv88e6xxx: exclude all ports in new VLAN
  net: dsa: mv88e6xxx: do not purge a VTU entry

 drivers/net/dsa/mv88e6xxx/chip.c | 38 +++++++++++++++-----------------------
 net/dsa/switch.c                 | 30 ++++++++++++++++++++----------
 2 files changed, 35 insertions(+), 33 deletions(-)

-- 
2.13.0

^ permalink raw reply

* [PATCH net-next 1/5] net: dsa: mv88e6xxx: define membership on VLAN add
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot
In-Reply-To: <20170606205631.22880-1-vivien.didelot@savoirfairelinux.com>

Define the target port membership of the VLAN entry in
mv88e6xxx_port_vlan_add where ds is scoped.

Allow the DSA core to call later the port_vlan_add operation for CPU or
DSA ports, by using the Unmodified membership for these ports, as in the
current behavior.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 117f275e3fb6..93078bbe3cb5 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1274,7 +1274,7 @@ mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
 }
 
 static int _mv88e6xxx_port_vlan_add(struct mv88e6xxx_chip *chip, int port,
-				    u16 vid, bool untagged)
+				    u16 vid, u8 member)
 {
 	struct mv88e6xxx_vtu_entry vlan;
 	int err;
@@ -1283,9 +1283,7 @@ static int _mv88e6xxx_port_vlan_add(struct mv88e6xxx_chip *chip, int port,
 	if (err)
 		return err;
 
-	vlan.member[port] = untagged ?
-		GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED :
-		GLOBAL_VTU_DATA_MEMBER_TAG_TAGGED;
+	vlan.member[port] = member;
 
 	return mv88e6xxx_vtu_loadpurge(chip, &vlan);
 }
@@ -1297,15 +1295,23 @@ static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
 	struct mv88e6xxx_chip *chip = ds->priv;
 	bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
 	bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
+	u8 member;
 	u16 vid;
 
 	if (!chip->info->max_vid)
 		return;
 
+	if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+		member = GLOBAL_VTU_DATA_MEMBER_TAG_UNMODIFIED;
+	else if (untagged)
+		member = GLOBAL_VTU_DATA_MEMBER_TAG_UNTAGGED;
+	else
+		member = GLOBAL_VTU_DATA_MEMBER_TAG_TAGGED;
+
 	mutex_lock(&chip->reg_lock);
 
 	for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid)
-		if (_mv88e6xxx_port_vlan_add(chip, port, vid, untagged))
+		if (_mv88e6xxx_port_vlan_add(chip, port, vid, member))
 			netdev_err(ds->ports[port].netdev,
 				   "failed to add VLAN %d%c\n",
 				   vid, untagged ? 'u' : 't');
-- 
2.13.0

^ permalink raw reply related

* [PATCH net-next 2/5] net: dsa: check VLAN capability of every switch
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot
In-Reply-To: <20170606205631.22880-1-vivien.didelot@savoirfairelinux.com>

Now that the VLAN object is propagated to every switch chip of the
switch fabric, we can easily ensure that they all support the required
VLAN operations before modifying an entry on a single switch.

To achieve that, remove the condition skipping other target switches,
and add a bitmap of VLAN members, eventually containing the target port,
if we are programming the switch target.

This will allow us to easily add other VLAN members, such as the DSA or
CPU ports (to introduce cross-chip VLAN support) or the other port
members if we want to reduce hardware accesses later.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 net/dsa/switch.c | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index d8e5c311ee7c..f235ae1e9777 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -159,19 +159,27 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
 {
 	const struct switchdev_obj_port_vlan *vlan = info->vlan;
 	struct switchdev_trans *trans = info->trans;
+	DECLARE_BITMAP(members, ds->num_ports);
+	int port, err;
 
-	/* Do not care yet about other switch chips of the fabric */
-	if (ds->index != info->sw_index)
-		return 0;
+	/* Build a mask of VLAN members */
+	bitmap_zero(members, ds->num_ports);
+	if (ds->index == info->sw_index)
+		set_bit(info->port, members);
 
 	if (switchdev_trans_ph_prepare(trans)) {
 		if (!ds->ops->port_vlan_prepare || !ds->ops->port_vlan_add)
 			return -EOPNOTSUPP;
 
-		return ds->ops->port_vlan_prepare(ds, info->port, vlan, trans);
+		for_each_set_bit(port, members, ds->num_ports) {
+			err = ds->ops->port_vlan_prepare(ds, port, vlan, trans);
+			if (err)
+				return err;
+		}
 	}
 
-	ds->ops->port_vlan_add(ds, info->port, vlan, trans);
+	for_each_set_bit(port, members, ds->num_ports)
+		ds->ops->port_vlan_add(ds, port, vlan, trans);
 
 	return 0;
 }
@@ -181,14 +189,13 @@ static int dsa_switch_vlan_del(struct dsa_switch *ds,
 {
 	const struct switchdev_obj_port_vlan *vlan = info->vlan;
 
-	/* Do not care yet about other switch chips of the fabric */
-	if (ds->index != info->sw_index)
-		return 0;
-
 	if (!ds->ops->port_vlan_del)
 		return -EOPNOTSUPP;
 
-	return ds->ops->port_vlan_del(ds, info->port, vlan);
+	if (ds->index == info->sw_index)
+		return ds->ops->port_vlan_del(ds, info->port, vlan);
+
+	return 0;
 }
 
 static int dsa_switch_event(struct notifier_block *nb,
-- 
2.13.0

^ permalink raw reply related

* [PATCH net-next 3/5] net: dsa: add CPU and DSA ports as VLAN members
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot
In-Reply-To: <20170606205631.22880-1-vivien.didelot@savoirfairelinux.com>

In a multi-chip switch fabric, it is currently the responsibility of the
driver to add the CPU or DSA (interconnecting chips together) ports as
members of a new VLAN entry. This makes the drivers more complicated.

We want the DSA drivers to be stupid and the DSA core being the one
responsible for caring about the abstracted switch logic and topology.

Make the DSA core program the CPU and DSA ports as part of the VLAN.

This makes all chips of the data path to be aware of VIDs spanning the
the whole fabric and thus, seamlessly add support for cross-chip VLAN.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 net/dsa/switch.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index f235ae1e9777..f913cdfe6585 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -166,6 +166,9 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds,
 	bitmap_zero(members, ds->num_ports);
 	if (ds->index == info->sw_index)
 		set_bit(info->port, members);
+	for (port = 0; port < ds->num_ports; ++port)
+		if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
+			set_bit(port, members);
 
 	if (switchdev_trans_ph_prepare(trans)) {
 		if (!ds->ops->port_vlan_prepare || !ds->ops->port_vlan_add)
-- 
2.13.0

^ permalink raw reply related

* [PATCH net-next 4/5] net: dsa: mv88e6xxx: exclude all ports in new VLAN
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot
In-Reply-To: <20170606205631.22880-1-vivien.didelot@savoirfairelinux.com>

Now that the DSA core adds the CPU and DSA ports itself to the new VLAN
entry, there is no need to include them as members of this VLAN when
initializing a new VTU entry.

As of now, initialize a new VTU entry with all ports excluded.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 93078bbe3cb5..522f023bb17e 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1159,11 +1159,10 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid,
 		entry->valid = true;
 		entry->vid = vid;
 
-		/* Include only CPU and DSA ports */
+		/* Exclude all ports */
 		for (i = 0; i < mv88e6xxx_num_ports(chip); ++i)
-			entry->member[i] = dsa_is_normal_port(chip->ds, i) ?
-				GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER :
-				GLOBAL_VTU_DATA_MEMBER_TAG_UNMODIFIED;
+			entry->member[i] =
+				GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER;
 
 		return mv88e6xxx_atu_new(chip, &entry->fid);
 	}
-- 
2.13.0

^ permalink raw reply related

* [PATCH net-next 5/5] net: dsa: mv88e6xxx: do not purge a VTU entry
From: Vivien Didelot @ 2017-06-06 20:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot
In-Reply-To: <20170606205631.22880-1-vivien.didelot@savoirfairelinux.com>

The mv88e6xxx driver currently tries to be smart and remove by itself a
VLAN entry from the VTU when the driven switch sees no user ports as
members of the VLAN.

This is bad in a multi-chip switch fabric, since a chip in between
others may have no bridge port members, but still needs to be aware of
the VID in order to correctly pass frames in the data path.

Remove the code purging a VTU entry when updating a port membership.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 522f023bb17e..64c0f88f9e79 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1325,9 +1325,8 @@ static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
 static int _mv88e6xxx_port_vlan_del(struct mv88e6xxx_chip *chip,
 				    int port, u16 vid)
 {
-	struct dsa_switch *ds = chip->ds;
 	struct mv88e6xxx_vtu_entry vlan;
-	int i, err;
+	int err;
 
 	err = mv88e6xxx_vtu_get(chip, vid, &vlan, false);
 	if (err)
@@ -1339,18 +1338,6 @@ static int _mv88e6xxx_port_vlan_del(struct mv88e6xxx_chip *chip,
 
 	vlan.member[port] = GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER;
 
-	/* keep the VLAN unless all ports are excluded */
-	vlan.valid = false;
-	for (i = 0; i < mv88e6xxx_num_ports(chip); ++i) {
-		if (dsa_is_cpu_port(ds, i) || dsa_is_dsa_port(ds, i))
-			continue;
-
-		if (vlan.member[i] != GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER) {
-			vlan.valid = true;
-			break;
-		}
-	}
-
 	err = mv88e6xxx_vtu_loadpurge(chip, &vlan);
 	if (err)
 		return err;
-- 
2.13.0

^ permalink raw reply related

* [GIT] Networking
From: David Miller @ 2017-06-06 20:57 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) Made TCP congestion control documentation match current reality,
   from Anmol Sarma.

2) Various build warning and failure fixes from Arnd Bergmann.

3) Fix SKB list leak in ipv6_gso_segment().

4) Use after free in ravb driver, from Eugeniu Rosca.

5) Don't use udp_poll() in ping protocol driver, from Eric Dumazet.

6) Don't crash in PCI error recovery of cxgb4 driver, from Guilherme
   G. Piccoli.

7) _SRC_NAT_DONE_BIT needs to be cleared using atomics, from Liping Zhang.

8) Use after free in vxlan deletion, from Mark Bloch.

9) Fix ordering of NAPI poll enabled in ethoc driver, from Max Filippov.

10) Fix stmmac hangs with TSO, from Niklas Cassel.

11) Fix crash in CALIPSO ipv6, from Richard Haines.

12) Clear nh_flags properly on mpls link up.  From Roopa Prabhu.

13) Fix regression in sk_err socket error queue handling, noticed by
    ping applications.  From Soheil Hassas Yeganeh.

14) Update mlx4/mlx5 MAINTAINERS information.

Please pull, thanks a lot!

The following changes since commit e2a9aa5ab2a4d1fb05fcdfa9661d54e437093297:

  Merge tag 'led_fixes_for_4-12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds (2017-05-26 14:02:30 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 

for you to fetch changes up to 1d3028f4c16487d63861ab6c68451768a7a109df:

  net: stmmac: fix a broken u32 less than zero check (2017-06-06 16:26:28 -0400)

----------------------------------------------------------------
Andrew Lunn (2):
      net: dsa: mv88e6xxx: Add eeprom-length to binding
      net: dsa: mv88e6xxx: Add missing static to stub functions

Anmol Sarma (1):
      net: Update TCP congestion control documentation

Arend Van Spriel (1):
      brcmfmac: fix alignment configuration on host using 64-bit DMA

Arnd Bergmann (2):
      net: dsa: mv88e6xxx: Add missing static to stub functions
      net/mlx5: avoid build warning for uniprocessor

Ben Hutchings (1):
      ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()

Bjorn Andersson (1):
      wcn36xx: Close SMD channel on device removal

Björn Töpel (1):
      i40e/i40evf: proper update of the page_offset field

Chopra, Manish (1):
      qlcnic: Fix tunnel offload for 82xx adapters

Colin Ian King (2):
      net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value
      net: stmmac: fix a broken u32 less than zero check

David S. Miller (8):
      Merge git://git.kernel.org/.../pablo/nf
      Merge branch 'mlx4-mlx5-MAINTAINERS-update'
      Merge branch 'ARM-imx6ul-14x14-evk-Fix-suspend-over-nfs-by-phy'
      Merge tag 'mac80211-for-davem-2017-06-02' of git://git.kernel.org/.../jberg/mac80211
      ipv6: Fix leak in ipv6_gso_segment().
      Revert "sit: reload iphdr in ipip6_rcv"
      Merge branch '40GbE' of git://git.kernel.org/.../jkirsher/net-queue
      Merge tag 'wireless-drivers-for-davem-2017-06-06' of git://git.kernel.org/.../kvalo/wireless-drivers

Davide Caratti (1):
      netfilter: conntrack: fix false CRC32c mismatch using paged skb

Douglas Caetano dos Santos (1):
      tcp: reinitialize MTU probing when setting MSS in a TCP repair

Emmanuel Grumbach (1):
      iwlwifi: mvm: fix firmware debug restart recording

Eric Dumazet (1):
      net: ping: do not abuse udp_poll()

Eric Garver (1):
      geneve: fix needed_headroom and max_mtu for collect_metadata

Eugeniu Rosca (1):
      ravb: Fix use-after-free on `ifconfig eth0 down`

Firo Yang (1):
      hdlcdrv: Fix divide by zero in hdlcdrv_ioctl

Florian Fainelli (3):
      net: systemport: Fix missing Wake-on-LAN interrupt for SYSTEMPORT Lite
      net: dsa: Move dsa_switch_{suspend,resume} out of legacy.c
      net: dsa: Fix stale cpu_switch reference after unbind then bind

Ganesh Goudar (2):
      cxgb4: update latest firmware version supported
      cxgb4: avoid enabling napi twice to the same queue

Gregory Greenman (1):
      iwlwifi: mvm: rs: start using LQ command color

Guilherme G. Piccoli (1):
      cxgb4: avoid crash on PCI error recovery path

Gustavo A. R. Silva (1):
      net: freescale: fix potential null pointer dereference

Haim Dreyfuss (1):
      iwlwifi: mvm: Fix command queue number on d0i3 flow

Haishuang Yan (2):
      sit: reload iphdr in ipip6_rcv
      devlink: fix potential memort leak

Ido Shamay (1):
      net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport

Jia-Ju Bai (3):
      isdn: Fix a sleep-in-atomic bug
      qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M
      mISDN: Fix a sleep-in-atomic bug

Johannes Berg (4):
      mac80211: fix TX aggregation start/stop callback race
      mac80211: fix dropped counter in multiqueue RX
      iwlwifi: tt: move ucode_loaded check under mutex
      iwlwifi: mvm: clear new beacon command template struct

Kalle Valo (1):
      Merge tag 'iwlwifi-for-kalle-2017-06-05' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes

Lance Richardson (1):
      vxlan: eliminate cached dst leak

Leonard Crestez (2):
      ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties
      net: phy: micrel: Restore led_mode and clk_sel on resume

Liad Kaufman (1):
      iwlwifi: mvm: support ibss in dqa mode

Liam McBirnie (1):
      ip6_tunnel: fix traffic class routing for tunnels

Liping Zhang (2):
      netfilter: nat: use atomic bit op to clear the _SRC_NAT_DONE_BIT
      netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize

Luca Coelho (3):
      iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3
      iwlwifi: mvm: don't fail when removing a key from an inexisting sta
      iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265

Madalin Bucur (1):
      Documentation: networking: add DPAA Ethernet document

Mark Bloch (1):
      vxlan: fix use-after-free on deletion

Mauro S. M. Rodrigues (1):
      i40e: Fix state flags for bit set and clean operations of PF

Max Filippov (1):
      net: ethoc: enable NAPI before poll may be scheduled

Michael S. Tsirkin (1):
      virtio_net: lower limit on buffer size

Michal Hocko (1):
      amd-xgbe: use PAGE_ALLOC_COSTLY_ORDER in xgbe_map_rx_buffer

Mintz, Yuval (2):
      qed: Don't log missing periodic stats by default
      bnx2x: Fix Multi-Cos

Nicolas Dichtel (1):
      netlink: don't send unknown nsid

Niklas Cassel (1):
      net: stmmac: fix completely hung TX when using TSO

Nikolay Aleksandrov (2):
      net: bridge: start hello timer only if device is up
      net: bridge: fix a null pointer dereference in br_afspec

Pablo Neira Ayuso (1):
      netfilter: nft_set_rbtree: handle element re-addition after deletion

Randy Dunlap (1):
      net: phy: fix kernel-doc warnings

Richard Haines (1):
      net/ipv6: Fix CALIPSO causing GPF with datagram support

Roopa Prabhu (1):
      mpls: fix clearing of dead nh_flags on link up

Russell King (2):
      net: phy: fix marvell phy status reading
      net: fix auto-loading of Marvell DSA driver

Shahar S Matityahu (1):
      iwlwifi: fix host command memory leaks

Soheil Hassas Yeganeh (1):
      sock: reset sk_err when the error queue is empty

Talat Batheesh (1):
      net/mlx4: Fix the check in attaching steering rules

Tariq Toukan (3):
      MAINTAINERS: Update MELLANOX MLX4 core VPI driver maintainer
      MAINTAINERS: Move mlx4 rdma header file to IB driver charge
      MAINTAINERS: Move mlx5 rdma header file to IB driver charge

Thomas Falcon (1):
      ibmvnic: Remove module author mailing address

Thor Thayer (1):
      net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization

Timur Tabi (1):
      net: qcom/emac: do not use hardware mdio automatic polling

Yuchung Cheng (1):
      tcp: disallow cwnd undo when switching congestion control

 Documentation/devicetree/bindings/net/dsa/marvell.txt    |   4 +++
 Documentation/networking/dpaa.txt                        | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Documentation/networking/tcp.txt                         |  31 +++++++---------
 MAINTAINERS                                              |   6 ++--
 arch/arm/boot/dts/imx6ul-14x14-evk.dts                   |   6 ++++
 drivers/isdn/i4l/isdn_ppp.c                              |   2 +-
 drivers/isdn/mISDN/stack.c                               |   2 +-
 drivers/net/dsa/mv88e6xxx/global2.h                      |   6 ++--
 drivers/net/ethernet/amd/xgbe/xgbe-desc.c                |   5 ++-
 drivers/net/ethernet/broadcom/bcmsysport.c               |   7 ++--
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c          |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c          |  25 ++++++++-----
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c               |   9 +++--
 drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h        |   6 ++--
 drivers/net/ethernet/ethoc.c                             |   3 +-
 drivers/net/ethernet/freescale/fsl_pq_mdio.c             |   9 ++++-
 drivers/net/ethernet/ibm/ibmvnic.c                       |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c              |  36 +++++++++----------
 drivers/net/ethernet/intel/i40e/i40e_txrx.c              |   3 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c            |   3 +-
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c          |   5 ---
 drivers/net/ethernet/mellanox/mlx4/mcg.c                 |  15 +++++---
 drivers/net/ethernet/mellanox/mlx4/qp.c                  |  19 ++++++++++
 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c    |  16 ++++++---
 drivers/net/ethernet/mellanox/mlx5/core/main.c           |   5 ++-
 drivers/net/ethernet/qlogic/qed/qed_main.c               |   3 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h              |  26 ++++++++++++--
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c      |   2 ++
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c           |   2 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c         |   2 ++
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c |   2 ++
 drivers/net/ethernet/qualcomm/emac/emac-mac.c            |   2 +-
 drivers/net/ethernet/qualcomm/emac/emac-phy.c            |  75 +++-----------------------------------
 drivers/net/ethernet/qualcomm/emac/emac.c                |  22 +-----------
 drivers/net/ethernet/renesas/ravb_main.c                 |  24 ++++++-------
 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c       |   6 +++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c        |   7 ++--
 drivers/net/geneve.c                                     |   2 +-
 drivers/net/hamradio/hdlcdrv.c                           |   2 ++
 drivers/net/phy/marvell.c                                |   2 --
 drivers/net/phy/mdio_bus.c                               |  13 +++++++
 drivers/net/phy/micrel.c                                 |  42 ++++++++++++++--------
 drivers/net/phy/phy.c                                    |   2 +-
 drivers/net/virtio_net.c                                 |   5 +--
 drivers/net/vxlan.c                                      |  39 +++++++++++++++-----
 drivers/net/wireless/ath/wcn36xx/main.c                  |   2 ++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c  |   2 +-
 drivers/net/wireless/intel/iwlwifi/iwl-7000.c            |   4 +--
 drivers/net/wireless/intel/iwlwifi/iwl-8000.c            |   4 +--
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h            |   1 +
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rs.h       |   5 +++
 drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h       |   3 ++
 drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c          |  12 +------
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c        |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h             |   6 +++-
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c             |  32 ++++++++++++-----
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c              |  46 ++++++------------------
 drivers/net/wireless/intel/iwlwifi/mvm/rs.h              |  15 ++++++++
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c             |  26 +++++++++-----
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h             |   2 ++
 drivers/net/wireless/intel/iwlwifi/mvm/tt.c              |   8 +++--
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c              |  12 ++++++-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c          |   6 ++--
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c        |   9 +++--
 include/linux/mlx4/qp.h                                  |   1 +
 include/net/ipv6.h                                       |   1 +
 include/net/tcp.h                                        |   2 +-
 net/bridge/br_netlink.c                                  |   2 +-
 net/bridge/br_stp_if.c                                   |   3 +-
 net/core/devlink.c                                       |   8 +++--
 net/core/skbuff.c                                        |   5 ++-
 net/dsa/dsa.c                                            |  47 ++++++++++++++++++++++++
 net/dsa/dsa2.c                                           |   4 ++-
 net/dsa/legacy.c                                         |  47 ------------------------
 net/ipv4/af_inet.c                                       |   2 +-
 net/ipv4/tcp.c                                           |   6 ++--
 net/ipv4/tcp_cong.c                                      |   1 +
 net/ipv6/calipso.c                                       |   6 +++-
 net/ipv6/ip6_offload.c                                   |   4 ++-
 net/ipv6/ip6_tunnel.c                                    |   3 ++
 net/ipv6/ping.c                                          |   2 +-
 net/ipv6/raw.c                                           |   2 +-
 net/ipv6/xfrm6_mode_ro.c                                 |   2 ++
 net/ipv6/xfrm6_mode_transport.c                          |   2 ++
 net/mac80211/agg-tx.c                                    | 128 +++++++++++++++++++++++++++--------------------------------------
 net/mac80211/ht.c                                        |  16 ++++++---
 net/mac80211/ieee80211_i.h                               |  14 +++-----
 net/mac80211/iface.c                                     |  11 +-----
 net/mac80211/sta_info.c                                  |   2 +-
 net/mac80211/sta_info.h                                  |   2 ++
 net/mpls/af_mpls.c                                       |   2 +-
 net/netfilter/nf_conntrack_netlink.c                     |   7 +++-
 net/netfilter/nf_conntrack_proto_sctp.c                  |   9 +++--
 net/netfilter/nf_nat_core.c                              |   2 +-
 net/netfilter/nft_set_rbtree.c                           |  22 ++++++------
 net/netlink/af_netlink.c                                 |   4 ++-
 96 files changed, 781 insertions(+), 486 deletions(-)
 create mode 100644 Documentation/networking/dpaa.txt

^ permalink raw reply

* Re: [PATCH net-next v2 3/3] udp: try to avoid 2 cache miss on dequeue
From: Eric Dumazet @ 2017-06-06 20:58 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: netdev, David S. Miller, Eric Dumazet
In-Reply-To: <cdbe7b4e6758719d3e02938f05c8575d009e2822.1496756090.git.pabeni@redhat.com>

On Tue, 2017-06-06 at 16:23 +0200, Paolo Abeni wrote:
> when udp_recvmsg() is executed, on x86_64 and other archs, most skb
> fields are on cold cachelines.
> If the skb are linear and the kernel don't need to compute the udp
> csum, only a handful of skb fields are required by udp_recvmsg().
> Since we already use skb->dev_scratch to cache hot data, and
> there are 32 bits unused on 64 bit archs, use such field to cache
> as much data as we can, and try to prefetch on dequeue the relevant
> fields that are left out.

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+
From: Ben Greear @ 2017-06-06 21:06 UTC (permalink / raw)
  To: netdev

Hello,

This bug has been around forever, and we recently got an intern and stuck him with
trying to reproduce it on the latest kernel.  It is still here.  I'm not super excited
about trying to fix this, but we can easily test patches if someone has a
patch to try.

Test case is to create 1000 mac-vlans and bring them up, with user-space
tools running lots of 'dump' related commands as part of bringing up the
interfaces and configuring some special source-based routing tables.

(gdb) l *(inet6_dump_fib+0x109)
0x192f9 is in inet6_dump_fib (/home/greearb/git/linux-2.6/net/ipv6/ip6_fib.c:392).
387			} else
388				w->skip = 0;
389	
390			read_lock_bh(&table->tb6_lock);
391			res = fib6_walk_continue(w);
392			read_unlock_bh(&table->tb6_lock);
393			if (res <= 0) {
394				fib6_walker_unlink(net, w);
395				cb->args[4] = 0;
396			}

(gdb) l *(fib6_walk_continue+0x76)
0x188c6 is in fib6_walk_continue (/home/greearb/git/linux-2.6/net/ipv6/ip6_fib.c:1593).
1588				if (fn == w->root)
1589					return 0;
1590				pn = fn->parent;
1591				w->node = pn;
1592	#ifdef CONFIG_IPV6_SUBTREES
1593				if (FIB6_SUBTREE(pn) == fn) {
1594					WARN_ON(!(fn->fn_flags & RTN_ROOT));
1595					w->state = FWS_L;
1596					continue;
1597				}

[root@ct524-ffb0 ~]# BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
IP: fib6_walk_continue+0x76/0x180 [ipv6]
PGD 3d9226067
P4D 3d9226067
PUD 3d9020067
PMD 0

Oops: 0000 [#1] PREEMPT SMP
Modules linked in: nf_conntrack_netlink nf_conntrack nfnetlink nf_defrag_ipv4 libcrc32c bnep fuse macvlan pktgen cfg80211 ipmi_ssif iTCO_wdt iTCO_vendor_support 
coretemp intel_rapl x86_pkg_temp_thermal intel_powerclamp kvm_intel kvm irqbypass joydev i2c_i801 ie31200_edac intel_pch_thermal shpchp hci_uart ipmi_si btbcm 
btqca ipmi_devintf btintel ipmi_msghandler bluetooth pinctrl_sunrisepoint acpi_als pinctrl_intel video tpm_tis intel_lpss_acpi kfifo_buf tpm_tis_core intel_lpss 
industrialio tpm acpi_pad acpi_power_meter sch_fq_codel nfsd auth_rpcgss nfs_acl lockd grace sunrpc ast drm_kms_helper ttm drm igb hwmon ptp pps_core dca 
i2c_algo_bit i2c_hid i2c_core ipv6 crc_ccitt [last unloaded: nf_conntrack]
CPU: 1 PID: 996 Comm: ip Not tainted 4.12.0-rc4+ #32
Hardware name: Supermicro Super Server/X11SSM-F, BIOS 1.0b 12/29/2015
task: ffff8803d4d61dc0 task.stack: ffffc9000970c000
RIP: 0010:fib6_walk_continue+0x76/0x180 [ipv6]
RSP: 0018:ffffc9000970fbb8 EFLAGS: 00010283
RAX: ffff8803de84b020 RBX: ffff8803e0756f00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffc9000970fc00 RDI: ffffffff81eee280
RBP: ffffc9000970fbc0 R08: 0000000000000008 R09: ffff8803d4fbbf31
R10: ffffc9000970fb68 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000001 R14: ffff8803e0756f00 R15: ffff8803d9345b18
FS:  00007f32ca4ec700(0000) GS:ffff880477840000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000018 CR3: 00000003ddacc000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
  inet6_dump_fib+0x109/0x290 [ipv6]
  netlink_dump+0x11d/0x290
  netlink_recvmsg+0x260/0x3f0
  sock_recvmsg+0x38/0x40
  ___sys_recvmsg+0xe9/0x230
  ? alloc_pages_vma+0x9d/0x260
  ? page_add_new_anon_rmap+0x88/0xc0
  ? lru_cache_add_active_or_unevictable+0x31/0xb0
  ? __handle_mm_fault+0xce3/0xf70
  __sys_recvmsg+0x3d/0x70
  ? __sys_recvmsg+0x3d/0x70
  SyS_recvmsg+0xd/0x20
  do_syscall_64+0x56/0xc0
  entry_SYSCALL64_slow_path+0x25/0x25
RIP: 0033:0x7f32c9e21050
RSP: 002b:00007fff96401de8 EFLAGS: 00000246 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f32c9e21050
RDX: 0000000000000000 RSI: 00007fff96401e50 RDI: 0000000000000004
RBP: 00007fff96405e74 R08: 0000000000003fe4 R09: 0000000000000000
R10: 00007fff96401e90 R11: 0000000000000246 R12: 000000000064f3a0
R13: 00007fff96405ee0 R14: 0000000000003fe4 R15: 0000000000000000
Code: f6 40 2a 04 74 11 8b 53 30 85 d2 0f 84 02 01 00 00 83 ea 01 89 53 30 c7 43 28 04 00 00 00 48 39 43 10 74 33 48 8b 10 48 89 53 18 <48> 39 42 18 0f 84 a3 00 
00 00 48 39 42 08 0f 84 ae 00 00 00 48
RIP: fib6_walk_continue+0x76/0x180 [ipv6] RSP: ffffc9000970fbb8
CR2: 0000000000000018
---[ end trace 5ebbc4ee97bea64e ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled
Rebooting in 10 seconds..
ACPI MEMORY or I/O RESET_REG.


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply

* Re: [PATCH v4] net: don't call strlen on non-terminated string in dev_set_alias()
From: Alexander Potapenko @ 2017-06-06 21:15 UTC (permalink / raw)
  To: David Miller
  Cc: Dmitriy Vyukov, Kostya Serebryany, Eric Dumazet, stephen, LKML,
	Networking
In-Reply-To: <20170606.163639.1246601020260541080.davem@davemloft.net>

On Tue, Jun 6, 2017 at 10:36 PM, David Miller <davem@davemloft.net> wrote:
> From: Alexander Potapenko <glider@google.com>
> Date: Tue,  6 Jun 2017 15:56:54 +0200
>
>> KMSAN reported a use of uninitialized memory in dev_set_alias(),
>> which was caused by calling strlcpy() (which in turn called strlen())
>> on the user-supplied non-terminated string.
>>
>> Signed-off-by: Alexander Potapenko <glider@google.com>
>
> We should not be allowing non-NULL terminated strings for the
> IFLA_IFALIAS attribute.  It's defined as type NLA_STRING in
> the ifla_policy[] array.
Sorry, I couldn't determine from RFC 2233 whether ifAlias is
zero-terminated or not, but looking at validate_nla() I see that
NLA_STRING is supposed to be such.
I'll check what's going on.

> Please figure out why we aren't enforcing the attribute policy
> properly, rather than adding a workaround.
Guess the string has been previously claimed to be non-terminated
here: https://patchwork.ozlabs.org/patch/996/
> Thanks.



-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

^ permalink raw reply

* Re: [PATCH 7/7] mlx5: Do not build eswitch_offloads if CONFIG_MLX5_EN_ESWITCH_OFFLOADS is set
From: Jes Sorensen @ 2017-06-06 21:46 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: Or Gerlitz, Jes Sorensen, Linux Netdev List, Kernel Team,
	Saeed Mahameed, Ilan Tayari
In-Reply-To: <CALzJLG-=WU8DFNkqjAKBSFjHyc1V2YvoWV4r7fG9QVSRTybgZw@mail.gmail.com>

On 06/05/2017 05:53 PM, Saeed Mahameed wrote:
> On Mon, Jun 5, 2017 at 11:51 PM, Jes Sorensen <jsorensen@fb.com> wrote:
>> On 06/03/2017 03:37 PM, Or Gerlitz wrote:
>>>
>>> On Fri, Jun 2, 2017 at 11:22 PM, Jes Sorensen <jsorensen@fb.com> wrote:
>>>>
>>>> On 05/28/2017 02:03 AM, Or Gerlitz wrote:
>>>>>
>>>>>
>>>>> On Sun, May 28, 2017 at 5:23 AM, Jes Sorensen <jes.sorensen@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> On 05/27/2017 05:02 PM, Or Gerlitz wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sat, May 27, 2017 at 12:16 AM, Jes Sorensen
>>>>>>> <jes.sorensen@gmail.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> This gets rid of the temporary #ifdef spaghetti and allows the code
>>>>>>>> to
>>>>>>>> compile without offload support enabled.
>>>>>
>>>>>
>>>>>
>>>>>>> I am pretty sure we can do that exercise you're up to without any
>>>>>>> spaghetti cooking and even put more code under that CONFIG directive
>>>>>>> (en_rep.c), I'll take that with Saeed.
>>>>>
>>>>>
>>>>>
>>>>>> I want to avoid adding #ifdef CONFIG_foo to the main code in order to
>>>>>> keep
>>>>>> it readable. I did it gradually to make sure I didn't break anything
>>>>>> and
>>>>>> to
>>>>>> allow for it to be bisected in case something did break. If we can move
>>>>>> out
>>>>>> more code from places like en_rep.c into eswitch_offload.c and get it
>>>>>> disabled that way that would be great, but I like to limit the number
>>>>>> of
>>>>>> #ifdefs we add to the actual code.
>>>>>
>>>>>
>>>>>
>>>>> FWIW (see below), squashing your seven patches to one resulted in a
>>>>> fairly simple/clear
>>>>> patch, so if we go that way, no need to have seven commits just for this
>>>>> piece.
>>>>
>>>>
>>>>
>>>> Squashing patches into jumbo patches is inherently broken and bad coding
>>>> practice! It makes it way more complicated to debug and bisect in case a
>>>> minor detail broke in the process.
>>>
>>>
>>> Not that pure LOC ##-s is the only/deep measurement, but your overall
>>> changes in the the seven patch series account to:
>>>
>>>    5 files changed, 94 insertions(+), 3 deletions(-)
>>>
>>> and by no mean this is jumbo or inherently broken and bad coded, so
>>> please slow down please, I looked with care on the resulted patch and
>>> said it's basically ok.
>>
>>
>> Squashing patches for the sake of squashing patches is inherently broken and
>> bad. So please calm down and stop this mangling of other peoples' patches.
>>
>> If you want an alternative, put up a proposal and look at it for comparison
>> somewhere.
>
> Hey Jes,
> 
> It is not just about squashing patches, I am working on a series of
> patches to allow compiling out eswitch/eswitch_offloads/en_rep.c/en_tc
> altogether, it will come out cleaner as it will remove all ethernet
> sriov/eswitch VF representors and eswitch tc offloads stuff with one
> kconfig flag, and yet preserve standard QoS functionality from en_tc.

Saeed,

I realize it is not just about squashing patches, however doing that to 
someone else's patches is just broken. The Linux kernel way is to build 
on top of patches, if they are valid, rather than throwing them all away 
and doing it from scratch again bottom up. If there was something 
actually wrong with my patches, and I would love to understand if that 
is the case, since I don't know 1/100th of the hardware details that you 
know, then please share those details.

> BTW today you can just remove eswitch from driver and non sriov
> configuration will perfectly work with no issues.
> Even multi PF configuration will also work, but without l2 mac table,
> which means PFs can only see packets with their own static (permanent)
> mac addresses, user configured macs will not work on Multi PF
> configuration.

It sounds like this shakes up things a little and we will have things 
moved to where they actually belong in the hierarchy so that will be a 
good thing in the end :)

> For that i will take the l2 table (ConnectX PF mac table) logic out of
> eswitch as it is not really an eswitch logic, and move it to core
> driver to allow Multi PF configuration to work without eswitch.

Sounds good.

> I will post some patches for you to review by end of week.

Could we please start seeing this stuff happen in a public git tree so 
it is possible to follow and contribute to the development? It is very 
frustrating having to wait for things to appear and and not knowing 
whether a patch is integrated or needs to be revised when you have 
things building on top of it.

Jes

^ permalink raw reply

* [PATCH net] ibmvnic: Return failure on attempted mtu change
From: John Allen @ 2017-06-06 21:55 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Falcon, Nathan Fontenot, John Allen

Changing the mtu is currently not supported in the ibmvnic driver.

Implement .ndo_change_mtu in the driver so that attempting to use ifconfig
to change the mtu will fail and present the user with an error message.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
---
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4f2d329..8ff6c74 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1468,6 +1468,11 @@ static void ibmvnic_netpoll_controller(struct net_device *dev)
 }
 #endif

+static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
+{
+	return -EOPNOTSUPP;
+}
+
 static const struct net_device_ops ibmvnic_netdev_ops = {
 	.ndo_open		= ibmvnic_open,
 	.ndo_stop		= ibmvnic_close,
@@ -1479,6 +1484,7 @@ static void ibmvnic_netpoll_controller(struct net_device *dev)
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= ibmvnic_netpoll_controller,
 #endif
+	.ndo_change_mtu		= ibmvnic_change_mtu,
 };

 /* ethtool functions */

^ permalink raw reply related


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