[PATCH net] sctp: fix the issue sctp requeue auth chunk incorrectly

2016-07-29 Thread Xin Long
sctp needs to queue auth chunk back when we know that we are going to generate another segment. But commit f1533cce60d1 ("sctp: fix panic when sending auth chunks") requeues the last chunk processed which is probably not the auth chunk. It causes panic when calculating the MAC in

Re: [PATCH net-next 08/10] drivers: net: xgene: Poll link status via GPIO

2016-07-29 Thread kbuild test robot
Hi, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Iyappan-Subramanian/Fix-warning-and-issues/20160730-083713 config: mips-allmodconfig (attached as .config) compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609 reproduce: wget

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread Alexei Starovoitov
On Fri, Jul 29, 2016 at 10:23:06PM -0700, William Tu wrote: > On Fri, Jul 29, 2016 at 5:19 PM, Daniel Borkmann wrote: > > On 07/29/2016 10:03 PM, William Tu wrote: > >> > >> I'm not using ARM. It's x86 in a VM with 2 vcpu. By printk() in kernel, I > >> got > >>

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread William Tu
On Fri, Jul 29, 2016 at 5:19 PM, Daniel Borkmann wrote: > On 07/29/2016 10:03 PM, William Tu wrote: >> >> Hi Daniel and Alexei, >> >> Thanks for the reply. My apology for too brief description. In short, >> in my environment, running samples/bpf/test_map always segfault

Re: igb: question regarding auto-negotiation

2016-07-29 Thread Alexander Duyck
On Fri, Jul 29, 2016 at 4:37 PM, Dominic Curran wrote: > Hi > > This question refers to igb codebase. > I have a question regarding the setting of hw->mac.autoneg. > > Is it correct to say for igb driver: >"if speed=1000 and duplex=FULL and media_type=COPPER then

Re: [PATCH net-next 08/10] drivers: net: xgene: Poll link status via GPIO

2016-07-29 Thread kbuild test robot
Hi, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Iyappan-Subramanian/Fix-warning-and-issues/20160730-083713 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget

Re: [PATCH net-next 00/10] Fix warning and issues

2016-07-29 Thread David Miller
From: Iyappan Subramanian Date: Fri, 29 Jul 2016 17:33:53 -0700 > This patch set fixes the following warning and issues, net-next is closed, please resubmit this after the merge window is closed and net-next re-opens. Thank you.

Re: [PATCH net-next 08/10] drivers: net: xgene: Poll link status via GPIO

2016-07-29 Thread kbuild test robot
Hi, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Iyappan-Subramanian/Fix-warning-and-issues/20160730-083713 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Chen-Yu Tsai
On Sat, Jul 30, 2016 at 1:25 AM, Maxime Ripard wrote: > On Thu, Jul 28, 2016 at 04:57:34PM +0200, LABBE Corentin wrote: >> > > +static int sun8i_mdio_write(struct mii_bus *bus, int phy_addr, int >> > > phy_reg, >> > > + u16 data) >> > > +{ >>

[PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock

2016-07-29 Thread Salil Kapur
In the case when the loop breaks at line 390, the txq lock is not released. Added an unlock statement before the break statement. Signed-off-by: Salil Kapur --- net/core/netpoll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/netpoll.c

[PATCH net-next 00/10] Fix warning and issues

2016-07-29 Thread Iyappan Subramanian
This patch set fixes the following warning and issues, 1. Fix kbuild warning - drivers: net: xgene: Fix kbuild warning 2. unmap DMA memory on xgene_Enet_delete_bufpoool() - drivers: net: xgene: fix: Add dma_unmap_single 3. Delete descriptor rings and buffer pools on error

[PATCH net-next 01/10] drivers: net: xgene: Fix kbuild warning

2016-07-29 Thread Iyappan Subramanian
This patch fixes the following kbuild warning, when ACPI was not enabled. >> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:878:23: warning: 'phy_dev' >> may be used uninitialized in this function [-Wmaybe-uninitialized] phy_dev->advertising = phy_dev->supported; Signed-off-by: Iyappan

[PATCH net-next 04/10] drivers: net: xgene: Fix error deconstruction path

2016-07-29 Thread Iyappan Subramanian
Since register_netdev() call in xgene_enet_probe() was moved down to the end, it doesn't properly handle errors that may occur, by deconstructing everything that was setup before the error occurred. Signed-off-by: Iyappan Subramanian ---

[PATCH net-next 05/10] drivers: net: xgene: Fix RSS indirection table fields

2016-07-29 Thread Iyappan Subramanian
This patch fixes FPSel and NxtFPSel fields length to 5-bit value. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen --- drivers/net/ethernet/apm/xgene/xgene_enet_cle.c | 17 -

[PATCH net-next 03/10] drivers: net: xgene: fix: Delete descriptor rings and buffer pools

2016-07-29 Thread Iyappan Subramanian
xgene_enet_init_hw() should delete any descriptor rings and buffer pools setup should le_ops->cle_init() return an error. Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 12 +++- 1 file changed, 7 insertions(+), 5

[PATCH net-next 08/10] drivers: net: xgene: Poll link status via GPIO

2016-07-29 Thread Iyappan Subramanian
When 10GbE SFP+ module is not plugged in or cable is not connected, the link status register does not report the proper state due to floating signal. This patch checks the module present status via an GPIO to determine whether to ignore the link status register and report link down.

[PATCH net-next 10/10] Documentation: dtb: xgene: Add rxlos GPIO mapping

2016-07-29 Thread Iyappan Subramanian
Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen --- Documentation/devicetree/bindings/net/apm-xgene-enet.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net-next 07/10] drivers: net: xgene: XFI PCS reset when link is down

2016-07-29 Thread Iyappan Subramanian
This patch fixes the link recovery issue, by doing PCS reset when the link is down. Signed-off-by: Fushen Chen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h| 6

[PATCH net-next 09/10] dtb: xgene: Add rxlos-gpios property

2016-07-29 Thread Iyappan Subramanian
Added rxlos GPIO mapping by adding rxlos-gpios property. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen --- arch/arm64/boot/dts/apm/apm-mustang.dts | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net-next 06/10] drivers: net: xgene: Change port init sequence

