Re: [PATCH net-next v2] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-12 Thread Xin Long
On Tue, Mar 13, 2018 at 11:03 AM, Wei Yongjun wrote: > Return error code -EINVAL in the address len check error handling > case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' > in the for loop. > > Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for > sen

Re: [PATCH v2 net] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()

2018-03-12 Thread Steffen Klassert
On Wed, Mar 07, 2018 at 02:42:53PM -0800, Greg Hackmann wrote: > f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a > __this_cpu_read() call inside ipcomp_alloc_tfms(). > > At the time, __this_cpu_read() required the caller to either not care > about races or to handle preempti

[PATCH net 2/2] vlan: Fix out of order vlan headers with reorder header off

2018-03-12 Thread Toshiaki Makita
With reorder header off, received packets are untagged in skb_vlan_untag() called from within __netif_receive_skb_core(), and later the tag will be inserted back in vlan_do_receive(). This caused out of order vlan headers when we create a vlan device on top of another vlan device, because vlan_do_

[PATCH net 0/2] Fix vlan untag and insertion for bridge and vlan with reorder_hdr off

2018-03-12 Thread Toshiaki Makita
As Brandon Carpenter reported[1], sending non-vlan-offloaded packets from bridge devices ends up with corrupted packets. He narrowed down this problem and found that the root cause is in skb_reorder_vlan_header(). While I was working on fixing this problem, I found that the function does not work

Re: BUG_ON triggered in skb_segment

2018-03-12 Thread Eric Dumazet
On 03/12/2018 11:08 PM, Yonghong Song wrote: On 3/12/18 11:04 PM, Eric Dumazet wrote: On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct s

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-12 Thread Rafał Miłecki
On 03/13/2018 12:01 AM, Stephen Hemminger wrote: On Mon, 12 Mar 2018 23:42:48 +0100 Rafał Miłecki wrote: 2) Blame bridge + mcast-to-ucast + hairpin for 802.11f incompatibility If we agree that 802.11f support in FullMAC firmware is acceptable, then we have to make sure Linux's bridge doesn't

Re: BUG_ON triggered in skb_segment

2018-03-12 Thread Yunsheng Lin
Hi, Song On 2018/3/13 13:45, Yonghong Song wrote: > Hi, > > One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at > net-next function skb_segment, line 3667. > > 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, > 3473 netdev_features_t feature

linux-next: build warning after merge of the net-next tree

2018-03-12 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (sparc defconfig) produced this warning: net/core/pktgen.c: In function 'pktgen_if_write': net/core/pktgen.c:1710:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ Introduced by commi

Re: BUG_ON triggered in skb_segment

2018-03-12 Thread Yonghong Song
On 3/12/18 11:04 PM, Eric Dumazet wrote: On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473  

Re: BUG_ON triggered in skb_segment

