Re: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-17 Thread Or Gerlitz
On Tue, Jul 17, 2018 at 12:46 AM, Mark Bloch wrote: >> From: Or Gerlitz [mailto:gerlitz...@gmail.com] >> > If NIC RX flow tables support decap opertion, enable it on creation. >> opertion --> operation saw it? >> > If NIC TX flow tables support reformat opertion, enable it on creation.

[PATCH net-next 1/7] net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules

2018-07-17 Thread Florian Fainelli
ds->enabled_port_mask only contains a bitmask of user-facing enabled ports, we also need to allow programming CFP rules that target CPU ports (e.g: ports 5 and 8). Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH net-next 2/7] net: dsa: bcm_sf2: Disable learning while in WoL

2018-07-17 Thread Florian Fainelli
When we are in Wake-on-LAN, we operate with the host sofware not running a network stack, so we want to the switch to flood packets in order to cause a system wake-up when matching specific filters (unicast or multicast). This was not necessary before since we supported Magic Packet which are

Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Andrew Lunn
On Tue, Jul 17, 2018 at 08:36:37AM -0700, Florian Fainelli wrote: > Hi all, > > This patch series adds support for allowing Wake-on-LAN to wake-up the > system using configurable filters. This is particular useful in the context > of Android where wake on MDNS is a requirement. > > We support

[PATCH net] net/xdp: Fix suspicious RCU usage warning

2018-07-17 Thread Tariq Toukan
Fix the warning below by calling rhashtable_lookup under RCU read lock. [ 342.450870] WARNING: suspicious RCU usage [ 342.455856] 4.18.0-rc2+ #17 Tainted: G O [ 342.462210] - [ 342.467202] ./include/linux/rhashtable.h:481 suspicious

[PATCH net] net/page_pool: Fix inconsistent lock state warning

2018-07-17 Thread Tariq Toukan
Fix the warning below by calling the ptr_ring_consume_bh, which uses spin_[un]lock_bh. [ 179.064300] [ 179.069073] WARNING: inconsistent lock state [ 179.073846] 4.18.0-rc2+ #18 Not tainted [ 179.078133] [ 179.082907]

[PATCH net-next 1/3] net: phy: Drop OF dependency for MDIO_BCM_UNIMAC

2018-07-17 Thread Florian Fainelli
The driver builds fine even with CONFIG_OF=n since we now have stubs that are provided. Signed-off-by: Florian Fainelli --- drivers/net/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index

[PATCH net-next 0/3] net: Drop OF dependency for some Broadcom drivers

2018-07-17 Thread Florian Fainelli
Hi David, This patch series drops the CONFIG_OF dependency that some Broadcom drivers had, this is no longer necessary and goes against allowing build testing on more platforms. Let me know if kbuild or your own builds somehow fail. Florian Fainelli (3): net: phy: Drop OF dependency for

[PATCH net-next 3/3] net: dsa: Drop OF dependency for BCM_SF2

2018-07-17 Thread Florian Fainelli
NET_DSA_BCM_SF2 does not need to depend on CONFIG_OF anymore since we have stubs when that option is disabled. Signed-off-by: Florian Fainelli --- drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index

[PATCH net-next 2/3] net: ethernet: broadcom: Drop dependency on OF

2018-07-17 Thread Florian Fainelli
Both BCMGENET and SYSTEMPORT build just fine with CONFIG_OF=n, we do have a dependency on HAS_IOMEM that was not being reflected for SYSTEMPORT so add that. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

RE: [PATCH mlx5-next] RDMA/mlx5: Don't use cached IRQ affinity mask

2018-07-17 Thread Steve Wise
> On 7/16/2018 8:08 PM, Steve Wise wrote: > > Hey Max: > > > > > > Hey, > > > On 7/16/2018 11:46 AM, Max Gurtovoy wrote: > >> > >> > >> On 7/16/2018 5:59 PM, Sagi Grimberg wrote: > >>> > Hi, > I've tested this patch and seems problematic at this moment. > >>> > >>> Problematic how?

Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c

2018-07-17 Thread Saeed Mahameed
On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib wrote: > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's > only used there. > > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags > infrastructure") > Signed-off-by: Kamal Heib > --- LGTM, but why to net ? this

Re: [PATCH net-next 2/7] net: dsa: bcm_sf2: Disable learning while in WoL

