Re: [patch net-next] devlink: add warning in case driver does not set port type

2019-05-03 Thread Jakub Kicinski
On Fri, 3 May 2019 13:31:53 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Prevent misbehavior of drivers who would not set port type for longer > period of time. Drivers should always set port type. Do WARN if that > happens. > > Note that it is perfectly fine to temporarily not have the type

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-03 Thread Jakub Kicinski
On Fri, 3 May 2019 16:06:55 +0100, Edward Cree wrote: > Introduce a new offload command TC_CLSFLOWER_STATS_BYINDEX, similar to > the existing TC_CLSFLOWER_STATS but specifying an action_index (the > tcfa_index of the action), which is called for each stats-having action > on the rule. Drivers s

Re: [RFC PATCH net-next 0/3] flow_offload: Re-add various features that disappeared

2019-05-03 Thread Jakub Kicinski
On Fri, 3 May 2019 15:59:28 +0100, Edward Cree wrote: > When the flow_offload infrastructure was added, a couple of things that > were previously possible for drivers to support in TC offload were not > plumbed through, perhaps because the drivers in the tree did not fully > or correctly impleme

Re: [RFC PATCH net-next 0/3] flow_offload: Re-add various features that disappeared

2019-05-03 Thread Jiri Pirko
Fri, May 03, 2019 at 04:59:28PM CEST, ec...@solarflare.com wrote: >When the flow_offload infrastructure was added, a couple of things that > were previously possible for drivers to support in TC offload were not > plumbed through, perhaps because the drivers in the tree did not fully > or correctly

Re: [PATCH v2 0/8] netlink policy export and recursive validation

2019-05-03 Thread David Miller
From: Johannes Berg Date: Fri, 3 May 2019 11:24:53 +0200 > Here's (finally, sorry) the respin with the range/range_signed assignment > fixed up. > > I've now included the validation recursion protection so it's clear that > it applies on top of the other patches only. Series applied, thanks.

Re: [PATCH net-next] ipmr: Do not define MAXVIFS twice

2019-05-03 Thread David Miller
From: David Ahern Date: Thu, 2 May 2019 15:23:26 -0700 > From: David Ahern > > b70432f7319eb refactored mroute code to make it common between ipv4 > and ipv6. In the process, MAXVIFS got defined a second time: the > first is in the uapi file linux/mroute.h. A second one was created > presumabl

Re: [PATCH net] ipmr_base: Do not reset index in mr_table_dump

2019-05-03 Thread David Miller
From: David Ahern Date: Thu, 2 May 2019 15:14:15 -0700 > From: David Ahern > > e is the counter used to save the location of a dump when an > skb is filled. Once the walk of the table is complete, mr_table_dump > needs to return without resetting that index to 0. Dump of a specific > table is