2018-03-12 Thread Eric Dumazet
On 03/12/2018 10:45 PM, Yonghong Song wrote: Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473 netdev_features_t features) 3474 { 3475  

[PATCH net 1/2] net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off

2018-03-12 Thread Toshiaki Makita
When we have a bridge with vlan_filtering on and a vlan device on top of it, packets would be corrupted in skb_vlan_untag() called from br_dev_xmit(). The problem sits in skb_reorder_vlan_header() used in skb_vlan_untag(), which makes use of skb->mac_len. In this function mac_len is meant for hand

RE: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2018-03-12 Thread Razvan Stefanescu
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Monday, March 12, 2018 4:37 PM > To: Razvan Stefanescu > Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; linux- > ker...@vger.kernel.org; netdev@vger.kernel.org; Alexander Graf > ; a...@arndb.de; Alexand

Re: [PATCH v2 1/1] net: check before dereferencing netdev_ops during busy poll

2018-03-12 Thread Eric Dumazet
On 03/12/2018 10:32 PM, Josh Elsasser wrote: init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_

BUG_ON triggered in skb_segment

2018-03-12 Thread Yonghong Song
Hi, One of our in-house projects, bpf-based NAT, hits a kernel BUG_ON at net-next function skb_segment, line 3667. 3472 struct sk_buff *skb_segment(struct sk_buff *head_skb, 3473 netdev_features_t features) 3474 { 3475 struct sk_buff *segs = NULL; 3476

[PATCH v2 1/1] net: check before dereferencing netdev_ops during busy poll

2018-03-12 Thread Josh Elsasser
init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before following the pointer, avoidi

[PATCH 0/1] net: avoid a kernel panic during sk_busy_loop

2018-03-12 Thread Josh Elsasser
V2: just check napi->dev->netdev_ops instead of getting clever with the netdev registration state. Original cover letter: Hi Dave, I stumbled across a reproducible kernel panic while playing around with busy_poll on a Linux 4.9.86 kernel. There's an unfortunate interaction between init_dummy_net

Re: [PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-12 Thread Josh Elsasser
On Mon, Mar 12, 2018 at 4:17 PM, Cong Wang wrote: > On Sun, Mar 11, 2018 at 12:22 PM, Josh Elsasser wrote: >> init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads >> to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi >> wireless adapter and checks napi->dev->

Re: [Intel-wired-lan] [PATCH 01/15] ice: Add basic driver framework for Intel(R) E800 Series

2018-03-12 Thread Jakub Kicinski
On Mon, 12 Mar 2018 09:56:30 -0700, Jeff Kirsher wrote: > On Fri, 2018-03-09 at 14:16 -0800, Jakub Kicinski wrote: > > On Fri, 9 Mar 2018 09:21:22 -0800, Anirudh Venkataramanan wrote: > > > diff --git a/Documentation/networking/ice.txt > > > b/Documentation/networking/ice.txt > > > new file mode

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-12 Thread Kees Cook
On Mon, Mar 12, 2018 at 4:57 PM, Linus Torvalds wrote: > On Mon, Mar 12, 2018 at 3:55 PM, Andrew Morton > wrote: >> >> Replacing the __builtin_choose_expr() with ?: works of course. > > Hmm. That sounds like the right thing to do. We were so myopically > staring at the __builtin_choose_expr() pro

Re: [PATCH v3 net-next 1/4] net: macb: Reorganize macb_mii bringup

2018-03-12 Thread kbuild test robot
Hi Brad, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [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/Brad-Mouring/net-macb-Reorganize-macb_mii-bringup

[PATCH v2] netfilter: nf_tables: remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we ca

Re: [PATCH] net: hns: use put_device() if device_register fail

2018-03-12 Thread arvindY
On Monday 12 March 2018 10:59 PM, Richard Weinberger wrote: On Mon, Mar 12, 2018 at 5:27 PM, arvindY wrote: On Monday 12 March 2018 08:13 PM, David Miller wrote: From: Arvind Yadav Date: Fri, 9 Mar 2018 16:11:17 +0530 if device_register() returned an error! Always use put_device() to gi

[PATCH net-next v2] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-12 Thread Wei Yongjun
Return error code -EINVAL in the address len check error handling case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' in the for loop. Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg") Signed-off-by: Wei Yongjun Acked-by: Neil Horman --- v1

[PATCH net-next 0/4] net: qualcomm: rmnet: Updates 2018-03-12

2018-03-12 Thread Subash Abhinov Kasiviswanathan
This series contains some minor updates for rmnet driver. Patch 1 contains fixes for sparse warnings. Patch 2 updates the copyright date to 2018. Patch 3 is a cleanup in receive path. Patch 4 has the implementation of the fill_info operation. Subash Abhinov Kasiviswanathan (4): net: qualcomm: r

[PATCH net-next 1/4] net: qualcomm: rmnet: Fix casting issues

2018-03-12 Thread Subash Abhinov Kasiviswanathan
Fix warnings which were reported when running with sparse (make C=1 CF=-D__CHECK_ENDIAN__) drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c:81:15: warning: cast to restricted __be16 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:271:37: warning: incorrect type in assignment (different ba

[PATCH net-next 3/4] net: qualcomm: rmnet: Remove unnecessary device assignment

2018-03-12 Thread Subash Abhinov Kasiviswanathan
Device of the de-aggregated skb is correctly assigned after inspecting the mux_id, so remove the assignment in rmnet_map_deaggregate(). Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driver

[PATCH net-next 2/4] net: qualcomm: rmnet: Update copyright year to 2018

2018-03-12 Thread Subash Abhinov Kasiviswanathan
Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c| 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.h

[PATCH net-next 4/4] net: qualcomm: rmnet: Implement fill_info

2018-03-12 Thread Subash Abhinov Kasiviswanathan
This is needed to query the mux_id and flags of a rmnet device. Signed-off-by: Subash Abhinov Kasiviswanathan --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/d

Re: [Intel-wired-lan] [PATCH 04/15] ice: Get switch config, scheduler config and device capabilities

2018-03-12 Thread Shannon Nelson
On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote: This patch adds to the initialization flow by getting switch configuration, scheduler configuration and device capabilities. Switch configuration: On boot, an L2 switch element is created in the firmware per physical function. Each physical func

Re: [Intel-wired-lan] [PATCH 07/15] ice: Add support for VSI allocation and deallocation

2018-03-12 Thread Shannon Nelson
On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote: This patch introduces data structures and functions to alloc/free VSIs. The driver represents a VSI using the ice_vsi structure. Some noteworthy points about VSI allocation: 1) A VSI is allocated in the firmware using the "add VSI" admin queue

Re: [Intel-wired-lan] [PATCH 06/15] ice: Initialize PF and setup miscellaneous interrupt

2018-03-12 Thread Shannon Nelson
On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote: This patch continues the initialization flow as follows: 1) Allocate and initialize necessary fields (like vsi, num_alloc_vsi, irq_tracker, etc) in the ice_pf instance. 2) Setup the miscellaneous interrupt handler. This also known as the

[PATCH net-next] ibmvnic: Fix recent errata commit

2018-03-12 Thread Thomas Falcon
Sorry, one of the patches I sent in an earlier series has some dumb mistakes. One was that I had changed the parameter for the errata workaround function but forgot to make that change in the code that called it. The second mistake was a forgotten return value at the end of the function in case th

Re: [Intel-wired-lan] [PATCH 02/15] ice: Add support for control queues

2018-03-12 Thread Shannon Nelson
On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote: A control queue is a hardware interface which is used by the driver to interact with other subsystems (like firmware, PHY, etc.). It is implemented as a producer-consumer ring. More specifically, an "admin queue" is a type of control queue used t

Re: [Intel-wired-lan] [PATCH 03/15] ice: Start hardware initialization

2018-03-12 Thread Shannon Nelson
On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote: This patch implements multiple pieces of the initialization flow as follows: 1) A reset is issued to ensure a clean device state, followed by initialization of admin queue interface. 2) Once the admin queue interface is up, clear the PF con