2016-07-29 Thread Iyappan Subramanian
This patch rearranges the port initialization sequence as recommended by hardware specification. This patch also removes, mac_init() call from xgene_enet_link_state(), as it was not required. Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen ---

[PATCH net-next 02/10] drivers: net: xgene: fix: Add dma_unmap_single

2016-07-29 Thread Iyappan Subramanian
In addition to xgene_enet_delete_bufpool() freeing skbs, their associated dma memory should also be unmapped. Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread Daniel Borkmann
On 07/29/2016 10:03 PM, William Tu wrote: Hi Daniel and Alexei, Thanks for the reply. My apology for too brief description. In short, in my environment, running samples/bpf/test_map always segfault under percpu array/hash map operations. I think it's due to stack corruption. I'm not using ARM.

igb: question regarding auto-negotiation

2016-07-29 Thread Dominic Curran
Hi This question refers to igb codebase. I have a question regarding the setting of hw->mac.autoneg. Is it correct to say for igb driver: "if speed=1000 and duplex=FULL and media_type=COPPER then only auto-negotiate enable is supported" i.e. with these settings

[iproute PATCH 1/2] include: Add linux/sctp.h

2016-07-29 Thread Phil Sutter
This header does not exist in this form upstream yet, as it contains struct sctp_info which is required for SCTP support in 'ss' and hasn't been exported yet. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 1005 ++ 1 file

[iproute PATCH 0/2] ss: Implement sctp_diag support

2016-07-29 Thread Phil Sutter
This patch series adds the necessary bits to make use of recently added sctp_diag module in Linux. There are a few pending kernel fixes currently under review which this series kind of depends on, but it is already useable as is (although a bit buggy here and there). The first patch adds

[iproute PATCH 2/2] ss: Add support for SCTP protocol

2016-07-29 Thread Phil Sutter
This makes use of the sctp_diag interface recently added to the kernel. Joint work with Xin Long who provided the PoC implementation which I merely polished up a bit. Signed-off-by: Phil Sutter --- misc/ss.c | 212 +++--- 1

Re: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)

2016-07-29 Thread Greg KH
On Fri, Jul 29, 2016 at 02:02:24PM -0700, Stephen Hemminger wrote: > On Thu, 28 Jul 2016 11:15:17 +0300 > Amir Levy wrote: > > > +static LIST_HEAD(controllers_list); > > +static DECLARE_RWSEM(controllers_list_rwsem); > > Why use a semaphore when simple spinlock or mutex

Re: [PATCH net] tcp: fix functions of tcp_congestion_ops from being called before initialization

