Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Yonghong Song
On 3/16/18 4:03 PM, Eric Dumazet wrote: On 03/16/2018 03:37 PM, Yonghong Song wrote: Eric and Daniel, I have tried to fix this issue but not really successful. I tried two hacks:   . if skb_headlen(list_skb) is not 0, we just pull     skb_headlen(list_skb) from the skb to make skb_headle

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Timur Tabi
On Fri, Mar 16, 2018 at 11:25 PM, Sinan Kaya wrote: > @@ -477,15 +477,16 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 > inc, union t4_wr *wqe) > (u64 *)wqe); > } else { > pr_debug("DB wq->sq.pidx = %d\n", wq->sq

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
On 3/17/2018 12:03 AM, Sinan Kaya wrote: > On 3/16/2018 11:40 PM, Sinan Kaya wrote: >> I'll change writel_relaxed() with __raw_writel() in the series like you >> suggested >> and also look at your other comments. > > I spoke too soon. > > Now that I realized, code needs to follow one of the foll

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Timur Tabi
On 3/16/18 6:04 PM, Steve Wise wrote: Anybody understand why the PPC implementation of writeX_relaxed() isn't relaxed? You probably should ask that on the linuxppc-...@lists.ozlabs.org mailing list. I've always wondered why PowerPC has non-standard I/O accessors. -- Qualcomm Datacenter Tech

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
On 3/16/2018 11:40 PM, Sinan Kaya wrote: > I'll change writel_relaxed() with __raw_writel() in the series like you > suggested > and also look at your other comments. I spoke too soon. Now that I realized, code needs to follow one of the following patterns for correctness 1) wmb() writel()/wri

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
On 3/16/2018 7:05 PM, Steve Wise wrote: >> >> On 3/16/2018 5:05 PM, Steve Wise wrote: Code includes wmb() followed by writel(). writel() already has a barrier >>> on some architectures like arm64. This ends up CPU observing two barriers back to back before executing >> the

[page_frag_cache] 47b0eaa4b5: BUG:unable_to_handle_kernel

2018-03-16 Thread kernel test robot
FYI, we noticed the following commit (built with gcc-7): commit: 47b0eaa4b5814e82dbd7b6053926e181c7dc878f ("page_frag_cache: Store metadata in struct page") url: https://github.com/0day-ci/linux/commits/Matthew-Wilcox/mm-Use-page-mapping-to-indicate-pfmemalloc/20180317-041855 in testcase: trin

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 9:14 PM, Linus Torvalds wrote: > On Fri, Mar 16, 2018 at 1:03 PM, Miguel Ojeda > wrote: >>> >>> Kees - is there some online "gcc-4.4 checker" somewhere? This does >>> seem to work with my gcc. I actually tested some of those files you >>> pointed at now. >> >> I use this o

Re: [PATCH] net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred

2018-03-16 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

[PATCH net-next 09/10 v2] selftests: pmtu: Add pmtu_vti6_link_add_mtu test

2018-03-16 Thread Stefano Brivio
Same as pmtu_vti4_link_add_mtu test, but for IPv6. Signed-off-by: Stefano Brivio --- v2: Adjusted return codes for 4/10, added test description, error strings now buffered tools/testing/selftests/net/pmtu.sh | 44 - 1 file changed, 43 insertions(+), 1 del

[PATCH net-next 05/10 v2] selftests: pmtu: Add pmtu_vti4_default_mtu test

2018-03-16 Thread Stefano Brivio
This test checks that the MTU assigned by default to a vti (IPv4) interface created on top of veth is simply veth's MTU minus the length of the encapsulated IPv4 header. Signed-off-by: Stefano Brivio --- v2: Adjusted return codes for 4/10, added test description, error strings now buffered

[PATCH net-next 03/10 v2] selftests: pmtu: Factor out MTU parsing helper

2018-03-16 Thread Stefano Brivio
...so that it can be used for any iproute command output. Signed-off-by: Stefano Brivio --- v2: No changes tools/testing/selftests/net/pmtu.sh | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/ne

[PATCH net-next 10/10 v2] selftests: pmtu: Add pmtu_vti6_link_change_mtu test

2018-03-16 Thread Stefano Brivio
This test checks that MTU configured from userspace is used on link creation and changes, and that when it's not passed from userspace, it's calculated properly from the MTU of the lower layer. Signed-off-by: Stefano Brivio --- v2: Adjusted return codes for 4/10, added test description, error

[PATCH net-next 04/10 v2] selftests: pmtu: Introduce support for multiple tests

2018-03-16 Thread Stefano Brivio
Introduce list of tests and their descriptions, and loop on it in main body. Tests will now just take care of calling setup with a list of "units" they need, and return 0 on success, 1 on failure, 2 if the test had to be skipped. Main script body will take care of displaying results and cleaning

[PATCH net-next 08/10 v2] selftests: pmtu: Add pmtu_vti4_link_add_mtu test

2018-03-16 Thread Stefano Brivio
This test checks that MTU given on vti link creation is actually configured, and that tunnel is not created with an invalid MTU value. Signed-off-by: Stefano Brivio --- v2: Adjusted return codes for 4/10, added test description, error strings now buffered tools/testing/selftests/net/pmtu.sh

[PATCH net-next 07/10 v2] selftests: pmtu: Add test_pmtu_vti4_exception test

2018-03-16 Thread Stefano Brivio
This test checks that PMTU exceptions are created only when needed on IPv4 routes with vti and xfrm, and their PMTU value is checked as well. We can't adopt the same approach as test_pmtu_vti6_exception() here, because on IPv4 administrative MTU changes won't be reflected directly on PMTU. Signed

[PATCH net-next 06/10 v2] selftests: pmtu: Add pmtu_vti6_default_mtu test

2018-03-16 Thread Stefano Brivio
Same as pmtu_vti4_default_mtu, but on IPv6 with vti6. Signed-off-by: Stefano Brivio --- v2: Adjusted return codes for 4/10, added test description, error strings now buffered tools/testing/selftests/net/pmtu.sh | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff -

[PATCH net-next 01/10 v2] selftests: pmtu: Reverse return codes of functions

2018-03-16 Thread Stefano Brivio
David suggests it's more intuitive to return non-zero on failures, and zero on success. No need to introduce tail 'return 0' in functions, they will return the exit code of the last command anyway. Suggested-by: David Ahern Signed-off-by: Stefano Brivio --- v2: Introduced tools/testing/selfte

[PATCH net-next 02/10 v2] selftests: pmtu: Use namespace command prefix to fetch route mtu

2018-03-16 Thread Stefano Brivio
In 7af137b72131 ("selftests: net: Introduce first PMTU test") I accidentally assumed route_get_* helpers would run from a single namespace. Make them a bit more generic, by passing the namespace command prefix as a parameter instead. Fixes: 7af137b72131 ("selftests: net: Introduce first PMTU test"

[PATCH net-next 00/10 v2] selftests: pmtu: Add further vti/vti6 MTU and PMTU tests

2018-03-16 Thread Stefano Brivio
Patches 5/10 to 10/10 add tests to verify default MTU assignment for vti4 and vti6 interfaces, to check that MTU values set on new link and link changes are properly taken and validated, and to verify PMTU exceptions on vti4 interfaces. Patch 1/10 reverses function return codes as suggested by Dav

[PATCH net-next v5 1/8] ibmvnic: Generalize TX pool structure

2018-03-16 Thread Thomas Falcon
Remove some unused fields in the structure and include values describing the individual buffer size and number of buffers in a TX pool. This allows us to use these fields for TX pool buffer accounting as opposed to using hard coded values. Include a new pool array for TSO transmissions. Signed-of

[PATCH net-next v5 6/8] ibmvnic: Improve TX buffer accounting

2018-03-16 Thread Thomas Falcon
Improve TX pool buffer accounting to prevent the producer index from overruning the consumer. First, set the next free index to an invalid value if it is in use. If next buffer to be consumed is in use, drop the packet. Finally, if the transmit fails for some other reason, roll back the consumer i

[PATCH net-next v5 3/8] ibmvnic: Update release TX pool routine

2018-03-16 Thread Thomas Falcon
Introduce function that frees one TX pool. Use that to release each pool in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/eth

[PATCH net-next v5 4/8] ibmvnic: Update TX pool initialization routine

2018-03-16 Thread Thomas Falcon
Introduce function that initializes one TX pool. Use that to create each pool entry in both the standard TX pool and TSO pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 90 -- 1 file changed, 48 insertions(+), 42 deletions(-)

[PATCH net-next v5 8/8] ibmvnic: Remove unused TSO resources in TX pool structure

2018-03-16 Thread Thomas Falcon
Finally, remove the TSO-specific fields in the TX pool strcutures. These are no longer needed with the introduction of separate buffer pools for TSO transmissions. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net

[PATCH net-next v5 5/8] ibmvnic: Update TX and TX completion routines

2018-03-16 Thread Thomas Falcon
Update TX and TX completion routines to account for TX pool restructuring. TX routine first chooses the pool depending on whether a packet is GSO or not, then uses it accordingly. For the completion routine to know which pool it needs to use, set the most significant bit of the correlator index to

[PATCH net-next v5 2/8] ibmvnic: Update and clean up reset TX pool routine

2018-03-16 Thread Thomas Falcon
Update TX pool reset routine to accommodate new TSO pool array. Introduce a function that resets one TX pool, and use that function to initialize each pool in both pool arrays. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 45 +- 1 file

[PATCH net-next v5 7/8] ibmvnic: Update TX pool cleaning routine

2018-03-16 Thread Thomas Falcon
Update routine that cleans up any outstanding transmits that have not received completions when the device needs to close. Introduces a helper function that cleans one TX pool to make code more readable. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 40 +++

[PATCH net-next v5 0/8] ibmvnic: Update TX pool and TX routines

2018-03-16 Thread Thomas Falcon
This patch restructures the TX pool data structure and provides a separate TX pool array for TSO transmissions. This is already used in some way due to our unique DMA situation, namely that we cannot use single DMA mappings for packet data. Previously, both buffer arrays used the same pool entry. T

Re: [v2] vhost: add vsock compat ioctl

2018-03-16 Thread Sonny Rao
On Fri, Mar 16, 2018 at 12:30 PM, David Miller wrote: > > Although the top level ioctls are probably size and layout compatible, > I do not think that the deeper ioctls can be called by compat binaries > without some translations in order for them to work. Ok, thanks -- I have only tested VHOST_V

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 9:14 PM, Linus Torvalds wrote: > On Fri, Mar 16, 2018 at 1:03 PM, Miguel Ojeda > wrote: >>> >>> Kees - is there some online "gcc-4.4 checker" somewhere? This does >>> seem to work with my gcc. I actually tested some of those files you >>> pointed at now. >> >> I use this o

Re: [PATCH] net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred

2018-03-16 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: sctp: use proc_remove_subtree()

2018-03-16 Thread Al Viro
On Fri, Mar 16, 2018 at 12:44:15PM -0400, David Miller wrote: > From: Al Viro > Date: Wed, 14 Mar 2018 20:51:19 + > > > On Wed, Mar 14, 2018 at 08:46:21PM +, Al Viro wrote: > >> use proc_remove_subtree() for subtree removal, both on setup failure > >> halfway through and on teardown. No

[PATCH v2] sctp: use proc_remove_subtree()

2018-03-16 Thread Al Viro
use proc_remove_subtree() for subtree removal, both on setup failure halfway through and on teardown. No need to make simple things complex... Signed-off-by: Al Viro --- include/net/sctp/sctp.h | 11 +-- net/sctp/objcnt.c | 8 net/sctp/proc.c | 90 ++

Re: [PATCH net-next 4/5] net: Make ip_ra_chain per struct net

2018-03-16 Thread kbuild test robot
Hi Kirill, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v4.16-rc4] [also build test WARNING on next-20180316] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

RE: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Steve Wise
> > On 3/16/2018 5:05 PM, Steve Wise wrote: > >> Code includes wmb() followed by writel(). writel() already has a barrier > > on > >> some architectures like arm64. > >> > >> This ends up CPU observing two barriers back to back before executing > the > >> register write. > >> > >> Since code alrea

RE: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Steve Wise
> > On Fri, Mar 16, 2018 at 04:05:10PM -0500, Steve Wise wrote: > > > Code includes wmb() followed by writel(). writel() already has a barrier > > on > > > some architectures like arm64. > > > > > > This ends up CPU observing two barriers back to back before executing > the > > > register write. >

Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Eric Dumazet
On 03/16/2018 03:37 PM, Yonghong Song wrote: > > Eric and Daniel, > > I have tried to fix this issue but not really successful. > I tried two hacks: >   . if skb_headlen(list_skb) is not 0, we just pull >     skb_headlen(list_skb) from the skb to make skb_headlen(list_skb) = 0, or >   . if skb_

[PATCH net-next] liquidio: Added support for trusted VF

2018-03-16 Thread Felix Manlunas
From: Intiyaz Basha When a VF is trusted, all promiscuous traffic will only be sent to that VF. In normal operation promiscuous traffic is sent to the PF. There can be only one trusted VF per PF. Signed-off-by: Intiyaz Basha Acked-by: Satanand Burla Signed-off-by: Felix Manlunas --- drivers/

Re: [PATCH net-next] liquidio: Added support for trusted VF

2018-03-16 Thread Eric Dumazet
On 03/16/2018 03:40 PM, Felix Manlunas wrote: > From: Intiyaz Basha > > When a VF is trusted, all promiscuous traffic will only be sent to that VF. > In normal operation promiscuous traffic is sent to the PF. There can be > only one trusted VF per PF. > > Signed-off-by: Intiyaz Basha > Acked-

[PATCH net-next 0/2] hv_netvsc: minor enhancements

2018-03-16 Thread Stephen Hemminger
A couple of small things for net-next Stephen Hemminger (2): hv_netvsc: pass netvsc_device to rndis halt hv_netvsc: add trace points drivers/net/hyperv/Makefile | 2 +- drivers/net/hyperv/netvsc.c | 26 +- drivers/net/hyperv/netvsc_trace.c | 7 ++ drivers/net/hyperv/netv

[PATCH net-next 2/2] hv_netvsc: add trace points

2018-03-16 Thread Stephen Hemminger
This adds tracepoints to the driver which has proved useful in debugging startup and shutdown race conditions. Signed-off-by: Stephen Hemminger --- Note: the standard indentation style of trace files send checkpatch off into a tantrum. Ignore warnings from that. drivers/net/hyperv/Makefile

[PATCH net-next 1/2] hv_netvsc: pass netvsc_device to rndis halt

2018-03-16 Thread Stephen Hemminger
The caller has a valid pointer, pass it to rndis_filter_halt_device and avoid any possible RCU races here. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/rndis_filter.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c b/driver

[PATCH 2/5] ixgbevf: Add support for XDP_TX action

2018-03-16 Thread Tony Nguyen
This implements the XDP_TX action which is modeled on the ixgbe implementation. However instead of using CPU id to determine which XDP queue to use, this uses the received RX queue index, which is similar to i40e. Doing this eliminates the restriction that number of CPUs not exceed number of XDP qu

[PATCH 4/5] ixgbevf: Add support for meta data

2018-03-16 Thread Tony Nguyen
Add support for XDP meta data when using build skb. Based on commit 366a88fe2f40 ("bpf, ixgbe: add meta data support") Signed-off-by: Tony Nguyen Acked-by: John Fastabend --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 29 +++ 1 file changed, 25 insertions(+), 4 del

[PATCH 1/5] ixgbevf: Add XDP support for pass and drop actions

2018-03-16 Thread Tony Nguyen
Implement XDP_PASS and XDP_DROP based on the ixgbe implementation. Based largely on commit 924708081629 ("ixgbe: add XDP support for pass and drop actions"). Signed-off-by: Tony Nguyen Acked-by: John Fastabend --- drivers/net/ethernet/intel/ixgbevf/ethtool.c | 9 +- drivers/net/ethernet

[PATCH 0/5] Enable XDP for ixgbevf

2018-03-16 Thread Tony Nguyen
This patch series implements support for XDP on ixgbevf; it is mainly based on the ixgbe implementation and supports the following actions: XDP_PASS, XDP_DROP, and XDP_TX. Tony Nguyen (5): ixgbevf: Add XDP support for pass and drop actions ixgbevf: Add support for XDP_TX action ixgbevf: Dela

[PATCH 3/5] ixgbevf: Delay tail write for XDP packets

2018-03-16 Thread Tony Nguyen
Current XDP implementation hits the tail on every XDP_TX; change the driver to only hit the tail after packet processing is complete. Based on commit 7379f97a4fce ("ixgbe: delay tail write to every 'n' packets") Signed-off-by: Tony Nguyen Acked-by: John Fastabend --- drivers/net/ethernet/intel

[PATCH 5/5] ixgbevf: Add XDP queue stats reporting

2018-03-16 Thread Tony Nguyen
XDP stats are included in TX stats, however, they are not reported in TX queue stats since they are setup on different queues. Add reporting for XDP queue stats to provide consistency between the total stats and per queue stats. Signed-off-by: Tony Nguyen Acked-by: John Fastabend --- drivers/n

Re: BUG_ON triggered in skb_segment

2018-03-16 Thread Yonghong Song
Eric and Daniel, I have tried to fix this issue but not really successful. I tried two hacks: . if skb_headlen(list_skb) is not 0, we just pull skb_headlen(list_skb) from the skb to make skb_headlen(list_skb) = 0, or . if skb_headlen(list_skb) is not 0, we go to the beginning of th

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Jason Gunthorpe
On Fri, Mar 16, 2018 at 04:05:10PM -0500, Steve Wise wrote: > > Code includes wmb() followed by writel(). writel() already has a barrier > on > > some architectures like arm64. > > > > This ends up CPU observing two barriers back to back before executing the > > register write. > > > > Since code

[PATCH v2 2/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Grygorii Strashko
Some ethernet drivers (like TI CPSW) may connect and manage >1 Net PHYs per one netdevice, as result such drivers will produce warning during system boot and fail to connect second phy to netdevice when PHYLIB framework will try to create sysfs link netdev->phydev for second PHY in phy_attach_direc

[PATCH v2 1/2] sysfs: symlink: export sysfs_create_link_nowarn()

2018-03-16 Thread Grygorii Strashko
The sysfs_create_link_nowarn() is going to be used in phylib framework in subsequent patch which can be built as module. Hence, export sysfs_create_link_nowarn() to avoid build errors. Cc: Florian Fainelli Cc: Andrew Lunn Fixes: a3995460491d ("net: phy: Relax error checking on sysfs_create_link(

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Grygorii Strashko
On 03/16/2018 04:14 PM, Andrew Lunn wrote: I agree, let's not have you run into circles, let's just use your patches as they are since they fix the problem and are not intrusive in any way. Agreed, this is too complex, for little gain. Thanks. v2 posted. -- regards, -grygorii

[PATCH v2 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Grygorii Strashko
Some ethernet drivers (like TI CPSW) may connect and manage >1 Net PHYs per one netdevice, as result such drivers will produce warning during system boot and fail to connect second phy to netdevice when PHYLIB framework will try to create sysfs link netdev->phydev for second PHY in phy_attach_direc

Re: [PATCH RFC 0/2] Add support for warnings to extack

2018-03-16 Thread Jakub Kicinski
CC: David Ahern On Fri, 16 Mar 2018 16:23:08 -0300, Marcelo Ricardo Leitner wrote: > Currently we have the limitation that warnings cannot be reported though > extack. For example, when tc flower failed to get offloaded but got > installed on software datapath. The hardware failure is not fatal a

[PATCH v2 net 2/2] vmxnet3: use correct flag to indicate LRO feature

2018-03-16 Thread Ronak Doshi
'Commit 45dac1d6ea04 ("vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)")' introduced a flag "lro" in structure vmxnet3_adapter which is used to indicate whether LRO is enabled or not. However, the patch did not set the flag and hence it was never exercised. So, when LRO is enabled, it resulte

[PATCH v2 net 1/2] vmxnet3: avoid xmit reset due to a race in vmxnet3

2018-03-16 Thread Ronak Doshi
The field txNumDeferred is used by the driver to keep track of the number of packets it has pushed to the emulation. The driver increments it on pushing the packet to the emulation and the emulation resets it to 0 at the end of the transmit. There is a possibility of a race either when (a) ESX is

Re: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
On 3/16/2018 5:05 PM, Steve Wise wrote: >> Code includes wmb() followed by writel(). writel() already has a barrier > on >> some architectures like arm64. >> >> This ends up CPU observing two barriers back to back before executing the >> register write. >> >> Since code already has an explicit barr

Re: [pci PATCH v7 0/5] Add support for unmanaged SR-IOV

2018-03-16 Thread Don Dutile
On 03/15/2018 02:40 PM, Alexander Duyck wrote: This series is meant to add support for SR-IOV on devices when the VFs are not managed by the kernel. Examples of recent patches attempting to do this include: virto - https://patchwork.kernel.org/patch/10241225/ pci-stub - https://patchwork.kernel.o

Re: [RFC 2/2] page_frag_cache: Store metadata in struct page

2018-03-16 Thread Eric Dumazet
On 03/16/2018 02:05 PM, Matthew Wilcox wrote: > > Obviously if the problem turns out to be the cacheline thrashing rather > than the call to page_to_virt, then this is pointless to test. > >> I won't be able to test the patches until next week, but I expect I >> will probably see a noticeabl

[PATCH RFC v2 7/7] net: phy: remove phy_stop_machine

2018-03-16 Thread Heiner Kallweit
Now that the functionality of phy_stop() was integrated to __phy_stop() we can remove phy_stop_machine(). Signed-off-by: Heiner Kallweit --- v2: - no changes --- drivers/net/phy/phy.c| 18 -- drivers/net/phy/phy_device.c | 2 -- include/linux/phy.h | 1 - 3 fil

[PATCH RFC v2 3/7] net: phy: resume PHY only if needed in mdio_bus_phy_suspend

2018-03-16 Thread Heiner Kallweit
Currently the PHY is unconditionally resumed in mdio_bus_phy_suspend(). In cases where the PHY was sleepinh before suspending or if somebody else takes care of resuming later, this is not needed and wastes energy. Also start the state machine only if it's used by the driver (indicated by the adjus

[PATCH RFC v2 5/7] net: phy: make phy_stop synchronous

2018-03-16 Thread Heiner Kallweit
Currently phy_stop() just sets the state to PHY_HALTED and relies on the state machine to do the remaining work. It can take up to 1s until the state machine runs again what causes issues in situations where e.g. driver / device is brought down directly after executing phy_stop(). Fix this by exec

[PATCH RFC v2 1/7] net: phy: unconditionally resume and re-enable interrupts, in phy_start

2018-03-16 Thread Heiner Kallweit
In subsequent patches of this series interrupts will be disabled during system suspend, also we will have to resume the PHY in states other than PHY_HALTED. To prepare for this unconditionally resume and re-enable interrupts in phy_start(). Signed-off-by: Heiner Kallweit --- v2: - no changes ---

[PATCH RFC v2 2/7] net: phy: improve checking for when PHY is allowed to, suspend

2018-03-16 Thread Heiner Kallweit
This patch improves and unifies checking for when PHY is allowed to suspend. New is a check for the parent of the MDIO bus being runtime-suspended. In this case the MDIO bus may not be accessible and therefore we don't try to suspend the PHY. Instead we rely on the parent to suspend all devices on

[PATCH RFC v2 6/7] net: phy: use new function phy_stop_suspending in mdio_bus_phy_suspend

2018-03-16 Thread Heiner Kallweit
Use new function phy_stop_suspending() in mdio_bus_phy_suspend() to also disable interrupts and set link state to down. Signed-off-by: Heiner Kallweit --- v2: - no changes --- drivers/net/phy/phy_device.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/

[PATCH RFC v2 4/7] net: phy: remove phy_start_machine

2018-03-16 Thread Heiner Kallweit
Now that phy_start() integrated the functionality of phy_start_machine() we can remove it. Signed-off-by: Heiner Kallweit --- v2: - no changes --- drivers/net/phy/phy.c| 16 drivers/net/phy/phy_device.c | 1 - drivers/net/phy/phylink.c| 1 - include/linux/phy.h

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Andrew Lunn
> I agree, let's not have you run into circles, let's just use your > patches as they are since they fix the problem and are not intrusive in > any way. Agreed, this is too complex, for little gain. Andrew

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Florian Fainelli
On 03/16/2018 01:13 PM, Grygorii Strashko wrote: > > > On 03/16/2018 02:54 PM, Andrew Lunn wrote: >>> The phydrv->mdiodrv.flags can be accessible only after call to >>> of_phy_connect()/phy_connect(), >> >> You need to use a function like of_phy_find_device() to get the >> phydev, set the flag,

Re: [RFC 2/2] page_frag_cache: Store metadata in struct page

2018-03-16 Thread Matthew Wilcox
On Thu, Mar 15, 2018 at 02:26:28PM -0700, Alexander Duyck wrote: > On Thu, Mar 15, 2018 at 12:53 PM, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > Shrink page_frag_cache from 24 to 8 bytes (a single pointer to the > > currently-in-use struct page) by using the page's refcount directly >

RE: [PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Steve Wise
> Code includes wmb() followed by writel(). writel() already has a barrier on > some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > > Since code already has an explicit barrier call, changing writel() to > writel_relaxed

[PATCH RFC v2 0/7] net: phy: patch series aiming to improve few aspects of phylib

2018-03-16 Thread Heiner Kallweit
This patch series aims to tackle few issues with phylib: - address issues with patch series [1] (smsc911x + phylib changes) - make phy_stop synchronous - get rid of phy_start/stop_machine and handle it in phy_start/phy_stop - in mdio_suspend consider runtime pm state of mdio bus parent - consider

Re: HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests?

2018-03-16 Thread Andrew Lunn
> The DeLock board is this beauty: > http://www.delock.de/produkte/G_89481/merkmale.html?setLanguage=en > DeLock techsupport were so kind as to provide me with a schematic > snippet, showing the wiring of the i210 fiber SKU's dedicated > I2C/MDIO pins to the SFP socket's standard I2C pins. There

Re: [PATCH iproute2] treat "default" and "all"/"any" parameters differenty

2018-03-16 Thread Alexander Zubkov
Hi Stephen, This patch is against v4.15.0 only. It will not fit the current master, because there were changes it that areas of code since then. I have made some patch for master too and trying to discuss it with Serhey, who made other changes there. He has not answered yet. If there are no ans

Re: [PATCH] net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred

2018-03-16 Thread Christophe JAILLET
Le 16/03/2018 à 20:27, David Miller a écrit : From: Christophe JAILLET Date: Wed, 14 Mar 2018 22:09:34 +0100 diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c index 16f9bee992fe..8ee9dfd0e363 100644 --- a/drivers/net/ethernet/arc/emac_rockchip.c

Re: [PATCH iproute2 1/1] tc: print actual action for sample action

2018-03-16 Thread Stephen Hemminger
On Tue, 13 Mar 2018 09:57:10 -0400 Roman Mashak wrote: > Signed-off-by: Roman Mashak Thanks for catching this, applied.

Re: HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests?

2018-03-16 Thread Frantisek Rysanek
On 16 Mar 2018 at 19:42, Andrew Lunn wrote: > Hi Frantisek > > This seems a bit odd. The SFP cage only has i2c, not MDIO. It is > possible to carry MDIO over i2c, which is what is done when the SFP > module is copper, not fibre. But you are doing 100Base-FX, so fibre. > > The BCM5461 is a copper

Re: [PATCH iproute2 1/1] tc: use get_u32() in psample action to match types

2018-03-16 Thread Stephen Hemminger
On Tue, 13 Mar 2018 17:16:23 -0400 Roman Mashak wrote: > Signed-off-by: Roman Mashak Applied

Re: [PATCH iproute2] treat "default" and "all"/"any" parameters differenty

2018-03-16 Thread Stephen Hemminger
On Tue, 13 Mar 2018 21:19:45 +0100 Alexander Zubkov wrote: > Debian maintainer found that basic command: > # ip route flush all > No longer worked as expected which breaks user scripts and > expectations. It no longer flushed all IPv4 routes. > > Recently behaviour of "default" prefix para

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Andrew Lunn
> The phydrv->mdiodrv.flags can be accessible only after call to > of_phy_connect()/phy_connect(), You need to use a function like of_phy_find_device() to get the phydev, set the flag, and then call phy_connect_direct(). Andrew

Re: [PATCH] json_print: fix print_uint with helper type extensions

2018-03-16 Thread Stephen Hemminger
On Thu, 15 Mar 2018 20:07:20 + Kevin Darbyshire-Bryant wrote: > Introduce print helper functions for int, uint, explicit int32, uint32, > int64 & uint64. > > print_int used 'int' type internally, whereas print_uint used 'uint64_t' > > These helper functions eventually call vfprintf(fp, fmt,

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Grygorii Strashko
On 03/16/2018 02:11 PM, Florian Fainelli wrote: > On March 16, 2018 11:42:21 AM PDT, Grygorii Strashko > wrote: >> >> >> On 03/16/2018 12:34 PM, Florian Fainelli wrote: >>> >>> >>> On 03/16/2018 10:22 AM, Andrew Lunn wrote: On Wed, Mar 14, 2018 at 05:26:22PM -0500, Grygorii Strashko wrote:

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Linus Torvalds
On Fri, Mar 16, 2018 at 10:44 AM, David Laight wrote: > > I looked at the generated code for one of the constant sized VLA that > the compiler barfed at. > It seemed to subtract constants from %sp separately for the VLA. > So it looks like the compiler treats them as VLA even though it > knows the

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Linus Torvalds
On Fri, Mar 16, 2018 at 1:14 PM, Linus Torvalds wrote: > > It does not work with gcc-4.1.x, but works with gcc-4.4.x. > > I can't seem to see the errors any way, I wonder if > __builtin_choose_expr() simply didn't exist back then. No, that goes further back. It seems to be -Wvla itself that does

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Al Viro
On Fri, Mar 16, 2018 at 01:15:27PM -0700, Linus Torvalds wrote: > On Fri, Mar 16, 2018 at 1:12 PM, Al Viro wrote: > > > > That's C99, straight from N1256.pdf (C99-TC3)... > > I checked C90, since the error is > >ISO C90 forbids variable length array > > and I didn't see anything there. Wel

Re: [PATCH -next 00/22] remove in-kernel syscall invocations (part 2 == netdev)

2018-03-16 Thread Dominik Brodowski
On Fri, Mar 16, 2018 at 02:30:21PM -0400, David Miller wrote: > From: Dominik Brodowski > Date: Fri, 16 Mar 2018 18:05:52 +0100 > > > The rationale of this change is described in patch 1 of part 1[*] as > > follows: > > > > The syscall entry points to the kernel defined by SYSCALL_DEFINEx()

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Linus Torvalds
On Fri, Mar 16, 2018 at 1:12 PM, Al Viro wrote: > > That's C99, straight from N1256.pdf (C99-TC3)... I checked C90, since the error is ISO C90 forbids variable length array and I didn't see anything there. Admittedly I only found a draft copy. Linus

Re: [PATCH v2] netns: send uevent messages

2018-03-16 Thread Kirill Tkhai
On 16.03.2018 15:50, Christian Brauner wrote: > This patch adds a receive method to NETLINK_KOBJECT_UEVENT netlink sockets > to allow sending uevent messages into the network namespace the socket > belongs to. > > Currently non-initial network namespaces are already isolated and don't > receive ue

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Linus Torvalds
On Fri, Mar 16, 2018 at 1:03 PM, Miguel Ojeda wrote: >> >> Kees - is there some online "gcc-4.4 checker" somewhere? This does >> seem to work with my gcc. I actually tested some of those files you >> pointed at now. > > I use this one: > > https://godbolt.org/ Well, my *test* code works on that

Re: [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev

2018-03-16 Thread Grygorii Strashko
On 03/16/2018 02:54 PM, Andrew Lunn wrote: >> The phydrv->mdiodrv.flags can be accessible only after call to >> of_phy_connect()/phy_connect(), > > You need to use a function like of_phy_find_device() to get the > phydev, set the flag, and then call phy_connect_direct(). So, do you propose me

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Al Viro
On Fri, Mar 16, 2018 at 12:27:23PM -0700, Linus Torvalds wrote: > But it sure isn't "variable" either as far as the standard is > concerned, because the standard doesn't even have that concept (it > uses "variable" for argument numbers and for variables). Huh? 6.7.5.2p4: If the size is not pres

Re: [PATCH -next 00/22] remove in-kernel syscall invocations (part 2 == netdev)

2018-03-16 Thread Linus Torvalds
On Fri, Mar 16, 2018 at 11:30 AM, David Miller wrote: > > I imagine one of the things you'd like to do is declare that syscall > entries use a different (better) argument passing scheme. For > example, passing values in registers instead of on the stack. Actually, it's almost exactly the reverse

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Miguel Ojeda
On Fri, Mar 16, 2018 at 8:27 PM, Linus Torvalds wrote: > On Fri, Mar 16, 2018 at 10:55 AM, Al Viro wrote: >> >> That's not them, that's C standard regarding ICE. > > Yes. The C standard talks about "integer constant expression". I know. > It's come up in this very thread before. > > The C standar

Re: [PATCH net-next 3/9] selftests: pmtu: Introduce support for multiple tests

2018-03-16 Thread Stefano Brivio
On Fri, 16 Mar 2018 12:53:23 -0700 David Ahern wrote: > On 3/16/18 12:29 PM, Stefano Brivio wrote: > > This might be equally counter-intuitive for somebody. If one does a lot > > of explicit error checking with early returns, my return convention is > > also rather practical. E.g. in the setup()

Re: Fw: [Bug 199109] New: pptp: kernel printk "recursion detected", and then reboot itself

2018-03-16 Thread Guillaume Nault
On Fri, Mar 16, 2018 at 02:49:40PM +0800, xu heng wrote: > > For testing, in __ppp_channel_push(), disable sending anything from > the attached unit, just disable __ppp_xmit_process(ppp) in > __ppp_channel_push(). In my opinion, __ppp_xmit_process() should only called > by ppp_xmit_proc

Re: [PATCH net-next 2/2] net-tcp_bbr: set tp->snd_ssthresh to BDP upon STARTUP exit

2018-03-16 Thread Eric Dumazet
On 03/16/2018 10:51 AM, Yousuk Seung wrote: > Set tp->snd_ssthresh to BDP upon STARTUP exit. This allows us > to check if a BBR flow exited STARTUP and the BDP at the > time of STARTUP exit with SCM_TIMESTAMPING_OPT_STATS. Since BBR does not > use snd_ssthresh this fix has no impact on BBR's beha

Re: [PATCH net-next 3/9] selftests: pmtu: Introduce support for multiple tests

2018-03-16 Thread David Ahern
On 3/16/18 12:29 PM, Stefano Brivio wrote: > On Fri, 16 Mar 2018 11:06:07 -0700 > David Ahern wrote: > >> On 3/15/18 9:18 AM, Stefano Brivio wrote: >>> trap cleanup EXIT >>> >>> -test_pmtu_vti6_exception >>> +exitcode=0 >>> +for name in ${tests}; do >>> + echo "${name}: START" >>> + eval t

Re: [v2] vhost: add vsock compat ioctl

2018-03-16 Thread David Miller
Although the top level ioctls are probably size and layout compatible, I do not think that the deeper ioctls can be called by compat binaries without some translations in order for them to work.

Re: [PATCH net-next 3/9] selftests: pmtu: Introduce support for multiple tests

2018-03-16 Thread Stefano Brivio
On Fri, 16 Mar 2018 11:06:07 -0700 David Ahern wrote: > On 3/15/18 9:18 AM, Stefano Brivio wrote: > > trap cleanup EXIT > > > > -test_pmtu_vti6_exception > > +exitcode=0 > > +for name in ${tests}; do > > + echo "${name}: START" > > + eval test_${name} > > + ret=$? > > + cleanup > > + >

  1   2   3   4   >