Re: [pull request][for-next 00/11] Mellanox, mlx5 IPSec updates 2018-02-28-2 (Part 2)

2018-03-12 Thread Doug Ledford
On Mon, 2018-03-12 at 21:43 +, Saeed Mahameed wrote: > On Thu, 2018-03-08 at 14:14 -0500, Doug Ledford wrote: > > On 3/8/2018 1:04 PM, David Miller wrote: > > > From: Saeed Mahameed > > > Date: Wed, 7 Mar 2018 17:26:03 -0800 > > > > > > > Hi Dave and Doug, > > > > > > > > This series includ

[PATCH] netfilter: nf_tables: remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we ca

Re: [PATCH net-next] net: stmmac: remove superfluous wmb() memory barriers

2018-03-12 Thread David Miller
From: Niklas Cassel Date: Mon, 12 Mar 2018 09:55:42 +0100 > Jose is simply responding to the commit message description of this patch. > > You explained that there is an implicit memory barrier between physical memory > writes and those to MMIO register space, as long as you used writel(). > >

Re: [RFC PATCH net-next 3/5] bridge: allow switchdev port to handle flooding by itself

2018-03-12 Thread Andrew Lunn
> The flag was introduced to enable hardware switch capabilities of > drivers/net/wireless/quantenna/qtnfmac wifi driver. It does not have any > switchdev functionality in upstream tree at this moment, and this patchset > was intended as a preparatory change. O.K. But i suggest you add basic switc

Re: [RESEND PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-12 Thread David Miller
From: Roman Mashak Date: Mon, 12 Mar 2018 16:07:02 -0400 > Signed-off-by: Roman Mashak Applied. > -] > +] > \ No newline at end of file Please fix this.

Re: [RESEND PATCH net-next 1/1] tc-testing: add TC vlan action tests