2018-07-17 Thread Andrew Lunn
On Tue, Jul 17, 2018 at 08:36:40AM -0700, Florian Fainelli wrote: > When we are in Wake-on-LAN, we operate with the host sofware not running > a network stack, so we want to the switch to flood packets Hi Florian Just to be sure... By flood, you mean from a user port to the CPU. You don't mean

Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-17 Thread David Ahern
On 7/16/18 3:09 PM, David Miller wrote: > > Is this a -stable candidate? > I think so. The API is not doing what the user requested, even though the route add does not fail.

[PATCH net-next 4/7] net: systemport: Create helper to set MPD

2018-07-17 Thread Florian Fainelli
Create a helper function to turn on/off MPD, this will be used to avoid duplicating code as we are going to add additional types of wake-up types. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 20 +--- 1 file changed, 13 insertions(+), 7

[PATCH net-next 5/7] ethtool: Add WAKE_FILTER bitmask

2018-07-17 Thread Florian Fainelli
Add the ability to specify that a filter, programmed through ethtool::rxnfc will be used as a wake-up source. sopass which is a 48-bit wide storage is used to indicate which filters (as bits) can be used for wake-up. Signed-off-by: Florian Fainelli --- include/uapi/linux/ethtool.h | 3 ++- 1

[PATCH ethtool] ethtool: Add support for WAKE_FILTER

2018-07-17 Thread Florian Fainelli
Allow re-purposing the wol->sopass storage area to specify a bitmask of filters (programmed previously via ethtool::rxnfc) to be used as wake-up patterns. Signed-off-by: Florian Fainelli --- ethtool-copy.h | 1 + ethtool.c | 35 ++- 2 files changed, 35

[PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Florian Fainelli
Hi all, This patch series adds support for allowing Wake-on-LAN to wake-up the system using configurable filters. This is particular useful in the context of Android where wake on MDNS is a requirement. We support this by using the bcm_sf2 Compact Field Processor (CFP) which supports matching

[PATCH net-next 3/7] net: systemport: Do not re-configure upon WoL interrupt

2018-07-17 Thread Florian Fainelli
We already properly resume from Wake-on-LAN whether such a condition occured or not, no need to process the WoL interrupt for functional changes since that could race with other settings. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 4 +--- 1 file changed, 1

[PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Florian Fainelli
The SYSTEMPORT MAC allows up to 8 filters to be programmed to wake-up from LAN. Verify that we have up to 8 filters and program them to the appropriate RXCHK entries to be matched (along with their masks). We need to update the entry and exit to Wake-on-LAN mode to keep the RXCHK engine running

[PATCH net-next 7/7] net: dsa: bcm_sf2: Support WAKE_FILTER

2018-07-17 Thread Florian Fainelli
Propagate wol->sopass when WAKE_FILTER is set since that contains the bitmap of filters to be enabled for wake-up. Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/bcm_sf2.c

Re: [PATCH net-next 2/7] net: dsa: bcm_sf2: Disable learning while in WoL

2018-07-17 Thread Florian Fainelli
On 07/17/2018 08:54 AM, Andrew Lunn wrote: > On Tue, Jul 17, 2018 at 08:36:40AM -0700, Florian Fainelli wrote: >> When we are in Wake-on-LAN, we operate with the host sofware not running >> a network stack, so we want to the switch to flood packets > > Hi Florian > > Just to be sure... > >

[PATCH 1/6] lib/crc: Move polynomial definition to separate header

2018-07-17 Thread Krzysztof Kozlowski
Allow other drivers and parts of kernel to use the same define for CRC32 polynomial, instead of duplicating it in many places. This code does not bring any functional changes, except moving existing code. Signed-off-by: Krzysztof Kozlowski --- include/linux/crc32poly.h | 20

[PATCH net-next 1/1] tc-tests: initial version of fw filter unit tests

2018-07-17 Thread Keara Leibovitz
Create initial unit tests for the tc fw filter. Signed-off-by: Keara Leibovitz --- .../selftests/tc-testing/tc-tests/filters/fw.json | 1049 1 file changed, 1049 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/filters/fw.json diff --git

Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Andrew Lunn
> >> ethtool -s gphy wol f filters 0x2 > > > > What does this 0x2 represent? > > 0x2 = bit 1 is set, which corresponds to the filter ID that was returned > from the previous ethtool::rxnfc command invocation. If ethtool > --config-nfc returned 3, then we would have used filters 0x8, etc. It

Re: [RFC iproute2-next v1 5/5] tc: Add support for configuring the taprio scheduler

2018-07-17 Thread Vinicius Costa Gomes
Hi, Stephen Hemminger writes: > On Fri, 13 Jul 2018 17:06:11 -0700 > Vinicius Costa Gomes wrote: > >> +while (fscanf(f, "%ms %x %" PRIu32 "\n", _str, , >> ) != EOF) { >> +struct rtattr *entry; >> + >> +err = str_to_entry_cmd(cmd_str); >> +

[PATCH bpf-next v2 08/11] bpf: offload: allow program and map sharing per-ASIC

2018-07-17 Thread Jakub Kicinski
Allow programs and maps to be re-used across different netdevs, as long as they belong to the same struct bpf_offload_dev. Update the bpf_offload_prog_map_match() helper for the verifier and export a new helper for the drivers to use when checking programs at attachment time. Signed-off-by: Jakub

[PATCH bpf-next v2 01/11] netdevsim: add switch_id attribute

2018-07-17 Thread Jakub Kicinski
Grouping netdevsim devices into "ASICs" will soon be supported. Add switch_id attribute to all netdevsims. For now each netdevsim will have its switch_id matching the device id. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/netdev.c| 24

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-17 Thread Cong Wang
On Tue, Jul 17, 2018 at 10:43 AM David Ahern wrote: > > On 7/17/18 11:40 AM, Cong Wang wrote: > > On Tue, Jul 17, 2018 at 5:11 AM wrote: > >> > >> From: David Ahern > >> > >> Nikita Leshenko reported that neighbor entries in one namespace can > >> evict neighbor entries in another. The problem

[PATCH bpf-next v2 07/11] bpf: offload: keep the offload state per-ASIC

2018-07-17 Thread Jakub Kicinski
Create a higher-level entity to represent a device/ASIC to allow programs and maps to be shared between device ports. The extra work is required to make sure we don't destroy BPF objects as soon as the netdev for which they were loaded gets destroyed, as other ports may still be using them. When

[PATCH bpf-next v2 02/11] netdevsim: add shared netdevsim devices

2018-07-17 Thread Jakub Kicinski
Factor out sharable netdevsim sub-object and use IFLA_LINK to link netdevsims together at creation time. Sharable object will have its own DebugFS directory. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/netdev.c| 87 ---

[PATCH bpf-next v2 05/11] bpf: offload: rename bpf_offload_dev_match() to bpf_offload_prog_map_match()

2018-07-17 Thread Jakub Kicinski
A set of new API functions exported for the drivers will soon use 'bpf_offload_dev_' as a prefix. Rename the bpf_offload_dev_match() which is internal to the core (used by the verifier) to avoid any confusion. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- include/linux/bpf.h

[PATCH bpf-next v2 03/11] netdevsim: associate bound programs with shared dev

2018-07-17 Thread Jakub Kicinski
Move bound program information from netdevsim to shared sub-object, as programs will soon be shared between netdevs of the same ASIC. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/bpf.c | 30 -

[PATCH bpf-next v2 04/11] nfp: add .ndo_init() and .ndo_uninit() callbacks

2018-07-17 Thread Jakub Kicinski
BPF code should unregister the offload capabilities from .ndo_uninit(), to make sure the operation is atomic with unlist_netdevice(). Plumb the init/uninit NDOs for vNICs and representors. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

[PATCH bpf-next v2 06/11] bpf: offload: aggregate offloads per-device

2018-07-17 Thread Jakub Kicinski
Currently we have two lists of offloaded objects - programs and maps. Netdevice unregister notifier scans those lists to orphan objects associated with device being unregistered. This puts unnecessary (even if negligible) burden on all netdev unregister calls in BPF- -enabled kernel. The lists

[PATCH bpf-next v2 00/11] bpf: offload: program and map sharing

2018-07-17 Thread Jakub Kicinski
Hi! This patchset adds support for sharing BPF objects within one ASIC. This will allow us to reuse of the same program on multiple ports of a device leading to better code store utilization. It also enables sharing maps between programs attached to different ports of a device. v2: - rename

[PATCH bpf-next v2 10/11] nfp: bpf: allow program sharing within ASIC

2018-07-17 Thread Jakub Kicinski
Allow program sharing between netdevs of the same NFP ASIC. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH bpf-next v2 11/11] selftests/bpf: add test for sharing objects between netdevs

2018-07-17 Thread Jakub Kicinski
Add tests for sharing programs and maps between different netdevs. Use netdevsim's ability to pretend multiple netdevs belong to the same "ASIC". Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 146 +++- 1 file

[PATCH bpf-next v2 09/11] netdevsim: allow program sharing between devices

2018-07-17 Thread Jakub Kicinski
Allow program sharing between devices which were linked together. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- drivers/net/netdevsim/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c index

Re: [PATCH net] net/xdp: Fix suspicious RCU usage warning

2018-07-17 Thread Daniel Borkmann
On 07/17/2018 06:47 PM, Alexei Starovoitov wrote: > On Tue, Jul 17, 2018 at 06:10:38PM +0300, Tariq Toukan wrote: >> Fix the warning below by calling rhashtable_lookup under >> RCU read lock. >> >> [ 342.450870] WARNING: suspicious RCU usage >> [ 342.455856] 4.18.0-rc2+ #17 Tainted: G

Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Florian Fainelli
On 07/17/2018 08:47 AM, Andrew Lunn wrote: > On Tue, Jul 17, 2018 at 08:36:37AM -0700, Florian Fainelli wrote: >> Hi all, >> >> This patch series adds support for allowing Wake-on-LAN to wake-up the >> system using configurable filters. This is particular useful in the context >> of Android

[PATCH 6/6] lib: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski --- lib/decompress_bunzip2.c | 3 ++- lib/xz/xz_crc32.c| 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c

Re: [PATCH net-next 4/4] act_mirred: use ACT_REDIRECT when possible

2018-07-17 Thread Cong Wang
On Tue, Jul 17, 2018 at 2:16 AM Paolo Abeni wrote: > > Hi, > > On Mon, 2018-07-16 at 16:39 -0700, Cong Wang wrote: > > On Fri, Jul 13, 2018 at 2:55 AM Paolo Abeni wrote: > > > > > > When mirred is invoked from the ingress path, and it wants to redirect > > > the processed packet, it can now use

[PATCH net-next] r8169: power down chip in probe

2018-07-17 Thread Heiner Kallweit
The removed code would be called in two situations: 1. interface is brought up never or >10s after driver load 2. after close() Case 1 we can handle cleaner by ensuring chip is powered down when leaving probe(). open() callback will power up the chip. In case 2 we call rtl_pll_power_down() twice

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Florian Fainelli
On 07/17/2018 09:14 AM, Andrew Lunn wrote: > On Tue, Jul 17, 2018 at 08:36:44AM -0700, Florian Fainelli wrote: >> The SYSTEMPORT MAC allows up to 8 filters to be programmed to wake-up >> from LAN. Verify that we have up to 8 filters and program them to the >> appropriate RXCHK entries to be

Re: [PATCH net] net/xdp: Fix suspicious RCU usage warning

2018-07-17 Thread Alexei Starovoitov
On Tue, Jul 17, 2018 at 06:10:38PM +0300, Tariq Toukan wrote: > Fix the warning below by calling rhashtable_lookup under > RCU read lock. > > [ 342.450870] WARNING: suspicious RCU usage > [ 342.455856] 4.18.0-rc2+ #17 Tainted: G O > [ 342.462210] - > [

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Andrew Lunn
On Tue, Jul 17, 2018 at 08:36:44AM -0700, Florian Fainelli wrote: > The SYSTEMPORT MAC allows up to 8 filters to be programmed to wake-up > from LAN. Verify that we have up to 8 filters and program them to the > appropriate RXCHK entries to be matched (along with their masks). > > We need to

[PATCH net-next 1/3] net/sched: tunnel_key: Allow to set tos and ttl for tc based ip tunnels

2018-07-17 Thread Or Gerlitz
Allow user-space to provide tos and ttl to be set for the tunnel headers. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Acked-by: Jiri Pirko --- include/uapi/linux/tc_act/tc_tunnel_key.h | 2 ++ net/sched/act_tunnel_key.c| 20 ++-- 2 files changed, 20

[PATCH net-next 2/3] flow_dissector: Dissect tos and ttl from the tunnel info

2018-07-17 Thread Or Gerlitz
Add dissection of the tos and ttl from the ip tunnel headers fields in case a match is needed on them. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Acked-by: Jiri Pirko --- include/net/flow_dissector.h | 2 +- net/core/flow_dissector.c| 14 +- 2 files changed, 14

[PATCH net-next 0/3] set/match the tos/ttl fields of TC based IP tunnels

2018-07-17 Thread Or Gerlitz
Hi Dave, This series comes to address the case to set (encap) and match (decap) also the tos and ttl fields of TC based IP tunnels. Example encap (1st one) and decap (2nd) that use the new fields tc filter add dev eth0_0 protocol ip parent : prio 10 flower \ src_mac

[PATCH net-next 3/3] net/sched: cls_flower: Support matching on ip tos and ttl for tunnels

2018-07-17 Thread Or Gerlitz
Allow users to set rules matching on ipv4 tos and ttl or ipv6 traffic-class and hoplimit of tunnel headers. Signed-off-by: Or Gerlitz Reviewed-by: Roi Dayan Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 5 + net/sched/cls_flower.c | 43

Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Florian Fainelli
On 07/17/2018 09:21 AM, Andrew Lunn wrote: ethtool -s gphy wol f filters 0x2 >>> >>> What does this 0x2 represent? >> >> 0x2 = bit 1 is set, which corresponds to the filter ID that was returned >> from the previous ethtool::rxnfc command invocation. If ethtool >> --config-nfc returned 3,

RE: [RFC PATCH rdma-next 13/18] RDMA/mlx5: Enable decap and packet reformat on flow tables

2018-07-17 Thread Mark Bloch
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Or Gerlitz > Sent: Tuesday, July 17, 2018 5:47 AM > To: Mark Bloch > Cc: Doug Ledford ; Jason Gunthorpe > ; Leon Romanovsky ; RDMA > mailing list ; Saeed Mahameed > ;

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Andrew Lunn
> +if (bitmap_weight(priv->filters, WAKE_FILTER_BITS) > > + RXCHK_BRCM_TAG_MAX) { > +bitmap_zero(priv->filters, WAKE_FILTER_BITS); > +return -ENOSPC; > +} >

Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

2018-07-17 Thread Andrew Lunn
On Tue, Jul 17, 2018 at 09:28:52AM -0700, Florian Fainelli wrote: > > > On 07/17/2018 09:21 AM, Andrew Lunn wrote: > ethtool -s gphy wol f filters 0x2 > >>> > >>> What does this 0x2 represent? > >> > >> 0x2 = bit 1 is set, which corresponds to the filter ID that was returned > >> from the

Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c

2018-07-17 Thread Kamal Heib
On Tue, Jul 17, 2018 at 08:00:58AM -0700, Saeed Mahameed wrote: > On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib wrote: > > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's > > only used there. > > > > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags > >

[PATCH] net: cavium: Add fine-granular dependencies on PCI

2018-07-17 Thread Alexander Sverdlin
Add dependencies on PCI where necessary. Fixes: 7e2bc7fb65 ("net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI") Signed-off-by: Alexander Sverdlin --- drivers/net/ethernet/cavium/Kconfig | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Andrew Lunn
> >> struct ethtool_wolinfo *wol) > >> { > >>struct bcm_sysport_priv *priv = netdev_priv(dev); > >>struct device *kdev = >pdev->dev; > >> - u32 supported = WAKE_MAGIC | WAKE_MAGICSECURE; > >> + u32 supported = WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER; > >> +

Re: [PATCH net-next 6/7] net: systemport: Add support for WAKE_FILTER

2018-07-17 Thread Florian Fainelli
On 07/17/2018 09:49 AM, Andrew Lunn wrote: struct ethtool_wolinfo *wol) { struct bcm_sysport_priv *priv = netdev_priv(dev); struct device *kdev = >pdev->dev; - u32 supported = WAKE_MAGIC | WAKE_MAGICSECURE; + u32 supported =

Re: [PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-17 Thread Cong Wang
On Mon, Jul 16, 2018 at 1:31 AM Vlad Buslov wrote: > > > On Fri 13 Jul 2018 at 21:51, Cong Wang wrote: > > On Fri, Jul 13, 2018 at 6:30 AM Vlad Buslov wrote: > >> > >> > >> On Fri 13 Jul 2018 at 03:52, Cong Wang wrote: > >> > On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote: > >> >> > >> >>

[PATCH net-next] pktgen: convert safe uses of strncpy() to strcpy() to avoid string truncation warning

2018-07-17 Thread Jakub Kicinski
GCC 8 complains: net/core/pktgen.c: In function ‘pktgen_if_write’: net/core/pktgen.c:1419:4: warning: ‘strncpy’ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation] strncpy(pkt_dev->src_max, buf, len);

Re: [PATCH next] bonding: pass link-local packets to bonding master also.

2018-07-17 Thread Michal Soltys
On 2018-07-17 11:32, Michal Soltys wrote: > On 07/17/2018 01:53 AM, Mahesh Bandewar (महेश बंडेवार) wrote: >> On Mon, Jul 16, 2018 at 2:24 PM, Jay Vosburgh >> wrote: >>> Mahesh Bandewar wrote: >>> From: Mahesh Bandewar Commit b89f04c61efe ("bonding: deliver link-local packets with

[PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-17 Thread Daniel Borkmann
Implement loading of .BTF section from object file and build up internal table for retrieving key/value id related to maps in the BPF program. Latter is done by setting up struct btf_type table. One of the issues is that there's a disconnect between the data types used in the map and struct

[PATCH iproute2 4/5] bpf: implement bpf to bpf calls support

2018-07-17 Thread Daniel Borkmann
Implement missing bpf to bpf calls support. The loader will recognize .text section and handle relocation entries that are emitted by LLVM. First step is processing of map related relocation entries for .text section, and in a second step loader will copy .text section into program section and

[PATCH net-next 8/8] net: dsa: mv88e6xxx: Longer timeout for PTP TX timestamp

2018-07-17 Thread Andrew Lunn
For slow processors using bit-banging MDIO, 20ms can be too short a timeout when waiting for the transmit timestamp to become available. Double it to 40ms. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/hwtstamp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next 6/8] net: dsa: mv88e6xxx: Add hwtimestamp support for the 6165

2018-07-17 Thread Andrew Lunn
The 6165 family supports a more restricted version of hardware time stamps. Only L2 PTP is supported. All ports have to use the same EtherType, and transport spec configuration. PTP can only be enabled/disabled globally, not per port. Signed-off-by: Andrew Lunn ---

[PATCH iproute2 3/5] bpf: remove strict dependency on af_alg

2018-07-17 Thread Daniel Borkmann
Do not bail out when AF_ALG is not supported by the kernel and only do so when a map is requested in object ns where we're calculating the hash. Otherwise, the loader can operate just fine, therefore lets not fail early when it's not needed. Signed-off-by: Daniel Borkmann --- lib/bpf.c | 74

[PATCH iproute2 2/5] bpf: move bpf_elf_map fixup notification under verbose

2018-07-17 Thread Daniel Borkmann
No need to spam the user with this if it can be fixed gracefully anyway. Therefore, move it under verbose option. Signed-off-by: Daniel Borkmann --- lib/bpf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bpf.c b/lib/bpf.c index 4e26c0d..42093db 100644 ---

[PATCH iproute2 0/5] Various BPF improvements

2018-07-17 Thread Daniel Borkmann
Main part of this set is to: i) avoid strict af_alg kernel dependency, ii) add loader support for bpf to bpf calls and iii) add btf loader support with an option to annotate maps. For details please see the individual patches. Thanks! Daniel Borkmann (5): bpf: import btf uapi kernel header

