[PATCH bpf-next] samples/bpf: fix include path in Makefile

2019-06-13 Thread Prashant Bhole
Recent commit included libbpf.h in selftests/bpf/bpf_util.h. Since some samples use bpf_util.h and samples/bpf/Makefile doesn't have libbpf.h path included, build was failing. Let's add the path in samples/bpf/Makefile. Signed-off-by: Prashant Bhole --- samples/bpf/Makefile | 2 +- 1 file change

Re: [PATCH bpf-next 8/9] selftests/bpf: add realistic loop tests

2019-06-13 Thread Alexei Starovoitov
On 6/13/19 4:33 PM, Andrii Nakryiko wrote: >> +++ b/tools/testing/selftests/bpf/progs/strobemeta.h >> @@ -0,0 +1,528 @@ >> +// SPDX-License-Identifier: GPL-2.0 > Let's make this (LGPL-2.1 OR BSD-2-Clause) ? > nope. it's gpl-2. Could you please trim your replies? I accidentally noticed that your

Re: [PATCH bpf-next 4/9] bpf: introduce bounded loops

2019-06-13 Thread Alexei Starovoitov
On 6/13/19 4:04 PM, Andrii Nakryiko wrote: > On Thu, Jun 13, 2019 at 9:49 AM Alexei Starovoitov wrote: >> >> Allow the verifier to validate the loops by simulating their execution. >> Exisiting programs have used '#pragma unroll' to unroll the loops >> by the compiler. Instead let the verifier sim

Re: [PATCH bpf-next 3/9] bpf: extend is_branch_taken to registers

2019-06-13 Thread Alexei Starovoitov
On 6/13/19 3:25 PM, Andrii Nakryiko wrote: > On Thu, Jun 13, 2019 at 9:50 AM Alexei Starovoitov wrote: >> >> This patch extends is_branch_taken() logic from JMP+K instructions >> to JMP+X instructions. >> Conditional branches are often done when src and dst registers >> contain known scalars. In s

Re: [PATCH bpf-next 1/9] bpf: track spill/fill of constants

2019-06-13 Thread Alexei Starovoitov
On 6/13/19 2:46 PM, Andrii Nakryiko wrote: > On Thu, Jun 13, 2019 at 9:50 AM Alexei Starovoitov wrote: >> >> Compilers often spill induction variables into the stack, >> hence it is necessary for the verifier to track scalar values >> of the registers through stack slots. >> >> Also few bpf progra

Re: [PATCH net-next] virtio_net: enable napi_tx by default

2019-06-13 Thread Michael S. Tsirkin
On Fri, Jun 14, 2019 at 11:28:59AM +0800, Jason Wang wrote: > > On 2019/6/14 上午12:24, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). > > TSQ reduces queuing ("bufferbloat") and burstiness. > > > > Previous measur

[PATCH net-next 2/2] r8169: use helper rtl_is_8168evl_up for setting register MaxTxPacketSize

2019-06-13 Thread Heiner Kallweit
>From RTL8168e-vl the value in register MaxTxPacketSize is interpreted differently, therefore use new helper rtl_is_8168evl_up to set this register. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 24 --- 1 file changed, 4 insertions(+), 20 dele

[PATCH net-next 1/2] r8169: add helper rtl_is_8168evl_up

2019-06-13 Thread Heiner Kallweit
Add helper rtl_is_8168evl_up to make the code better readable and to simplify it. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 29 ++- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c

[PATCH net-next 0/2] r8169: add and use helper rtl_is_8168evl_up

2019-06-13 Thread Heiner Kallweit
Few registers have been added or changed its purpose with version RTL8168e-vl, so create a helper for identifying chip versions from RTL8168e-vl. Heiner Kallweit (2): r8169: add helper rtl_is_8168evl_up r8169: use helper rtl_is_8168evl_up for setting register MaxTxPacketSize drivers/net/

Re: [PATCH net-next] r8169: improve rtl_coalesce_info

2019-06-13 Thread David Miller
From: Heiner Kallweit Date: Tue, 11 Jun 2019 21:09:19 +0200 > tp->coalesce_info is used in rtl_coalesce_info() only, so we can > remove this member. In addition replace phy_ethtool_get_link_ksettings > with a direct access to tp->phydev->speed. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH net-next] r8169: let mdio read functions return -ETIMEDOUT

2019-06-13 Thread David Miller
From: Heiner Kallweit Date: Tue, 11 Jun 2019 21:04:09 +0200 > In case of a timeout currently ~0 is returned. Callers often just check > whether a certain bit is set and therefore may behave incorrectly. > So let's return -ETIMEDOUT in case of a timeout. > > r8168_phy_ocp_read is used in r8168g_m

Re: [PATCH net-next] net: dsa: tag_sja1105: Select CONFIG_PACKING

2019-06-13 Thread David Miller
From: Vladimir Oltean Date: Tue, 11 Jun 2019 21:47:45 +0300 > The packing facility is needed to decode Ethernet meta frames containing > source port and RX timestamping information. > > The DSA driver selects CONFIG_PACKING, but the tagger did not, and since > taggers can be now compiled as modu