2018-03-12 Thread David Miller
From: Roman Mashak Date: Mon, 12 Mar 2018 16:06:37 -0400 > Signed-off-by: Roman Mashak Applied.

Re: [PATCH net] net: dsa: Fix dsa_is_user_port() test inversion

2018-03-12 Thread David Miller
From: Florian Fainelli Date: Mon, 12 Mar 2018 16:00:40 -0700 > During the conversion to dsa_is_user_port(), a condition ended up being > reversed, which would prevent the creation of any user port when using > the legacy binding and/or platform data, fix that. > > Fixes: 4a5b85ffe2a0 ("net: dsa:

Re: [PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread Thomas Falcon
On 03/12/2018 07:59 PM, David Miller wrote: > From: Thomas Falcon > Date: Mon, 12 Mar 2018 17:07:38 -0500 > >> On 03/12/2018 11:56 AM, David Miller wrote: >>> From: Thomas Falcon >>> Date: Mon, 12 Mar 2018 11:51:01 -0500 >>> This patch series contains fixes for VLAN and other backing hardwar

Re: [PATCH net-next] net: phy: set link state to down when creating the phy_device

2018-03-12 Thread David Miller
From: Heiner Kallweit Date: Sun, 11 Mar 2018 15:00:37 +0100 > Currently the link state is initialized to "up" when the phy_device is > being created. This is not consistent with the phy state being > initialized to PHY_DOWN. > > Usually this doen't do any harm because the link state is updated >

Re: [PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread David Miller
From: Thomas Falcon Date: Mon, 12 Mar 2018 17:07:38 -0500 > On 03/12/2018 11:56 AM, David Miller wrote: >> From: Thomas Falcon >> Date: Mon, 12 Mar 2018 11:51:01 -0500 >> >>> This patch series contains fixes for VLAN and other backing hardware >>> errata. The VLAN fixes are mostly to account for

[PATCH] netfilter: nfnetlink_cthelper: Remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we ca

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

2018-03-12 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got conflicts in: drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum.c between commit: 663f1b26f9c1 ("mlxsw: spectrum: Prevent duplicate mirrors") from the net tree and commit: a629ef210d89

Re: [RFC PATCH v0 2/2] skbuff: Notify errors with sk_error_report()

2018-03-12 Thread Eric Dumazet
On 03/12/2018 04:10 PM, Vinicius Costa Gomes wrote: When errors are enqueued to the error queue via sock_queue_err_skb() function, it is possible that the correct application is not notified. Your patch makes sense, thanks.

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

2018-03-12 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/phy/phy.c between commit: a2c054a896b8 ("net: phy: Tell caller result of phy_change()") from the net tree and commit: 4fff2d33c707 ("net: phy: remove phy_error from phy_disable_interrupts") from the ne

Re: [PATCH] netfilter: cttimeout: remove VLA usage

2018-03-12 Thread Joe Perches
On Mon, 2018-03-12 at 18:14 -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLA and replace it > with dynamic memory allocation. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks. Also, in general, as the code

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-12 Thread Linus Torvalds
On Mon, Mar 12, 2018 at 3:55 PM, Andrew Morton wrote: > > Replacing the __builtin_choose_expr() with ?: works of course. Hmm. That sounds like the right thing to do. We were so myopically staring at the __builtin_choose_expr() problem that we overlooked the obvious solution. Using __builtin_cons

[PATCH] netfilter: cttimeout: remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with dynamic memory allocation. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus, we ca

Re: [PATCH 1/1] net: check dev->reg_state before deref of napi netdev_ops

2018-03-12 Thread Cong Wang
On Sun, Mar 11, 2018 at 12:22 PM, Josh Elsasser wrote: > init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads > to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi > wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. > > Avoid this by ensuring th

[RFC PATCH v0 2/2] skbuff: Notify errors with sk_error_report()

2018-03-12 Thread Vinicius Costa Gomes
When errors are enqueued to the error queue via sock_queue_err_skb() function, it is possible that the correct application is not notified. Reported-by: Randy E. Witt Signed-off-by: Vinicius Costa Gomes --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ne

[RFC PATCH v0 1/2] selftests/txtimestamp: Add more configurable parameters

2018-03-12 Thread Vinicius Costa Gomes
Add a way to configure if poll() should wait forever for an event, the number of packets that should be sent for each and if there should be any delay between packets. Signed-off-by: Vinicius Costa Gomes --- .../selftests/networking/timestamping/txtimestamp.c | 21 ++--- 1 file c

[RFC PATCH v0 0/2] skbuff: Fix applications not being woken for errors

2018-03-12 Thread Vinicius Costa Gomes
Hi, This is actually a "bug report"-RFC instead of the more usual "new feature"-RFC. We are developing an application that uses TX hardware timestamping to make some measurements, and during development Randy Witt initially reported that the application poll() never unblocked when TX hardware tim

Re: [PATCH net-next 0/5] Switchdev: flooding offload option

2018-03-12 Thread Igor Mitsyanko
On 03/10/2018 02:08 PM, Andrew Lunn wrote: Hi Igor You don't appear to be adding any user of this. Please also make one of the switchdev drivers actually use this new functionality. Andrew Hi Andrew, a first user is supposed to be drivers/net/wireless/quantenna/qtnfmac wifi driver. I w

Re: [RFC PATCH net-next 3/5] bridge: allow switchdev port to handle flooding by itself

2018-03-12 Thread Igor Mitsyanko
On 03/10/2018 08:55 AM, Andrew Lunn wrote: Is this sufficiently granular? There are a few different use cases for flooding: There is no fdb entry in the software switch for the destination MAC address, so flood the packet out all ports of the bridge. The hardware switch might have an entry in it

[PATCH net] net: dsa: Fix dsa_is_user_port() test inversion

2018-03-12 Thread Florian Fainelli
During the conversion to dsa_is_user_port(), a condition ended up being reversed, which would prevent the creation of any user port when using the legacy binding and/or platform data, fix that. Fixes: 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere") Signed-off-by: Florian Fainelli ---

Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()

2018-03-12 Thread Andrew Morton
On Fri, 9 Mar 2018 17:30:15 -0800 Kees Cook wrote: > > It's one reason why I wondered if simplifying the expression to have > > just that single __builtin_constant_p() might not end up working.. > > Yeah, it seems like it doesn't bail out as "false" for complex > expressions given to __builtin_c

Re: [PATCH net-next 1/1] net sched actions: return explicit error when tunnel_key mode is not specified

2018-03-12 Thread Cong Wang
On Mon, Mar 12, 2018 at 1:20 PM, Roman Mashak wrote: > If set/unset mode of the tunnel_key action is not provided, ->init() still > returns 0, and the caller proceeds with bogus 'struct tc_action *' object, > this results in crash: ... > Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key"

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
> On Mar 12, 2018, at 2:31 PM, Alexei Starovoitov wrote: > > On 3/12/18 2:12 PM, Song Liu wrote: >> >>> On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: >>> >>> On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); >>> >>> did you test it with c

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-12 Thread Siwei Liu
Apologies, still some comments going. Please see inline. On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala wrote: > This patch enables virtio_net to switch over to a VF datapath when a VF > netdev is present with the same MAC address. It allows live migration > of a VM with a direct attached VF

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-12 Thread Rafał Miłecki
On 02/27/2018 11:08 AM, Rafał Miłecki wrote: I've problem when using OpenWrt/LEDE on a home router with Broadcom's FullMAC WiFi chipset. First of all OpenWrt/LEDE uses bridge interface for LAN network with: 1) IFLA_BRPORT_MCAST_TO_UCAST 2) Clients isolation in hostapd 3) Hairpin mode enabled F