Re: [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON()

2019-05-03 Thread David Miller
From: Eelco Chaudron Date: Thu, 2 May 2019 16:12:38 -0400 > For all other error cases in queue_userspace_packet() the error is > returned, so it makes sense to do the same for these two error cases. > > Reported-by: Davide Caratti > Signed-off-by: Eelco Chaudron Applied.

Re: [PATCH net-next] r8169: remove rtl_write_exgmac_batch

2019-05-03 Thread David Miller
From: Heiner Kallweit Date: Thu, 2 May 2019 20:46:52 +0200 > rtl_write_exgmac_batch is used in only one place, so we can remove it. > > Signed-off-by: Heiner Kallweit Applied.

Re: [PATCH net-next 0/3] mlxsw: Firmware version update

2019-05-03 Thread David Miller
From: Ido Schimmel Date: Thu, 2 May 2019 14:13:06 +0300 > This patchset updates mlxsw to use a new firmware version and adds > support for split into two ports on Spectrum-2 based systems. ... Series applied, thank you.

Re: [PATCH net-next] net: phy: improve resuming from hibernation

2019-05-03 Thread David Miller
From: Heiner Kallweit Date: Wed, 1 May 2019 22:14:21 +0200 > I got an interesting report [0] that after resuming from hibernation > the link has 100Mbps instead of 1Gbps. Reason is that another OS has > been used whilst Linux was hibernated. And this OS speeds down the link > due to WoL. Therefor

Re: [PATCH v2 net-next] net: phy: improve pause handling

2019-05-03 Thread David Miller
From: Heiner Kallweit Date: Wed, 1 May 2019 21:34:43 +0200 > When probing the phy device we set sym and asym pause in the "supported" > bitmap (unless the PHY tells us otherwise). However we don't know yet > whether the MAC supports pause. Simply copying phy->supported to > phy->advertising will

Re: [Patch net-next v2] net: add a generic tracepoint for TX queue timeout

2019-05-03 Thread David Miller
From: Cong Wang Date: Wed, 1 May 2019 19:56:59 -0700 > Although devlink health report does a nice job on reporting TX > timeout and other NIC errors, unfortunately it requires drivers > to support it but currently only mlx5 has implemented it. > Before other drivers could catch up, it is useful

Re: [PATCH net] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-05-03 Thread David Miller
From: David Ahern Date: Wed, 1 May 2019 18:18:42 -0700 > From: David Ahern > > Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to > INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not > updated to use the altered key. The result is that every packet Tx does

Re: [PATCH net] neighbor: Reset gc_entries counter if new entry is released before insert

2019-05-03 Thread David Miller
From: David Ahern Date: Wed, 1 May 2019 18:08:34 -0700 > From: David Ahern > > Ian and Alan both reported seeing overflows after upgrades to 5.x kernels: > neighbour: arp_cache: neighbor table overflow! > > Alan's mpls script helped get to the bottom of this bug. When a new entry > is creat

Re: [pull request][net-next V2 00/15] Mellanox, mlx5 updates 2019-04-30

2019-05-03 Thread David Miller
From: Saeed Mahameed Date: Wed, 1 May 2019 21:54:46 + > This series provides misc updates to mlx5 driver. > There is one patch of this series that is touching outside mlx5 driver: > > ethtool.h: Add SFF-8436 and SFF-8636 max EEPROM length definitions > Added max EEPROM length defines for eth

Re: [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-05-02

2019-05-03 Thread David Miller
From: Jeff Kirsher Date: Thu, 2 May 2019 02:06:05 -0700 > This series contains updates to the ice driver only. Pulled, thanks Jeff.

Re: [PATCH V1 net 0/8] Bug fixes for ENA Ethernet driver

2019-05-03 Thread David Miller
From: Date: Wed, 1 May 2019 16:47:02 +0300 > From: Sameeh Jubran > > Sameeh Jubran (8): > net: ena: fix swapped parameters when calling > ena_com_indirect_table_fill_entry > net: ena: fix: set freed objects to NULL to avoid failing future > allocations > net: ena: fix: Free napi r

Re: [PATCH net-next] net: dsa: mv88e6xxx: Pass interrupt number in platform data

2019-05-03 Thread David Miller
From: Andrew Lunn Date: Wed, 1 May 2019 00:10:50 +0200 > Allow an interrupt number to be passed in the platform data. The > driver will then use it if not zero, otherwise it will poll for > interrupts. > > Signed-off-by: Andrew Lunn Applied.

[PATCH net-next] net: mvpp2: cls: Remove set but not used variable 'act'

2019-05-03 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c: In function 'mvpp2_cls_c2_build_match': drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c:1159:28: warning: variable 'act' set but not used [-Wunused-but-set-variable] It is never used since introduction

Re: [PATCH net-next 0/2] mv88e6xxx: Disable ports to save power

2019-05-03 Thread David Miller
From: Andrew Lunn Date: Wed, 1 May 2019 00:08:29 +0200 > Save some power by disabling ports. The first patch fully disables a > port when it is runtime disabled. The second disables any ports which > are not used at all. > > Depending on configuration strapping, this can lower the temperature >

Re: [net-next v2 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2019-05-03

2019-05-03 Thread David Miller
From: Jeff Kirsher Date: Fri, 3 May 2019 16:09:28 -0700 > This series contains updates to the i40e driver only. Pulled, thanks Jeff.

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-05-03 Thread Lawrence Brakmo
On 4/8/19, 10:39 AM, "Yuchung Cheng" wrote: On Mon, Apr 8, 2019 at 10:07 AM Eric Dumazet wrote: > > > > On 04/08/2019 09:16 AM, Neal Cardwell wrote: > > On Wed, Apr 3, 2019 at 8:13 PM brakmo wrote: > >> > >> When a packet is dropped when calling queue_xmit in

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-05-03 Thread Lawrence Brakmo
On 4/8/19, 10:07 AM, "Eric Dumazet" wrote: On 04/08/2019 09:16 AM, Neal Cardwell wrote: > On Wed, Apr 3, 2019 at 8:13 PM brakmo wrote: >> >> When a packet is dropped when calling queue_xmit in __tcp_transmit_skb >> and packets_out is 0, it is beneficial to set a

Re: [PATCH v2 bpf-next 5/7] bpf: sysctl for probe_on_drop

2019-05-03 Thread Lawrence Brakmo
Sorry for the delay, due to a combination of changing teams and getting pneumonia. Answers inline, but note that I will be sending a patchset for review that does not include these changes to the probe timer. On 4/8/19, 9:17 AM, "Neal Cardwell" wrote: On Wed, Apr 3, 2019 at 8:13 PM brakmo

Re: [PATCH net-next v2] net: dsa: mv88e6xxx: refine SMI support

2019-05-03 Thread Florian Fainelli
On 5/3/2019 4:28 PM, Vivien Didelot wrote: > The Marvell SOHO switches have several ways to access the internal > registers. One of them being the System Management Interface (SMI), > using the MDC and MDIO pins, with direct and indirect variants. > > In preparation for adding support for other

[PATCH net-next v2] net: dsa: mv88e6xxx: refine SMI support

2019-05-03 Thread Vivien Didelot
The Marvell SOHO switches have several ways to access the internal registers. One of them being the System Management Interface (SMI), using the MDC and MDIO pins, with direct and indirect variants. In preparation for adding support for other register accesses, move the SMI code into its own files

Re: [PATCH] net: dsa: mv88e6xxx: refine SMI support

2019-05-03 Thread Vivien Didelot
Hi Florian, On Fri, 3 May 2019 16:01:38 -0700, Florian Fainelli wrote: > [snip] > > > assert_reg_lock(chip); > > > > - err = mv88e6xxx_smi_read(chip, addr, reg, val); > > + if (chip->smi_ops) > > + err = chip->smi_ops->read(chip, addr, reg, val); > > + else > > You might

[net-next v2 02/11] i40e: change behavior on PF in response to MDD event

2019-05-03 Thread Jeff Kirsher
From: Carolyn Wyborny TX MDD events reported on the PF are the result of the PF misconfiguring a descriptor and not because of "bad actions" by anything else. No need to reset now because if it results in a Tx hang, the Tx hang check will take care of it. Signed-off-by: Carolyn Wyborny Tested-

[net-next v2 11/11] i40e: Introduce recovery mode support

2019-05-03 Thread Jeff Kirsher
From: Alice Michael This patch introduces "recovery mode" to the i40e driver. It is part of a new Any2Any idea of upgrading the firmware. In this approach, it is required for the driver to have support for "transition firmware", that is used for migrating from structured to flat firmware image. I

[net-next v2 07/11] i40e: remove out-of-range comparisons in i40e_validate_cloud_filter

2019-05-03 Thread Jeff Kirsher
From: Jacob Keller The function i40e_validate_cloud_filter checks that the destination and source port numbers are valid by attempting to ensure that the number is non-zero and no larger than 0x. However, the types for the dst_port and src_port variable are __be16 which by definition cannot b

[net-next v2 06/11] i40e: Further implementation of LLDP

2019-05-03 Thread Jeff Kirsher
From: Aleksandr Loktionov This code implements driver code changes necessary for LLDP Agent support. Modified i40e_aq_start_lldp() and i40e_aq_stop_lldp() adding false parameter whether LLDP state should be persistent across power cycles. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bow

[net-next v2 03/11] i40e: remove error msg when vf with port vlan tries to remove vlan 0

2019-05-03 Thread Jeff Kirsher
From: Aleksandr Loktionov VF's attempt to delete vlan 0 when a port vlan is configured is harmless in this case pf driver just does nothing. If vf will try to remove other vlans when a port vlan is configured it will still produce error as before. Signed-off-by: Aleksandr Loktionov Tested-by:

[net-next v2 08/11] i40e: update version number

2019-05-03 Thread Jeff Kirsher
From: Alice Michael Just bumping the version number appropriately. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/

[net-next v2 01/11] i40e: Fix for allowing too many MDD events on VF

2019-05-03 Thread Jeff Kirsher
From: Carolyn Wyborny This patch changes the driver behavior when detecting a VF MDD event. It now disables the VF after one event, which indicates a hw detected problem in the VF. Before this change, the PF would allow a couple of events before doing the reset. Signed-off-by: Carolyn Wyborny

[net-next v2 10/11] i40e: print PCI vendor and device ID during probe

2019-05-03 Thread Jeff Kirsher
From: Stefan Assmann Printing each devices PCI vendor and device ID has the advantage of easily revealing what hardware we're dealing with exactly. It's no longer necessary to match the PCI bus information to the lspci output. Helps with bug reports where no lspci output is available. Output be

[net-next v2 09/11] i40e: fix misleading message about promisc setting on un-trusted VF

2019-05-03 Thread Jeff Kirsher
From: Harshitha Ramamurthy A refactor of the i40e_vc_config_promiscuous_mode_msg function moved the check for un-trusted VF into another function. We have to lie to an un-trusted VF that its request to set promiscuous mode is successful even when it is not because we don't want the VF to find out

[net-next v2 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2019-05-03

2019-05-03 Thread Jeff Kirsher
This series contains updates to the i40e driver only. Carolyn changes the driver behavior to now disable the VF after one MDD event instead of allowing a couple of MDD events before doing the reset. Aleksandr changes the driver to only report an error when a VF tries to remove VLAN when a port VL

[net-next v2 04/11] i40e: ShadowRAM checksum calculation change

2019-05-03 Thread Jeff Kirsher
From: Maciej Paczkowski Due to changes in FW the SW is required to perform double SR dump in some cases. Implementation adds two new steps to update nvm checksum function: * recalculate checksum and check if checksum in NVM is correct * if checksum in NVM is not correct then update it again Sig

[net-next v2 05/11] i40e: Report advertised link modes on 40GBase_LR4, CR4 and fibre

2019-05-03 Thread Jeff Kirsher
From: Adam Ludkiewicz Add assignments for advertising 40GBase_LR4, 40GBase_CR4 and fibre Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) dif

Re: [PATCH] net: dsa: mv88e6xxx: refine SMI support

2019-05-03 Thread Florian Fainelli
On 5/3/19 3:49 PM, Vivien Didelot wrote: > The Marvell SOHO switches have several ways to access the internal > registers. One of them being the System Management Interface (SMI), > using the MDC and MDIO pins, with direct and indirect variants. > > In preparation for adding support for other regi

[PATCH] net: dsa: mv88e6xxx: refine SMI support

2019-05-03 Thread Vivien Didelot
The Marvell SOHO switches have several ways to access the internal registers. One of them being the System Management Interface (SMI), using the MDC and MDIO pins, with direct and indirect variants. In preparation for adding support for other register accesses, move the SMI code into its own files

Re: [PATCH bpf] libbpf: add libbpf_util.h to header install.

2019-05-03 Thread Y Song
On Fri, May 3, 2019 at 12:54 PM William Tu wrote: > > On Thu, May 2, 2019 at 1:18 PM Y Song wrote: > > > > On Thu, May 2, 2019 at 11:34 AM William Tu wrote: > > > > > > The libbpf_util.h is used by xsk.h, so add it to > > > the install headers. > > > > Can we try to change code a little bit to a

RE: Hyperv netvsc - regression for 32-PAE kernel

2019-05-03 Thread Dexuan Cui
> From: linux-hyperv-ow...@vger.kernel.org > On Behalf Of Michael Kelley > Sent: Thursday, May 2, 2019 3:24 PM > To: Juliana Rodrigueiro ; > linux-hyp...@vger.kernel.org > Cc: netdev@vger.kernel.org > Subject: RE: Hyperv netvsc - regression for 32-PAE kernel > > From: Juliana Rodrigueiro Sent: T

Re: [PATCH bpf] libbpf: add libbpf_util.h to header install.

2019-05-03 Thread William Tu
On Thu, May 2, 2019 at 1:18 PM Y Song wrote: > > On Thu, May 2, 2019 at 11:34 AM William Tu wrote: > > > > The libbpf_util.h is used by xsk.h, so add it to > > the install headers. > > Can we try to change code a little bit to avoid exposing libbpf_util.h? > Originally libbpf_util.h is considered

[PATCH net] um: vector netdev: adjust to xmit_more API change

2019-05-03 Thread Johannes Berg
From: Johannes Berg Replace skb->xmit_more usage by netdev_xmit_more(). Fixes: 4f296edeb9d4 ("drivers: net: aurora: use netdev_xmit_more helper") Signed-off-by: Johannes Berg --- arch/um/drivers/vector_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/drivers/v

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Set STP disable state in port_disable

2019-05-03 Thread Florian Fainelli
On 4/30/19 3:08 PM, Andrew Lunn wrote: > When requested to disable a port, set the port STP state to disabled. > This fully disables the port and should save some power. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next 2/2] net: dsa :mv88e6xxx: Disable unused ports

2019-05-03 Thread Florian Fainelli
On 4/30/19 3:08 PM, Andrew Lunn wrote: > If the NO_CPU strap is set, the switch starts in 'dumb hub' mode, with > all ports enable. Ports which are then actively used are reconfigured > as required when the driver starts. However unused ports are left > alone. Change this to disable them, and turn

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Eric Dumazet
On 5/3/19 11:58 AM, Peter Oskolkov wrote: > On Fri, May 3, 2019 at 8:52 AM Eric Dumazet wrote: >> >> On Fri, May 3, 2019 at 11:33 AM Peter Oskolkov wrote: >>> >>> This skb_get was introduced by commit >>> 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 >>> "ipv6: frags: rewrite ip6_expire_frag_queue

Re: 32-bit zext JIT efficiency (Was Re: [PATCH bpf-next] selftests/bpf: two scale tests)

2019-05-03 Thread Jiong Wang
Jiong Wang writes: >> > if you can craft a test that shows patch_insn issue before your set, >> > then it's ok to hack bpf_fill_scale1 to use alu64. >> >> As described above, does the test_verifier 732 + jit blinding looks >> convincing? >> >> > I would also prefer to go with option 2 (new zext

Re: bpftool doc man page build failure

2019-05-03 Thread Yonghong Song
On 5/3/19 9:54 AM, Quentin Monnet wrote: > 2019-05-03 16:21 UTC+ ~ Yonghong Song >> Quentin, >> >> I hit the following errors with latest bpf-next. >> >> -bash-4.4$ make man >> GEN bpftool-perf.8 >> GEN bpftool-map.8 >> GEN bpftool.8 >> GEN bpftool-net.8 >

Re: bpftool doc man page build failure

2019-05-03 Thread Quentin Monnet
2019-05-03 16:21 UTC+ ~ Yonghong Song > Quentin, > > I hit the following errors with latest bpf-next. > > -bash-4.4$ make man >GEN bpftool-perf.8 >GEN bpftool-map.8 >GEN bpftool.8 >GEN bpftool-net.8 >GEN bpftool-feature.8 >GEN bpftool-pro

bpftool doc man page build failure

2019-05-03 Thread Yonghong Song
Quentin, I hit the following errors with latest bpf-next. -bash-4.4$ make man GEN bpftool-perf.8 GEN bpftool-map.8 GEN bpftool.8 GEN bpftool-net.8 GEN bpftool-feature.8 GEN bpftool-prog.8 GEN bpftool-cgroup.8 GEN bpftool-btf.8 GEN

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Peter Oskolkov
On Fri, May 3, 2019 at 8:52 AM Eric Dumazet wrote: > > On Fri, May 3, 2019 at 11:33 AM Peter Oskolkov wrote: > > > > This skb_get was introduced by commit > > 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 > > "ipv6: frags: rewrite ip6_expire_frag_queue()", and the rbtree patch > > is not in 4.4, wher

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-03 Thread Florian Westphal
Eric Dumazet wrote: On 5/3/19 2:07 AM, Steffen Klassert wrote: > > On Wed, Apr 24, 2019 at 12:40:23PM +0200, Florian Westphal wrote: > >> I'm not sure this is a good idea to begin with, refcount > >> is right next to state spinlock which is taken for both tx and rx ops, > >> plus this complicates

[PATCH v2 net] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-05-03 Thread David Ahern
From: David Ahern Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to INADDR_ANY, but neigh_xmit which is used for MPLS encapsulations was not updated to use the altered key. The result is that every packet Tx does a lookup on the gateway address which does not find an entry, a new

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Eric Dumazet
On Fri, May 3, 2019 at 11:33 AM Peter Oskolkov wrote: > > This skb_get was introduced by commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 > "ipv6: frags: rewrite ip6_expire_frag_queue()", and the rbtree patch > is not in 4.4, where the bug is reported at. > Shouldn't the "Fixes" tag also reference

[PATCH ipsec-next 3/6] xfrm: remove init_flags indirection from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
There is only one implementation of this function; just call it directly. Signed-off-by: Florian Westphal --- include/net/xfrm.h | 1 - net/ipv4/xfrm4_state.c | 8 net/xfrm/xfrm_state.c | 17 +++-- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/includ

[PATCH ipsec-next 2/6] xfrm: remove init_temprop indirection from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
same as previous patch: just place this in the caller, no need to have an indirection for a structure initialization. Signed-off-by: Florian Westphal --- include/net/xfrm.h | 4 net/ipv4/xfrm4_state.c | 16 net/ipv6/xfrm6_state.c | 16 net/xfrm/xfrm_st

[PATCH ipsec-next 0/6] xfrm: reduce xfrm_state_afinfo size

2019-05-03 Thread Florian Westphal
xfrm_state_afinfo is a very large struct; its over 4kbyte on 64bit systems. The size comes from two arrays to store the l4 protocol type pointers (esp, ah, ipcomp and so on). There are only a handful of those, so just use pointers for protocols that we implement instead of mostly-empty arrays. T

[PATCH ipsec-next 5/6] xfrm: remove eth_proto value from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
xfrm_prepare_input needs to lookup the state afinfo backend again to fetch the address family ethernet protocol value. There are only two address families, so a switch statement is simpler. While at it, use u8 for family and proto and remove the owner member -- its not used anywhere. Signed-off-b

[PATCH ipsec-next 6/6] xfrm: remove type and offload_type map from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
Only a handful of xfrm_types exist, no need to have 512 pointers for them. Reduces size of afinfo struct from 4k to 120 bytes on 64bit platforms. Also, the unregister function doesn't need to return an error, no single caller does anything useful with it. Just place a WARN_ON() where needed inst

[PATCH ipsec-next 1/6] xfrm: remove init_tempsel indirection from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
Simple initialization, handle it in the caller. Signed-off-by: Florian Westphal --- include/net/xfrm.h | 2 -- net/ipv4/xfrm4_state.c | 19 -- net/ipv6/xfrm6_state.c | 21 net/xfrm/xfrm_state.c | 56 -- 4 files changed, 4

[PATCH ipsec-next 4/6] xfrm: remove state and template sort indirections from xfrm_state_afinfo

2019-05-03 Thread Florian Westphal
No module dependency, placing this in xfrm_state.c avoids need for an indirection. This also removes the state spinlock -- I don't see why we would need to hold it during sorting. This in turn allows to remove the 'net' argument passed to xfrm_tmpl_sort. Last, remove the EXPORT_SYMBOL, there are

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Peter Oskolkov
On Fri, May 3, 2019 at 4:47 AM Eric Dumazet wrote: > > Since ip6frag_expire_frag_queue() now pulls the head skb > from frag queue, we should no longer use skb_get(), since > this leads to an skb leak. > > Stefan Bader initially reported a problem in 4.4.stable [1] caused > by the skb_get(), so thi

[PATCH v2 net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Eric Dumazet
Since ip6frag_expire_frag_queue() now pulls the head skb from frag queue, we should no longer use skb_get(), since this leads to an skb leak. Stefan Bader initially reported a problem in 4.4.stable [1] caused by the skb_get(), so this patch should also fix this issue. 296583.091021] kernel BUG at

[RFC PATCH net-next 3/3] flow_offload: support CVLAN match

2019-05-03 Thread Edward Cree
Plumb it through from the flow_dissector. Signed-off-by: Edward Cree --- include/net/flow_offload.h | 2 ++ net/core/flow_offload.c| 7 +++ 2 files changed, 9 insertions(+) diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h index 6f59cdaf6eb6..48847ee7aa3a 100644 --- a

[RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-03 Thread Edward Cree
Introduce a new offload command TC_CLSFLOWER_STATS_BYINDEX, similar to the existing TC_CLSFLOWER_STATS but specifying an action_index (the tcfa_index of the action), which is called for each stats-having action on the rule. Drivers should implement either, but not both, of these commands. Sig

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Nicolas Dichtel
Le 03/05/2019 à 13:47, Eric Dumazet a écrit : > Since ip6frag_expire_frag_queue() now pulls the head skb > from frag queue, we should no longer use skb_get(), since > this leads to an skb leak. > > Stefan Bader initially reported a problem in 4.4.stable [1] caused > by the skb_get(), so this patch

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Eric Dumazet
On Fri, May 3, 2019 at 10:55 AM Nicolas Dichtel wrote: > > Le 03/05/2019 à 13:47, Eric Dumazet a écrit : > > Since ip6frag_expire_frag_queue() now pulls the head skb > > from frag queue, we should no longer use skb_get(), since > > this leads to an skb leak. > > > > Stefan Bader initially reported

[RFC PATCH net-next 1/3] flow_offload: copy tcfa_index into flow_action_entry

2019-05-03 Thread Edward Cree
Required for support of shared counters (and possibly other shared per- action entities in future). Signed-off-by: Edward Cree --- include/net/flow_offload.h | 1 + net/sched/cls_api.c| 1 + 2 files changed, 2 insertions(+) diff --git a/include/net/flow_offload.h b/include/net/flow_off

[PATCH net-next 4/4] net: use indirect calls helpers at the socket layer

2019-05-03 Thread Paolo Abeni
This avoids an indirect call per {send,recv}msg syscall in the common (IPv6 or IPv4 socket) case. Signed-off-by: Paolo Abeni --- net/socket.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/net/socket.c b/net/socket.c index a180e1a9ff23..472fbefa5d9b 100

[PATCH net-next 1/4] net: use indirect calls helpers for ptype hook

2019-05-03 Thread Paolo Abeni
This avoids an indirect call per RX IPv6/IPv4 packet. Note that we don't want to use the indirect calls helper for taps. Signed-off-by: Paolo Abeni --- net/core/dev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 22f2640f559a..108

[PATCH net-next 0/4] net: extend indirect calls helper usage

2019-05-03 Thread Paolo Abeni
This series applies the indirect calls helper introduced with commit 283c16a2dfd3 ("indirect call wrappers: helpers to speed-up indirect calls of builtin") to more hooks inside the network stack. Overall this avoids up to 4 indirect calls for each RX packets, giving small but measurable gain TCP

[PATCH net-next 3/4] net: use indirect calls helpers at early demux stage

2019-05-03 Thread Paolo Abeni
So that we avoid another indirect call per RX packet, if early demux is enabled. Signed-off-by: Paolo Abeni --- net/ipv4/ip_input.c | 5 - net/ipv6/ip6_input.c | 5 - net/ipv6/tcp_ipv6.c | 2 +- net/ipv6/udp.c | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 2/4] net: use indirect calls helpers for L3 handler hooks

2019-05-03 Thread Paolo Abeni
So that we avoid another indirect call per RX packet in the common case. Signed-off-by: Paolo Abeni --- net/ipv4/ip_input.c | 6 +- net/ipv6/ip6_input.c | 7 ++- net/ipv6/tcp_ipv6.c | 3 ++- net/ipv6/udp.c | 3 ++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/n

[RFC PATCH net-next 0/3] flow_offload: Re-add various features that disappeared

2019-05-03 Thread Edward Cree
When the flow_offload infrastructure was added, a couple of things that were previously possible for drivers to support in TC offload were not plumbed through, perhaps because the drivers in the tree did not fully or correctly implement them. The main issue was with statistics; in TC (and in the

[PATCH v4 00/10] of_net: Add NVMEM support to of_get_mac_address

2019-05-03 Thread Petr Štetiar
Hi, this patch series is a continuation of my previous attempt[1], where I've tried to wire MTD layer into of_get_mac_address, so it would be possible to load MAC addresses from various NVMEMs as EEPROMs etc. Predecessor of this patch which used directly MTD layer has originated in OpenWrt some t

Re: [PATCH net-next 2/2] net: dsa :mv88e6xxx: Disable unused ports

2019-05-03 Thread Vivien Didelot
On Wed, 1 May 2019 00:08:31 +0200, Andrew Lunn wrote: > If the NO_CPU strap is set, the switch starts in 'dumb hub' mode, with > all ports enable. Ports which are then actively used are reconfigured > as required when the driver starts. However unused ports are left > alone. Change this to disabl

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Set STP disable state in port_disable

2019-05-03 Thread Vivien Didelot
On Wed, 1 May 2019 00:08:30 +0200, Andrew Lunn wrote: > When requested to disable a port, set the port STP state to disabled. > This fully disables the port and should save some power. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot

Re: [PATCH v6 bpf-next 13/17] s390: bpf: eliminate zero extension code-gen

2019-05-03 Thread Jiong Wang
Heiko Carstens writes: > On Fri, May 03, 2019 at 11:42:40AM +0100, Jiong Wang wrote: >> Cc: Martin Schwidefsky >> Cc: Heiko Carstens >> Signed-off-by: Jiong Wang >> --- >> arch/s390/net/bpf_jit_comp.c | 20 +--- >> 1 file changed, 17 insertions(+), 3 deletions(-) > > When sen

Re: [PATCH v6 bpf-next 13/17] s390: bpf: eliminate zero extension code-gen

2019-05-03 Thread Eric Dumazet
On 5/3/19 9:41 AM, Heiko Carstens wrote: > On Fri, May 03, 2019 at 11:42:40AM +0100, Jiong Wang wrote: >> Cc: Martin Schwidefsky >> Cc: Heiko Carstens >> Signed-off-by: Jiong Wang >> --- >> arch/s390/net/bpf_jit_comp.c | 20 +--- >> 1 file changed, 17 insertions(+), 3 deletio

[PATCH] net: ucc_geth - fix Oops when changing number of buffers in the ring

2019-05-03 Thread Christophe Leroy
When changing the number of buffers in the RX ring while the interface is running, the following Oops is encountered due to the new number of buffers being taken into account immediately while their allocation is done when opening the device only. [ 69.882706] Unable to handle kernel paging requ

Re: [PATCH v6 bpf-next 13/17] s390: bpf: eliminate zero extension code-gen

2019-05-03 Thread Heiko Carstens
On Fri, May 03, 2019 at 11:42:40AM +0100, Jiong Wang wrote: > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Signed-off-by: Jiong Wang > --- > arch/s390/net/bpf_jit_comp.c | 20 +--- > 1 file changed, 17 insertions(+), 3 deletions(-) When sending patches which affect s390, could

Re: [PATCH net-next] ipmr: Do not define MAXVIFS twice

2019-05-03 Thread Nikolay Aleksandrov
On 03/05/2019 01:23, David Ahern wrote: > From: David Ahern > > b70432f7319eb refactored mroute code to make it common between ipv4 > and ipv6. In the process, MAXVIFS got defined a second time: the > first is in the uapi file linux/mroute.h. A second one was created > presumably for IPv6 but it

[PATCH 2/2 net-next] net: ll_temac: remove an unnecessary condition

2019-05-03 Thread Dan Carpenter
The "pdata->mdio_bus_id" is unsigned so this condition is always true. This patch just removes it. Signed-off-by: Dan Carpenter --- drivers/net/ethernet/xilinx/ll_temac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xilinx/ll_temac_mdio.c b/drive

[PATCH 1/2 net-next] net: ll_temac: Fix an NULL vs IS_ERR() check in temac_open()

2019-05-03 Thread Dan Carpenter
The phy_connect() function doesn't return NULL pointers. It returns error pointers on error, so I have updated the check. Fixes: 8425c41d1ef7 ("net: ll_temac: Extend support to non-device-tree platforms") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/xilinx/ll_temac_main.c | 4 ++-- 1

[PATCH net] net: atm: clean up a range check

2019-05-03 Thread Dan Carpenter
The code works fine but the problem is that check for negatives is a no-op: if (arg < 0) i = 0; The "i" value isn't used. We immediately overwrite it with: i = array_index_nospec(arg, MAX_LEC_ITF); The array_index_nospec() macro returns zero if "arg" is out of b

Re: Possible refcount bug in ip6_expire_frag_queue()?

2019-05-03 Thread Stefan Bader
On 03.05.19 13:49, Eric Dumazet wrote: > On Fri, May 3, 2019 at 7:17 AM Eric Dumazet wrote: >> >> On Fri, May 3, 2019 at 7:12 AM Eric Dumazet wrote: >>> > >>> I will send the following fix >>> >>> diff --git a/include/net/ipv6_frag.h b/include/net/ipv6_frag.h >>> index >>> 28aa9b30aeceac9a86ee6

Re: [RFC HACK] xfrm: make state refcounting percpu

2019-05-03 Thread Eric Dumazet
On 5/3/19 2:07 AM, Steffen Klassert wrote: > On Wed, Apr 24, 2019 at 12:40:23PM +0200, Florian Westphal wrote: >> I'm not sure this is a good idea to begin with, refcount >> is right next to state spinlock which is taken for both tx and rx ops, >> plus this complicates debugging quite a bit. >

Re: [linux-sunxi] [PATCH v4 5/9] arm64: dts: allwinner: orange-pi-3: Enable ethernet

2019-05-03 Thread Jagan Teki
On Sat, Apr 13, 2019 at 10:24 PM megous via linux-sunxi wrote: > > From: Ondrej Jirman > > Orange Pi 3 has two regulators that power the Realtek RTL8211E. According > to the phy datasheet, both regulators need to be enabled at the same time, > but we can only specify a single phy-supply in the DT

Re: Possible refcount bug in ip6_expire_frag_queue()?

2019-05-03 Thread Eric Dumazet
On Fri, May 3, 2019 at 7:17 AM Eric Dumazet wrote: > > On Fri, May 3, 2019 at 7:12 AM Eric Dumazet wrote: > > > > I will send the following fix > > > > diff --git a/include/net/ipv6_frag.h b/include/net/ipv6_frag.h > > index > > 28aa9b30aeceac9a86ee6754e4b5809be115e947..d3152811b8962705a508b3fd

[PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Eric Dumazet
Since ip6frag_expire_frag_queue() now pulls the head skb from frag queue, we should no longer use skb_get(), since this leads to an skb leak. Stefan Bader initially reported a problem in 4.4.stable [1] caused by the skb_get(), so this patch should also fix this issue. 296583.091021] kernel BUG at

[patch net-next] devlink: add warning in case driver does not set port type

2019-05-03 Thread Jiri Pirko
From: Jiri Pirko Prevent misbehavior of drivers who would not set port type for longer period of time. Drivers should always set port type. Do WARN if that happens. Note that it is perfectly fine to temporarily not have the type set, during initialization and port type change. Signed-off-by: Ji

Re: Possible refcount bug in ip6_expire_frag_queue()?

2019-05-03 Thread Eric Dumazet
On Fri, May 3, 2019 at 7:12 AM Eric Dumazet wrote: > > On Fri, May 3, 2019 at 5:17 AM Stefan Bader > wrote: > > > > In commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 "ipv6: frags: > > rewrite ip6_expire_frag_queue()" this function got changed to > > be like ip_expire() (after dropping a clone t

Re: Possible refcount bug in ip6_expire_frag_queue()?

2019-05-03 Thread Eric Dumazet
On Fri, May 3, 2019 at 5:17 AM Stefan Bader wrote: > > In commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 "ipv6: frags: > rewrite ip6_expire_frag_queue()" this function got changed to > be like ip_expire() (after dropping a clone there). > This was backported to 4.4.y stable (amongst other stable

[PATCH net-next] drivers: net: davinci_mdio: fix return value check in davinci_mdio_probe()

2019-05-03 Thread Wei Yongjun
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 03f66f067560 ("net: ethernet: ti: davinci_mdio: use devm_ioremap()") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/davi

[PATCH v6 bpf-next 08/17] libbpf: add "prog_flags" to bpf_program/bpf_prog_load_attr/bpf_load_program_attr

2019-05-03 Thread Jiong Wang
libbpf doesn't allow passing "prog_flags" during bpf program load in a couple of load related APIs, "bpf_load_program_xattr", "load_program" and "bpf_prog_load_xattr". It makes sense to allow passing "prog_flags" which is useful for customizing program loading. Reviewed-by: Jakub Kicinski Signed

[PATCH v6 bpf-next 11/17] arm: bpf: eliminate zero extension code-gen

2019-05-03 Thread Jiong Wang
Cc: Shubham Bansal Signed-off-by: Jiong Wang --- arch/arm/net/bpf_jit_32.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index c8bfbbf..a6f78c8 100644 --- a/arch/arm/net/bpf_jit_32.c

[PATCH v6 bpf-next 17/17] nfp: bpf: eliminate zero extension code-gen

2019-05-03 Thread Jiong Wang
This patch eliminate zero extension code-gen for instructions including both alu and load/store. The only exception is for ctx load, because offload target doesn't go through host ctx convert logic so we do customized load and ignores zext flag set by verifier. Reviewed-by: Jakub Kicinski Signed-

  1   2   >