[PATCH iproute2 1/5] bpf: import btf uapi kernel header

2018-07-17 Thread Daniel Borkmann
Needed later on for BTF loader. Signed-off-by: Daniel Borkmann --- include/uapi/linux/btf.h | 113 +++ 1 file changed, 113 insertions(+) create mode 100644 include/uapi/linux/btf.h diff --git a/include/uapi/linux/btf.h b/include/uapi/linux/btf.h new

[PATCH net-next v3 00/10] r8169: add phylib support

2018-07-17 Thread Heiner Kallweit
Now that all the basic refactoring has been done we can add phylib support. This patch series was successfully tested on: RTL8168h RTL8168evl RTL8169sb Changes in v2: - return error in mdio ops if phyaddr > 0 - advertise pause modes - added reviewed-by for several patches Changes in v3: - return

[PATCH net-next 4/8] net: dsa: mv88e6xxx: Abstract HW timestamp setup

2018-07-17 Thread Andrew Lunn
The 6165 family does not have per port PTP control registers. Also, it places the timestamp data in different registers. Abstract the current implementation of 6352 compatible PTP devices so that 6165 can be added. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.h | 5 +++

[PATCH net-next 3/8] net: dsa: mv88e6xxx: Add mv88e6165 PTP support

2018-07-17 Thread Andrew Lunn
The mv88e6165 family has its global clock in the PTP global registers. It does not support any form of PTP events. Add a function to read the clock, fill in an ops structure, and register it with the two members of the family. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 4