Re: [PATCH v4 net-next 3/4] net: macb: Add phy-handle DT support

2018-03-12 Thread Florian Fainelli
On 03/12/2018 02:57 PM, Andrew Lunn wrote: >> +/* attempt to find a phy-handle */ >> +if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", >> 0))) { >> + >> +/* fallback to standard phy registration if no >> phy were >> +

Re: [PATCH net-next] net: phy: set link state to down when creating the phy_device

2018-03-12 Thread Florian Fainelli
On 03/11/2018 07:00 AM, Heiner Kallweit wrote: > Currently the link state is initialized to "up" when the phy_device is > being created. This is not consistent with the phy state being > initialized to PHY_DOWN. > > Usually this doen't do any harm because the link state is updated > once the PHY r

Re: [PATCH net-next v2 0/4] ibmvnic: Fix VLAN and other device errata

2018-03-12 Thread Thomas Falcon
On 03/12/2018 11:56 AM, David Miller wrote: > From: Thomas Falcon > Date: Mon, 12 Mar 2018 11:51:01 -0500 > >> This patch series contains fixes for VLAN and other backing hardware >> errata. The VLAN fixes are mostly to account for the additional four >> bytes VLAN header in TX descriptors and buf

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Peter Zijlstra
On Mon, Mar 12, 2018 at 01:39:56PM -0700, Song Liu wrote: > +static void stack_map_get_build_id_offset(struct bpf_map *map, > + struct stack_map_bucket *bucket, > + u64 *ips, u32 trace_nr) > +{ > + int i; > + struct

Re: [PATCH v4 net-next 3/4] net: macb: Add phy-handle DT support

2018-03-12 Thread Andrew Lunn
> + /* attempt to find a phy-handle */ > + if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", > 0))) { > + > + /* fallback to standard phy registration if no > phy were > + * found during dt phy

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-12 Thread Siwei Liu
On Sat, Mar 3, 2018 at 8:04 PM, Michael S. Tsirkin wrote: > On Fri, Mar 02, 2018 at 03:56:31PM -0800, Siwei Liu wrote: >> On Fri, Mar 2, 2018 at 1:36 PM, Michael S. Tsirkin wrote: >> > On Fri, Mar 02, 2018 at 01:11:56PM -0800, Siwei Liu wrote: >> >> On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudr

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-12 Thread Rafał Miłecki
On 12 March 2018 at 12:48, Linus Lüssing wrote: > On Mon, Mar 12, 2018 at 12:08:56PM +0100, Linus Lüssing wrote: >> On Tue, Feb 27, 2018 at 11:08:20AM +0100, Rafał Miłecki wrote: >> > I've problem when using OpenWrt/LEDE on a home router with Broadcom's >> > FullMAC WiFi chipset. >> >> Hi Rafał, >

Re: Problem with bridge (mcast-to-ucast + hairpin) and Broadcom's 802.11f in their FullMAC fw

2018-03-12 Thread Rafał Miłecki
On 12 March 2018 at 12:08, Linus Lüssing wrote: > On Tue, Feb 27, 2018 at 11:08:20AM +0100, Rafał Miłecki wrote: >> I've problem when using OpenWrt/LEDE on a home router with Broadcom's >> FullMAC WiFi chipset. > > Hi Rafał, > > Thanks for reporting this issue! > >> Can you see any solution for th

Re: [pull request][for-next 00/11] Mellanox, mlx5 IPSec updates 2018-02-28-2 (Part 2)

2018-03-12 Thread Saeed Mahameed
On Thu, 2018-03-08 at 14:14 -0500, Doug Ledford wrote: > On 3/8/2018 1:04 PM, David Miller wrote: > > From: Saeed Mahameed > > Date: Wed, 7 Mar 2018 17:26:03 -0800 > > > > > Hi Dave and Doug, > > > > > > This series includes shared code updates (IPSec part2) for mlx5 > > > core > > > driver fo

Re: [PATCH iproute2] Revert "iproute: "list/flush/save default" selected all of the routes"

2018-03-12 Thread Luca Boccassi
On Mon, 2018-03-12 at 14:03 -0700, Stephen Hemminger wrote: > This reverts commit 9135c4d6037ff9f1818507bac0049fc44db8c3d2. > > 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

[PATCH v4 net-next 2/4] net: macb: Remove redundant poll irq assignment

2018-03-12 Thread Brad Mouring
In phy_device's general probe, this device will already be set for phy register polling, rendering this code redundant. Signed-off-by: Brad Mouring Suggested-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/cadence/macb_main.c | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v4 net-next 3/4] net: macb: Add phy-handle DT support

2018-03-12 Thread Brad Mouring
This optional binding (as described in the ethernet DT bindings doc) directs the netdev to the phydev to use. This is useful for a phy chip that has >1 phy in it, and two netdevs are using the same phy chip (i.e. the second mac's phy lives on the first mac's MDIO bus) The devicetree snippet would

[PATCH v4 net-next 4/4] Documentation: macb: Document phy-handle binding

2018-03-12 Thread Brad Mouring
Document the existance of the optional binding, directing to the general ethernet document that describes this binding. Signed-off-by: Brad Mouring Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/

[PATCH v4 net-next 1/4] net: macb: Reorganize macb_mii bringup

2018-03-12 Thread Brad Mouring
The macb mii setup (mii_probe() and mii_init()) previously was somewhat interspersed, likely a result of organic growth and hacking. This change moves mii bus registration into mii_init and probing the bus for devices into mii_probe. Signed-off-by: Brad Mouring Suggested-by: Andrew Lunn Reviewe

[PATCH v4 net-next 0/4]

2018-03-12 Thread Brad Mouring
Consider the situation where a macb netdev is connected through a phydev that sits on a mii bus other than the one provided to this particular netdev. This situation is what this patchset aims to accomplish through the existing phy-handle optional binding. This optional binding (as described in t

Re: [PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Eric Biggers
On Mon, Mar 12, 2018 at 02:25:41PM -0700, Tom Herbert wrote: > On Mon, Mar 12, 2018 at 2:09 PM, Eric Biggers wrote: > > On Mon, Mar 12, 2018 at 02:04:12PM -0700, Tom Herbert wrote: > >> Need to lock lower socket in order to provide mutual exclusion > >> with kcm_unattach. > >> > >> Fixes: ab7ac4eb

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Alexei Starovoitov
On 3/12/18 2:12 PM, Song Liu wrote: On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); did you test it with config_debug_atomic_sleep ? it should have complained... Yeah, I have CONFIG_DEBUG

Re: [net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-03-12

2018-03-12 Thread David Miller
From: Jeff Kirsher Date: Mon, 12 Mar 2018 13:12:09 -0700 > This series contains updates to ixgbe and ixgbevf only. Pulled, thanks Jeff.

Re: [PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Tom Herbert
On Mon, Mar 12, 2018 at 2:09 PM, Eric Biggers wrote: > On Mon, Mar 12, 2018 at 02:04:12PM -0700, Tom Herbert wrote: >> Need to lock lower socket in order to provide mutual exclusion >> with kcm_unattach. >> >> Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connection Multiplexor module") >> Signed-

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
> On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: > > On 3/12/18 1:39 PM, Song Liu wrote: >> +page = find_get_page(vma->vm_file->f_mapping, 0); > > did you test it with config_debug_atomic_sleep ? > it should have complained... Yeah, I have CONFIG_DEBUG_ATOMIC_SLEEP=y. I think fin

Re: [PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Eric Biggers
On Mon, Mar 12, 2018 at 02:04:12PM -0700, Tom Herbert wrote: > Need to lock lower socket in order to provide mutual exclusion > with kcm_unattach. > > Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connection Multiplexor module") > Signed-off-by: Tom Herbert > --- Is this fixing the syzbot-report

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-12 Thread Jiri Pirko
Mon, Mar 12, 2018 at 09:58:06PM CET, sridhar.samudr...@intel.com wrote: > > >On 3/12/2018 1:12 PM, Jiri Pirko wrote: >> Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.com wrote: >> > This patch enables virtio_net to switch over to a VF datapath when a VF >> > netdev is present with th

[PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Tom Herbert
Need to lock lower socket in order to provide mutual exclusion with kcm_unattach. Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Tom Herbert --- net/kcm/kcmsock.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Alexei Starovoitov
On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); did you test it with config_debug_atomic_sleep ? it should have complained...

[PATCH iproute2] Revert "iproute: "list/flush/save default" selected all of the routes"

2018-03-12 Thread Stephen Hemminger
This reverts commit 9135c4d6037ff9f1818507bac0049fc44db8c3d2. 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. Reported-by: Luca Boccassi Signed-off-by: Stephen

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-12 Thread Samudrala, Sridhar
On 3/12/2018 1:12 PM, Jiri Pirko wrote: Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.com wrote: This patch enables virtio_net to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF withou

Re: de-indirect TCP congestion control

2018-03-12 Thread Stephen Hemminger
On Mon, 12 Mar 2018 16:05:16 -0400 (EDT) David Miller wrote: > From: Eric Dumazet > Date: Mon, 12 Mar 2018 13:03:35 -0700 > > > > > > > On 03/12/2018 12:48 PM, Stephen Hemminger wrote: > >> On Mon, 12 Mar 2018 15:04:06 -0400 (EDT) > >> David Miller wrote: > >> > >>> From: Stephen Hemmin

[PATCH bpf-next v4 0/2] bpf stackmap with build_id+offset

2018-03-12 Thread Song Liu
This is v4 of this work. Changes since v3: 1. Add fallback when build_id lookup failed. In this case, status is set to BPF_STACK_BUILD_ID_IP, and ip of this entry is saved. 2. Handle cases where vma is only part of the file (vma->vm_pgoff != 0). Thanks to Teng for helping me identify this is

[PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
Currently, bpf stackmap store address for each entry in the call trace. To map these addresses to user space files, it is necessary to maintain the mapping from these virtual address to symbols in the binary. Usually, the user space profiler (such as perf) has to scan /proc/pid/maps at the beginnin

[PATCH bpf-next v4 2/2] bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID

2018-03-12 Thread Song Liu
test_stacktrace_build_id() is added. It accesses tracepoint urandom_read with "dd" and "urandom_read" and gathers stack traces. Then it reads the stack traces from the stackmap. urandom_read is a statically link binary that reads from /dev/urandom. test_stacktrace_build_id() calls readelf to read

Re: "wrong" ifindex on received VLAN tagged packet?

2018-03-12 Thread David Ahern
On 3/6/18 5:27 PM, Lawrence Kreeger wrote: > Using ETH_P_ALL instead of ETH_P_802_2, is causing mstpd to get 3 > copies of the same BPDU. One from eth0, one from eth0.100, and > another from vlan100 (the bridge). > mstpd will drop the one from vlan100, but since there is also an > instance of span

Re: [PATCH 00/30] Netfilter/IPVS updates for net-next

2018-03-12 Thread Felix Fietkau
On 2018-03-12 21:01, David Miller wrote: > From: Felix Fietkau > Date: Mon, 12 Mar 2018 20:30:01 +0100 > >> It's not dead and useless. In its current state, it has a software fast >> path that significantly improves nftables routing/NAT throughput, >> especially on embedded devices. >> On some de

[PATCH net-next 1/1] net sched actions: return explicit error when tunnel_key mode is not specified

2018-03-12 Thread Roman Mashak
If set/unset mode of the tunnel_key action is not provided, ->init() still returns 0, and the caller proceeds with bogus 'struct tc_action *' object, this results in crash: % tc actions add action tunnel_key src_ip 1.1.1.1 dst_ip 2.2.2.1 id 7 index 1 [ 35.805515] general protection fault:

Re: [pci PATCH v5 1/4] pci: Add pci_sriov_configure_simple for PFs that don't manage VF resources

2018-03-12 Thread Alexander Duyck
On Mon, Mar 12, 2018 at 11:23 AM, Keith Busch wrote: > On Mon, Mar 12, 2018 at 11:09:34AM -0700, Alexander Duyck wrote: >> On Mon, Mar 12, 2018 at 10:40 AM, Keith Busch wrote: >> > On Mon, Mar 12, 2018 at 10:21:29AM -0700, Alexander Duyck wrote: >> >> diff --git a/include/linux/pci.h b/include/li

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-12 Thread Jiri Pirko
Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.com wrote: >This patch enables virtio_net to switch over to a VF datapath when a VF >netdev is present with the same MAC address. It allows live migration >of a VM with a direct attached VF without the need to setup a bond/team >between a

[net-next 6/6] ixgbe: fix disabling hide VLAN on VF reset

2018-03-12 Thread Jeff Kirsher
From: Paul Greenwalt If port VLAN is enabled, set PFQDE.HIDE_VLAN during VF reset. Setting only PFQDE.PFQDE during VF reset was clearing PFQDE.HIDE_VLAN. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6

[net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-03-12

2018-03-12 Thread Jeff Kirsher
This series contains updates to ixgbe and ixgbevf only. Shannon Nelson provides three fixes to the ipsec portion of ixgbe. Make sure we are using 128-bit authentication, since it is the only size supported for hardware offload. Fixed the transmit trailer length calculation for ipsec by finding t

  1   2   3   4   >