[PATCH net] mpls: fix clearing of dead nh_flags on link up

2017-05-30 Thread Roopa Prabhu
From: Roopa Prabhu recent fixes to use WRITE_ONCE for nh_flags on link up, accidently ended up leaving the deadflags on a nh. This patch fixes the WRITE_ONCE to use freshly evaluated nh_flags. Fixes: 39eb8cd17588 ("net: mpls: rt_nhn_alive and nh_flags should be accessed using READ_ONCE") Report

Re: [PULL] topic/e1000e-fix

2017-05-30 Thread Daniel Vetter
On Wed, May 31, 2017 at 7:54 AM, Daniel Vetter wrote: > On Wed, May 31, 2017 at 1:06 AM, Dave Airlie wrote: >> On 31 May 2017 at 08:10, David Miller wrote: >>> From: Daniel Vetter >>> Date: Tue, 30 May 2017 22:15:42 +0200 >>> If the e1000e maintainer wants to coalesce or not return stateme

[PATCH net-next] powerpc: use asm-generic/socket.h as much as possible

2017-05-30 Thread Stephen Rothwell
asm-generic/socket.h already has an exception for the differences that powerpc needs, so just include it after defining the differences. Signed-off-by: Stephen Rothwell --- arch/powerpc/include/uapi/asm/socket.h | 92 +- 1 file changed, 1 insertion(+), 91 deletion

Re: [PATCH net-next 0/8] Introduce bpf ID

2017-05-30 Thread Martin KaFai Lau
On Tue, May 30, 2017 at 06:35:37PM -0600, David Ahern wrote: > On 5/30/17 6:08 PM, Martin KaFai Lau wrote: > > This patch series: > > 1) Introduce ID for both bpf_prog and bpf_map. > > 2) Add bpf commands to iterate the prog IDs and map > >IDs of the system. > > 3) Add bpf commands to get a pro

