RE: [PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-05-02 Thread Gao Feng
> From: Xin Long [mailto:lucien@gmail.com] > Sent: Wednesday, May 3, 2017 1:38 PM > On Wed, May 3, 2017 at 10:07 AM, Gao Feng > wrote: > >> From: netdev-ow...@vger.kernel.org > >> [mailto:netdev-ow...@vger.kernel.org] > >> On Behalf Of Xin Long > >> Sent: Wednesday, May 3, 2017 12:59 AM On Tue

Re: [PATCH iproute2 net 0/8] tc/act_pedit: Support offset relative to conventional header

2017-05-02 Thread Amir Vadai
On Mon, May 01, 2017 at 09:26:25AM -0700, Stephen Hemminger wrote: > On Sun, 23 Apr 2017 15:53:48 +0300 > Amir Vadai wrote: > > > Hi Stephen, > > > > This patchset extends pedit to support modifying a field in an offset > > relative > > to the conventional network headers (kenrel support was ad

Re: [net-next PATCH 0/4] Improve bpf ELF-loader under samples/bpf

2017-05-02 Thread Jesper Dangaard Brouer
On Tue, 02 May 2017 23:10:04 +0200 Daniel Borkmann wrote: > On 05/02/2017 02:31 PM, Jesper Dangaard Brouer wrote: > > This series improves and fixes bpf ELF loader and programs under > > samples/bpf. The bpf_load.c created some hard to debug issues when > > the struct (bpf_map_def) used in the E

Re: [net-next PATCH 2/4] samples/bpf: make bpf_load.c code compatible with ELF maps section changes

2017-05-02 Thread Jesper Dangaard Brouer
On Tue, 2 May 2017 17:54:51 -0700 Alexei Starovoitov wrote: > On Tue, May 02, 2017 at 02:31:56PM +0200, Jesper Dangaard Brouer wrote: > > This patch does proper parsing of the ELF "maps" section, in-order to > > be both backwards and forwards compatible with changes to the map > > definition stru

Re: [PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-05-02 Thread Xin Long
On Wed, May 3, 2017 at 10:07 AM, Gao Feng wrote: >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of Xin Long >> Sent: Wednesday, May 3, 2017 12:59 AM >> On Tue, May 2, 2017 at 7:03 PM, Gao Feng wrote: >> >> From: Xin Long [mailto:lucien@gmail.com] >> >

Re: [PATCH 1/1] IB/mlx5: Add port_xmit_wait to counter registers read

2017-05-02 Thread Leon Romanovsky
On Mon, May 01, 2017 at 05:30:08PM +0100, Tim Wright wrote: > Add port_xmit_wait to the error counters read by mlx5_ib_process_mad to > ensure sysfs port counter provides correct value for PortXmitWait. > Otherwise the sysfs port_xmit_wait file always contains zero. > > The previous MAD_IFC impleme

Re: [PATCH] xdp: use common helper for netlink extended ack reporting

2017-05-02 Thread Johannes Berg
On Wed, 2017-05-03 at 00:39 +0200, Daniel Borkmann wrote: > Small follow-up to d74a32acd59a ("xdp: use netlink extended ACK > reporting") > in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper > macro > for reporting. This also ensures that we consistently add the > driver's > prefi

Re: [PATCH v4 net-next 00/10] net/ncsi: Add debugging functionality

2017-05-02 Thread David Miller
Sorry, the net-next tree is closed right now as we are in the merge window. Please resubmit this when the net-next tree opens back up. Thank you.

[PATCH v4 net-next 05/10] net/ncsi: Ethtool operation to get NCSI channel info

2017-05-02 Thread Gavin Shan
This adds ethtool command (ETHTOOL_GNCSICINFO) to retrieve the NCSI channel information for the specified one. The simplified output of this command is shown as follows from the modified (private) ethtool: # ethtool --ncsi eth0 info NCSI channel 0:0 version: version: alpha2

[PATCH v4 net-next 06/10] net/ncsi: Ethtool operation to get NCSI hw statistics

2017-05-02 Thread Gavin Shan
This adds ethtool command (ETHTOOL_GNCSISTATS) to retrieve the NCSI hardware statistics. The simplified output of this command is shown as follows from the modified (private) ethtool. It's obvious the HW statistics isn't fetched from hardware yet, which is to be sorted out later. # ethtool --ncsi

[PATCH v4 net-next 07/10] net/ncsi: Ethtool operation to get NCSI sw statistics

2017-05-02 Thread Gavin Shan
This adds ethtool command (ETHTOOL_GNCSISWSTATS) to retrieve the NCSI software statistics. The simplified output of this command is shown as follows from the modified (private) ethtool. COMMAND OK TIMEOUT ERROR CIS 32 29 0 S

[PATCH v4 net-next 04/10] net/ncsi: Ethtool operation to get NCSI topology

2017-05-02 Thread Gavin Shan
This adds ethtool command (ETHTOOL_GNCSICHANNELS) to retrieve the NCSI channels that are associated with the specified netdev. The ethtool operation (get_ncsi_channels()) is initialized or destroyed when the NCSI device is registerred or unregistered. The userspace and kernel has to negotiate on th

[PATCH v4 net-next 03/10] net/ncsi: Enforce failover on link monitor timeout

2017-05-02 Thread Gavin Shan
The NCSI channel has been configured to provide service if its link monitor timer is enabled, regardless of its state (inactive or active). So the timeout event on the link monitor indicates the out-of-service on that channel, for which a failover is needed. This sets NCSI_DEV_RESHUFFLE flag to en

[PATCH v4 net-next 01/10] net/ncsi: Disable HWA mode when no channels are found

2017-05-02 Thread Gavin Shan
When there are no NCSI channels probed, HWA (Hardware Arbitration) mode is enabled. It's not correct because HWA depends on the fact: NCSI channels exist and all of them support HWA mode. This disables HWA when no channels are probed. Signed-off-by: Gavin Shan --- net/ncsi/ncsi-manage.c | 12 +++

[PATCH v4 net-next 02/10] net/ncsi: Properly track channel monitor timer state

2017-05-02 Thread Gavin Shan
The field @monitor.enabled in the NCSI channel descriptor is used to track the state of channel monitor timer. It indicates the timer's state (pending or not). We could not start the timer again in its handler. In that case, We missed to update @monitor.enabled to false. It leads to below warning p

[PATCH v4 net-next 09/10] net/ncsi: No error report on DP response to non-existing package

2017-05-02 Thread Gavin Shan
The issue was found from /sys/kernel/debug/ncsi/eth0/stats. The first step in NCSI package/channel enumeration is deselect all packages by sending DP (Deselect Package) commands. The remote NIC replies with response while the corresponding package isn't populated yet and it is treated as an error w

[PATCH v4 net-next 00/10] net/ncsi: Add debugging functionality

2017-05-02 Thread Gavin Shan
This series supports NCSI debugging infrastructure by adding several ethtool commands and one debugfs file. It was inspired by the reported issues: No available package and channel are probed successfully. Obviously, we don't have a debugging infrastructure for NCSI stack yet. The first 3 patches,

[PATCH v4 net-next 10/10] net/ncsi: Fix length of GVI response packet

2017-05-02 Thread Gavin Shan
The length of GVI (GetVersionInfo) response packet should be 40 instead of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats. # ethtool --ncsi eth0 swstats : RESPONSE OK TIMEOUT ERROR === GVI 002 With t

[PATCH v4 net-next 08/10] net/ncsi: Support NCSI packet generation

2017-05-02 Thread Gavin Shan
This introduces /sys/kernel/debug/ncsi/eth0/pkt. The debugfs entry can accept parameters to produce NCSI command packet. The received NCSI response packet is dumped on read. Below is an example to send CIS command and dump its response. # echo CIS,0,0 > /sys/kernel/debug/ncsi/eth0/pkt # cat

[PATCH 1/1] forcedeth: remove unnecessary carrier status check

2017-05-02 Thread Zhu Yanjun
Since netif_carrier_on() will do nothing if device's carrier is already on, so it's unnecessary to do carrier status check. It's the same for netif_carrier_off(). Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/nvidia/forcedeth.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) d

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Casey Leedom
| From: Alexander Duyck | Date: Tuesday, May 2, 2017 11:10 AM | ... | So for example, in the case of x86 it seems like there are multiple | root complexes that have issues, and the gains for enabling it with | standard DMA to host memory are small. As such we may want to default | it to off via th

[PATCH net-next] selftests/bpf: get rid of -D__x86_64__

2017-05-02 Thread Alexei Starovoitov
-D__x86_64__ workaround was used to make /usr/include/features.h to follow expected path through the system include headers. This is not portable. Instead define dummy stubs.h which is used by 'clang -target bpf' Fixes: 6882804c916b ("selftests/bpf: add a test for overlapping packet range checks"

Re: linux-next: manual merge of the net-next tree with Linus' tree

2017-05-02 Thread David Miller
From: Stephen Rothwell Date: Wed, 3 May 2017 11:07:03 +1000 > Hi all, > > Today's linux-next merge of the net-next tree got a conflict in: > > arch/avr32/include/uapi/asm/socket.h > > between commit: > > 26202873bb51 ("avr32: remove support for AVR32 architecture") > > from Linus' tree a

Re: TPACKET_V3 timeout bug?

2017-05-02 Thread Guy Harris
On May 2, 2017, at 10:16 AM, chetan loke wrote: > Commit that caused it: > > https://github.com/torvalds/linux/commit/41a50d621a321b4c15273cc1b5ed41437f4acdfb > > Reverting that change is what we need. As long as you do *not* revert https://github.com/torvalds/linux/commit/da413eec72

[PATCH net-next] selftests/bpf: add a test case to check verifier pointer arithmetic

2017-05-02 Thread Alexei Starovoitov
From: Yonghong Song With clang/llvm 4.0+, the test case is able to generate the following pattern: 440: (b7) r1 = 15 441: (05) goto pc+73 515: (79) r6 = *(u64 *)(r10 -152) 516: (bf) r7 = r10 517: (07) r7 += -112 518: (bf) r2 = r7 519: (0f) r2 += r1 520: (71) r1 = *(u8 *)(r8 +0) 521: (73) *(u

RE: [PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-05-02 Thread Gao Feng
> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Xin Long > Sent: Wednesday, May 3, 2017 12:59 AM > On Tue, May 2, 2017 at 7:03 PM, Gao Feng wrote: > >> From: Xin Long [mailto:lucien@gmail.com] > >> Sent: Tuesday, May 2, 2017 3:56 PM > >> On Sat, Apr 29

Re: [PATCH net-next RFC 1/1] net netlink: Add new type NLA_FLAG_BITS

2017-05-02 Thread Jamal Hadi Salim
On 17-05-02 03:03 PM, David Miller wrote: From: Jamal Hadi Salim Date: Sun, 30 Apr 2017 10:28:39 -0400 Generic bitflags attribute content sent to the kernel by user. With this type the user can either set or unset a flag in the kernel. You asked for feedback, here it is :-) I think this is

RE: [Intel-wired-lan] [PATCH] igb: make a few local functions static

2017-05-02 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Colin King > Sent: Thursday, April 27, 2017 10:59 AM > To: Kirsher, Jeffrey T ; intel-wired- > l...@lists.osuosl.org; netdev@vger.kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org >

RE: [Intel-wired-lan] [PATCH net-next] igb: mark PM functions as __maybe_unused

2017-05-02 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Arnd Bergmann > Sent: Thursday, April 27, 2017 12:10 PM > To: Kirsher, Jeffrey T > Cc: Arnd Bergmann ; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; intel-wired-...@lists.osuosl.org; David S. Miller

linux-next: manual merge of the net-next tree with Linus' tree

2017-05-02 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: arch/avr32/include/uapi/asm/socket.h between commit: 26202873bb51 ("avr32: remove support for AVR32 architecture") from Linus' tree and commits: a2d133b1d465 ("sock: introduce SO_MEMINFO getsockopt") 6d4339028b35

Re: [net-next PATCH 2/4] samples/bpf: make bpf_load.c code compatible with ELF maps section changes

2017-05-02 Thread Alexei Starovoitov
On Tue, May 02, 2017 at 02:31:56PM +0200, Jesper Dangaard Brouer wrote: > This patch does proper parsing of the ELF "maps" section, in-order to > be both backwards and forwards compatible with changes to the map > definition struct bpf_map_def, which gets compiled into the ELF file. > > The assump

Re: [net-next PATCH 1/4] samples/bpf: adjust rlimit RLIMIT_MEMLOCK for traceex2, tracex3 and tracex4

2017-05-02 Thread Alexei Starovoitov
On Tue, May 02, 2017 at 02:31:50PM +0200, Jesper Dangaard Brouer wrote: > Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf > samples > as these are using more and larger maps than can fit in distro default > 64Kbytes limit. > > Signed-off-by: Jesper Dangaard Brouer ... >

RE: [PATCH net v4 00/12] Fix possbile memleaks when fail to register_netdevice

2017-05-02 Thread Gao Feng
Hi David > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, May 3, 2017 3:30 AM > From: gfree.w...@foxmail.com > Date: Tue, 2 May 2017 13:58:42 +0800 > [...] > > > > This solution doesn't only make sure free all resources in any case, > > but also follows the original desgin th

Re: [PATCH] ipx: call ipxitf_put() in ioctl error path

2017-05-02 Thread Kees Cook
On Tue, May 2, 2017 at 3:58 AM, Dan Carpenter wrote: > We should call ipxitf_put() if the copy_to_user() fails. > > Reported-by: 李强 > Signed-off-by: Dan Carpenter > > diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c > index 8a9219ff2e77..fa31ef29e3fa 100644 > --- a/net/ipx/af_ipx.c > +++ b/net/i

[PATCH] Fix for new version of realtek r8153

2017-05-02 Thread jake Briggs
From: jake Fix for new version of realtek r8153 not being recognised by the r8152 driver. The new version of the device with idVendor=0bda, idProduct=8153 is 6010 and treating it as if it was a 5c30 allow it to work. Error log: Apr 19 09:55:13 devotron kernel: [ 330.167074] usb 2-2.2: New USB

Re: [PATCH] xdp: use common helper for netlink extended ack reporting

2017-05-02 Thread Jakub Kicinski
On Wed, 3 May 2017 00:39:17 +0200, Daniel Borkmann wrote: > Small follow-up to d74a32acd59a ("xdp: use netlink extended ACK reporting") > in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper macro > for reporting. This also ensures that we consistently add the driver's > prefix for

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Alexander Duyck
On Tue, May 2, 2017 at 12:34 PM, Raj, Ashok wrote: > On Tue, May 02, 2017 at 11:10:22AM -0700, Alexander Duyck wrote: >> On Tue, May 2, 2017 at 9:53 AM, Raj, Ashok wrote: >> > On Tue, May 02, 2017 at 09:39:34AM -0700, Alexander Duyck wrote: >> >> On Mon, May 1, 2017 at 4:13 PM, Casey Leedom wrot

[PATCH] xdp: use common helper for netlink extended ack reporting

2017-05-02 Thread Daniel Borkmann
Small follow-up to d74a32acd59a ("xdp: use netlink extended ACK reporting") in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper macro for reporting. This also ensures that we consistently add the driver's prefix for dumping the report in user space to indicate that the error messag

Re: [PATCH net-next V3 2/2] rtnl: Add support for netdev event attribute to link messages

2017-05-02 Thread David Ahern
On 5/1/17 7:35 AM, Vlad Yasevich wrote: > So, it looks like the notifier might be there to account for the ioctl/sysfs > interfaces. hmmm... I guess we have to leave it then. > > Additionally, the message is not generated from do_setlink() if the devices is > down, so notifier accounts for that

RE: [PATCH v6 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-05-02 Thread David.Cai
Andrew: Got it, Thanks! David Cai -Original Message- From: Andrew Lunn [mailto:and...@lunn.ch] Sent: Tuesday, May 02, 2017 2:39 PM To: David Cai - C24226 Cc: netdev@vger.kernel.org; da...@davemloft.net; UNGLinuxDriver; steve.glendinn...@shawell.net Subject: Re: [PATCH v6 net-next]smsc9

[PATCH net] net: ipv6: Do not duplicate DAD on link up

2017-05-02 Thread David Ahern
Andrey reported a warning triggered by the rcu code: [ cut here ] WARNING: CPU: 1 PID: 5911 at lib/debugobjects.c:289 debug_print_object+0x175/0x210 ODEBUG: activate active (active state 1) object type: rcu_head hint: (null) Modules linked in: CPU: 1 PID: 5911 Comm:

Re: [PATCH v6 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-05-02 Thread Andrew Lunn
On Tue, May 02, 2017 at 08:59:14PM +, david@microchip.com wrote: > From: David Cai > > Adding support for Microchip LAN9250 Ethernet controller. > > Signed-off-by: David Cai Hi David FYI: It is normal to add here any Reviewed-by: or Tested-by, etc you received from previous versions o

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread Stephen Hemminger
On Tue, 2 May 2017 14:39:40 -0600 David Ahern wrote: > On 5/2/17 1:49 PM, Stephen Hemminger wrote: > > I am not disagreeing that iproute2 should handle the extended > > error format. Just want the solution to be as small as possible; > > ie do no more than is absolutely necessary. And future proo

Re: [net-next PATCH 0/4] Improve bpf ELF-loader under samples/bpf

2017-05-02 Thread Daniel Borkmann
On 05/02/2017 02:31 PM, Jesper Dangaard Brouer wrote: This series improves and fixes bpf ELF loader and programs under samples/bpf. The bpf_load.c created some hard to debug issues when the struct (bpf_map_def) used in the ELF maps section format changed in commit fb30d4b71214 ("bpf: Add tests f

[PATCH v6 net-next]smsc911x: Adding support for Micochip LAN9250 Ethernet controller

2017-05-02 Thread David.Cai
From: David Cai Adding support for Microchip LAN9250 Ethernet controller. Signed-off-by: David Cai --- Changes V2 - email format changed - remove unnecessary text in commit log Changes V3 - defined all supported Ethernet controller chip ID. V4 - changed 'if (pdata->generation == 4 && pdata-

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread David Ahern
On 5/2/17 1:49 PM, Stephen Hemminger wrote: > I am not disagreeing that iproute2 should handle the extended > error format. Just want the solution to be as small as possible; > ie do no more than is absolutely necessary. And future proof > for the inevitable growth in new area. Understood. I was t

Re: [net-next PATCH 0/4] Improve bpf ELF-loader under samples/bpf

2017-05-02 Thread Daniel Borkmann
On 05/02/2017 09:40 PM, David Miller wrote: From: Jesper Dangaard Brouer Date: Tue, 02 May 2017 14:31:45 +0200 This series improves and fixes bpf ELF loader and programs under samples/bpf. The bpf_load.c created some hard to debug issues when the struct (bpf_map_def) used in the ELF maps sect

Re: [RFC PATCH v2 07/17] net: sched: drop qdisc_reset from dev_graft_qdisc

2017-05-02 Thread Jesper Dangaard Brouer
On Tue, 02 May 2017 08:38:19 -0700 John Fastabend wrote: > @@ -991,20 +996,25 @@ void dev_deactivate_many(struct list_head *head) >&noop_qdisc); > > dev_watchdog_down(dev); > - sync_needed |= !dev->dismantle; > } > >

Re: [net-next 0/2] tipc: refactor socket receive functions

2017-05-02 Thread David Miller
From: Jon Maloy Date: Tue, 2 May 2017 18:16:52 +0200 > We try to make the functions tipc_sk_recvmsg() and > tipc_sk_recvstream() more readable. Series applied, thanks.

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread Stephen Hemminger
I am not disagreeing that iproute2 should handle the extended error format. Just want the solution to be as small as possible; ie do no more than is absolutely necessary. And future proof for the inevitable growth in new area. > + > +static const __u8 nla_attr_minlen[NLA_TYPE_MAX+1] = { > + [N

Re: [PATCH v3 net-next 00/11] ibmvnic: Updated reset handler and code fixes

2017-05-02 Thread David Miller
From: Nathan Fontenot Date: Tue, 02 May 2017 14:52:11 -0400 > This set of patches multiple code fixes and a new rest handler > for the ibmvnic driver. In order to implement the new reset handler > for the ibmvnic driver resource initialization needed to be moved to > its own routine, a state vari

Re: [PATCH 0/9] net: thunderx: Adds XDP support

2017-05-02 Thread David Miller
From: sunil.kovv...@gmail.com Date: Tue, 2 May 2017 18:36:49 +0530 > From: Sunil Goutham > > This patch series adds support for XDP to ThunderX NIC driver > which is used on CN88xx, CN81xx and CN83xx platforms. > > Patches 1-4 are performance improvement and cleanup patches > which are done k

Re: [net-next PATCH 0/4] Improve bpf ELF-loader under samples/bpf

2017-05-02 Thread David Miller
From: Jesper Dangaard Brouer Date: Tue, 02 May 2017 14:31:45 +0200 > This series improves and fixes bpf ELF loader and programs under > samples/bpf. The bpf_load.c created some hard to debug issues when > the struct (bpf_map_def) used in the ELF maps section format changed > in commit fb30d4b712

Re: [PATCH] ipx: call ipxitf_put() in ioctl error path

2017-05-02 Thread David Miller
From: Dan Carpenter Date: Tue, 2 May 2017 13:58:53 +0300 > We should call ipxitf_put() if the copy_to_user() fails. > > Reported-by: 李强 > Signed-off-by: Dan Carpenter Applied, thanks Dan.

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Raj, Ashok
On Tue, May 02, 2017 at 11:10:22AM -0700, Alexander Duyck wrote: > On Tue, May 2, 2017 at 9:53 AM, Raj, Ashok wrote: > > On Tue, May 02, 2017 at 09:39:34AM -0700, Alexander Duyck wrote: > >> On Mon, May 1, 2017 at 4:13 PM, Casey Leedom wrote: > >> > The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING

Re: [patch net-next repost] net: sched: add helpers to handle extended actions

2017-05-02 Thread David Miller
From: Jiri Pirko Date: Tue, 2 May 2017 10:12:00 +0200 > From: Jiri Pirko > > Jump is now the only one using value action opcode. This is going to > change soon. So introduce helpers to work with this. Convert TC_ACT_JUMP. > > This also fixes the TC_ACT_JUMP check, which is incorrectly done as

Re: [PATCH net 0/2] qed*: PTP bug fixes.

2017-05-02 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Tue, 2 May 2017 01:11:01 -0700 > The series addresses couple of issues in the PTP implementation. Series applied.

Re: [PATCH v2] stmmac: Add support for SIMATIC IOT2000 platform

2017-05-02 Thread David Miller
From: Jan Kiszka Date: Tue, 2 May 2017 09:58:00 +0200 > The IOT2000 is industrial controller platform, derived from the Intel > Galileo Gen2 board. The variant IOT2020 comes with one LAN port, the > IOT2040 has two of them. They can be told apart based on the board asset > tag in the DMI table. >

Re: [PATCH net v4 00/12] Fix possbile memleaks when fail to register_netdevice

2017-05-02 Thread David Miller
From: gfree.w...@foxmail.com Date: Tue, 2 May 2017 13:58:42 +0800 > These following drivers allocate kinds of resources in its ndo_init > func, free some of them or all in the destructor func. Then there is > one memleak that some errors happen after register_netdevice invokes > the ndo_init call

Re: [PATCH net v2] net: hns: fix ethtool_get_strings overflow in hns driver

2017-05-02 Thread David Miller
From: Timmy Li Date: Tue, 2 May 2017 10:46:52 +0800 > hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated > is not enough for ethtool_get_strings(), which will cause random memory > corruption. > > When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the > t

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

2017-05-02 Thread David Miller
From: Eric Dumazet Date: Mon, 01 May 2017 15:29:48 -0700 > From: Eric Dumazet > > Be careful when comparing tcp_time_stamp to some u32 quantity, > otherwise result can be surprising. > > Fixes: 7c106d7e782b ("[TCP]: TCP Low Priority congestion control") > Signed-off-by: Eric Dumazet Applied

Re: [PATCH net] bpf, arm64: fix jit branch offset related to ldimm64

2017-05-02 Thread David Miller
From: Daniel Borkmann Date: Tue, 2 May 2017 20:34:54 +0200 > When the instruction right before the branch destination is > a 64 bit load immediate, we currently calculate the wrong > jump offset in the ctx->offset[] array as we only account > one instruction slot for the 64 bit load immediate al

Re: [PATCH net-next RFC 1/1] net netlink: Add new type NLA_FLAG_BITS

2017-05-02 Thread David Miller
From: Jamal Hadi Salim Date: Sun, 30 Apr 2017 10:28:39 -0400 > Generic bitflags attribute content sent to the kernel by user. > With this type the user can either set or unset a flag in the > kernel. You asked for feedback, here it is :-) I think this is overengineered. Just define a u32 for t

Re: [PATCH] net: ethernet: stmmac: properly set PS bit in MII configurations during reset

2017-05-02 Thread David Miller
Someone needs to review this patch.

Re: [PATCH net-next v2] net: ipv6: make sure multicast packets are not forwarded beyond the different scopes

2017-05-02 Thread David Miller
From: Donatas Abraitis Date: Thu, 27 Apr 2017 10:12:02 +0300 > RFC4291 2.7 Routers must not forward any multicast packets > beyond of the scope indicated by the scop field in the > destination multicast address. > > Signed-off-by: Donatas Abraitis I think it's a "

[PATCH] bonding: Use seq_putc() in bond_info_show_master()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 20:48:36 +0200 A few single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/bonding/bond_procfs.c | 6 ++

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread David Miller
From: David Ahern Date: Tue, 2 May 2017 12:39:51 -0600 > On 5/2/17 12:03 PM, Stephen Hemminger wrote: >> Then use libmnl it is already used in several other places in iproute2. >> Eventually, I would like to use it everywhere and get rid of old netlink >> parser. >> > > Why? libmnl is not goin

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread David Ahern
On 5/2/17 12:03 PM, Stephen Hemminger wrote: > Then use libmnl it is already used in several other places in iproute2. > Eventually, I would like to use it everywhere and get rid of old netlink > parser. > Why? libmnl is not going to simplify the iproute2 code. Look at attribute validation. Imp

Re: net/smc and the RDMA core

2017-05-02 Thread Bart Van Assche
On Tue, 2017-05-02 at 14:25 +0200, Ursula Braun wrote: > if you can point out specific issues, we will be happy to work with you > to get them addressed! Hello Ursula, My list of issues that I would like to see addressed can be found below. Doug, Christoph and others may have additional inputs. T

[PATCH net] bpf, arm64: fix jit branch offset related to ldimm64

2017-05-02 Thread Daniel Borkmann
When the instruction right before the branch destination is a 64 bit load immediate, we currently calculate the wrong jump offset in the ctx->offset[] array as we only account one instruction slot for the 64 bit load immediate although it uses two BPF instructions. Fix it up by setting the offset i

[PATCH] net: ipv6: Fix warning of freeing alive inet6 address

2017-05-02 Thread Mike Manning
While this is not reproducible manually, Andrey's syzkaller program hit the warning "IPv6: Freeing alive inet6 address" with this part trace: inet6_ifa_finish_destroy+0x12e/0x190 c:894 in6_ifa_put ./include/net/addrconf.h:330 addrconf_dad_work+0x4e9/0x1040 net/ipv6/addrconf.c:3963 The fix is to c

Re: TPACKET_V3 timeout bug?

2017-05-02 Thread Guy Harris
On May 2, 2017, at 10:54 AM, Guy Harris wrote: > Yes, there's a case where user space wasn't being woken up. See also this thread from almost 3 years ago, beginning with http://marc.info/?l=linux-netdev&m=140633612828824&w=2 and this patch thread from almost 2 1/2 years ago: h

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Alexander Duyck
On Tue, May 2, 2017 at 9:53 AM, Raj, Ashok wrote: > On Tue, May 02, 2017 at 09:39:34AM -0700, Alexander Duyck wrote: >> On Mon, May 1, 2017 at 4:13 PM, Casey Leedom wrote: >> > The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed >> > Ordering Attribute should not be used on

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread Stephen Hemminger
On Tue, 02 May 2017 13:00:32 -0400 (EDT) David Miller wrote: > From: David Ahern > Date: Tue, 2 May 2017 10:51:23 -0600 > > > On 5/2/17 9:25 AM, Stephen Hemminger wrote: > >> Please either use existing netlink attribute code in libnetlink.h > >> (rta_getattr_u32 etc) or use libmnl like devlin

Re: TPACKET_V3 timeout bug?

2017-05-02 Thread Guy Harris
On May 2, 2017, at 8:04 AM, chetan loke wrote: > On Sat, Apr 15, 2017 at 7:41 PM, Guy Harris wrote: >> On Apr 15, 2017, at 7:10 PM, Andrew Lunn wrote: >> >>> Do you think this is a kernel problem, libpcap problem, or an >>> application problem? >> > > Its clearly a kernel regression. > > If

[PATCH 3/3] net/atm: Add some spaces for better code readability

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 19:19:14 +0200 Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring --- net/atm/mpoa_proc.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff

[PATCH 2/3] net/atm: Use seq_putc() in mpc_show()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 18:58:08 +0200 Single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/atm/mpoa_proc.c | 6 +++---

[PATCH 1/3] net/atm: Combine four seq_printf() calls in mpc_show()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 18:52:58 +0200 Some data were put into a sequence by four separate function calls. Print the same data by two function calls instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/atm/mpoa_proc.c | 8

[PATCH 0/3] net/atm: Fine-tuning for three function implementations

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 19:37:39 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Combine four seq_printf() calls in mpc_show() Use seq_putc() in mpc_show() Add some spaces for better code readability net/atm/

Re: net/ipv6: use-after-free in __call_rcu/in6_dev_finish_destroy_rcu

2017-05-02 Thread David Ahern
On 5/2/17 10:58 AM, Andrey Konovalov wrote: > Do you have a patch that I could test? not yet. > > I also reported another issue recently, that might also be related to this > one: > https://groups.google.com/forum/#!topic/syzkaller/Rt0pgY4wfiw different problem. I can still trigger this one wi

Re: TPACKET_V3 timeout bug?

2017-05-02 Thread chetan loke
On Tue, May 2, 2017 at 8:04 AM, chetan loke wrote: > On Sat, Apr 15, 2017 at 7:41 PM, Guy Harris wrote: >> On Apr 15, 2017, at 7:10 PM, Andrew Lunn wrote: >> >>> Do you think this is a kernel problem, libpcap problem, or an >>> application problem? >> > > Its clearly a kernel regression. > Comm

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread David Miller
From: David Ahern Date: Tue, 2 May 2017 10:51:23 -0600 > On 5/2/17 9:25 AM, Stephen Hemminger wrote: >> Please either use existing netlink attribute code in libnetlink.h >> (rta_getattr_u32 etc) or use libmnl like devlink. > > All of the existing rta_ functions take a struct rta_attr; netlink >

Re: [PATCH net v3] driver: veth: Fix one possbile memleak when fail to register_netdevice

2017-05-02 Thread Xin Long
On Tue, May 2, 2017 at 7:03 PM, Gao Feng wrote: >> From: Xin Long [mailto:lucien@gmail.com] >> Sent: Tuesday, May 2, 2017 3:56 PM >> On Sat, Apr 29, 2017 at 11:51 AM, wrote: >> > From: Gao Feng > [...] >> > -static void veth_dev_free(struct net_device *dev) >> > +static void veth_destructor

Re: net/ipv6: use-after-free in __call_rcu/in6_dev_finish_destroy_rcu

2017-05-02 Thread Andrey Konovalov
On Tue, May 2, 2017 at 4:44 AM, David Ahern wrote: > On 4/26/17 9:15 AM, Andrey Konovalov wrote: >> +David >> >> I've enabled CONFIG_DEBUG_OBJECTS_RCU_HEAD and this is what I get. >> >> Apparently the rcu warning is related to the fib6_del_route bug I've >> been trying to reproduce: >> https://gro

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Raj, Ashok
On Tue, May 02, 2017 at 09:39:34AM -0700, Alexander Duyck wrote: > On Mon, May 1, 2017 at 4:13 PM, Casey Leedom wrote: > > The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed > > Ordering Attribute should not be used on Transaction Layer Packets destined > > for the PCIe End

Re: [PATCH net-next iproute2 1/3] netlink: import netlink message parsing from kernel

2017-05-02 Thread David Ahern
On 5/2/17 9:25 AM, Stephen Hemminger wrote: > Please either use existing netlink attribute code in libnetlink.h > (rta_getattr_u32 etc) or use libmnl like devlink. All of the existing rta_ functions take a struct rta_attr; netlink messages use struct nlattr. It's just wrong to use rta functions fo

Re: net/key: slab-out-of-bounds in pfkey_compile_policy

2017-05-02 Thread Andrey Konovalov
On Tue, May 2, 2017 at 6:45 PM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit d3b5d35290d729a2518af00feca867385a1b08fa (4.11). > > A reproducer and .config are attached. > > =

net/key: slab-out-of-bounds in pfkey_compile_policy

2017-05-02 Thread Andrey Konovalov
Hi, I've got the following error report while fuzzing the kernel with syzkaller. On commit d3b5d35290d729a2518af00feca867385a1b08fa (4.11). A reproducer and .config are attached. == BUG: KASAN: slab-out-of-bounds in pfkey_compile_p

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Raj, Ashok
Hi Casey On Mon, May 01, 2017 at 04:13:50PM -0700, Casey Leedom wrote: > The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed > Ordering Attribute should not be used on Transaction Layer Packets destined > for the PCIe End Node so flagged. Initially flagged this way are Inte

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-02 Thread Alexander Duyck
On Mon, May 1, 2017 at 4:13 PM, Casey Leedom wrote: > The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed > Ordering Attribute should not be used on Transaction Layer Packets destined > for the PCIe End Node so flagged. Initially flagged this way are Intel > E5-26xx Root Com

Re: [PATCH v2 net-next 4/7] net: add new control message for incoming HW-timestamped packets

2017-05-02 Thread kbuild test robot
Hi Miroslav, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Miroslav-Lichvar/Extend-socket-timestamping-API/20170502-212515 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https

[net-next 2/2] tipc: refactor function tipc_sk_recv_stream()

2017-05-02 Thread Jon Maloy
We try to make this function more readable by improving variable names and comments, using more stack variables, and doing some smaller changes to the logics. We also rename the function to make it consistent with naming conventions used elsewhere in the code. Reviewed-by: Parthasarathy Bhuvaragan

[net-next 0/2] tipc: refactor socket receive functions

2017-05-02 Thread Jon Maloy
We try to make the functions tipc_sk_recvmsg() and tipc_sk_recvstream() more readable. Jon Maloy (2): tipc: refactor function tipc_sk_recvmsg() tipc: refactor function tipc_sk_recv_stream() net/tipc/socket.c | 266 +- 1 file changed, 122 i

[net-next 1/2] tipc: refactor function tipc_sk_recvmsg()

2017-05-02 Thread Jon Maloy
We try to make this function more readable by improving variable names and comments, plus some minor changes to the logics. Reviewed-by: Parthasarathy Bhuvaragan Signed-off-by: Jon Maloy --- net/tipc/socket.c | 109 +- 1 file changed, 50 inser

Re: [PATCH v2 net-next 3/7] net: add function to retrieve original skb device using NAPI ID

2017-05-02 Thread Willem de Bruijn
On Tue, May 2, 2017 at 6:10 AM, Miroslav Lichvar wrote: > Since commit b68581778cd0 ("net: Make skb->skb_iif always track > skb->dev") skbs don't have the original index of the interface which > received the packet. This information is now needed for a new control > message related to hardware tim

Re: [PATCH net-next 9/9] ipvlan: introduce individual MAC addresses

2017-05-02 Thread Dan Williams
On Tue, 2017-05-02 at 15:08 +, Chiappero, Marco wrote: > > -Original Message- > > From: Dan Williams [mailto:d...@redhat.com] > > On Thu, 2017-04-27 at 11:20 -0500, Dan Williams wrote: > > > On Thu, 2017-04-27 at 15:51 +0100, Marco Chiappero wrote: > > > > Currently all the slave device

Re: those bpf binutils testsuite failures..

2017-05-02 Thread Aaron Conole
David Miller writes: > I wonder if whatever tool you used to get rid of trailing whitespace > did so in the testsuite foo.d files too? That definitely is > undesirable :-) Most likely I was being too clever by half. I'll make sure I omit the .d files from scanning.

remaining sparc bpf hacks...

2017-05-02 Thread David Miller
So I just have two issues remaining for test_progs to run properly on sparc. We've discussed them before. The first is the clang Makefile hack: diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index d8d94b9..2ed63b6 100644 --- a/tools/testing/selftests/b

Re: [PATCH v2 net-next 4/7] net: add new control message for incoming HW-timestamped packets

2017-05-02 Thread Willem de Bruijn
On Tue, May 2, 2017 at 6:11 AM, Miroslav Lichvar wrote: > Add SOF_TIMESTAMPING_OPT_PKTINFO option to request a new control message > for incoming packets with hardware timestamps. It contains the index of > the real interface which received the packet and the length of the > packet at layer 2. > >

Re: [PATCH 0/2] Fix some bpf program testing framework bugs

2017-05-02 Thread Alexei Starovoitov
On 5/2/17 8:36 AM, David Miller wrote: This series fixes two issue: 1) Accidental user pointer dereference in bpf_test_finish() 2) The packet data given to the test programs is not aligned correctly The first issue is fixed simply because we have a kernel side copy of the datastructure in que

  1   2   3   >