Re: [PATCH net-next] net: axienet: move use of resource after validity check

2019-06-13 Thread David Miller
From: Robert Hancock Date: Tue, 11 Jun 2019 10:56:02 -0600 > We were accessing the pointer returned from platform_get_resource before > checking if it was valid, causing an oops if it was not. Move this access > after the call to devm_ioremap_resource which does the validity check. > > Signed-of

Re: [PATCH net-next 00/13] s390/qeth: updates 2019-06-11

2019-06-13 Thread David Miller
From: Julian Wiedmann Date: Tue, 11 Jun 2019 18:37:47 +0200 > please apply the following patch series for qeth to net-next. > This brings all sorts of cleanups and minor improvements, > primarily for the control IO path. Series applied.

Re: [PATCH net-next v2 0/9] mlxsw: Add support for physical hardware clock

2019-06-13 Thread David Miller
From: Ido Schimmel Date: Tue, 11 Jun 2019 18:45:03 +0300 > From: Ido Schimmel > > Shalom says: > > This patchset adds support for physical hardware clock for Spectrum-1 > ASIC only. > > Patches #1, #2 and #3 add the ability to query the free running clock > PCI address. > > Patches #4 and #5

Re: [PATCH net-next] virtio_net: enable napi_tx by default

2019-06-13 Thread Michael S. Tsirkin
On Thu, Jun 13, 2019 at 12:24:57PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). > TSQ reduces queuing ("bufferbloat") and burstiness. > > Previous measurements have shown significant improvement for > TCP_STREA

Re: [PATCH net-next 1/1] tc-tests: updated fw with bind actions by reference use cases

2019-06-13 Thread David Miller
From: Roman Mashak Date: Tue, 11 Jun 2019 10:02:22 -0400 > Extended fw TDC tests with use cases where actions are pre-created and > attached to a filter by reference, i.e. by action index. > > Signed-off-by: Roman Mashak Applied.

Re: [PATCH net] net: phy: sfp: clean up a condition

2019-06-13 Thread Dan Carpenter
On Thu, Jun 13, 2019 at 07:00:16PM +0100, Russell King - ARM Linux admin wrote: > On Thu, Jun 13, 2019 at 09:51:02AM +0300, Dan Carpenter wrote: > > The acpi_node_get_property_reference() doesn't return ACPI error codes, > > it just returns regular negative kernel error codes. This patch doesn't >

[PATCH net next 2/2] udp: Remove unused variable/function (exact_dif)

2019-06-13 Thread Tim Beale
This was originally passed through to the VRF logic in compute_score(). But that logic has now been replaced by udp_sk_bound_dev_eq() and so this code is no longer used or needed. Signed-off-by: Tim Beale --- net/ipv4/udp.c | 12 net/ipv6/udp.c | 11 --- 2 files changed, 23

[PATCH net next 1/2] udp: Remove unused parameter (exact_dif)