[PATCH net-next 2/8] net: dsa: mv88e6xxx: Add MV88E6165 AVB register access

2018-07-17 Thread Andrew Lunn
The MV88E6165 PTP registers are all in AVB bank F, unlike newer generations which spread them over AVB bank E and F. Implement AVB ops for the MV88E6165 which hides this difference. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 2 ++

[PATCH net-next v3 08/10] r8169: remove rtl8169_set_speed_xmii

2018-07-17 Thread Heiner Kallweit
We can remove rtl8169_set_speed_xmii() now that phylib handles all this. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 90 1 file changed, 90 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next v3 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-17 Thread Heiner Kallweit
The only remaining usage of the struct mii_if_info member is to store the information whether the chip is GMII-capable. So we can replace it with a simple flag. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn --- drivers/net/ethernet/realtek/r8169.c | 38 +--- 1

[PATCH net-next v3 05/10] r8169: use phy_ethtool_nway_reset

2018-07-17 Thread Heiner Kallweit
Switch to using phy_ethtool_nway_reset(). Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/realtek/Kconfig | 1 - drivers/net/ethernet/realtek/r8169.c | 9 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git

[PATCH net-next v3 03/10] r8169: replace open-coded PHY soft reset with genphy_soft_reset

2018-07-17 Thread Heiner Kallweit
Use genphy_soft_reset() instead of open-coding a PHY soft reset. We have to do an explicit PHY soft reset because some chips use the genphy driver which uses a no-op as soft_reset callback. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli ---

[PATCH net-next v3 10/10] r8169: don't read chip phy status register

2018-07-17 Thread Heiner Kallweit
Instead of accessing the PHYstatus register we can use the information phylib stores in the phy_device structure. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers/net/ethernet/realtek/r8169.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v3 01/10] r8169: add basic phylib support

2018-07-17 Thread Heiner Kallweit
Add basic phylib support to r8169. All now unneeded old PHY handling code will be removed in subsequent patches. Signed-off-by: Heiner Kallweit --- v2: - return error in mdio ops if phyaddr > 0 - advertise pause modes v3: - return ENODEV in mdio ops if phyaddr > 0 - consider other minor review

[PATCH net-next v3 02/10] r8169: use phy_resume/phy_suspend

2018-07-17 Thread Heiner Kallweit
Use phy_resume() / phy_suspend() instead of open coding this functionality. The chip version specific differences are handled by the respective PHY drivers. The call to r8168_phy_power_down() in r8168_pll_power_down() can be removed because phylib takes care now. The relevant scenarios are: -

[PATCH net-next v3 04/10] r8169: use phy_ethtool_(g|s)et_link_ksettings

2018-07-17 Thread Heiner Kallweit
Use phy_ethtool_(g|s)et_link_ksettings() for the respective ethtool_ops callbacks. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers/net/ethernet/realtek/r8169.c | 35 +++- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git