Re: [PATCH 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties

2017-05-30 Thread Fabio Estevam
On Tue, May 30, 2017 at 2:34 PM, Leonard Crestez wrote: > Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same > register values can be set through the micrel phy driver by using dts > properties. > > This seems preferable and allows cleanly fixing suspend/resume. > > Signed-off-b

Re: [net-bluetooth] question about potential null pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
Hi Marcel, Quoting "Gustavo A. R. Silva" : Hi Marcel, Quoting Marcel Holtmann : Hi Gustavo, While looking into Coverity ID 1357456 I ran into the following piece of code at net/bluetooth/smp.c:166 166/* The following functions map to the LE SC SMP crypto functions 167 * AES-CMAC, f4, f5

Re: [net-bluetooth] question about potential null pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
Hi Marcel, Quoting Marcel Holtmann : Hi Gustavo, While looking into Coverity ID 1357456 I ran into the following piece of code at net/bluetooth/smp.c:166 166/* The following functions map to the LE SC SMP crypto functions 167 * AES-CMAC, f4, f5, f6, g2 and h6. 168 */ 169 170static int aes_

Re: [PATCH net-next 4/8] bpf: Add BPF_PROG_GET_FD_BY_ID

2017-05-30 Thread kbuild test robot
Hi Martin, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-Introduce-bpf_prog-ID/20170531-110650 config: x86_64-randconfig-x015-201722 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save

Re: [PATCH net-next] bnxt_en: Fix xmit_more with BQL.

2017-05-30 Thread David Miller
From: Michael Chan Date: Tue, 30 May 2017 20:03:00 -0400 > We need to write the doorbell if BQL has stopped the queue and > skb->xmit_more is set. Otherwise it is possible for the tx queue to > rot and cause tx timeout. > > Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.") > Suggested-by: Y

[PATCH] enic: Fix another sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
The driver may sleep under a spin lock in some function call paths. The 1st function call path is: enic_tx_hang_reset (acquire the lock by spin_lock) enic_stop enic_synchronize_irqs synchronize_irq --> may sleep The 2nd function call path is: enic_tx_hang_reset (acquire the lock by spin

[PATCH] enic: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
The driver may sleep under a spin lock in some function call paths. The 1st function call path is: enic_reset (acquire the lock by spin_lock) enic_stop enic_synchronize_irqs synchronize_irq --> may sleep The 2nd function call path is: enic_reset (acquire the lock by spin_lock) enic_de

[PATCH] i40e: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh) i40e_vsi_remove_pvid i40e_vlan_stripping_disable i40e_aq_update_vsi_params i40e_asq_send_command mutex_lock --> may sleep To fixed it, t

Re: Deleting a dynamic mac entry..

2017-05-30 Thread Manohar Kumar
Please see inline.. On Fri, May 26, 2017 at 1:15 AM, Toshiaki Makita wrote: > On 2017/05/26 14:08, Manohar Kumar wrote: >> On Wed, May 24, 2017 at 6:11 PM, Toshiaki Makita >> wrote: >>> On 2017/05/25 3:05, Manohar Kumar wrote: Thanks, Toshiaki. What is the right way to set the def

[PATCH] isdn: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
The driver may sleep under a spin lock, the function call path is: isdn_ppp_mp_receive (acquire the lock) isdn_ppp_mp_reassembly isdn_ppp_push_higher isdn_ppp_decompress isdn_ppp_ccp_reset_trans isdn_ppp_ccp_reset_alloc_state kzalloc(GFP_KERNEL) --> may sle

Re: [i40e] regression on TCP stream and TCP maerts, kernel-4.12.0-0.rc2

2017-05-30 Thread Alexander Duyck
On Tue, May 30, 2017 at 8:41 AM, Alexander Duyck wrote: > On Tue, May 30, 2017 at 6:43 AM, Adam Okuliar wrote: >> Hello, >> >> we found regression on intel card(XL710) with i40e driver. Regression is >> about ~45% >> on TCP_STREAM and TCP_MAERTS test for IPv4 and IPv6. Regression was first >> vis

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
Ok, I will send v2 later > -Original Message- > From: David Ahern [mailto:dsah...@gmail.com] > Sent: Wednesday, May 31, 2017 8:40 AM > To: YUAN Linyu; David Ahern; Joe Perches; David Miller; cug...@163.com > Cc: netdev@vger.kernel.org > Subject: Re: [PATCH net-next] net: ndisc.c: reduce si

Re: [PATCH iproute2 0/4] ip: Add vrf show commmand

2017-05-30 Thread Stephen Hemminger
On Sat, 27 May 2017 17:34:46 -0600 David Ahern wrote: > Refactor ip address to export its capability to save a list of nlmsg's > for links and its link filter. Use both to add an 'ip vrf show' command > to list all configured VRF with table id. > > David Ahern (4): > ip address: Export ip_link

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 05:16:27PM -0700, Florian Fainelli wrote: > On 05/30/2017 05:06 PM, Andrew Lunn wrote: > >> - past the initial setup, if we start creating bridge devices and so on, > >> we have no way to tell: group Ports 0-3 together and send traffic to CPU > >> port 0, then let Port 5 alo

Re: [net-bluetooth] question about potential null pointer dereference

2017-05-30 Thread Marcel Holtmann
Hi Gustavo, > While looking into Coverity ID 1357456 I ran into the following piece of code > at net/bluetooth/smp.c:166 > > 166/* The following functions map to the LE SC SMP crypto functions > 167 * AES-CMAC, f4, f5, f6, g2 and h6. > 168 */ > 169 > 170static int aes_cmac(struct crypto_shash *t

Re: [PATCH iproute2 -master 0/2] Two misc BPF updates

2017-05-30 Thread Stephen Hemminger
On Sat, 13 May 2017 02:32:33 +0200 Daniel Borkmann wrote: > Requires header rebase with -net. > > Thanks! > > Daniel Borkmann (2): > bpf: update printing of generic xdp mode > bpf: dump error to the user when retrieving pinned prog fails > > ip/iplink_xdp.c | 19 +++ > lib

Re: [patch iproute2] ipvtap: Adding support for ipvtap device management

2017-05-30 Thread Stephen Hemminger
On Tue, 23 May 2017 16:22:05 -0700 Sainath Grandhi wrote: > This patch adds support for managing ipvtap devices using ip link. ipvtap > support > is added to linux with commit 235a9d89da976e2975b3de9afc0bed7b72557983 Please resend with a Signed-off-by line. Also, you need to update the Usage m

Re: [patch iproute2] tc: flower: add support for tcp flags

2017-05-30 Thread Stephen Hemminger
On Tue, 23 May 2017 23:51:39 +0200 Jiri Pirko wrote: > From: Jiri Pirko > > Allow user to insert a flower classifier filter rule which includes > match for tcp flags. > > Signed-off-by: Jiri Pirko Applied to net-next

Re: [PATCH RFC net-next] arp: Really delete an arp entry on "arp -d"

2017-05-30 Thread David Ahern
On 5/30/17 5:32 PM, Sowmini Varadhan wrote: > On (05/30/17 16:20), Stephen Hemminger wrote: >> >> Please don't copy/paste chunks of code. Instead refactor and make this >> into a helper function. > > sure, I have no problems with that, and as I pointed out, I've not > tested ipv6 for this yet eit

Re: [PATCH iproute2] ip: add handling for new CAN netlink interface

2017-05-30 Thread Stephen Hemminger
On Fri, 19 May 2017 14:54:49 +0200 Remigiusz Kołłątaj wrote: > This patch adds handling for new CAN netlink interface introduced in > 4.11 kernel: > - IFLA_CAN_TERMINATION, > - IFLA_CAN_TERMINATION_CONST, > - IFLA_CAN_BITRATE_CONST, > - IFLA_CAN_DATA_BITRATE_CONST > > Output example: > $

Re: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread David Ahern
On 5/30/17 6:29 PM, YUAN Linyu wrote: >>> that function should be converted to skb_put_zero once it hits net-next. >> I will check it > I can't find skb_put_zero I believe the decision was to put it in Johannes' tree and it will make its way to DaveM's tree. Give some time.

Re: [iproute PATCH] tc: m_xt: Prevent a segfault in libipt

2017-05-30 Thread Stephen Hemminger
On Tue, 23 May 2017 15:40:57 +0200 Phil Sutter wrote: > From: Phil Sutter > > This happens with NAT targets, such as SNAT, DNAT and MASQUERADE. These > are still not usable with this patch, but at least tc doesn't crash > anymore when one tries to use them. > > Signed-off-by: Phil Sutter App

Re: [PATCH iproute2] devlink: Add option to set and show eswitch encapsulation support

2017-05-30 Thread Stephen Hemminger
On Sun, 21 May 2017 08:37:27 +0300 Roi Dayan wrote: > This is an e-switch global knob to enable HW support for applying > encapsulation/decapsulation to VF traffic as part of SRIOV e-switch > offloading. > > The actual encap/decap is carried out (along with the matching and other > actions) per

Re: [PATCH] netlink: Change rtnl_dump_done to always show error

2017-05-30 Thread Stephen Hemminger
On Tue, 16 May 2017 14:22:46 -0700 David Ahern wrote: > The original code which became rtnl_dump_done only shows netlink errors > if the protocol is NETLINK_SOCK_DIAG, but netlink dumps always appends > the length which contains any error encountered during the dump. Update > rtnl_dump_done to al

Re: [PATCH net-next 0/8] Introduce bpf ID

2017-05-30 Thread David Ahern
On 5/30/17 6:08 PM, Martin KaFai Lau wrote: > This patch series: > 1) Introduce ID for both bpf_prog and bpf_map. > 2) Add bpf commands to iterate the prog IDs and map >IDs of the system. > 3) Add bpf commands to get a prog/map fd from an ID > 4) Add bpf command to get prog/map info from a fd.