2019-06-13 Thread Tim Beale
Originally this was used by the VRF logic in compute_score(), but that was later replaced by udp_sk_bound_dev_eq() and the parameter became unused. Note this change adds an 'unused variable' compiler warning that will be removed in the next patch (I've split the removal in two to make review sligh

Re: [PATCH] bpf: optimize constant blinding

2019-06-13 Thread kbuild test robot
Hi "Naveen, I love your patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] [also build test WARNING on v5.2-rc4 next-20190613] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0d

[PATCH net-next] ipv4: tcp: fix ACK/RST sent with a transmit delay

2019-06-13 Thread Eric Dumazet
If we want to set a EDT time for the skb we want to send via ip_send_unicast_reply(), we have to pass a new parameter and initialize ipc.sockc.transmit_time with it. This fixes the EDT time for ACK/RST packets sent on behalf of a TIME_WAIT socket. Fixes: a842fe1425cb ("tcp: add optional per socke

Re: [PATCH net-next] virtio_net: enable napi_tx by default

2019-06-13 Thread Jason Wang
On 2019/6/14 上午12:24, Willem de Bruijn wrote: From: Willem de Bruijn NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). TSQ reduces queuing ("bufferbloat") and burstiness. Previous measurements have shown significant improvement for TCP_STREAM style workloads. Such as tho

Re: [PATCH RFC 4/6] dpaa2-mac: add initial driver

2019-06-13 Thread Andrew Lunn
> +static phy_interface_t phy_mode(enum dpmac_eth_if eth_if) > +{ > + switch (eth_if) { > + case DPMAC_ETH_IF_RGMII: > + return PHY_INTERFACE_MODE_RGMII; So the MAC cannot insert RGMII delays? I didn't see anything in the PHY object about configuring the delays. Does the PCB ne

[PATCH][net-next] net: remove empty netlink_tap_exit_net

2019-06-13 Thread Li RongQing
Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The net namespace API checks if this pointer is not NULL before using it, it are safe to remove the function. Signed-off-by: Li RongQing --- net/netlink/af_netlink.c |

Re: [PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object

2019-06-13 Thread Andrew Lunn
> +/** > + * dpmac_set_link_state() - Set the Ethernet link status > + * @mc_io: Pointer to opaque I/O object > + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' > + * @token: Token of DPMAC object > + * @link_state: Link state configuration > + * > + * Return: '0' on Suc

Re: [PATCH RFC 2/6] dpaa2-eth: add support for new link state APIs

2019-06-13 Thread Andrew Lunn
> /** > + * Advertised link speeds > + */ > +#define DPNI_ADVERTISED_10BASET_FULL BIT_ULL(0) > +#define DPNI_ADVERTISED_100BASET_FULL BIT_ULL(1) > +#define DPNI_ADVERTISED_1000BASET_FULL BIT_ULL(2) > +#define DPNI_ADVERTISED_1BASET_FULLBIT_ULL(4) So 10 Half

Re: [PATCH RFC 00/13] Ethernet PHY cable test support

2019-06-13 Thread Andrew Lunn
On Thu, Jun 13, 2019 at 03:28:04PM +0530, Raju Lakkaraju wrote: > Hi Andrew, > > Look like these patches are not create from "net-next" branch. > Can you please share branch detail where i can apply patches and check the > code > flow? Hi Raju There is a branch https://github.com/lunn/linux.git

[PATCH RFC 4/6] dpaa2-mac: add initial driver

2019-06-13 Thread Ioana Ciornei
The dpaa2-mac driver binds to DPAA2 DPMAC objects, dynamically discovered on the fsl-mc bus. It acts as a proxy between the PHY management layer and the MC firmware, delivering any configuration changes to the firmware and also setting any new configuration requested though PHYLINK. A in-depth vie

[PATCH RFC 1/6] net: phy: update the autoneg state in phylink_phy_change

2019-06-13 Thread Ioana Ciornei
The phy_state field of phylink should carry only valid information especially when this can be passed to the .mac_config callback. Update the an_enabled field with the autoneg state in the phylink_phy_change function. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Ioana

[PATCH RFC 0/6] DPAA2 MAC Driver

2019-06-13 Thread Ioana Ciornei
After today's discussion with Russell King about what phylink exposes in .mac_config(): https://marc.info/?l=linux-netdev&m=156043794316709&w=2 I am submitting for initial review the dpaa2-mac driver model. At the moment, pause frame support is missing so inherently all the USXGMII modes that rely

[PATCH RFC 5/6] dpaa2-eth: add autoneg support

2019-06-13 Thread Ioana Ciornei
From: Ioana Radulescu For MC versions that support it, use the new DPNI link APIs, which allow setting/getting of advertised and supported link modes. A mapping between DPNI link modes and ethtool ones is created to help converting from one to the other. Signed-off-by: Ioana Radulescu Signed-o

[PATCH RFC 6/6] net: documentation: add MAC/PHY proxy driver documentation

2019-06-13 Thread Ioana Ciornei
Add documentation file for the dpaa2-mac driver. This describes the architecture and implementation of the proxy interface between phylink and dpaa2-eth. Signed-off-by: Ioana Ciornei --- .../freescale/dpaa2/dpmac-driver.rst | 159 + .../device_drivers/freescale/

[PATCH RFC 3/6] dpaa2-mac: add MC API for the DPMAC object

2019-06-13 Thread Ioana Ciornei
Add the necessary MC API for the DPMAC object. These functions will be used in the initial patch that adds the dpaa2-mac driver. Signed-off-by: Ioana Ciornei --- drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h | 107 +++ drivers/net/ethernet/freescale/dpaa2/dpmac.c | 369 +++

[PATCH RFC 2/6] dpaa2-eth: add support for new link state APIs

2019-06-13 Thread Ioana Ciornei
From: Ioana Radulescu Add v2 of dpni_get_link_state() and dpni_set_link_cfg() commands. The new version allows setting and getting advertised and supported link options. This will allow adding autoneg support in an following patch. Signed-off-by: Valentin Catalin Neacsu Signed-off-by: Ioana Ra

Re: [Intel-wired-lan] [PATCH bpf-next 0/6] add need_wakeup flag to the AF_XDP rings

2019-06-13 Thread Jeff Kirsher
On Thu, 2019-06-13 at 09:37 +0200, Magnus Karlsson wrote: > This patch set adds support for a new flag called need_wakeup in the > AF_XDP Tx and fill rings. When this flag is set by the driver, it > means that the application has to explicitly wake up the kernel Rx > (for the bit in the fill ring)

Re: [PATCH bpf-next 8/9] selftests/bpf: add realistic loop tests

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:49 AM Alexei Starovoitov wrote: > > Add a bunch of loop tests. Most of them are created by replacing > '#pragma unroll' with '#pragma clang loop unroll(disable)' > > Several tests are artificially large: > /* partial unroll. llvm will unroll loop ~150 times. >* C lo

Re: [PATCH bpf-next 6/9] selftests/bpf: fix tests

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:49 AM Alexei Starovoitov wrote: > > Fix tests that assumed no loops. > > Signed-off-by: Alexei Starovoitov > --- Acked-by: Andrii Nakryiko > tools/testing/selftests/bpf/test_verifier.c | 11 -- > tools/testing/selftests/bpf/verifier/calls.c | 22

Re: [PATCH bpf-next 4/9] bpf: introduce bounded loops

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:49 AM Alexei Starovoitov wrote: > > Allow the verifier to validate the loops by simulating their execution. > Exisiting programs have used '#pragma unroll' to unroll the loops > by the compiler. Instead let the verifier simulate all iterations > of the loop. > In order to

[PATCH] net: dsa: rtl8366: Fix up VLAN filtering

2019-06-13 Thread Linus Walleij
We get this regression when using RTL8366RB as part of a bridge with OpenWrt: WARNING: CPU: 0 PID: 1347 at net/switchdev/switchdev.c:291 switchdev_port_attr_set_now+0x80/0xa4 lan0: Commit of attribute (id=7) failed. (...) realtek-smi switch lan0: failed to initialize vlan filtering on thi

Re: [PATCH bpf-next 3/9] bpf: extend is_branch_taken to registers

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:50 AM Alexei Starovoitov wrote: > > This patch extends is_branch_taken() logic from JMP+K instructions > to JMP+X instructions. > Conditional branches are often done when src and dst registers > contain known scalars. In such case the verifier can follow > the branch that

Re: [PATCH v3 bpf-next 0/3] bpf: net: Detach BPF prog from reuseport sk

2019-06-13 Thread Stanislav Fomichev
On 06/13, Martin KaFai Lau wrote: > v3: > - Use rcu_swap_protected (Stanislav Fomichev) > - Use 0x0047 for SO_DETACH_REUSEPORT_BPF for sparc (kbuild test robot > ) > > v2: > - Copy asm-generic/socket.h to tools/ in the new patch 2 (Stanislav Fomichev) > > This patch adds SO_DETACH_REUSEPORT_BPF

Re: [PATCH bpf-next 2/9] selftests/bpf: fix tests due to const spill/fill

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:50 AM Alexei Starovoitov wrote: > > fix tests that incorrectly assumed that the verifier > cannot track constants through stack. > > Signed-off-by: Alexei Starovoitov > --- Acked-by: Andrii Nakryiko > .../bpf/verifier/direct_packet_access.c | 3 +- > .../bpf/

[PATCH v3 bpf-next 3/3] bpf: Add test for SO_REUSEPORT_DETACH_BPF

2019-06-13 Thread Martin KaFai Lau
This patch adds a test for the new sockopt SO_REUSEPORT_DETACH_BPF. Signed-off-by: Martin KaFai Lau --- .../selftests/bpf/test_select_reuseport.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/self

[PATCH v3 bpf-next 1/3] bpf: net: Add SO_DETACH_REUSEPORT_BPF

2019-06-13 Thread Martin KaFai Lau
There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH. This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same sockopt can be used to undo both SO_ATTACH_REUSEPORT_[CE]BPF. reseport_detach_prog() is added and it is mostly a mirror of the existing reuseport_attach_prog(). The differences

[PATCH v3 bpf-next 0/3] bpf: net: Detach BPF prog from reuseport sk

2019-06-13 Thread Martin KaFai Lau
v3: - Use rcu_swap_protected (Stanislav Fomichev) - Use 0x0047 for SO_DETACH_REUSEPORT_BPF for sparc (kbuild test robot ) v2: - Copy asm-generic/socket.h to tools/ in the new patch 2 (Stanislav Fomichev) This patch adds SO_DETACH_REUSEPORT_BPF to detach BPF prog from reuseport sk. Martin KaFai

[PATCH v3 bpf-next 2/3] bpf: Sync asm-generic/socket.h to tools/

2019-06-13 Thread Martin KaFai Lau
SO_DETACH_REUSEPORT_BPF is needed for the test in the next patch. It is defined in the socket.h. Signed-off-by: Martin KaFai Lau --- tools/include/uapi/asm-generic/socket.h | 147 1 file changed, 147 insertions(+) create mode 100644 tools/include/uapi/asm-generic/socket

Re: [PATCH bpf-next v5 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-13 Thread Stanislav Fomichev
On 06/13, Andrii Nakryiko wrote: > On Thu, Jun 13, 2019 at 2:20 PM Stanislav Fomichev wrote: > > > > On 06/13, Alexei Starovoitov wrote: > > > C based example doesn't use ret=1. > > > imo that's a sign that something is odd in the api. > > I decided not to test ret=1 it because there are tests in

Re: [PATCH net v2 1/1] net/udp_gso: Allow TX timestamp with UDP GSO

2019-06-13 Thread Willem de Bruijn
On Thu, Jun 13, 2019 at 4:58 PM Fred Klassen wrote: > > >> It also appears that other TX CMSG types cause similar issues, for > >> example trying to set SOL_IP/IP_TOS. > > > > If correct we need to find the root cause. Without that, this is not > > very informative. And likely the fix is not relat

Re: [PATCH bpf-next v5 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 2:20 PM Stanislav Fomichev wrote: > > On 06/13, Alexei Starovoitov wrote: > > C based example doesn't use ret=1. > > imo that's a sign that something is odd in the api. > I decided not to test ret=1 it because there are tests in the test_sockopt.c > for ret=1 usecase. But I

Re: [PATCH bpf-next 1/9] bpf: track spill/fill of constants

2019-06-13 Thread Andrii Nakryiko
On Thu, Jun 13, 2019 at 9:50 AM Alexei Starovoitov wrote: > > Compilers often spill induction variables into the stack, > hence it is necessary for the verifier to track scalar values > of the registers through stack slots. > > Also few bpf programs were incorrectly rejected in the past, > since t

Re: [PATCH net-next] gso: enable udp gso for virtual devices

2019-06-13 Thread Willem de Bruijn
> >> @@ -237,6 +237,7 @@ static inline int find_next_netdev_feature(u64 > >> feature, unsigned long start) > >> NETIF_F_GSO_GRE_CSUM | \ > >> NETIF_F_GSO_IPXIP4 | \ > >>

Re: [PATCH bpf-next v5 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-13 Thread Stanislav Fomichev
On 06/13, Alexei Starovoitov wrote: > C based example doesn't use ret=1. > imo that's a sign that something is odd in the api. I decided not to test ret=1 it because there are tests in the test_sockopt.c for ret=1 usecase. But I can certainly extend C based test to cover ret=1 as well. I agree that

Re: [PATCH bpf-next 1/2] bpf: net: Add SO_DETACH_REUSEPORT_BPF

2019-06-13 Thread Martin Lau
On Thu, Jun 13, 2019 at 01:14:46PM -0700, Andrii Nakryiko wrote: > On Wed, Jun 12, 2019 at 12:08 PM Martin KaFai Lau wrote: > > > > There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH. > > This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same > > sockopt can be used to undo both SO_AT

[PATCH net-next 3/3] nfp: flower: extend extack messaging for flower match and actions

2019-06-13 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Use extack messages in flower offload when compiling match and actions messages that will configure hardware. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- .../ethernet/netronome/nfp/flower/action.c| 205 +

[PATCH net-next 2/3] nfp: flower: use extack messages in flower offload

2019-06-13 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Use extack messages in flower offload, specifically focusing on the extack use in add offload, remove offload and get stats paths. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski --- .../ethernet/netronome/nfp/flowe

[PATCH net-next 1/3] nfp: flower: check L4 matches on unknown IP protocols

2019-06-13 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Matching on fields with a protocol that is unknown to hardware is not strictly unsupported. Determine if hardware can offload a filter with an unknown protocol by checking if any L4 fields are being matched as well. Signed-off-by: Pieter Jansen van Vuuren Reviewed

[PATCH net-next 0/3] nfp: flower: loosen L4 checks and add extack to flower offload

2019-06-13 Thread Jakub Kicinski
Hi! Pieter says: This set allows the offload of filters that make use of an unknown ip protocol, given that layer 4 is being wildcarded. The set then aims to make use of extack messaging for flower offloads. It adds about 70 extack messages to the driver. Pieter Jansen van Vuuren (3): nfp: flo

Re: [PATCH net v2 1/1] net/udp_gso: Allow TX timestamp with UDP GSO

2019-06-13 Thread Fred Klassen
>> It also appears that other TX CMSG types cause similar issues, for >> example trying to set SOL_IP/IP_TOS. > > If correct we need to find the root cause. Without that, this is not > very informative. And likely the fix is not related, as that does not > involve tx_flags or tskey. > > What exac

Re: [PATCH iproute2-next v2] Makefile: use make -C to change directory

2019-06-13 Thread Matteo Croce
On Thu, Jun 13, 2019 at 8:02 PM Andrea Claudi wrote: > > make provides a handy -C option to change directory before reading > the makefiles or doing anything else. > > Use that instead of the "cd dir && make && cd .." pattern, thus > simplifying sintax for some makefiles. > > Changes from v1: > -

Re: [PATCH bpf v2 1/2] bpf: simplify definition of BPF_FIB_LOOKUP related flags

2019-06-13 Thread Daniel Borkmann
On 06/12/2019 06:05 PM, Martynas Pumputis wrote: > Previously, the BPF_FIB_LOOKUP_{DIRECT,OUTPUT} flags were defined > with the help of BIT macro. This had the following issues: > > - In order to user any of the flags, a user was required to depend > on . > - No other flag in bpf.h uses the macr

[net-next v2 10/15] net/mlx5: Add support for FW reporter dump

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Add support of dump callback for mlx5 FW reporter. Once we trigger FW dump, the FW will write the core dump to its raw data buffer. The tracer translates the raw data to traces and save it to a cyclic array. Once dump is done, the saved traces data is filled into the dump buf

[net-next v2 09/15] net/mlx5: Create FW devlink_health_reporter

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Create mlx5_devlink_health_reporter for FW reporter. The FW reporter implements devlink_health_reporter diagnose callback. The fw reporter diagnose command can be triggered any time by the user to check current fw status. In healthy status, it will return clear syndrome. Othe

[net-next v2 13/15] net/mlx5: Add support for FW fatal reporter dump

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Add support of dump callback for mlx5 FW fatal reporter. The FW fatal dump uses cr-dump functionality to gather cr-space data for debug. The cr-dump uses vsc interface which is valid even if the FW command interface is not functional, which is the case in most FW fatal errors.

[net-next v2 08/15] net/mlx5: Issue SW reset on FW assert

2019-06-13 Thread Saeed Mahameed
From: Feras Daoud If a FW assert is considered fatal, indicated by a new bit in the health buffer, reset the FW. After the reset go through the normal recovery flow. Only one PF needs to issue the reset, so an attempt is made to prevent the 2nd function from also issuing the reset. It's not an er

[net-next v2 11/15] net/mlx5: Report devlink health on FW issues

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Use devlink_health_report() to report any symptom of FW issue as FW counter miss or new health syndrome. The FW issues detected in mlx5 during poll_health which is called in timer atomic context and so health work queue is used to schedule the reports. Signed-off-by: Moshe Sh

[net-next v2 03/15] net/mlx5: Move all devlink related functions calls to devlink.c

2019-06-13 Thread Saeed Mahameed
From: Eran Ben Elisha Centralize all devlink related callbacks in one file. In the downstream patch, some more functionality will be added, this patch is preparing the driver infrastructure for it. Currently, move devlink un/register functions calls into this file. Signed-off-by: Eran Ben Elish

[net-next v2 12/15] net/mlx5: Add fw fatal devlink_health_reporter

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Create mlx5_devlink_health_reporter for fw fatal reporter. The fw fatal reporter is added in addition to the fw reporter and implements the recover callback. The point of having two reporters for FW issues, is that we don't want to run FW recover on any issue, but only fatal o

[net-next v2 15/15] Documentation: net: mlx5: Devlink health documentation

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Documentation for devlink health reporters supported by mlx5. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- .../device_drivers/mellanox/mlx5.rst | 72 +++ 1 file changed, 72 insertions(+) diff --git a/Documentation/networking/devi

[net-next v2 05/15] net/mlx5: Add Crdump support

2019-06-13 Thread Saeed Mahameed
From: Alex Vesker Crdump allows the driver to retrieve a dump of the FW PCI crspace. This is useful in case of catastrophic issues which may require FW reset. The crspace dump can be used for later debug. Signed-off-by: Alex Vesker Signed-off-by: Moshe Shemesh Reviewed-by: Feras Daoud Signed-

[net-next v2 07/15] net/mlx5: Control CR-space access by different PFs

2019-06-13 Thread Saeed Mahameed
From: Feras Daoud Since the FW can be shared between different PFs/VFs it is common that more than one health poll will detected a failure, this can lead to multiple resets which are unneeded. The solution is to use a FW locking mechanism using semaphore space to provide a way to allow only one

[net-next v2 14/15] net/mlx5: Report devlink health on FW fatal issues

2019-06-13 Thread Saeed Mahameed
From: Moshe Shemesh Report devlink health on FW fatal issues via fw_fatal_reporter. The driver recover flow for FW fatal error is now being handled by the devlink health. Having the recovery controlled by devlink health, the user has the ability to cancel the auto-recovery for debug session and

[net-next v2 06/15] net/mlx5: Handle SW reset of FW in error flow

2019-06-13 Thread Saeed Mahameed
From: Feras Daoud New mlx5 adapters allow the driver to reset the FW in the event of an error, this action called "SW Reset". When an SW reset is issued on any PF all PFs enter reset state which is a recoverable condition. The existing recovery flow was designed to allow the recovery of a VF afte

[net-next v2 02/15] Documentation: net: mlx5: Add mlx5 initial documentation

2019-06-13 Thread Saeed Mahameed
Add initial documentation for mlx5 driver. Signed-off-by: Saeed Mahameed --- .../networking/device_drivers/index.rst | 1 + .../device_drivers/mellanox/mlx5.rst | 101 ++ MAINTAINERS | 1 + 3 files changed, 103 insertions(+) c

[pull request][net-next v2 00/15] Mellanox, mlx5 Firmware devlink health and sw reset

2019-06-13 Thread Saeed Mahameed
Hi Dave, This series provides the support for mlx5 Firmware devlink health and sw reset. For more information please see tag log below. Please pull and let me know if there is any problem. This is a re-spin of a previously sent series on 5.2 kernel release. v2: - Improved mlx5 kernel documen

[net-next v2 04/15] net/mlx5: Add Vendor Specific Capability access gateway

2019-06-13 Thread Saeed Mahameed
From: Alex Vesker The Vendor Specific Capability (VSC) is used to activate a gateway interfacing with the device. The gateway is used to read or write device configurations, which are organized in different domains (spaces). A configuration access may result in multiple actions, reads, writes. E

[net-next v2 01/15] devlink: Hang reporter's dump method on a dumpit cb

2019-06-13 Thread Saeed Mahameed
From: Aya Levin The devlink health reporter provides a dump method on an error. Dump may contain a large amount of data, in this case doit cb isn't sufficient. This is because the user side is blocking and doesn't allow draining of the socket until the socket runs out of buffers. Using dumpit cb

Re: [PATCH bpf-next v5 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-13 Thread Alexei Starovoitov
On Mon, Jun 10, 2019 at 02:08:23PM -0700, Stanislav Fomichev wrote: > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > BPF_CGROUP_GETSOCKOPT can modify the supplied bu

Re: [PATCH bpf-next 1/2] bpf: net: Add SO_DETACH_REUSEPORT_BPF

2019-06-13 Thread Andrii Nakryiko
On Wed, Jun 12, 2019 at 12:08 PM Martin KaFai Lau wrote: > > There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH. > This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same > sockopt can be used to undo both SO_ATTACH_REUSEPORT_[CE]BPF. > > reseport_detach_prog() is added and it is mostl

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-13 Thread Marcelo Ricardo Leitner
On Wed, Jun 12, 2019 at 02:34:58PM -0700, Jakub Kicinski wrote: > On Wed, 12 Jun 2019 21:18:59 +0200, Michal Kubecek wrote: > > On Wed, Jun 12, 2019 at 08:56:10PM +0200, Johannes Berg wrote: > > > (switching to my personal email) > > > > > > > > I can't add these actions with current net-next an

Re: [RFC 3/3] dt-bindings: net: dsa: document additional Microchip KSZ8863 family switches

2019-06-13 Thread Rob Herring
On Wed, May 08, 2019 at 11:13:30PM +0200, Michael Grzeschik wrote: > Document additional Microchip KSZ8863 family switches. > > Show how KSZ8863 switch should be configured as the host port is port 3. > > Cc: devicet...@vger.kernel.org > Signed-off-by: Michael Grzeschik > --- > .../devicetree/b

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-13 Thread Marcelo Ricardo Leitner
On Thu, Jun 13, 2019 at 09:09:47AM +, Kevin 'ldir' Darbyshire-Bryant wrote: > > > > On 13 Jun 2019, at 10:33, Simon Horman wrote: > > > > On Wed, Jun 12, 2019 at 11:46:27AM -0700, Jakub Kicinski wrote: > >> On Wed, 12 Jun 2019 15:02:39 -0300, Marcelo Ricardo Leitner wrote: > >>> On Tue, May

[PATCH net] bnx2x: Check if transceiver implements DDM before access

2019-06-13 Thread Mauro S. M. Rodrigues
Some transceivers may comply with SFF-8472 even though they do not implement the Digital Diagnostic Monitoring (DDM) interface described in the spec. The existence of such area is specified by the 6th bit of byte 92, set to 1 if implemented. Currently, without checking this bit, bnx2x fails trying

Re: [PATCH bpf-next 1/2] bpf: net: Add SO_DETACH_REUSEPORT_BPF

2019-06-13 Thread kbuild test robot
Hi Martin, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/bpf-net-Add-SO_DETACH_REUSEPORT_BPF/20190614-015829 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git maste

Re: [PATCH bpf-next 2/6] xsk: add support for need_wakeup flag in AF_XDP rings

2019-06-13 Thread Magnus Karlsson
On Thu, Jun 13, 2019 at 9:05 PM Jakub Kicinski wrote: > > On Thu, 13 Jun 2019 09:37:26 +0200, Magnus Karlsson wrote: > > > > - if (!dev->netdev_ops->ndo_bpf || > > - !dev->netdev_ops->ndo_xsk_async_xmit) { > > + if (!dev->netdev_ops->ndo_bpf || !dev->netdev_ops->ndo_xsk_wakeup) { >

Re: [PATCH net-next] gso: enable udp gso for virtual devices

2019-06-13 Thread Jason Baron
On 6/13/19 1:15 PM, Alexander Duyck wrote: > On Wed, Jun 12, 2019 at 4:14 PM Jason Baron wrote: >> >> Now that the stack supports UDP GRO, we can enable udp gso for virtual >> devices. If packets are looped back locally, and UDP GRO is not enabled >> then they will be segmented to gso_size via

Re: [PATCH bpf-next 2/6] xsk: add support for need_wakeup flag in AF_XDP rings

2019-06-13 Thread Jakub Kicinski
On Thu, 13 Jun 2019 09:37:26 +0200, Magnus Karlsson wrote: > > - if (!dev->netdev_ops->ndo_bpf || > - !dev->netdev_ops->ndo_xsk_async_xmit) { > + if (!dev->netdev_ops->ndo_bpf || !dev->netdev_ops->ndo_xsk_wakeup) { > err = -EOPNOTSUPP; > goto err_unreg_

[net-next 02/12] i40e: let untrusted VF to create up to 16 VLANs

2019-06-13 Thread Jeff Kirsher
From: Piotr Kwapulinski This patch lets untrusted VF to create up to 16 VLANs. It was implemented by increasing I40E_VC_MAX_VLAN_PER_VF up to 16. Without this patch untrusted VF could create only up to 8 VLANs. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsh

[net-next 01/12] i40e: add functions stubs to support EEE

2019-06-13 Thread Jeff Kirsher
From: Aleksandr Loktionov This patch adds functions stubs to support EEE on/off. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 1 file changed, 12 insertions(+) diff --git a/driver

[net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2019-06-13

2019-06-13 Thread Jeff Kirsher
This series contains updates to i40e only. Aleksandr adds stub functions for Energy Efficient Ethernet (EEE) to currently report that it is not supported in i40e. Fixed up the Link Layer Detection Protocol (LLDP) code to ensure we do not set the LLDP flag too early before we ensure that we have a

[net-next 04/12] i40e: Use signed variable

2019-06-13 Thread Jeff Kirsher
From: Mitch Williams The counter variable in i40e_clean_tx_irq starts out negative and climbs to 0. So it should not be defined as a u16. This was working by accident due to the fact the u16 overflows and underflows predictably. Replace the u16 with int, which is signed and can handle the negati

[net-next 09/12] i40e: Check if the BAR size is large enough before writing to registers

2019-06-13 Thread Jeff Kirsher
From: Adam Ludkiewicz This patch fixes the problem with a kernel panic occurring when trying to bind the i40e driver to a non-i40e port. The problem is fixed by checking if the BAR size in the device is large enough by reading the highest register. Signed-off-by: Adam Ludkiewicz Tested-by: Andr

[net-next 07/12] i40e: add input validation for virtchnl handlers

2019-06-13 Thread Jeff Kirsher
From: Sergey Nemov Change some data to unsigned int instead of integer when we compare. Check LUT values in VIRTCHNL_OP_CONFIG_RSS_LUT handler. Also enhance error/warning messages to print the real values of I40E_MAX_VF_QUEUES, I40E_MAX_VF_VSI and I40E_DEFAULT_QUEUES_PER_VF instead of plain tex

[net-next 05/12] i40e: Add bounds check for ch[] array

2019-06-13 Thread Jeff Kirsher
From: Piotr Kwapulinski Add bounds check for ch[] array. Use ARRAY_SIZE() to ensure that idx is within the range. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++- 1 file changed, 10

[net-next 08/12] i40e: Missing response checks in driver when starting/stopping FW LLDP

2019-06-13 Thread Jeff Kirsher
From: Piotr Marczak Driver did not check response on LLDP flag change and always returned SUCCESS. This patch now checks for an error and returns an error code and has additional information in the log. Signed-off-by: Piotr Marczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- ..

[net-next 03/12] i40e: add constraints for accessing veb array

2019-06-13 Thread Jeff Kirsher
From: Piotr Kwapulinski Add veb array access boundary checks. Ensure veb array index is smaller than I40E_MAX_VEB. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++- 1 file changed, 7 insert

[net-next 12/12] i40e: mark expected switch fall-through

2019-06-13 Thread Jeff Kirsher
From: "Gustavo A. R. Silva" In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function ‘i40e_run_xdp_zc’: drivers/net/ethernet/intel/i40e/i40e_xsk.c:

[net-next 10/12] i40e: remove duplicate stat calculation for tx_errors

2019-06-13 Thread Jeff Kirsher
From: Jacob Keller The tx_errors statistic was being calculated twice in i40e_update_eth_stats. This appears to be as of commit 201db2898f2c ("i40e: add missing VSI statistics", 2014-03-25). Remove the extra i40e_stat_update32 call for GLV_TEPC. Signed-off-by: Jacob Keller Tested-by: Andrew B

[net-next 11/12] i40e: Missing response checks in driver when starting/stopping FW LLDP

2019-06-13 Thread Jeff Kirsher
From: Aleksandr Loktionov Driver updated pf->flags before calling i40e_aq_start_lldp(). This patch moved down updating pf->flags down so flags will be updated only in case of successful i40e_aq_start_lldp() call. Also was introduced is_reset_needed local flag to avoid unnecessary h/w reset in cas

[net-next 06/12] i40e: Improve AQ log granularity

2019-06-13 Thread Jeff Kirsher
From: Doug Dziggel This patch makes it possible to log only AQ descriptors, without the entire AQ message buffers being dumped too. It should greatly reduce kernel log size in cases where a full AQ dump is not needed. Selection is made by setting flags in hw->debug_mask. Additionally, some debug

  1   2   3   4   >