[PATCH net-next v3 07/10] r8169: use phy_speed_down / phy_speed_up

2018-07-17 Thread Heiner Kallweit
Use new phylib functions phy_speed_down() and phy_speed_up(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 29 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[PATCH net-next v3 06/10] r8169: use phy_mii_ioctl

2018-07-17 Thread Heiner Kallweit
Switch to using phy_mii_ioctl(). Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/realtek/r8169.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c

[RFC ipsec-next] xfrm: Remove xfrmi interface ID from flowi

2018-07-17 Thread Benedict Wong
In order to remove performance impact of having the extra u32 in every single flowi, this change removes the flowi_xfrm struct, prefering to take the if_id as a method parameter where needed. In the inbound direction, if_id is only needed during the __xfrm_check_policy() function, and the if_id

[PATCH net-next 1/8] net: dsa: mv88e6xxx: Abstract PTP operations

2018-07-17 Thread Andrew Lunn
The mv88e6165 family supports PTP, but its registers use a different layout to the currently supported devices. Abstract accessing the PTP registers into a set of ops, so making space for a second implementation. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 11 +++

[PATCH net-next 0/8] PTP support for mv88e6165 family

2018-07-17 Thread Andrew Lunn
The mv88e6165 family of switches supports PTP. It is however not fully compatible with the current PTP support in the mv88e6xxx driver. This patchset adds a level of abstraction to the PTP code, and then adds the code needed to support the mv88e6165 family. Andrew Lunn (8): net: dsa: mv88e6xxx:

[PATCH net-next 7/8] net: dsa: mv88e6xxx: Set PTP Ethertype

2018-07-17 Thread Andrew Lunn
For the 6352 and newer switches, the PTP Ethertype defaults to ETH_P_1588. Hence it was not explicitly set. The 6165 however defaults to 0. So explicitly set the EtherType. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/hwtstamp.c | 5 + drivers/net/dsa/mv88e6xxx/ptp.h | 3

[PATCH net-next 5/8] net: dsa: mv88e6xxx: Abstract supported PTP filters

2018-07-17 Thread Andrew Lunn
The 6165 only supports layer L2 PTP, where as the more modern devices also support UDP and UDPv6, i.e. L4. Abstract the supported receive filters. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.h | 1 + drivers/net/dsa/mv88e6xxx/hwtstamp.c | 26 ++

Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation

2018-07-17 Thread Jakub Kicinski
On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > # bpftool map dump id 386 >[{ > "key": 0, > "value": { > "": { > "value": 0, > "ifindex": 0, > "mac": [] > } > } > },{ >

Re: [PATCH net-next v3 00/10] r8169: add phylib support

2018-07-17 Thread David Miller
From: Heiner Kallweit Date: Tue, 17 Jul 2018 22:42:40 +0200 > Now that all the basic refactoring has been done we can add phylib > support. This patch series was successfully tested on: > RTL8168h > RTL8168evl > RTL8169sb > > Changes in v2: > - return error in mdio ops if phyaddr > 0 > -

[PATCH RFC bpf-next] bpf: per-register parent pointers

2018-07-17 Thread Alexei Starovoitov
By giving each register its own liveness chain, we elide the skip_callee() logic. Instead, each register's parent is the state it inherits from; both check_func_call() and prepare_func_exit() automatically connect reg states to the correct chain since when they copy the reg state across (r1-r5

Re: [PATCH net-next] r8169: power down chip in probe

2018-07-17 Thread David Miller
From: Heiner Kallweit Date: Tue, 17 Jul 2018 21:21:37 +0200 > The removed code would be called in two situations: > 1. interface is brought up never or >10s after driver load > 2. after close() > > Case 1 we can handle cleaner by ensuring chip is powered down when > leaving probe(). open()

Re: [PATCH iproute2 net-next] ipneigh: exclude NTF_EXT_LEARNED from default filter

2018-07-17 Thread David Ahern
On 7/16/18 4:19 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > NUD_NOARP entries are filtered out by default by iproute2. > We dont want NUD_NOARP with NTF_EXT_LEARNED flag filtered out. > This patch extends the default filter check for ip neigh show > to include the NTF_EXT_LEARNED flag. > >

Re: [PATCH iproute2-next v3] net:sched: add action inheritdsfield to skbedit

2018-07-17 Thread David Ahern
On 7/14/18 1:10 AM, Qiaobin Fu wrote: > @@ -156,6 +162,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char > ***argv_p, int tca_id, > if (flags & SKBEDIT_F_PTYPE) > addattr_l(n, MAX_MSG, TCA_SKBEDIT_PTYPE, > , sizeof(ptype)); > + if

Re: [PATCH net-next 1/8] net: dsa: mv88e6xxx: Abstract PTP operations

2018-07-17 Thread David Miller
From: Andrew Lunn Date: Tue, 17 Jul 2018 23:48:53 +0200 > @@ -319,6 +337,8 @@ int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip) > { > int i; > > + const struct mv88e6xxx_ptp_ops *ptp_ops = chip->info->ops->ptp_ops; > + Please keep the local variables together here. Otherwise,

Re: [PATCH net-next 0/8] PTP support for mv88e6165 family

2018-07-17 Thread Richard Cochran
On Tue, Jul 17, 2018 at 11:48:52PM +0200, Andrew Lunn wrote: > The mv88e6165 family of switches supports PTP. It is however not fully > compatible with the current PTP support in the mv88e6xxx driver. This > patchset adds a level of abstraction to the PTP code, and then adds > the code needed to

Re: [PATCH bpf-next v2 07/11] bpf: offload: keep the offload state per-ASIC

2018-07-17 Thread Alexei Starovoitov
On Tue, Jul 17, 2018 at 10:53:25AM -0700, Jakub Kicinski wrote: > Create a higher-level entity to represent a device/ASIC to allow > programs and maps to be shared between device ports. The extra > work is required to make sure we don't destroy BPF objects as > soon as the netdev for which they

Re: [PATCH net-next 1/7] net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules

2018-07-17 Thread David Miller
From: Florian Fainelli Date: Tue, 17 Jul 2018 08:36:39 -0700 > @@ -755,7 +755,8 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, > int port, > port_num = fs->ring_cookie / SF2_NUM_EGRESS_QUEUES; > > if (fs->ring_cookie == RX_CLS_FLOW_DISC || > -

[PATCH v2] tcp: identify cryptic messages as TCP seq # bugs

2018-07-17 Thread Randy Dunlap
/net/ipv4/tcp.c:2011 tcp_recvmsg+0x694/0xba0 Suggested-by: 積丹尼 Dan Jacobson Signed-off-by: Randy Dunlap --- v2: drop __func__ because it duplicates part of the error message. net/ipv4/tcp.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20180717.orig/net/ipv4/tcp.c +++

  1   2   >