2016-07-29 Thread Li, Ji
Thank you for reply. I don’t think there would be kernel crash. But there must be some unexpected behaviors caused by calling before initialization. Let’s still use dctcp as an example. If SYN loss happens during active open, dctcp_ssthresh() is called to calculate new ssthresh using

Re: [PATCH v5 6/8] thunderbolt: Networking transmit and receive

2016-07-29 Thread Stephen Hemminger
On Thu, 28 Jul 2016 11:15:19 +0300 Amir Levy wrote: > + /* pad short packets */ > + if (unlikely(skb->len < ETH_ZLEN)) { > + int pad_len = ETH_ZLEN - skb->len; > + > + /* The skb is freed on error */ > +

Re: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)

2016-07-29 Thread Stephen Hemminger
On Thu, 28 Jul 2016 11:15:17 +0300 Amir Levy wrote: > +int nhi_send_message(struct tbt_nhi_ctxt *nhi_ctxt, enum pdf_value pdf, > + u32 msg_len, const u8 *msg, bool ignore_icm_resp) > +{ Why not make msg a void * and not have to do so many casts?

Re: [PATCH v5 4/8] thunderbolt: Communication with the ICM (firmware)

2016-07-29 Thread Stephen Hemminger
On Thu, 28 Jul 2016 11:15:17 +0300 Amir Levy wrote: > +static LIST_HEAD(controllers_list); > +static DECLARE_RWSEM(controllers_list_rwsem); Why use a semaphore when simple spinlock or mutex would be better?

Re: [PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-29 Thread Marcelo Ricardo Leitner
On Fri, Jul 29, 2016 at 06:59:39PM +0200, Phil Sutter wrote: > Since it is exported as unsigned value, userspace has no way detecting > whether it is negative or just very large. Therefore do this in kernel > space where it is a simple comparison. > > Signed-off-by: Phil Sutter >

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread William Tu
Hi Daniel and Alexei, Thanks for the reply. My apology for too brief description. In short, in my environment, running samples/bpf/test_map always segfault under percpu array/hash map operations. I think it's due to stack corruption. I'm not using ARM. It's x86 in a VM with 2 vcpu. By printk()

Re: [PATCH v5] net: sched: convert qdisc linked list to hashtable

2016-07-29 Thread kbuild test robot
-linked-list-to-hashtable/20160729-155412 config: x86_64-randconfig-s1-07292101 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file include

Re: [PATCH] net: dsa: bcm_sf2: Unwind errors in correct order

2016-07-29 Thread Vivien Didelot
Florian Fainelli writes: > In case we cannot complete bcm_sf2_sw_setup() for any reason, and we > go to the out_unmap label, but the MDIO bus has not been registered yet, > we will hit the BUG condition in drivers/net/phy/mdio_bus.c about the > bus not being registered. Fix

Re: [PATCH] net: dsa: bcm_sf2: Unwind errors in correct order

2016-07-29 Thread Florian Fainelli
On 07/29/2016 12:35 PM, Florian Fainelli wrote: > In case we cannot complete bcm_sf2_sw_setup() for any reason, and we > go to the out_unmap label, but the MDIO bus has not been registered yet, > we will hit the BUG condition in drivers/net/phy/mdio_bus.c about the > bus not being registered. Fix

[PATCH] net: dsa: bcm_sf2: Unwind errors in correct order

2016-07-29 Thread Florian Fainelli
In case we cannot complete bcm_sf2_sw_setup() for any reason, and we go to the out_unmap label, but the MDIO bus has not been registered yet, we will hit the BUG condition in drivers/net/phy/mdio_bus.c about the bus not being registered. Fix this by dedicating a specific lable for when we fail

Re: [RFC PATCH] xfrm: Add option to reset oif in xfrm lookup

2016-07-29 Thread subashab
Please don't try to workaround a bug with a sysctl. If we have a bug here, we should fix it. Choosing between bug A and bug B with a sysctl is not what we are doing ;) Sure, this was just a quick hack. Can you give an example of your use case -- e.g., commands for others (me) to reproduce?

Re: [PATCH v2 3/5] ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac

2016-07-29 Thread Maxime Ripard
On Fri, Jul 29, 2016 at 10:15:19AM +0200, LABBE Corentin wrote: > > > > > +See ethernet.txt in the same directory for generic bindings for > > > > > ethernet > > > > > +controllers. > > > > > + > > > > > +The device node referenced by "phy" or "phy-handle" should be a > > > > > child node > > >

[PATCH net-next 3/3] bna: remove global bnad_list_mutex

2016-07-29 Thread Ivan Vecera
Remove global bnad_list_mutex as it is not used anymore. This makes bnad_add_to_list() and bnad_remove_from_list() empty so remove them too. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/brocade/bna/bnad.c | 20 1 file changed, 20 deletions(-)

[PATCH net-next 0/3] bna: remove useless global variables

2016-07-29 Thread Ivan Vecera
The set removes useless global bnad_list as well as bnad->entry that track a list of driver instances but it is not used anywhere. The associated bnad_list_mutex is removed as well but as it is also used to protect bna_id increment it is necessary to convert bna_id to atomic_t. Signed-off-by:

[PATCH net-next 2/3] bna: change type of bna_id to atomic_t

2016-07-29 Thread Ivan Vecera
Change type of bna_id to atomic_t. The bnad_list_mutex is used to prevent a race when bna_id is incremented. After the change the mutex can be removed in the next step. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/brocade/bna/bnad.c | 4 ++-- 1 file changed, 2

[PATCH net-next 1/3] bna: remove useless linked list

2016-07-29 Thread Ivan Vecera
Remove global variable bnad_list and bnad->list_entry that are used as list of bna driver instances. It is not necessary and useless. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/brocade/bna/bnad.c | 3 --- drivers/net/ethernet/brocade/bna/bnad.h | 1 - 2 files

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Maxime Ripard
On Thu, Jul 28, 2016 at 04:57:34PM +0200, LABBE Corentin wrote: > > > +static int sun8i_mdio_write(struct mii_bus *bus, int phy_addr, int > > > phy_reg, > > > + u16 data) > > > +{ > > > + struct net_device *ndev = bus->priv; > > > + struct sun8i_emac_priv *priv =

[PATCH 1/3] sctp: Export struct sctp_info to userspace

2016-07-29 Thread Phil Sutter
This is required to correctly interpret INET_DIAG_INFO messages exported by sctp_diag module. Signed-off-by: Phil Sutter --- include/linux/sctp.h | 64 --- include/uapi/linux/sctp.h | 64

[PATCH 3/3] sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states

2016-07-29 Thread Phil Sutter
Since 'ss' always adds TCPF_CLOSE to idiag_states flags, sctp_diag can't rely upon TCPF_LISTEN flag solely being present when listening sockets are requested. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 0/3] sctp_diag: A bunch of fixes for upcoming 'ss' support

2016-07-29 Thread Phil Sutter
The following series contains a number of fixes necessary to make my yet unpublished 'ss' support patch functional. Phil Sutter (3): sctp: Export struct sctp_info to userspace sctp_diag: export timer value only if it is active sctp_diag: Respect ss adding TCPF_CLOSE to idiag_states

[PATCH 2/3] sctp_diag: export timer value only if it is active

2016-07-29 Thread Phil Sutter
Since it is exported as unsigned value, userspace has no way detecting whether it is negative or just very large. Therefore do this in kernel space where it is a simple comparison. Signed-off-by: Phil Sutter --- net/sctp/sctp_diag.c | 10 ++ 1 file changed, 6 insertions(+),

[PATCH RESEND nf] netfilter: avoid a race between nf_register_hook() and cleanup_net()

2016-07-29 Thread Michal Kubecek
There is a race condition between nf_{,un}register_hook() and cleanup_net() which can either trigger WARN check or cause a memory leak. The scenario is like this (2a and 2b are alternatives): 1. cleanup_net() removes one or more struct net from net_namespace_list 2a. nf_register_hook() adds

RE: [Intel-wired-lan] [PATCH net-next v3 1/2] e1000e: factor out systim sanitization

2016-07-29 Thread Woodford, Timothy W.
>>> This is prepatory work for an expanding list of adapter families that have >>> occasional ~10 hour clock jumps when being used for PTP. Factor out the >>> sanitization function and convert to using a feature (bug) flag, per >>> suggestion from Jesse Brandeburg. >>> >>> Littering functional

Re: [PATCH v2 net] tcp: consider recv buf for the initial window scale

2016-07-29 Thread Neal Cardwell
On Fri, Jul 29, 2016 at 9:34 AM, Soheil Hassas Yeganeh wrote: > To fix this, consider the maximum of net.ipv4.tcp_rmem[2], > net.core.rmem_max and socket's initial buffer space. > > Fixes: b0573dea1fb3 ("[NET]: Introduce SO_{SND,RCV}BUFFORCE socket options") >

[PATCH net 1/3] macsec: fix reference counting on RXSC in macsec_handle_frame

2016-07-29 Thread Sabrina Dubroca
Currently, we lookup the RXSC without taking a reference on it. The RXSA holds a reference on the RXSC, but the SA and SC could still both disappear before we take a reference on the SA. Take a reference on the RXSC in macsec_handle_frame. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE

[PATCH net 0/3] macsec: reference counting fixes

2016-07-29 Thread Sabrina Dubroca
Patch 1 adds explicit reference counting on RXSCs, instead of the current implicit reference counting using the RXSA's refcount. Patch 2 fixes possible kernel panics during module unload caused by an RCU callback that schedules another RCU callback, which the rcu_barrier() added in b196c22af5c3

[PATCH net 2/3] macsec: RXSAs don't need to hold a reference on RXSCs

2016-07-29 Thread Sabrina Dubroca
Following the previous patch, RXSCs are held and properly refcounted in the RX path (instead of being implicitly held by their SA), so the SA doesn't need to hold a reference on its parent RXSC. This also avoids panics on module unload caused by the double layer of RCU callbacks (call_rcu frees

[PATCH net 3/3] macsec: fix negative refcnt on parent link

2016-07-29 Thread Sabrina Dubroca
When creation of a macsec device fails because an identical device already exists on this link, the current code decrements the refcnt on the parent link (in ->destructor for the macsec device), but it had not been incremented yet. Move the dev_hold(parent_link) call earlier during macsec device

[PATCH v2 net] tcp: consider recv buf for the initial window scale

2016-07-29 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh tcp_select_initial_window() intends to advertise a window scaling for the maximum possible window size. To do so, it considers the maximum of net.ipv4.tcp_rmem[2] and net.core.rmem_max as the only possible upper-bounds. However, users with

Re: [PATCH net] tcp: consider recv buf for the initial window scale

2016-07-29 Thread Soheil Hassas Yeganeh
On Fri, Jul 29, 2016 at 9:21 AM, Neal Cardwell wrote: > > On Thu, Jul 28, 2016 at 11:11 PM, Soheil Hassas Yeganeh > wrote: > > > > From: Soheil Hassas Yeganeh > > > > tcp_select_initial_window() intends to advertise a window > >

Re: [PATCH net] tcp: consider recv buf for the initial window scale

2016-07-29 Thread Neal Cardwell
On Thu, Jul 28, 2016 at 11:11 PM, Soheil Hassas Yeganeh wrote: > > From: Soheil Hassas Yeganeh > > tcp_select_initial_window() intends to advertise a window > scaling for the maximum possible window size. To do so, > it considers the maximum of

Re: PROBLEM: TPROXY and DNAT broken (bisected to 079096f103fa)

2016-07-29 Thread Florian Westphal
Brandon Cazander wrote: > * When it fails, no traffic hits the WEBSERVER. A tcpdump on the bad kernel > shows: > root@dons-qemu-new-kernel:~# tcpdump -niany tcp and port 8080 > tcpdump: verbose output suppressed, use -v or -vv for full protocol decode >

Re: [PATCH v2 4/4] ARM: OMAP2+: omap_device: fix crash on omap_device removal

2016-07-29 Thread Grygorii Strashko
On 07/29/2016 08:15 AM, Peter Ujfalusi wrote: On 07/28/16 20:50, Grygorii Strashko wrote: Below call chain causes system crash when OMAP device is removed by calling of_platform_depopulate()/device_del(): Should you swap 3 <-> 4 in the series? Currently patch 3 will introduce the crash you

Re: [RFC] net/mlx5_core/en_main: Remove deprecated create_workqueue

2016-07-29 Thread Tejun Heo
Hello, On Fri, Jul 29, 2016 at 01:30:05AM +0300, Saeed Mahameed wrote: > > Are the workitems being used on a memory reclaim path? > > do you mean they need to allocate memory ? It's a bit convoluted. A workqueue needs WQ_MEM_RECLAIM flag to be guaranteed forward progress under memory pressure,

Re: [PATCH] net/mlx5_core/pagealloc: Remove deprecated create_singlethread_workqueue

2016-07-29 Thread Tejun Heo
Hello, On Thu, Jul 28, 2016 at 12:37:35PM +0300, Leon Romanovsky wrote: > Did you test this patch? Did you notice the memory reclaim path nature > of this work? The conversion uses WQ_MEM_RECLAIM, which is standard for all workqueues which can stall packet processing if stalled. The requirement

Re: [PATCH v2 1/1] Add timer to handle OOM situations

2016-07-29 Thread Stefan Hajnoczi
On Tue, Jul 26, 2016 at 04:28:21PM +0200, ggar...@abra.uab.cat wrote: > @@ -493,6 +524,9 @@ static int vhost_vsock_dev_open(struct inode *inode, > struct file *file) > goto out; > } > > + setup_timer(>tx_kick, > + vhost_vsock_rehandle_tx_kick, (unsigned

Re: [PATCH net] tcp: fix functions of tcp_congestion_ops from being called before initialization

2016-07-29 Thread Florian Westphal
Li, Ji wrote: > In Linux 3.17 and earlier, tcp_init_congestion_ops (i.e. tcp_reno) is > used as the ca_ops during 3WHS, and after 3WHS, ca_ops is assigned as > the default congestion control set by sysctl and immediately its parameters > stored in icsk_ca_priv[] are initialized.

[PATCH 1/1] Bluetooth: add printf format attribute to hci_set_[fh]w_info()

2016-07-29 Thread Nicolas Iooss
Commit 5177a83827cd ("Bluetooth: Add debugfs fields for hardware and firmware info") introduced hci_set_hw_info() and hci_set_fw_info(). These functions use kvasprintf_const() but are not marked with a __printf attribute. Adding such an attribute helps detecting issues related to

Re: [PATCH ipsec] xfrm: Ignore socket policies when rebuilding hash tables

2016-07-29 Thread Steffen Klassert
On Fri, Jul 29, 2016 at 04:19:11PM +0800, Herbert Xu wrote: > On Fri, Jul 29, 2016 at 09:57:32AM +0200, Tobias Brunner wrote: > > Whenever thresholds are changed the hash tables are rebuilt. This is > > done by enumerating all policies and hashing and inserting them into > > the right table

Re: question: tg3 driver/nics and inconsistent RX ring count

2016-07-29 Thread Siva Reddy Kallam
On Wed, Jul 27, 2016 at 4:25 AM, Michael Chan wrote: > On Tue, Jul 26, 2016 at 1:32 PM, Michal Soltys wrote: >> On 2016-07-26 22:06, Alexander Duyck wrote: >>> On Tue, Jul 26, 2016 at 12:52 PM, Michal Soltys wrote: Hi,

[PATCH 1/1] phy/micrel: Change phy_id_mask for KSZ8721

2016-07-29 Thread Alexander Stein
There are KSZ8721 PHYs with phy_id 0x00221619. In order to detect them as PHY_ID_KSZ8001 compatible while staying different to PHY_ID_KSZ9021 ignore the last two bits when matching PHY_ID Signed-off-by: Alexander Stein --- drivers/net/phy/micrel.c | 4 ++-- 1 file changed,

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Andre Przywara
Hi, On 25/07/16 20:54, Maxime Ripard wrote: > On Wed, Jul 20, 2016 at 10:03:16AM +0200, LABBE Corentin wrote: >> This patch add support for sun8i-emac ethernet MAC hardware. >> It could be found in Allwinner H3/A83T/A64 SoCs. >> >> It supports 10/100/1000 Mbit/s speed with half/full duplex. >> It

[PATCH 1/3] net: ipconfig: Add device name to debug messages

2016-07-29 Thread Uwe Kleine-König
This simplifies understanding what happens when there is more than one device. Signed-off-by: Uwe Kleine-König --- net/ipv4/ipconfig.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index

[PATCH 2/3] net: ipconfig: Support using "delayed" DHCP replies

2016-07-29 Thread Uwe Kleine-König
The dhcp code only waits 1s between sending DHCP requests on different devices and only accepts an answer for the device that sent out the last request. Only the timeout at the end of a loop is increased iteratively which favours only the last device. This makes it impossible to work with a dhcp

[PATCH 3/3] net: ipconfig: drop inter-device timeout

2016-07-29 Thread Uwe Kleine-König
Now that ipconfig learned to handle "delayed replies" in the previous commit, there is no reason any more to delay sending a first request per device. Signed-off-by: Uwe Kleine-König --- net/ipv4/ipconfig.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH 0/3] net: ipconfig: improve DHCP timeout handling

2016-07-29 Thread Uwe Kleine-König
Hello, this series teaches the ipconfig code to handle a DHCP reply on eth0 even if a request on eth1 was already sent out. This is a follow fix to 2513dfb83fc7 ("ipconfig: handle case of delayed DHCP server") that dropped a late reply. This makes it possible at all to work with slow DHCP

Re: [PATCH 15/15] ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle

2016-07-29 Thread Mugunthan V N
+ Linux Omap ML On Wednesday 27 July 2016 01:13 PM, Peter Chen wrote: > >> On Wednesday 27 July 2016 07:50 AM, Peter Chen wrote: >>> of_node_put needs to be called when the device node which is got from >>> of_parse_phandle has finished using. >>> >>> Signed-off-by: Peter Chen

Re: [PATCH v2 1/5] ethernet: add sun8i-emac driver

2016-07-29 Thread Arnd Bergmann
On Thursday, July 28, 2016 3:18:26 PM CEST LABBE Corentin wrote: > > I will reworked locking and it seems that no locking is necessary. > I have added the following comment about the locking strategy: > > /* Locking strategy: > * RX queue does not need any lock since only sun8i_emac_poll()

Re: [PATCH 2/3] stmmac: change dma descriptors to __le32

2016-07-29 Thread Michael Weiser
Hi Giuseppe, On Tue, Jul 26, 2016 at 02:13:45PM +0200, Giuseppe CAVALLARO wrote: > > - ep++; > > + ep++); > there is a build problem here. > Pls fix it. Thanks for your review. I've got it fixed locally. An updated patchset will be forthcoming as soon as I've

[PATCH net v2 0/3] r8169:fix 3 runtime pm related issues.

2016-07-29 Thread Chunhao Lin
v2: use "struct device *d = >pci_dev->dev" instead of "struct pci_dev *pdev = tp->pci_dev" v1: This series of patches fix 3 runtime pm related issues that are listed below. Chunhao Lin (3): r8169:fix kernel log spam when set or get hardware wol setting. r8169:add checking driver's runtime

[PATCH net v2 1/3] r8169:fix kernel log spam when set or get hardware wol setting.

2016-07-29 Thread Chunhao Lin
NIC will be put into D3 state during runtime suspend state. When set or get hardware wol setting, driver will write or read hardware registers. If we set or get hardware wol setting in runtime suspend state, because NIC will in D3 state, the hardware registers read by driver will return all 0xff.

[PATCH net v2 2/3] r8169:add checking driver's runtime pm status in rtl8169_get_ethtool_stats()

2016-07-29 Thread Chunhao Lin
Not to call rtl8169_update_counters() to dump tally counter when driver is in runtime suspend state. Calling rtl8169_update_counters() in runtime suspend state will produce warning message "rtl_counters_cond == 1 (loop: 1000, delay: 10)". Signed-off-by: Chunhao Lin ---

[PATCH net v2 3/3] r8169:fix nic may not work after changing mac address.

2016-07-29 Thread Chunhao Lin
When there is no AC power, NIC may not work after changing mac address. Please refer to following link. http://www.spinics.net/lists/netdev/msg356572.html This issue is caused by runtime power management. When there is no AC power, if we put NIC down (ifconfig down), the driver will be in runtime

Re: [PATCH v2 3/4] drivers: net: cpsw: use of_platform_depopulate()

2016-07-29 Thread Mugunthan V N
On Thursday 28 July 2016 11:20 PM, Grygorii Strashko wrote: > Use of_platform_depopulate() in cpsw_remove() instead of > of_device_unregister(), because CSPW child devices will not be > recreated otherwise on next insmod. of_platform_depopulate() is > correct way now as it will ensure that all

Re: [PATCH v2 2/4] drivers: net: cpsw: fix wrong regs access in cpsw_remove

2016-07-29 Thread Mugunthan V N
On Thursday 28 July 2016 11:20 PM, Grygorii Strashko wrote: > The L3 error will be generated and system will crash during unloading > of CPSW driver if CPSW is used as module and ethX devices are down. > This happens because CPSW can be power off by PM runtime now when ethX > devices are down. >

Re: [PATCH 2/3] stmmac: change dma descriptors to __le32

2016-07-29 Thread Giuseppe CAVALLARO
On 7/29/2016 9:53 AM, Michael Weiser wrote: Hi Giuseppe, On Tue, Jul 26, 2016 at 02:13:45PM +0200, Giuseppe CAVALLARO wrote: - ep++; + ep++); there is a build problem here. Pls fix it. Thanks for your review. I've got it fixed locally. An updated

Re: [PATCH ipsec] xfrm: Ignore socket policies when rebuilding hash tables

2016-07-29 Thread Herbert Xu
On Fri, Jul 29, 2016 at 09:57:32AM +0200, Tobias Brunner wrote: > Whenever thresholds are changed the hash tables are rebuilt. This is > done by enumerating all policies and hashing and inserting them into > the right table according to the thresholds and direction. > > Because socket policies

Re: Microsemi VSC 8531/41 PHY Driver

2016-07-29 Thread Andrew Lunn
> > +/* RGMII Rx Clock delay value change with board lay-out */ static u8 > > +rgmii_rx_clk_delay = RGMII_RX_CLK_DELAY_1_1_NS; > > Doesn't this stop you from having a board with two PHYs with different > layouts? You should be getting this value from the device tree. > > Raju: As of now, RGMII

Re: [PATCH v2 1/4] net: ethernet: ti: cpdma: fix lockup in cpdma_ctlr_destroy()

2016-07-29 Thread Mugunthan V N
On Thursday 28 July 2016 11:20 PM, Grygorii Strashko wrote: > Fix deadlock in cpdma_ctlr_destroy() which is triggered now on > cpsw module removal: > cpsw_remove() > - cpdma_ctlr_destroy() >- spin_lock_irqsave(>lock, flags) >- cpdma_ctlr_stop() > - spin_lock_irqsave(>lock, flags); >

Re: [PATCH v2 3/5] ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac

2016-07-29 Thread LABBE Corentin
On Thu, Jul 28, 2016 at 08:49:16PM +0200, Maxime Ripard wrote: > On Thu, Jul 28, 2016 at 03:40:31PM +0200, LABBE Corentin wrote: > > On Thu, Jul 21, 2016 at 09:55:19AM +0200, Maxime Ripard wrote: > > > Hi, > > > > > > On Wed, Jul 20, 2016 at 10:03:18AM +0200, LABBE Corentin wrote: > > > > This

[PATCH ipsec] xfrm: Ignore socket policies when rebuilding hash tables

2016-07-29 Thread Tobias Brunner
Whenever thresholds are changed the hash tables are rebuilt. This is done by enumerating all policies and hashing and inserting them into the right table according to the thresholds and direction. Because socket policies are also contained in net->xfrm.policy_all but no hash tables are defined

Re: Microsemi VSC 8531/41 PHY Driver

2016-07-29 Thread Andrew Lunn
On Thu, Jul 28, 2016 at 06:44:37AM +, Raju Lakkaraju wrote: > Hello Andrew, > > Thank you for given valuable comments. > Please see the my responses inline. > > Thanks, > Raju > > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Tuesday, July 26, 2016 6:14 PM

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread Daniel Borkmann
On 07/29/2016 08:47 AM, Alexei Starovoitov wrote: On Thu, Jul 28, 2016 at 05:42:21PM -0700, William Tu wrote: The total size of value copy_to_user() writes to userspace should be the (current number of cpu) * (value size), instead of num_possible_cpus() * (value size). Found by

[PATCH v5] net: sched: convert qdisc linked list to hashtable

2016-07-29 Thread Jiri Kosina
From: Jiri Kosina Convert the per-device linked list into a hashtable. The primary motivation for this change is that currently, we're not tracking all the qdiscs in hierarchy (e.g. excluding default qdiscs), as the lookup performed over the linked list by

[PATCH net] tcp: fix functions of tcp_congestion_ops from being called before initialization

2016-07-29 Thread Li, Ji
In Linux 3.17 and earlier, tcp_init_congestion_ops (i.e. tcp_reno) is used as the ca_ops during 3WHS, and after 3WHS, ca_ops is assigned as the default congestion control set by sysctl and immediately its parameters stored in icsk_ca_priv[] are initialized. Commit 55d8694fa82c ("net: tcp: assign

Re: [PATCH] bpf: fix size of copy_to_user in percpu map.

2016-07-29 Thread Alexei Starovoitov
On Thu, Jul 28, 2016 at 05:42:21PM -0700, William Tu wrote: > The total size of value copy_to_user() writes to userspace should > be the (current number of cpu) * (value size), instead of > num_possible_cpus() * (value size). Found by samples/bpf/test_maps.c, > which always copies 512 byte to