[PATCH net] bridge: check for null fdb->dst before notifying switchdev drivers

2017-08-26 Thread Roopa Prabhu
From: Roopa Prabhu current switchdev drivers dont seem to support offloading fdb entries pointing to the bridge device which have fdb->dst not set to any port. This patch adds a NULL fdb->dst check in the switchdev notifier code. This patch fixes the below NULL ptr

Re: [PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-26 Thread Andrew Lunn
> Hi Andrew, > > Have you taken a look at mglist (the boolean, probably needs a rename) ? It > is for > exactly that purpose, to track which groups the bridge is interested in. > I assume I'm forgetting or missing something here. > > > performed. With a pure software bridge, it is not required.

Re: [PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-26 Thread Nikolay Aleksandrov
On 27.08.2017 01:17, Nikolay Aleksandrov wrote: > On 26/08/17 23:56, Andrew Lunn wrote: >> This is a WIP patchset i would like comments on from bridge, switchdev >> and hardware offload people. >> >> The linux bridge supports IGMP snooping. It will listen to IGMP >> reports on bridge ports and

Re: [PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-26 Thread Nikolay Aleksandrov
On 26/08/17 23:56, Andrew Lunn wrote: > This is a WIP patchset i would like comments on from bridge, switchdev > and hardware offload people. > > The linux bridge supports IGMP snooping. It will listen to IGMP > reports on bridge ports and keep track of which groups have been > joined on an

Re: [PATCH v4 4/5] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-26 Thread Andrew Lunn
Hi Corentin I think we have now all agreed this is an mdio-mux, plus it is also an MII mux. We should represent that in device tree. This patchset does this. However, as it is now, the mux structure in DT is ignored. All it does is search for the phy-is-integrated flags and goes on that. I made

[PATCH RFC WIP 4/5] net: dsa: HACK: Handle MDB add/remove for none-switch ports

2017-08-26 Thread Andrew Lunn
When there is a mdb added to a port which is not in the switch, we need the switch to forward traffic for the group to the software bridge, so it can forward it out the none-switch port. The current implementation is a hack and will be replaced. Currently only the bridge soft interface is

[PATCH RFC WIP 3/5] net: bridge: Make the brX interface a member of the bridge

2017-08-26 Thread Andrew Lunn
In order to perform IGMP snooping on the brX interface, it has to be part of the bridge, so that the code snooping on normal bridge ports keeps track of IGMP joins and leaves. When the brX interface is opened, add the interface to the bridge. When the brX interface is closed, remove it from the

[PATCH RFC WIP 2/5] net: bridge: Skip receive handler on brX interface

2017-08-26 Thread Andrew Lunn
The brX interface will soon become a member of the bridge. As such, it will get a receiver handler assigned. However, we don't want to handle packets received on this soft interfaces. So detect the condition and say all the packets pass. --- net/bridge/br_input.c | 4 1 file changed, 4

[PATCH RFC WIP 5/5] net: dsa: Don't include CPU port when adding MDB to a port

2017-08-26 Thread Andrew Lunn
Now that the MDB are explicitly added to the CPU port when required, don't add the CPU port adding an MDB to a switch port. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c

[PATCH RFC WIP 1/5] net: rtnetlink: Handle bridge port without upper device

2017-08-26 Thread Andrew Lunn
The brX interface will with a following patch becomes a member of the bridge. It however cannot be a slave interface, since it would have to be a slave of itself. netdev_master_upper_dev_get() returns NULL as a result. Handle this NULL, by knowing this bridge slave must also be the master, i.e.

[PATCH RFC WIP 0/5] IGMP snooping for local traffic

2017-08-26 Thread Andrew Lunn
This is a WIP patchset i would like comments on from bridge, switchdev and hardware offload people. The linux bridge supports IGMP snooping. It will listen to IGMP reports on bridge ports and keep track of which groups have been joined on an interface. It will then forward multicast based on this

[PATCH] net: ethernet: broadcom: Remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha --- drivers/net/ethernet/broadcom/sb1250-mac.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

Re: [PATCH net 0/4] xfrm_user info leaks

2017-08-26 Thread Mathias Krause
On 26 August 2017 at 17:58, Joe Perches wrote: > On Sat, 2017-08-26 at 17:08 +0200, Mathias Krause wrote: >> Hi David, Steffen, >> >> the following series fixes a few info leaks due to missing padding byte >> initialization in the xfrm_user netlink interface. > > Were these

Re: UDP sockets oddities

2017-08-26 Thread Florian Fainelli
On 08/26/2017 05:47 AM, Eric Dumazet wrote: > On Fri, 2017-08-25 at 21:19 -0700, David Miller wrote: > >> Agreed, but the ARP resolution queue really needs to scale it's backlog >> to the physical technology it is attached to. > Yes, last time (in 2011) we increased the old limit of 3 packets

Transaction

2017-08-26 Thread Nora Stanley
Attention: Greetings from Miss Nora Stanley, A banker who is assigned by the Togolaise ministry of finance and inheritance funds reconciliation Forum to represent you in the release of your assigned inheritance funds with the ORA BANK TOGO. I want to inform you that the ministry of finance and

Re: mlxsw and rtnl lock

2017-08-26 Thread Ido Schimmel
On Fri, Aug 25, 2017 at 01:26:07PM -0700, David Ahern wrote: > Jiri / Ido: > > I was looking at the mlxsw driver and the places it holds the rtnl lock. > There are a lot of them and from an admittedly short review it seems > like the rtnl is protecting changes to mlxsw data structures as opposed

Re: [PATCH net 0/4] xfrm_user info leaks

2017-08-26 Thread Joe Perches
On Sat, 2017-08-26 at 17:08 +0200, Mathias Krause wrote: > Hi David, Steffen, > > the following series fixes a few info leaks due to missing padding byte > initialization in the xfrm_user netlink interface. Were these found by inspection or by some tool? If by tool, perhaps there are other

[PATCH net 3/4] xfrm_user: fix info leak in build_expire()

2017-08-26 Thread Mathias Krause
The memory reserved to dump the expired xfrm state includes padding bytes in struct xfrm_user_expire added by the compiler for alignment. To prevent the heap info leak, memset(0) the remainder of the struct. Initializing the whole structure isn't needed as copy_to_user_state() already takes care

[PATCH net 2/4] xfrm_user: fix info leak in xfrm_notify_sa()

2017-08-26 Thread Mathias Krause
The memory reserved to dump the ID of the xfrm state includes a padding byte in struct xfrm_usersa_id added by the compiler for alignment. To prevent the heap info leak, memset(0) the whole struct before filling it. Cc: Herbert Xu Fixes: 0603eac0d6b7 ("[IPSEC]: Add

[PATCH net 1/4] xfrm_user: fix info leak in copy_user_offload()

2017-08-26 Thread Mathias Krause
The memory reserved to dump the xfrm offload state includes padding bytes of struct xfrm_user_offload added by the compiler for alignment. Add an explicit memset(0) before filling the buffer to avoid the heap info leak. Cc: Steffen Klassert Fixes: d77e38e612a0

[PATCH net 0/4] xfrm_user info leaks

2017-08-26 Thread Mathias Krause
Hi David, Steffen, the following series fixes a few info leaks due to missing padding byte initialization in the xfrm_user netlink interface. Please apply! Mathias Krause (4): xfrm_user: fix info leak in copy_user_offload() xfrm_user: fix info leak in xfrm_notify_sa() xfrm_user: fix info

[PATCH net 4/4] xfrm_user: fix info leak in build_aevent()

2017-08-26 Thread Mathias Krause
The memory reserved to dump the ID of the xfrm state includes a padding byte in struct xfrm_usersa_id added by the compiler for alignment. To prevent the heap info leak, memset(0) the sa_id before filling it. Cc: Jamal Hadi Salim Fixes: d51d081d6504 ("[IPSEC]: Sync series -

[PATCH net-next v2] sched: sfq: drop packets after root qdisc lock is released

2017-08-26 Thread gfree . wind
From: Gao Feng The commit 520ac30f4551 ("net_sched: drop packets after root qdisc lock is released) made a big change of tc for performance. But there are some points which are not changed in SFQ enqueue operation. 1. Fail to find the SFQ hash slot; 2. When the queue is

[PATCH] sni_82596: Add Thomas' email address to driver.

2017-08-26 Thread Ralf Baechle
--- Reviewing Christoph's DMA patch I noticed Thomas' email address was missing from the entire driver file. drivers/net/ethernet/i825xx/sni_82596.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/i825xx/sni_82596.c

Re: [PATCH 3/4] i825xx: switch to switch to dma_alloc_attrs

2017-08-26 Thread Ralf Baechle
On Sat, Aug 26, 2017 at 09:21:24AM +0200, Christoph Hellwig wrote: Adding Thomas Bogendoerfer , the author of sni_82596.c to cc. > This way we can always pass DMA_ATTR_NON_CONSISTENT, the SNI mips version > will simply ignore the flag. > > Signed-off-by: Christoph

Re: [PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-26 Thread Eric Dumazet
On Sat, 2017-08-26 at 07:53 +0200, Ivan Delalande wrote: > > Sorry, I probably should have detailed my changes. I tried to address > this by locking the whole socket in the caller, tcp_diag_get_aux, just > outside of the rcu_read_lock. Would this work here, or do you see a > better way? >

Re: [PATCH 1/4] sgiseeq: switch to dma_alloc_attrs

2017-08-26 Thread Ralf Baechle
On Sat, Aug 26, 2017 at 09:21:22AM +0200, Christoph Hellwig wrote: Looks good, Acked-by: Ralf Baechle Ralf

Re: UDP sockets oddities

2017-08-26 Thread Eric Dumazet
On Fri, 2017-08-25 at 21:19 -0700, David Miller wrote: > Agreed, but the ARP resolution queue really needs to scale it's backlog > to the physical technology it is attached to. Yes, last time (in 2011) we increased the old limit of 3 packets :/ We probably should match sysctl_wmem_max so that a

[PATCH net] ipv6: set dst.obsolete when a cached route has expired

2017-08-26 Thread Xin Long
Now it doesn't check for the cached route expiration in ipv6's dst_ops->check(), because it trusts dst_gc that would clean the cached route up when it's expired. The problem is in dst_gc, it would clean the cached route only when it's refcount is 1. If some other module (like xfrm) keeps holding

Re: [PATCH] netfilter: ipv4: nf_defrag: constify nf_hook_ops

2017-08-26 Thread Florian Westphal
Arvind Yadav wrote: > nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks > and nf_unregister_net_hooks are working with const nf_hook_ops. > So mark the non-const nf_hook_ops structs as const. please update your nf-next tree, all nf_hook_ops are

[PATCH] netfilter: ipv6: nf_defrag: constify nf_hook_ops

2017-08-26 Thread Arvind Yadav
nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks and nf_unregister_net_hooks are working with const nf_hook_ops. So mark the non-const nf_hook_ops structs as const. Signed-off-by: Arvind Yadav --- net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 2

[PATCH] netfilter: ipv4: nf_defrag: constify nf_hook_ops

2017-08-26 Thread Arvind Yadav
nf_hook_ops are not supposed to change at runtime. nf_register_net_hooks and nf_unregister_net_hooks are working with const nf_hook_ops. So mark the non-const nf_hook_ops structs as const. Signed-off-by: Arvind Yadav --- net/ipv4/netfilter/nf_defrag_ipv4.c | 2 +- 1

[PATCH v4 1/5] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
In case of fixed link, there are no mdio node. This patch add a test for fixed-link for bypassing MDIO node register that match need_mdio_ids. Note that this do not change behaviour for MDIO snps,dwmac-mdio nodes. Signed-off-by: Corentin Labbe ---

[PATCH v4 4/5] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated

2017-08-26 Thread Corentin Labbe
The current way to find if the phy is internal is to compare DT phy-mode and emac_variant/internal_phy. But it will negate a possible future SoC where an external PHY use the same phy mode than the internal one. This patch adds a new way to find if the PHY is internal, via the phy-is-integrated

[PATCH v4 2/5] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac

2017-08-26 Thread Corentin Labbe
Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 22 +- 1

[PATCH v4 0/5] net: stmmac: Detect PHY location with phy-is-integrated

2017-08-26 Thread Corentin Labbe
Hello The current way to find if the PHY is internal is to compare DT phy-mode and emac_variant/internal_phy. But it will negate a possible future SoC where an external PHY use the same phy mode than the integrated one. This patchs series adds a new way to find if the PHY is integrated, via the

[PATCH v4 5/5] net: stmmac: Register parent MDIO in case of fake mdio-mux

2017-08-26 Thread Corentin Labbe
In case of a fake MDIO switch/mux (like Allwinner H3), the registered MDIO node should be the parent of the PHY. Otherwise of_phy_connect will fail. Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 13 +++-- 1 file

[PATCH v4 3/5] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-08-26 Thread Corentin Labbe
This patch add documentation about the MDIO switch used on sun8i-h3-emac for integrated PHY. Signed-off-by: Corentin Labbe --- .../devicetree/bindings/net/dwmac-sun8i.txt| 117 - 1 file changed, 112 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] net: stmmac: Handle possible fixed-link with need_mdio_ids

2017-08-26 Thread Corentin Labbe
On Fri, Aug 25, 2017 at 09:45:23AM -0700, Florian Fainelli wrote: > On 08/25/2017 09:28 AM, Andrew Lunn wrote: > > On Fri, Aug 25, 2017 at 04:42:08PM +0200, Corentin Labbe wrote: > >> In case of fixed link, there are no mdio node. > >> This patch add a test for fixed-link for bypassing MDIO node

remove dma_alloc_noncoherent V2

2017-08-26 Thread Christoph Hellwig
For many years we've had the dma_alloc_attrs API that is more flexible than dma_alloc_noncoherent. This series moves the remaining users over to the attrs API. After half of the series went in for the last merge window I'd really like to merge the remainer. Any chance to get some ACKs/reviews

[PATCH 1/4] sgiseeq: switch to dma_alloc_attrs

2017-08-26 Thread Christoph Hellwig
Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/seeq/sgiseeq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/seeq/sgiseeq.c

[PATCH 4/4] dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent

2017-08-26 Thread Christoph Hellwig
No users left, everyone switched to the _attrs versions. Signed-off-by: Christoph Hellwig --- Documentation/DMA-API.txt| 30 -- arch/metag/include/asm/dma-mapping.h | 2 +- arch/nios2/include/asm/dma-mapping.h | 2 +-

[PATCH 2/4] au1000_eth: switch to dma_alloc_attrs

2017-08-26 Thread Christoph Hellwig
Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/amd/au1000_eth.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/amd/au1000_eth.c

[PATCH 3/4] i825xx: switch to switch to dma_alloc_attrs

2017-08-26 Thread Christoph Hellwig
This way we can always pass DMA_ATTR_NON_CONSISTENT, the SNI mips version will simply ignore the flag. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/i825xx/lasi_82596.c | 6 ++ drivers/net/ethernet/i825xx/lib82596.c | 9 +

[patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump

2017-08-26 Thread Jiri Pirko
From: Arkadi Sharshevsky During the neighbor traversal the neighbors from different families should be ignored. Fixes: c58035a74aba ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump") Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri

[patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs

2017-08-26 Thread Jiri Pirko
From: Jiri Pirko Arkadi Sharshevsky (1): mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko (1): mlxsw: spectrum: compile-in dpipe support only if devlink is enabled drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 ++-

[patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled

2017-08-26 Thread Jiri Pirko
From: Jiri Pirko Makes no sense to have dpipe compiled in when devlink is not enabled, because the devlink dpipe registation is noop function. So don't compile it in. This also fixes missing extern structs errors. Reported-by: kbuild test robot Fixes: