Re: [PATCH net-next v4 4/5] bnx2x: Use NETIF_F_GRO_HW.

2017-12-14 Thread Michael Chan
On Thu, Dec 14, 2017 at 11:07 PM, Chopra, Manish wrote: > Michael, I checked it on again, I tried to set LRO in dev->features and > dev->hw_features. > Somehow, it gets disabled after register_netdevice(). Any idea why ? > Although, I am not running any Bridge/bonding devices. > Looks like, wi

[patch net] mlxsw: spectrum: Disable MAC learning for ovs port

2017-12-14 Thread Jiri Pirko
From: Yuval Mintz Learning is currently enabled for ports which are OVS slaves - even though OVS doesn't need this indication. Since we're not associating a fid with the port, HW would continuously notify driver of learned [& aged] MACs which would be logged as errors. Fixes: 2b94e58df58c ("mlxs

[PATCH 01/27] timecounter: Make cyclecounter struct part of timecounter struct

2017-12-14 Thread Sagar Arun Kamble
There is no real need for the users of timecounters to define cyclecounter and timecounter variables separately. Since timecounter will always be based on cyclecounter, have cyclecounter struct as member of timecounter struct. v2: Rebase. Suggested-by: Chris Wilson Signed-off-by: Sagar Arun Kamb

[PATCH 05/27] amd-xgbe: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update xgbe tstamp_tc timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Tom Lendacky Cc: netdev@vger.kernel.org Cc: linux-ker...@v

[PATCH 07/27] fec: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update fec ethernet timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Fugang Duan Cc: netdev@vger.kernel.org Cc: linux-ker...@vger

[PATCH 08/27] e1000e: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update e1000e timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vger.

[PATCH 09/27] igb: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update igb ptp timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vger

[PATCH 11/27] net/mlx4: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update mlx4 timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Tariq Toukan Cc: netdev@vger.kernel.org Cc: linux-r...@vger.kernel.o

[PATCH 12/27] net/mlx5: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update mlx5 timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Saeed Mahameed Cc: Matan Barak Cc: Leon Romanovsky Cc: Eugenia Ema

[PATCH 10/27] ixgbe: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update ixgbe ptp timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vg

[PATCH 14/27] net: cpts: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update cpts timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: "David S. Miller" Cc: Grygorii Strashko Cc: Richard Cochran Cc: Bhumika Goyal Cc: Thom

[PATCH 13/27] qede: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update qede timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Ariel Elior Cc: everest-linux...@cavium.com Cc: netdev@vger.kernel.o

[PATCH 18/27] bnx2x: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update bnx2x_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Ariel Elior Cc: everest-linux...@cavium.com Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel.org --

[PATCH 17/27] amd-xgbe: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update xgbe_config_tstamp and xgbe_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Tom Lendacky Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/ne

[PATCH 20/27] e1000e: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update e1000e_phc_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel

[PATCH 22/27] ixgbe: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update ixgbe_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel.

[PATCH 21/27] igb: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update igb_ptp_settime_82576 with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-...@lists.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.ker

[PATCH 23/27] net/mlx4: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update mlx4_en_phc_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Tariq Toukan Cc: netdev@vger.kernel.org Cc: linux-r...@vger.kernel.org Cc: linux-ker...@vger.kernel.org

[PATCH 19/27] net: fec: ptp: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update fec_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Fugang Duan Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel.org --- drivers/net/ethernet/freescale/

[PATCH 24/27] net/mlx5: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update mlx5_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Saeed Mahameed Cc: Matan Barak Cc: Leon Romanovsky Cc: Eugenia Emantayev Cc: Eitan Rabin Cc: Feras Daou

[PATCH 25/27] qede: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update qede_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Ariel Elior Cc: everest-linux...@cavium.com Cc: netdev@vger.kernel.org Cc: linux-ker...@vger.kernel.org ---

[PATCH 26/27] net: cpts: Use timecounter_reset interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_reset we can update the start time for timecounter. Update cpts_ptp_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: "David S. Miller" Cc: Grygorii Strashko Cc: Bhumika Goyal Cc: Richard Cochran Cc: Thomas Gleixner Cc: netdev@vger.kernel.org

[PATCH 06/27] bnx2x: Use timecounter_initialize interface

2017-12-14 Thread Sagar Arun Kamble
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update bnx2x timecounter init with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Ariel Elior Cc: everest-linux...@cavium.com Cc: netdev@vger.kernel.

RE: [PATCH net-next v4 4/5] bnx2x: Use NETIF_F_GRO_HW.

2017-12-14 Thread Chopra, Manish
> -Original Message- > From: Michael Chan [mailto:michael.c...@broadcom.com] > Sent: Thursday, December 14, 2017 2:16 AM > To: Chopra, Manish > Cc: da...@davemloft.net; netdev@vger.kernel.org; > andrew.gospoda...@broadcom.com; Elior, Ariel ; > Dept-Eng Everest Linux L2 > Subject: Re: [PAT

[net-next] phylib: Add device reset GPIO support causes DSA MT7530 acquires reset-gpios fails

2017-12-14 Thread Sean Wang
Hi Sergei, Recently I found the patch commit bafbdd527d56 (phylib: Add device reset GPIO support) would have the impact on MT7530 driver. Which causes the DSA MT7530 device (it's the child node under mdio bus) gets the reset-gpios fails because the same GPIO seems already be held in the earlier md

[PATCH] net: phy: marvell: enable a errata for 88E1145

2017-12-14 Thread Zhao Qiang
The patch below commit f2899788353c ("net: phy: marvell: Limit errata to 88m1101") limit a errata's scope to 88E1101. However, 88E1145 also need this errata, set config_aneg to m88e1101_config_aneg for 88E1145 Signed-off-by: Zhao Qiang --- drivers/net/phy/marvell.c |2 +- 1 files changed, 1

Re: [PATCH net-next] net/ncsi: Don't take any action on HNCDSC AEN

2017-12-14 Thread Jeremy Kerr
Hi Sam, > The current HNCDSC handler takes the status flag from the AEN packet and > will update or change the current channel based on this flag and the > current channel status. > > However the flag from the HNCDSC packet merely represents the host link > state. While the state of the host inte

Re: Linux 4.14 - regression: broken tun/tap / bridge network with virtio - bisected

2017-12-14 Thread Andreas Hartmann
On 12/14/2017 at 11:17 PM Willem de Bruijn wrote: >>> Well, the patch does not fix hanging VMs, which have been shutdown and >>> can't be killed any more. >>> Because of the stack trace >>> >>> [] vhost_net_ubuf_put_and_wait+0x35/0x60 [vhost_net] >>> [] vhost_net_ioctl+0x304/0x870 [vhost_net] >>> [

xfrm: Reinject transport-mode packets through tasklet

2017-12-14 Thread Herbert Xu
This is an old bugbear of mine: https://www.mail-archive.com/netdev@vger.kernel.org/msg03894.html By crafting special packets, it is possible to cause recursion in our kernel when processing transport-mode packets at levels that are only limited by packet size. The easiest one is with DNAT, but

Re: [RFC][PATCH] Add primitives for manipulating bitfields both in host- and fixed-endian.

2017-12-14 Thread Al Viro
On Thu, Dec 14, 2017 at 09:07:13PM -0800, Jakub Kicinski wrote: > Looks great to me! > > On Fri, 15 Dec 2017 02:33:43 +, Al Viro wrote: > > The following primitives are defined in linux/bitfield.h: > > > > * u32 le32_get_bits(__le32 val, u32 field) extracts the contents of the > > bitfield

[PATCH bpf-next 1/5] nfp: add nfp_cpp_area_size() accessor

2017-12-14 Thread Jakub Kicinski
Allow users outside of core reading area sizes. This was not needed previously because whatever entity created the area would usually know what size it asked for. The nfp_rtsym_map() helper, however, will allocate the area based on the size of an RT-symbol with given name. Signed-off-by: Jakub K

[PATCH bpf-next 5/5] nfp: bpf: optimize the adjust_head calls in trivial cases

2017-12-14 Thread Jakub Kicinski
If the program is simple and has only one adjust head call with constant parameters, we can check that the call will always succeed at translation time. We need to track the location of the call and make sure parameters are always the same. We also have to check the parameters against datapath co

[PATCH bpf-next 3/5] nfp: bpf: prepare for call support

2017-12-14 Thread Jakub Kicinski
Add skeleton of verifier checks and translation handler for call instructions. Make sure jump target resolution will not treat them as jumps. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 12 drivers/net/ethernet/netronome/nfp/bpf/verifier.c

[PATCH bpf-next 4/5] nfp: bpf: add basic support for adjust head call

2017-12-14 Thread Jakub Kicinski
Support bpf_xdp_adjust_head(). We need to check whether the packet offset after adjustment is within datapath's limits. We also check if the frame is at least ETH_HLEN long (similar to the kernel implementation). Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/fw.h

[PATCH bpf-next 2/5] nfp: bpf: prepare for parsing BPF FW capabilities

2017-12-14 Thread Jakub Kicinski
BPF FW creates a run time symbol called bpf_capabilities which contains TLV-formatted capability information. Allocate app private structure to store parsed capabilities and add a skeleton of parsing logic. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/bpf/main.c| 75

[PATCH bpf-next 0/5] nfp: bpf: adjust head support

2017-12-14 Thread Jakub Kicinski
Hi! This small set adds support for bpf_xdp_adjust_head() to the offload. Since we have access to unmodified BPF bytecode translating calls is pretty trivial. First part of the series adds handling of BPF capabilities included in the FW in TLV format. The last two patches add adjust head support

Re: [PATCH v4 iproute2 net-next] gre6: add collect metadata support

2017-12-14 Thread Stephen Hemminger
On Tue, 12 Dec 2017 18:22:52 -0800 William Tu wrote: > The patch adds 'external' option to support collect metadata > gre6 tunnel. The 'external' keyword is already used to set the > device into collect metadata mode such as vxlan, geneve, ipip, > etc. This patch extends support for ipv6 gre an

Re: [patch iproute2] tc: fix command "tc actions del" hang issue

2017-12-14 Thread Stephen Hemminger
On Thu, 14 Dec 2017 18:09:00 +0900 Chris Mi wrote: > If command is RTM_DELACTION, a non-NULL pointer is passed to rtnl_talk(). > Then flag NLM_F_ACK is not set on n->nlmsg_flags and netlink_ack() will > not be called. Command tc will wait for the reply for ever. > > Fixes: 86bf43c7c2fd ("lib/lib

[PATCH net-next] net/ncsi: Don't take any action on HNCDSC AEN

2017-12-14 Thread Samuel Mendoza-Jonas
The current HNCDSC handler takes the status flag from the AEN packet and will update or change the current channel based on this flag and the current channel status. However the flag from the HNCDSC packet merely represents the host link state. While the state of the host interface is potentially

Re: [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter

2017-12-14 Thread Stephen Hemminger
On Thu, 14 Dec 2017 14:59:11 -0500 Roman Mashak wrote: > v2: >Print the path MTU immediately after the MSS, as it is easier to parse >for humans (suggested by Neal Cardwell). > > Signed-off-by: Roman Mashak Thanks for the patch, it looks like a good field to show. Unfortunately, it do

Re: [RFC][PATCH] Add primitives for manipulating bitfields both in host- and fixed-endian.

2017-12-14 Thread Jakub Kicinski
Looks great to me! On Fri, 15 Dec 2017 02:33:43 +, Al Viro wrote: > The following primitives are defined in linux/bitfield.h: > > * u32 le32_get_bits(__le32 val, u32 field) extracts the contents of the > bitfield specified by @field in little-endian 32bit value @val and > converts it to h

[PATCH v3 net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-14 Thread sean.wang
From: Sean Wang MT7530 can treat each port as either VLAN-unaware port or VLAN-aware port through the implementation of port matrix mode or port security mode on the ingress port, respectively. On one hand, Each port has been acting as the VLAN-unaware one whenever the device is created in the in

[PATCH v3 net-next 3/3] net: dsa: mediatek: update MAINTAINERS entry with MediaTek switch driver

2017-12-14 Thread sean.wang
From: Sean Wang I work for MediaTek and maintain SoC targeting to home gateway and also will keep extending and testing the function from MediaTek switch. Signed-off-by: Sean Wang Reviewed-by: Andrew Lunn --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b

[PATCH v3 net-next 0/3] add VLAN support to DSA MT7530

2017-12-14 Thread sean.wang
From: Sean Wang Changes sicne v2: update to the latest code base from net-next and fix up all building errors with -Werror. Changes since v1: - fix up the typo - prefer ordering declarations longest to shortest - update that vlan_prepare callback should not change any state - use lower case lett

[PATCH v3 net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-14 Thread sean.wang
From: Sean Wang In order to let MT7530 switch can recognize well those egress packets having both special tag and VLAN tag, the information about the special tag should be carried on the existing VLAN tag. On the other hand, it's unnecessary for extra handling for ingress packets when VLAN tag is

[PATCH] ip6_gre: fix a pontential issue in ip6erspan_rcv

2017-12-14 Thread Haishuang Yan
pskb_may_pull() can change skb->data, so we need to load ipv6h/ershdr at the right place. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Cc: William Tu Signed-off-by: Haishuang Yan --- net/ipv6/ip6_gre.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH] ip_gre: fix wrong return value of erspan_rcv

2017-12-14 Thread Haishuang Yan
If pskb_may_pull return failed, return PACKET_REJECT instead of -ENOMEM. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan --- net/ipv4/ip_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ip_gre.

[RFC][PATCH] Add primitives for manipulating bitfields both in host- and fixed-endian.

2017-12-14 Thread Al Viro
The following primitives are defined in linux/bitfield.h: * u32 le32_get_bits(__le32 val, u32 field) extracts the contents of the bitfield specified by @field in little-endian 32bit value @val and converts it to host-endian. * void le32p_replace_bits(__le32 *p, u32 v, u32 field) replaces th

Re: [PATCH iproute2] iplink: validate maximum gso_max_size

2017-12-14 Thread Stephen Hemminger
On Tue, 12 Dec 2017 14:25:22 -0800 Solio Sarabia wrote: > Validate the upper limit for gso_max_size, valid range is [0-65,536] > inclusive. Fix minor whitespace in iplink man page. > > Signed-off-by: Solio Sarabia > --- Applied to net-next

[PATCH iproute] ip: validate vlan value for vlan info

2017-12-14 Thread Stephen Hemminger
The VLAN tag must be 0..4095 to be valid. Better to trap it here. Signed-off-by: Stephen Hemminger --- ip/iplink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ip/iplink.c b/ip/iplink.c index e83f1477e7bc..1e685cc23805 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -276,

[PATCH v3 1/2] ARM64: dts: meson-axg: add ethernet mac controller

2017-12-14 Thread Yixun Lan
Add DT info for the stmmac ethernet MAC which found in the Amlogic's Meson-AXG SoC, also describe the ethernet pinctrl & clock information here. Reviewed-by: Neil Armstrong Signed-off-by: Yixun Lan --- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 54 ++ 1 file change

[PATCH v3 0/2] Add ethernet support for Meson-AXG SoC

2017-12-14 Thread Yixun Lan
This series try to add support for the ethernet MAC controller found in Meson-AXG SoC, and also enable it in the S400 board. Changes in v3 since [4]: - put clock DT info in soc.dtsi - separate DT for 'add support for the controller' vs 'enable in board' Changes in v2 since [1]: - rebase to kev

[PATCH v3 2/2] ARM64: dts: meson-axg: enable ethernet for A113D S400 board

2017-12-14 Thread Yixun Lan
This is tested in the S400 dev board which use a RTL8211F PHY, and the pins connect to the 'eth_rgmii_y_pins' group. Reviewed-by: Neil Armstrong Signed-off-by: Yixun Lan --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot

Re: [PATCH net-next] net: phy: broadcom: Add entry for 5395 switch PHYs

2017-12-14 Thread Chris Healy
Tested-by: Chris Healy Successfully tested on a machine with a Broadcom BCM5395 switch. On Thu, Dec 14, 2017 at 5:48 PM, Florian Fainelli wrote: > Add an entry for the builtin PHYs present in the Broadcom BCM5395 switch. This > allows us to retrieve the PHY statistics among other things. > > Si

[PATCH net-next] net: dsa: bcm_sf2: Update compatible string for 7278B0

2017-12-14 Thread Florian Fainelli
Update the compatible string and Device Tree binding document for 7278B0. Signed-off-by: Florian Fainelli --- Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt | 5 - drivers/net/dsa/bcm_sf2.c | 3 +++ 2 files changed, 7 insertions(+)

[PATCH] ethtool: fix MFLCN register dump for 82599 and newer

2017-12-14 Thread Zhang Kang
Use MFLCN for 82599 and X540 HW instead of FCTRL. Signed-off-by: Zhang Kang Signed-off-by: Gao Wayne Signed-off-by: Wei Net --- ixgbe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ixgbe.c b/ixgbe.c index ff0e769..c632137 100644 --- a/ixgbe.c +++ b/ixgbe.c @@ -232,

Re: b53 tags on bpi-r1 (bcm53125)

2017-12-14 Thread Florian Fainelli
Hi Jochen, On 11/23/2017 11:14 AM, Jochen Friedrich wrote: > Hi Florian, > >> With Broadcom tags (or any type of switch tagging protocol), eth0 >> becomes a conduit interface and no longer a "normal" network device for >> applications/socket to use. This means that if you were obtaining an IP >>

[PATCH bpf-next 02/13] bpf: introduce function calls (verification)

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov Allow arbitrary function calls from bpf function to another bpf function. To recognize such set of bpf functions the verifier does: 1. runs control flow analysis to detect function boundaries 2. proceeds with verification of all functions starting from main(root) functio

[PATCH bpf-next 09/13] bpf: add support for bpf_call to interpreter

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov though bpf_call is still the same call instruction and calling convention 'bpf to bpf' and 'bpf to helper' is the same the interpreter has to oparate on 'struct bpf_insn *'. To distinguish these two cases add a kernel internal opcode and mark call insns with it. This opco

[PATCH bpf-next 06/13] libbpf: add support for bpf_call

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov - recognize relocation emitted by llvm - since all regular function will be kept in .text section and llvm takes care of pc-relative offsets in bpf_call instruction simply copy all of .text to relevant program section while adjusting bpf_call instructions in program

[PATCH bpf-next 11/13] bpf: x64: add JIT support for multi-function programs

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov Typical JIT does several passes over bpf instructions to compute total size and relative offsets of jumps and calls. With multitple bpf functions calling each other all relative calls will have invalid offsets intially therefore we need to additional last pass over the pr

[PATCH bpf-next 10/13] bpf: fix net.core.bpf_jit_enable race

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov global bpf_jit_enable variable is tested multiple times in JITs, blinding and verifier core. The malicious root can try to toggle it while loading the programs. This race condition was accounted for and there should be no issues, but it's safer to avoid this race conditio

[PATCH bpf-next 03/13] selftests/bpf: add verifier tests for bpf_call

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov Add extensive set of tests for bpf_call verification logic: calls: basic sanity calls: using r0 returned by callee calls: callee is using r1 calls: callee using args1 calls: callee using wrong args2 calls: callee using two args calls: callee changing pkt pointers calls:

[PATCH bpf-next 12/13] bpf: arm64: add JIT support for multi-function programs

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov similar to x64 add support for bpf-to-bpf calls. When program has calls to in-kernel helpers the target call offset is known at JIT time and arm64 architecture needs 2 passes. With bpf-to-bpf calls the dynamically allocated function start is unknown until all functions of

[PATCH bpf-next 13/13] selftests/bpf: additional bpf_call tests

2017-12-14 Thread Alexei Starovoitov
From: Daniel Borkmann Add some additional checks for few more corner cases. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/test_verifier.c | 597 1 file changed, 597 insertions(+) diff --git a/tools/testing/selfte

[PATCH bpf-next 08/13] selftests/bpf: add xdp noinline test

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov add large semi-artificial XDP test with 18 functions to stress test bpf call verification logic Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_progs.c|

[PATCH bpf-next 00/13] bpf: introduce function calls

2017-12-14 Thread Alexei Starovoitov
First of all huge thank you to Daniel, John, Jakub, Edward and others who reviewed multiple iterations of this patch set over the last many months and to Dave and others who gave critical feedback during netconf/netdev. The patch is solid enough and we thought through numerous corner cases, but it

[PATCH bpf-next 07/13] selftests/bpf: add bpf_call test

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov strip always_inline from test_l4lb.c and compile it with -fno-inline to let verifier go through 11 function with various function arguments and return values Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/testing/selftests/bpf/Makefile

[PATCH bpf-next 05/13] selftests/bpf: add tests for stack_zero tracking

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov adjust two tests, since verifier got smarter and add new one to test stack_zero logic Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/testing/selftests/bpf/test_verifier.c | 66 - 1 file changed, 64 insertions(+), 2 de

[PATCH bpf-next 04/13] bpf: teach verifier to recognize zero initialized stack

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov programs with function calls are often passing various pointers via stack. When all calls are inlined llvm flattens stack accesses and optimizes away extra branches. When functions are not inlined it becomes the job of the verifier to recognize zero initialized stack to a

[PATCH bpf-next 01/13] bpf: introduce function calls (function boundaries)

2017-12-14 Thread Alexei Starovoitov
From: Alexei Starovoitov Allow arbitrary function calls from bpf function to another bpf function. Since the beginning of bpf all bpf programs were represented as a single function and program authors were forced to use always_inline for all functions in their C code. That was causing llvm to u

[PATCH net-next] net: phy: broadcom: Add entry for 5395 switch PHYs

2017-12-14 Thread Florian Fainelli
Add an entry for the builtin PHYs present in the Broadcom BCM5395 switch. This allows us to retrieve the PHY statistics among other things. Signed-off-by: Florian Fainelli --- drivers/net/phy/broadcom.c | 42 ++ include/linux/brcmphy.h| 1 + 2 files c

Re: [PATCH v2] ARM64: dts: meson-axg: add ethernet mac controller

2017-12-14 Thread Yixun Lan
Hi Jerome: On 12/15/17 00:45, Jerome Brunet wrote: > On Thu, 2017-12-14 at 11:02 +0800, Yixun Lan wrote: >> --- >> Changes in v2 since [1]: >> - rebase to kevin's v4.16/dt64 branch >> - add Neil's Reviewed-by >> - move clock info to board.dts instead of in soc.dtsi > > You got this comment reg

[PATCH bpf] xdp: linearize skb in netif_receive_generic_xdp()

2017-12-14 Thread Song Liu
In netif_receive_generic_xdp(), it is necessary to linearize all nonlinear skb. However, in current implementation, skb with troom <= 0 are not linearized. This patch fixes this by calling skb_linearize() for all nonlinear skb. Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed

Re: [PATCH 1/2] ip_gre: fix potential memory leak in erspan_rcv

2017-12-14 Thread 严海双
> On 2017年12月15日, at 上午2:47, William Tu wrote: > > On Thu, Dec 14, 2017 at 7:15 AM, Haishuang Yan > wrote: >> If md is NULL, tun_dst must be freed, otherwise it will cause memory >> leak. >> >> Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") >> Cc: William Tu >> Signe

[RFT/RFC net-next 2/2] net: dsa: bcm_sf2: Kick PHYLINK upon link interrupts

2017-12-14 Thread Florian Fainelli
In order to signal MoCA port link interrupts the same way we used to do (through polling a fixed PHY and having an fixed_link_update callback run), we just need to call phylink_mac_change() when that happens, and have our custom fixed_link_update callback run to obtain the link state. Signed-off-b

[RFT/RFC net-next 1/2] net: dsa: Plug in PHYLINK support

2017-12-14 Thread Florian Fainelli
Add support for PHYLINK within the DSA subsystem in order to support more complex devices such as pluggable and non-pluggable SFP modules, 10G PHYs, and traditional PHYs. Using PHYLINK allows us to drop some amount of complexity we had while dealing with fixed and non-fixed PHYs using Device Tree.

[RFT/RFC net-next 0/2] net: dsa: Plug in PHYLINK support

2017-12-14 Thread Florian Fainelli
Hi all, This patch series replaces the existing PHYLIB integration with PHYLINK which is a superior solution since we need to support a collection of fixed links, integrated PHYs, SFP, non-pluggable SFPs etc. I am expecting quite a lot of breakage, for a number of reasons: - PHYLINK does not cre

Re: [PATCH net-next] net: phy: phylink: Handle NULL fwnode_handle

2017-12-14 Thread Russell King - ARM Linux
On Thu, Dec 14, 2017 at 03:57:58PM -0800, Florian Fainelli wrote: > Unlike the various of_* routines to fetch properties, fwnode_* routines can > have an early check against a NULL fwnode_handle reference which makes them > return -EINVAL (see fwnode_call_int_op), thus making it virtually impossibl

Re: Setting large MTU size on slave interfaces may stall the whole system

2017-12-14 Thread Qing Huang
Hi Or, On 12/13/2017 06:28 AM, Or Gerlitz wrote: On Tue, Dec 12, 2017 at 5:21 AM, Qing Huang wrote: Hi, We found an issue with the bonding driver when testing Mellanox devices. The following test commands will stall the whole system sometimes, with serial console flooded with log messages fr

[PATCH net-next] net: phy: phylink: Handle NULL fwnode_handle

2017-12-14 Thread Florian Fainelli
Unlike the various of_* routines to fetch properties, fwnode_* routines can have an early check against a NULL fwnode_handle reference which makes them return -EINVAL (see fwnode_call_int_op), thus making it virtually impossible to differentiate what type of error is going on. Have an early check

Re: [PATCH net-next v6 1/2] dt-bindings: net: add DT bindings for Socionext UniPhier AVE

2017-12-14 Thread Florian Fainelli
On 12/14/2017 02:05 AM, Kunihiko Hayashi wrote: > DT bindings for the AVE ethernet controller found on Socionext's > UniPhier platforms. > > Signed-off-by: Kunihiko Hayashi > Signed-off-by: Jassi Brar > Acked-by: Rob Herring > --- > .../bindings/net/socionext,uniphier-ave4.txt | 48 >

Re: Linux 4.14 - regression: broken tun/tap / bridge network with virtio - bisected

2017-12-14 Thread Willem de Bruijn
On Thu, Dec 14, 2017 at 5:17 PM, Willem de Bruijn wrote: >>> Well, the patch does not fix hanging VMs, which have been shutdown and >>> can't be killed any more. >>> Because of the stack trace >>> >>> [] vhost_net_ubuf_put_and_wait+0x35/0x60 [vhost_net] >>> [] vhost_net_ioctl+0x304/0x870 [vhost_ne

Re: Linux 4.14 - regression: broken tun/tap / bridge network with virtio - bisected

2017-12-14 Thread Willem de Bruijn
>> Well, the patch does not fix hanging VMs, which have been shutdown and >> can't be killed any more. >> Because of the stack trace >> >> [] vhost_net_ubuf_put_and_wait+0x35/0x60 [vhost_net] >> [] vhost_net_ioctl+0x304/0x870 [vhost_net] >> [] do_vfs_ioctl+0x8f/0x5c0 >> [] SyS_ioctl+0x74/0x80 >> []

Re: [PATCH net-next] qmi_wwan: set FLAG_SEND_ZLP to avoid network initiated disconnect

2017-12-14 Thread Bjørn Mork
Vamsi Samavedam writes: > On Thu, Dec 14, 2017 at 07:55:50PM +0100, Bjørn Mork wrote: >> It has been reported that the dummy byte we add to avoid >> ZLPs can be forwarded by the modem to the PGW/GGSN, and that >> some operators will drop the connection if this happens. >> >> In theory, QMI devic

Re: [PATCH net-next] qmi_wwan: set FLAG_SEND_ZLP to avoid network initiated disconnect

2017-12-14 Thread Vamsi Samavedam
On Thu, Dec 14, 2017 at 07:55:50PM +0100, Bjørn Mork wrote: > It has been reported that the dummy byte we add to avoid > ZLPs can be forwarded by the modem to the PGW/GGSN, and that > some operators will drop the connection if this happens. > > In theory, QMI devices are based on CDC ECM and shoul

Re: [PATCH 1/1] net: usb: qmi_wwan: add Telit ME910 PID 0x1101 support

2017-12-14 Thread Daniele Palmas
2017-12-14 18:55 GMT+01:00 Bjørn Mork : > Daniele Palmas writes: > >> This patch adds support for Telit ME910 PID 0x1101. >> >> Signed-off-by: Daniele Palmas > > Acked-by: Bjørn Mork > >> bInterfaceSubClass254 > > Just curious: Is there some meaning hidden here? > That was puzzling al

Re: [RFC PATCH 0/9] ethtool netlink interface (WiP)

2017-12-14 Thread John W. Linville
Michal, Thanks for looking at this issue. While the kernel and userland bits here are at least somewhat decoupled, as the current maintainer for the userland ethtool I feel compelled to comment. FWIW I had started down a similar road, but I became dissatisfied with my own results. The main proble

Re: [PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver

2017-12-14 Thread Pavel Machek
Hi! Thanks for the support. > > root@miro:~# mii-tool lan3 > > lan3: negotiated 1000baseT-HD flow-control, link ok > > > > But IIRC the switch is 100mbit? And dmesg does get it right. Its just > > mii-tool that is confused. > > > > Link detection seems to work > > > > root@miro:/sys/bus/spi/de

Re: [PATCH 2/4] sctp: Add ip option support

2017-12-14 Thread Marcelo Ricardo Leitner
On Tue, Dec 12, 2017 at 05:24:46PM -0500, Paul Moore wrote: > On Tue, Dec 12, 2017 at 4:56 PM, Marcelo Ricardo Leitner > wrote: > > On Tue, Dec 12, 2017 at 04:33:03PM -0500, Paul Moore wrote: > >> On Tue, Dec 12, 2017 at 11:08 AM, Marcelo Ricardo Leitner > >> wrote: > >> > Hi Richard, > >> > > >>

[PATCH v2 ipsec-next 3/3] xfrm: wrap xfrmdev_ops with offload config

2017-12-14 Thread Shannon Nelson
There's no reason to define netdev->xfrmdev_ops if the offload facility is not CONFIG'd in. Signed-off-by: Shannon Nelson --- include/linux/netdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2eaac7d..145d0de

[PATCH v2 ipsec-next 1/3] xfrm: check for xdo_dev_state_free

2017-12-14 Thread Shannon Nelson
The current XFRM code assumes that we've implemented the xdo_dev_state_free() callback, even if it is meaningless to the driver. This patch adds a check for it before calling, as done in other APIs, to prevent a NULL function pointer kernel crash. Signed-off-by: Shannon Nelson --- include/net/xf

[PATCH v2 ipsec-next 0/3] xfrm: offload api fixes

2017-12-14 Thread Shannon Nelson
These are a couple of little fixes to the xfrm_offload API to make life just a little easier for the poor driver developer. Changes from v1: - removed netdev_err() notes (Steffen) - fixed build when CONFIG_XFRM_OFFLOAD is off (kbuild robot) - split into multiple patches (me) Shannon Nelson (

[PATCH v2 ipsec-next 2/3] xfrm: check for xdo_dev_ops add and delete

2017-12-14 Thread Shannon Nelson
This adds a check for the required add and delete functions up front at registration time to be sure both are defined. Signed-off-by: Shannon Nelson --- net/xfrm/xfrm_device.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/

Re: net-next libbpf broken on prev kernel release

2017-12-14 Thread Daniel Borkmann
On 12/14/2017 03:28 PM, Arnaldo Carvalho de Melo wrote: [...] >> Arnaldo, will there be a rework of your fix that we could route to bpf tree? > > I'm resuming work on it after I get my current batch tested and > submitted, will reboot with an older kernel and follow your suggestions, > that seems

Re: [PATCHv2 net-next 14/15] net: sch: sch_cbs: add extack support

2017-12-14 Thread David Ahern
On 12/14/17 11:39 AM, Alexander Aring wrote: > diff --git a/net/sched/sch_cbs.c b/net/sched/sch_cbs.c > index 8bf6e163d29c..6d09ffd2371e 100644 > --- a/net/sched/sch_cbs.c > +++ b/net/sched/sch_cbs.c > @@ -219,14 +219,17 @@ static void cbs_disable_offload(struct net_device *dev, > } > > static

[PATCH bpf 2/5] bpf, ppc64: do not reload skb pointers in non-skb context

2017-12-14 Thread Daniel Borkmann
The assumption of unconditionally reloading skb pointers on BPF helper calls where bpf_helper_changes_pkt_data() holds true is wrong. There can be different contexts where the helper would enforce a reload such as in case of XDP. Here, we do have a struct xdp_buff instead of struct sk_buff as conte

[PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context

2017-12-14 Thread Daniel Borkmann
The assumption of unconditionally reloading skb pointers on BPF helper calls where bpf_helper_changes_pkt_data() holds true is wrong. There can be different contexts where the BPF helper would enforce a reload such as in case of XDP. Here, we do have a struct xdp_buff instead of struct sk_buff as c

[PATCH bpf 3/5] bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_data

2017-12-14 Thread Daniel Borkmann
Some JITs don't cache skb context on stack in prologue, so when LD_ABS/IND is used and helper calls yield bpf_helper_changes_pkt_data() as true, then they temporarily save/restore skb pointer. However, the assumption that skb always has to be in r1 is a bit of a gamble. Right now it turned out to b

Re: [PATCHv2 net-next 10/15] net: sch: api: add extack support in tcf_block_get

2017-12-14 Thread David Ahern
On 12/14/17 11:39 AM, Alexander Aring wrote: > diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c > index 446ef956a79c..173107ed3726 100644 > --- a/net/sched/cls_api.c > +++ b/net/sched/cls_api.c > @@ -282,20 +282,24 @@ static void tcf_block_offload_unbind(struct tcf_block > *block, struct Qdi

  1   2   3   >