Re: [PATCH 1/2] ip: include libc headers first

2017-05-30 Thread Stephen Hemminger
On Mon, 22 May 2017 16:27:53 +0300 Baruch Siach wrote: > Including libc headers first helps as a workaround to redefinition of struct > ethhdr with a suitably patched musl libc that suppresses the kernel > if_ether.h. > > Signed-off-by: Baruch Siach > --- > ip/iplink_bridge.c | 2 +- > 1 file

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
> > -Original Message- > > From: David Ahern [mailto:dsah...@gmail.com] > > Sent: Tuesday, May 30, 2017 11:42 AM > > To: Joe Perches; David Miller; cug...@163.com > > Cc: netdev@vger.kernel.org; YUAN Linyu > > Subject: Re: [PATCH net-next] net: ndisc.c: reduce size of > > __ndisc_fill_addr_

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
> -Original Message- > From: David Ahern [mailto:dsah...@gmail.com] > Sent: Tuesday, May 30, 2017 11:42 AM > To: Joe Perches; David Miller; cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH net-next] net: ndisc.c: reduce size of > __ndisc_fill_addr_option() >

RE: [PATCH net-next] net: ndisc.c: reduce size of __ndisc_fill_addr_option()

2017-05-30 Thread YUAN Linyu
Hi joe, > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Joe Perches > Sent: Tuesday, May 30, 2017 11:41 AM > To: David Miller; cug...@163.com > Cc: netdev@vger.kernel.org; dsah...@gmail.com; YUAN Linyu > Subject: Re: [PATCH net

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 05:06 PM, Andrew Lunn wrote: >> - past the initial setup, if we start creating bridge devices and so on, >> we have no way to tell: group Ports 0-3 together and send traffic to CPU >> port 0, then let Port 5 alone and send traffic to CPU port 1, that's a >> DSA-only problem though, be

[PATCH net-next 5/8] bpf: Add BPF_MAP_GET_FD_BY_ID

2017-05-30 Thread Martin KaFai Lau
Add BPF_MAP_GET_FD_BY_ID command to allow user to get a fd from a bpf_map's ID. bpf_map_inc_not_zero() is added and is called with map_idr_lock held. __bpf_map_put() is also added which has the 'bool do_idr_lock' param to decide if the map_idr_lock should be acquired when freeing the map->id. In

[PATCH net-next 6/8] bpf: Add jited_len to struct bpf_prog

2017-05-30 Thread Martin KaFai Lau
Add jited_len to struct bpf_prog. It will be useful for the struct bpf_prog_info which will be added in the later patch. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- arch/arm64/net/bpf_jit_comp.c | 1 + arch/powerpc/net/bpf_jit_comp64.c | 1 +

[PATCH net-next 2/8] bpf: Introduce bpf_map ID

2017-05-30 Thread Martin KaFai Lau
This patch generates an unique ID for each created bpf_map. The approach is similar to the earlier patch for bpf_prog ID. It is worth to note that the bpf_map's ID and bpf_prog's ID are in two independent ID spaces and both have the same valid range: [1, INT_MAX). Signed-off-by: Martin KaFai Lau

[PATCH net-next 3/8] bpf: Add BPF_(PROG|MAP)_GET_NEXT_ID command

2017-05-30 Thread Martin KaFai Lau
This patch adds BPF_PROG_GET_NEXT_ID and BPF_MAP_GET_NEXT_ID to allow userspace to iterate all bpf_prog IDs and bpf_map IDs. The API is trying to be consistent with the existing BPF_MAP_GET_NEXT_KEY. It is currently limited to CAP_SYS_ADMIN which we can consider to lift it in followup patches. S

[PATCH net-next 8/8] bpf: Test for bpf ID

2017-05-30 Thread Martin KaFai Lau
Add test to exercise the bpf_prog/map id generation, bpf_(prog|map)_get_next_id(), bpf_(prog|map)_get_fd_by_id() and bpf_get_obj_info_by_fd(). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/include/uapi/linux/bpf.h| 41 +++ too

[PATCH net-next 1/8] bpf: Introduce bpf_prog ID

2017-05-30 Thread Martin KaFai Lau
This patch generates an unique ID for each BPF_PROG_LOAD-ed prog. It is worth to note that each BPF_PROG_LOAD-ed prog will have a different ID even they have the same bpf instructions. The ID is generated by the existing idr_alloc_cyclic(). The ID is ranged from [1, INT_MAX). It is allocated in c

[PATCH net-next 7/8] bpf: Add BPF_OBJ_GET_INFO_BY_FD

2017-05-30 Thread Martin KaFai Lau
A single BPF_OBJ_GET_INFO_BY_FD cmd is used to obtain the info for both bpf_prog and bpf_map. The kernel can figure out the fd is associated with a bpf_prog or bpf_map. The suggested struct bpf_prog_info and struct bpf_map_info are not meant to be a complete list and it is not the goal of this pa

[PATCH net-next 4/8] bpf: Add BPF_PROG_GET_FD_BY_ID

2017-05-30 Thread Martin KaFai Lau
Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd from a bpf_prog's ID. bpf_prog_inc_not_zero() is added and is called with prog_idr_lock held. __bpf_prog_put() is also added which has the 'bool do_idr_lock' param to decide if the prog_idr_lock should be acquired when freeing the prog->

[PATCH net-next 0/8] Introduce bpf ID

2017-05-30 Thread Martin KaFai Lau
This patch series: 1) Introduce ID for both bpf_prog and bpf_map. 2) Add bpf commands to iterate the prog IDs and map IDs of the system. 3) Add bpf commands to get a prog/map fd from an ID 4) Add bpf command to get prog/map info from a fd. The prog/map info is a jump start in this patchset

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Andrew Lunn
> - past the initial setup, if we start creating bridge devices and so on, > we have no way to tell: group Ports 0-3 together and send traffic to CPU > port 0, then let Port 5 alone and send traffic to CPU port 1, that's a > DSA-only problem though, because we still have the CPU port(s) as > indepe

[PATCH net-next] bnxt_en: Fix xmit_more with BQL.

2017-05-30 Thread Michael Chan
We need to write the doorbell if BQL has stopped the queue and skb->xmit_more is set. Otherwise it is possible for the tx queue to rot and cause tx timeout. Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.") Suggested-by: Yuval Mintz Signed-off-by: Michael Chan --- drivers/net/ethernet/broa

[PATCH v5 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-30 Thread Woojung.Huh
From: Woojung Huh Adding maintainer of Microchip KSZ switches. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 42378cf..0fcb5e75 100644 --- a/MAIN

[PATCH v5 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-30 Thread Woojung.Huh
From: Woojung Huh Adding Microchip 9477 Phy included in KSZ9477 Switch. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- drivers/net/phy/micrel.c | 11 +++ include/linux/micrel_phy.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/drive

[PATCH v5 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-30 Thread Woojung.Huh
From: Woojung Huh Adding support for the Microchip KSZ switch family tail tagging. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- include/net/dsa.h | 1 + net/dsa/Kconfig| 3 ++ net/dsa/Makefile | 1 + net/dsa/dsa.c | 3 ++ net/dsa/d

[PATCH v5 net-next 4/5] net: dsa: Add Microchip KSZ switches binding

2017-05-30 Thread Woojung.Huh
From: Woojung Huh A sample SPI configuration for Microchip KSZ switches. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- Documentation/devicetree/bindings/net/dsa/ksz.txt | 72 +++ 1 file changed, 72 insertions(+) create mode 100644

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
From: Woojung Huh The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs. The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII or RMII. Either of these may connect directly to a ho

[PATCH v5 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-30 Thread Woojung.Huh
From: Woojung Huh This series of patches is for Microchip KSZ9477 DSA driver. KSZ9477 is 7 ports GigE switch with numerous advanced features. 5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have Interfaces to SGMII, RGMII, MII or RMII. This patch supports VLAN, MDB, FDB and port mirroring

Re: loosing netdevices with namespaces and unshare?

2017-05-30 Thread David Ahern
On 5/30/17 4:07 PM, Harald Welte wrote: > In case you're wondering what I'm actually trying to achieve: Find > an easy way to run a single program in an isolated namespace that only > has one physical (usb) ethernet device. I would like to execute that > program as unprivileged user but still be a

Re: [PATCH RFC net-next] arp: Really delete an arp entry on "arp -d"

2017-05-30 Thread Sowmini Varadhan
On (05/30/17 16:20), Stephen Hemminger wrote: > > Please don't copy/paste chunks of code. Instead refactor and make this > into a helper function. sure, I have no problems with that, and as I pointed out, I've not tested ipv6 for this yet either. I'll do all of this after getting some feedback o

Re: [PATCH RFC net-next] arp: Really delete an arp entry on "arp -d"

2017-05-30 Thread Stephen Hemminger
On Mon, 29 May 2017 20:48:16 -0700 Sowmini Varadhan wrote: > + np = &nht->hash_buckets[hash_val]; > + while ((n = rcu_dereference_protected(*np, > + lockdep_is_held(&tbl->lock))) != NULL) { > + write_lock(&n->lock); > + if (n == ndel) {

Re: loosing netdevices with namespaces and unshare?

2017-05-30 Thread Cong Wang
On Tue, May 30, 2017 at 3:07 PM, Harald Welte wrote: > But, to the contrary, this doesn't happen. The unshare-created netns is > gone, but the netdevice did not get moved back to the root namespace > either. The only hack to get back to the "eth0" device is to unload the > driver and re-load it.

[PATCH RFC net-next] arp: Really delete an arp entry on "arp -d"

2017-05-30 Thread Sowmini Varadhan
Noticed during some testing: the command # arp -s 62.2.0.1 a:b:c:d:e:f dev eth2 adds an entry like the following (listed by "arp -an") ? (62.2.0.1) at 0a:0b:0c:0d:0e:0f [ether] PERM on eth2 but the symmetric deletion command # arp -i eth2 -d 62.2.0.1 does not remove the PERM entry from the ta

Re: [PATCH 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume

2017-05-30 Thread Leonard Crestez
On Tue, 2017-05-30 at 15:19 -0700, Florian Fainelli wrote: > On 05/30/2017 03:08 PM, Leonard Crestez wrote: > > On Tue, 2017-05-30 at 11:05 -0700, Florian Fainelli wrote: > > > Should not we actually call kszphy_config_init() in order to restore > > > broadcast and nand disable bits as well? > >

RE: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
Hi Andrew, > > +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > > + const struct switchdev_obj_port_mdb *mdb) > > +{ > > + struct ksz_device *dev = ds->priv; > > + u32 static_table[4]; > > + u32 data; > > + int index; > > + int ret = 0; > > + u32 mac

[PATCH] net: freescale: fix potential null pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
Add NULL check before dereferencing pointer _id_ in order to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1397995 Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
+Jiri, Ido, On 05/30/2017 03:44 AM, John Crispin wrote: > Some boards have two CPU interfaces connected to the switch, e.g. WiFi > access points, with 1 port labeled WAN, 4 ports labeled lan1-lan4, and > two port connected to the SoC. > > This patch extends DSA to allows both CPU ports to be used

Suggest stable pick for nfnetlink_queue memory leak

2017-05-30 Thread Doug Anderson
Hi, I was running kmemleak on a kernel based on 4.4.64 and I noticed that my memory leak was fixed by commit b18bcb0019cf ("netfilter: nfnetlink_queue: fix memory leak when attach expectation successfully"). It seems like perhaps this should go to linux-stable? It's not a huge leak, but the fix

Re: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Andrew Lunn
> +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > + const struct switchdev_obj_port_mdb *mdb) > +{ > + struct ksz_device *dev = ds->priv; > + u32 static_table[4]; > + u32 data; > + int index; > + int ret = 0; > + u32 mac_hi, mac_lo; >

Re: [PATCH] net: fix auto-loading of Marvell DSA driver

2017-05-30 Thread Andrew Lunn
On Tue, May 30, 2017 at 09:38:18PM +0100, Russell King wrote: > Auto-loading of the Marvell DSA driver has stopped working with recent > kernels. This seems to be due to the change of binding for DSA devices, > moving them from the platform bus to the MDIO bus. > > In order for module auto-loadin

loosing netdevices with namespaces and unshare?

2017-05-30 Thread Harald Welte
Hi all, I know I'm kind of late to the party in terms of deeper exploration of Linux network namespaces. Also, I'm not sure if the netdev list is the riight place to ask, but a moderate amount of web searching didn't bring up a solution in multiple hours, and it seems like I could trigger the ker

Re: [PATCH 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties

2017-05-30 Thread Leonard Crestez
On Tue, 2017-05-30 at 11:10 -0700, Florian Fainelli wrote: > On 05/30/2017 10:34 AM, Leonard Crestez wrote: > > Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same > > register values can be set through the micrel phy driver by using dts > > properties. > > > > This seems prefera

Re: [PATCH 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume

2017-05-30 Thread Florian Fainelli
On 05/30/2017 03:08 PM, Leonard Crestez wrote: > On Tue, 2017-05-30 at 11:05 -0700, Florian Fainelli wrote: >> On 05/30/2017 10:34 AM, Leonard Crestez wrote: >>> These bits seem to be lost after a suspend/resume cycle so just set them >>> again. >>> >>> This patch fixes ethernet suspend/resume on i

Re: [PATCH 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume

2017-05-30 Thread Leonard Crestez
On Tue, 2017-05-30 at 11:05 -0700, Florian Fainelli wrote: > On 05/30/2017 10:34 AM, Leonard Crestez wrote: > > These bits seem to be lost after a suspend/resume cycle so just set them > > again. > > > > This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards. > > > > Signed-off-by: L

[PATCH net-next] netlink: include netnsid only when netns differs.

2017-05-30 Thread Flavio Leitner
Don't include netns id for notifications broadcasts when the socket and the skb are in the same netns because it will be an error which can't be distinguished from a peer netns failing to allocate an id. Signed-off-by: Flavio Leitner --- net/netlink/af_netlink.c | 6 -- 1 file changed, 4 ins

Re: [PATCH] dt-bindings: net: move FMan binding

2017-05-30 Thread Rob Herring
On Thu, May 25, 2017 at 12:57:26PM +, Madalin-Cristian Bucur wrote: > > -Original Message- > > From: David Miller [mailto:da...@davemloft.net] > > Sent: Monday, May 15, 2017 5:31 PM > > Subject: Re: [PATCH] dt-bindings: net: move FMan binding > > > > From: Madalin Bucur > > Date: Mon,

Re: [PATCH V2 1/3] Documentation: devicetree: add multiple cpu port DSA binding

2017-05-30 Thread Florian Fainelli
On 05/30/2017 03:44 AM, John Crispin wrote: > Extend the DSA binding documentation, adding the new property required > when there is more than one CPU port attached to the switch. > > Cc: Rob Herring > Cc: devicet...@vger.kernel.org > Signed-off-by: John Crispin > --- > Documentation/devicetree

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread kbuild test robot
Hi Vivien, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Vivien-Didelot/net-dsa-tagger-simplification/20170531-032911 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubuser

Re: [PATCH net-next v2 6/6] net: dsa: factor skb freeing on xmit

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The taggers are currently responsible to free the original SKB if they > made a copy of it, or in case of error. > > This patch simplifies this by freeing the original SKB in the > dsa_slave_xmit caller, but only if an error (NULL) is returned. Is n

Re: [PATCH net-next v2 5/6] net: dsa: remove out_drop label in taggers rcv

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto > label which simply returns NULL. Kill it in favor of the obvious. Why not > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 3/6] net: dsa: remove dsa_uses_tagged_protocol

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > Since dev->dsa_ptr is a pointer to a dsa_switch_tree, there is no need > to have another inline helper just to check rcv. > > Remove dsa_uses_tagged_protocol and check dsa_ptr && dsa_ptr->rcv > together at the same time. > > Signed-off-by: Vivien Di

[PATCH] net: fix auto-loading of Marvell DSA driver

2017-05-30 Thread Russell King
Auto-loading of the Marvell DSA driver has stopped working with recent kernels. This seems to be due to the change of binding for DSA devices, moving them from the platform bus to the MDIO bus. In order for module auto-loading to work, we need to provide a MODALIAS string in the uevent file for t

Re: [PATCH net-next v2 2/6] net: dsa: do not cast dst

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > dsa_ptr is not a void pointer anymore since Nov 2011, as of cf50dcc24f82 > ("dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions"), > but an explicit dsa_switch_tree pointer, thus remove the (void *) cast. > > Signed-off-by: Vivien Didel

Re: [PATCH net-next v2 1/6] net: dsa: comment hot path requirements

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The DSA layer uses inline helpers and copies of the tagging functions > for faster access in hot path. Add comments to detail that. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

[PATCH net-next 2/9] bpf: split bpf core interpreter

2017-05-30 Thread Alexei Starovoitov
split __bpf_prog_run() interpreter into stack allocation and execution parts. The code section shrinks which helps interpreter performance in some cases. textdata bss dec hex filename 26350 10328 624 3730291b6 kernel/bpf/core.o.before 25777 10328 624 36729

[PATCH net-next 7/9] bpf: use different interpreter depending on required stack size

2017-05-30 Thread Alexei Starovoitov
16 __bpf_prog_run() interpreters for various stack sizes add .text but not a lot comparing to run-time stack savings textdata bss dec hex filename 26350 10328 624 3730291b6 kernel/bpf/core.o.before_split 25777 10328 624 367298f79 kernel/bpf/core.o.aft

Re: [patch net-next 0/9] mlxsw: Support firmware flash

2017-05-30 Thread Or Gerlitz
On Sun, May 28, 2017 at 10:26 AM, Yotam Gigi wrote: > On 05/23/2017 06:38 PM, David Miller wrote: >> From: Yotam Gigi >> Date: Tue, 23 May 2017 18:14:15 +0300 >>> Sorry, I am not sure I understand. You think that drivers should not >>> implement >>> ethtool's flash_device callback anymore? do y

[PATCH net-next 1/9] bpf: free up BPF_JMP | BPF_CALL | BPF_X opcode

2017-05-30 Thread Alexei Starovoitov
free up BPF_JMP | BPF_CALL | BPF_X opcode to be used by actual indirect call by register and use kernel internal opcode to mark call instruction into bpf_tail_call() helper. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- arch/arm64/net/bpf_jit_comp.c | 2 +- arch/powerpc/ne

[PATCH net-next 6/9] bpf: fix stack_depth usage by test_bpf.ko

2017-05-30 Thread Alexei Starovoitov
test_bpf.ko doesn't call verifier before selecting interpreter or JITing, hence the tests need to manually specify the amount of stack they consume. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib/test_bpf.c | 25 - 1 file changed, 24 insertions(+), 1

[PATCH net-next 0/9] bpf: stack depth tracking

2017-05-30 Thread Alexei Starovoitov
Introduce tracking of bpf program stack depth in the verifier and use that info to reduce bpf program stack consumption in the interpreter and x64 JIT. Other JITs can take advantage of it as well in the future. Most of the programs consume very little stack, so it's good optimization in general and

[PATCH net-next 9/9] bpf: take advantage of stack_depth tracking in x64 JIT

2017-05-30 Thread Alexei Starovoitov
Take advantage of stack_depth tracking in x64 JIT. Round up allocated stack by 8 bytes to make sure it stays aligned for functions called from JITed bpf program. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- arch/x86/net/bpf_jit_comp.c | 9 + 1 file changed, 5 insertio

[PATCH net-next 8/9] bpf: change x86 JITed program stack layout

2017-05-30 Thread Alexei Starovoitov
in order to JIT programs with different stack sizes we need to make epilogue and exception path to be stack size independent, hence move auxiliary stack space from the bottom of the stack to the top of the stack. Nice side effect is that JITed function prologue becomes shorter due to imm8 offset en

[PATCH net-next 5/9] bpf: track stack depth of classic bpf programs

2017-05-30 Thread Alexei Starovoitov
To track stack depth of classic bpf programs we only need to analyze ST|STX instructions, since check_load_and_stores() verifies that programs can load from stack only after write. We also need to change the way cBPF stack slots map to eBPF stack, since typical classic programs are using slots 0 a

[PATCH net-next 3/9] bpf: teach verifier to track stack depth

2017-05-30 Thread Alexei Starovoitov
teach verifier to track bpf program stack depth Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- include/linux/bpf.h | 1 + kernel/bpf/verifier.c | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 6bb

[PATCH net-next 4/9] bpf: reconcile bpf_tail_call and stack_depth

2017-05-30 Thread Alexei Starovoitov
The next set of patches will take advantage of stack_depth tracking, so make sure that the program that does bpf_tail_call() has stack depth large enough for the callee. We could have tracked the stack depth of the prog_array owner program and only allow insertion of the programs with stack depth l

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Vivien Didelot
Florian Fainelli writes: >> Is orig_dev really needed in the tagging implementation, or only in the >> layer above? (dsa_slave_xmit and dsa_switch_rcv.) > > It's needed: > > https://github.com/ffainelli/linux/commits/switch-tag > https://github.com/ffainelli/linux/commit/61f9ca70dd21bb8c1615f9599

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:55 PM, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli writes: > >> I actually have a patch pending that adds support for HW >> insertion/extraction of switch tags (broadcom HW supports that) which >> require the orig_dev to be there so we know what features are support

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > I actually have a patch pending that adds support for HW > insertion/extraction of switch tags (broadcom HW supports that) which > require the orig_dev to be there so we know what features are supported > by the master network device. Is orig_dev really ne

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, Vivien Didelot writes: >> +int port_cpu = ds->ports[port].upstream; > > ds->ports[port] is p->dp. I misread this part, p is not yet allocated in that chunk, please ignore this one comment ;-) Thanks, Vivien

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, John Crispin writes: > +static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int p) > +{ > + return dsa_is_cpu_port(ds, p) || dsa_is_dsa_port(ds, p); > +} This looks confusing to me. What DSA calls an "upstream" port for the moment is the port which goes to the CPU interf

Re: [net-wireless-orinoco] question about potential null pointer dereference

2017-05-30 Thread Johannes Berg
Hi, > The issue here is that line 56 implies that pointer tfm_michael > might be NULL. If this is the case, there is a potential NULL > pointer dereference at line 52 once pointer tfm_michael is > indirectly dereferenced inside macro SHASH_DESC_ON_STACK(). > > My question is if there is any chanc

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:15 PM, Florian Fainelli wrote: > Hi John, > > On 05/30/2017 11:37 AM, John Crispin wrote: >> Hi, >> >> the patch series is based on net-next from 12 hours ago and works fine >> on that tree. I compile and runtime tested it quite intensively on >> various boards > > The warning is

Re: [PATCH linux-firmware] Mellanox: Add firmware for mlxsw_spectrum

2017-05-30 Thread Kyle McMartin
On Mon, May 29, 2017 at 01:42:28PM +0300, Yotam Gigi wrote: > Add first firmware for the Mellanox Spectrum switch, as a followup to the > recently added commit: > 6b7421992b8d ("mlxsw: spectrum: Validate firmware revision on init") > > The version of the firmware release is 13.1420.122 > > Signed

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-30 Thread Kees Cook
Forwarding this to net-dev and eBPF folks, who weren't on CC... -Kees On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. > > This patch is e

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
err = dsa_user_parse(port, index, ds); if (err) return err; > > John > > > On 30/05/17 17:38, kbuild test robot wrote: >> Hi John, >> >> [auto build test ERROR on net-next/master] >> [also bui

Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types

2017-05-30 Thread Peter Zijlstra
On Tue, May 30, 2017 at 10:37:46AM -0700, Alexei Starovoitov wrote: > On 5/30/17 9:51 AM, Peter Zijlstra wrote: > > I'm not entirely sure I see how that is required. Should per task not > > already work? The WARN that's there will only trigger if you call them > > on the wrong task, which is somet

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Florian Fainelli
Hey Vivien, On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The struct dsa_device_ops defines the rcv function with 2 unused > arguments struct packet_type *pt, and struct net_device *orig_dev. > > This patch removes them from the definition and implementations. > > Reviewed-by: Andrew Lunn > S

  1   2   3   >