[PATCH] net: ll_temac: Fix typo bug for 32-bit

2019-05-01 Thread Esben Haabendal
Fixes: d84aec42151b ("net: ll_temac: Fix support for 64-bit platforms") Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll

Re: [net-next][PATCH v2 1/2] rds: handle unsupported rdma request to fs dax memory

2019-05-01 Thread Leon Romanovsky
On Wed, May 01, 2019 at 10:54:00AM -0700, Santosh Shilimkar wrote: > On 5/1/2019 12:44 AM, Leon Romanovsky wrote: > > On Mon, Apr 29, 2019 at 04:37:19PM -0700, Santosh Shilimkar wrote: > > > From: Hans Westgaard Ry > > > > > > RDS doesn't support RDMA on memory apertures that require On Demand > >

Re: [net-next][PATCH v2 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-05-01 Thread Leon Romanovsky
On Wed, May 01, 2019 at 10:54:50AM -0700, Santosh Shilimkar wrote: > On 5/1/2019 12:45 AM, Leon Romanovsky wrote: > > On Mon, Apr 29, 2019 at 04:37:20PM -0700, Santosh Shilimkar wrote: > > > RDS doesn't support RDMA on memory apertures that require On Demand > > > Paging (ODP), such as FS DAX memor

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

2019-05-01 Thread Cong Wang
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 to have a generic tracepoint to monitor this kind of TX timeout.

Re: [PATCH net] udp: fix GRO packet of death

2019-05-01 Thread David Miller
From: Eric Dumazet Date: Wed, 1 May 2019 18:56:28 -0700 > syzbot was able to crash host by sending UDP packets with a 0 payload. > > TCP does not have this issue since we do not aggregate packets without > payload. > > Since dev_gro_receive() sets gso_size based on skb_gro_len(skb) > it seems

[PATCH net] udp: fix GRO packet of death

2019-05-01 Thread Eric Dumazet
syzbot was able to crash host by sending UDP packets with a 0 payload. TCP does not have this issue since we do not aggregate packets without payload. Since dev_gro_receive() sets gso_size based on skb_gro_len(skb) it seems not worth trying to cope with padded packets. BUG: KASAN: slab-out-of-bo

[PATCH net] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-05-01 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

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

2019-05-01 Thread David Ahern
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 created the gc_entries counter is bumped in neigh_alloc to check if a new one

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

2019-05-01 Thread Cong Wang
On Wed, May 1, 2019 at 6:11 AM Eran Ben Elisha wrote: > > > > On 4/30/2019 9:50 PM, Cong Wang wrote: > > 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.

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

2019-05-01 Thread David Miller
From: Saeed Mahameed Date: Wed, 1 May 2019 21:43:41 + > Hi Dave, i will be sending V2 to include latest fix from mlx5-next > branch. Ok.

Re: MPLS encapsulation and arp table overflow

2019-05-01 Thread David Ahern
On 5/1/19 10:03 AM, Alan Maguire wrote: > I'm seeing the following repeated error > > [ 130.821362] neighbour: arp_cache: neighbor table overflow! > > when using MPLSoverGRE or MPLSoverUDP tunnels on bits synced > with bpf-next as of this morning. The test script below reliably > reproduces the

Re: [PATCH 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-01 Thread Andrew Lunn
On Wed, May 01, 2019 at 10:45:03PM +0200, Hauke Mehrtens wrote: Hi Hauke /* Add the LAN port into a bridge with the CPU port by > + * default. This prevents automatic forwarding of > + * packages between the LAN ports when no explicit > + * bridge is configured. > + */ > +static int gswip_add_sig

[net-next V2 10/15] net/mlx5: Remove unused mlx5_query_nic_vport_vlans

2019-05-01 Thread Saeed Mahameed
From: Bodong Wang mlx5_query_nic_vport_vlans() is not used anymore. Hence remove it. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/vport.c | 61 --- inc

[net-next V2 15/15] net/mlx5: E-Switch, Use atomic rep state to serialize state change

2019-05-01 Thread Saeed Mahameed
From: Bodong Wang When the state of rep was introduced, it was also designed to prevent duplicate unloading of the same rep. Considering the following two flows when an eswitch manager is at switchdev mode with n VF reps loaded. +--+---

[net-next V2 12/15] net/mlx5: Use available mlx5_vport struct

2019-05-01 Thread Saeed Mahameed
From: Parav Pandit Several functions need to access mlx5_vport and vport_num. When these functions are called, caller already has mlx5_vport* available. Hence pass such mlx5_vport pointer. This is preparation patch to add error checks to mlx5_eswitch_get_vport() and to return error status. By do

[net-next V2 08/15] net/mlx5e: Put the common XDP code into a function

2019-05-01 Thread Saeed Mahameed
From: Maxim Mikityanskiy The same code that returns XDP frames and releases pages is used both in mlx5e_poll_xdpsq_cq and mlx5e_free_xdpsq_descs. Create a function that cleans up an MPWQE. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/

[net-next V2 09/15] net/mlx5e: remove meaningless CFLAGS_tracepoint.o

2019-05-01 Thread Saeed Mahameed
From: Masahiro Yamada CFLAGS_tracepoint.o specifies CFLAGS for compiling tracepoint.c but it does not exist under drivers/net/ethernet/mellanox/mlx5/core/. CFLAGS_tracepoint.o is unused. Signed-off-by: Masahiro Yamada Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/

[net-next V2 11/15] net/mlx5: Reuse mlx5_esw_for_each_vf_vport macro in two files

2019-05-01 Thread Saeed Mahameed
From: Parav Pandit Currently mlx5_esw_for_each_vf_vport iterates over mlx5_vport entries in eswitch.c Same macro in eswitch_offloads.c iterates over vport number in eswitch_offloads.c Instead of duplicate macro names, to avoid confusion and to reuse the same macro in both files, move it to eswit

[net-next V2 07/15] net/mlx5e: ethtool, Add support for EEPROM high pages query

2019-05-01 Thread Saeed Mahameed
From: Erez Alfasi Add the support to read additional EEPROM information from high pages. Information for modules such as SFF-8436 and SFF-8636: 1) Application select table 2) User writable EEPROM 3) Thresholds and alarms Signed-off-by: Erez Alfasi Signed-off-by: Saeed Mahameed --- .../ethe

[net-next V2 03/15] net/mlx5e: ACLs for priority tag mode

2019-05-01 Thread Saeed Mahameed
From: Eli Britstein Current ConnectX HW is unable to perform VLAN pop in TX path and VLAN push on RX path. As a workaround, untagged packets are tagged with VID 0x000 allowing pop/push actions to be exchanged with VLAN rewrite actions. Use the ingress ACL table, preceding the FDB, to push VLAN 0x

[net-next V2 06/15] ethtool: Add SFF-8436 and SFF-8636 max EEPROM length definitions

2019-05-01 Thread Saeed Mahameed
From: Erez Alfasi Added max EEPROM length defines for ethtool usage: #define ETH_MODULE_SFF_8636_MAX_LEN 640 #define ETH_MODULE_SFF_8436_MAX_LEN 640 These definitions are used to determine the EEPROM data length when reading high eeprom pages. For example, SFF-8636 EEPROM data from pa

[net-next V2 04/15] net/mlx5e: Replace TC VLAN pop with VLAN 0 rewrite in prio tag mode

2019-05-01 Thread Saeed Mahameed
From: Eli Britstein Current ConnectX HW is unable to perform VLAN pop in TX path and VLAN push on RX path. To workaround that limitation untagged packets are tagged with VLAN ID 0x000 (priority tag) and pop/push actions are replaced by VLAN re-write actions (which are supported by the HW). Replac

[net-next V2 02/15] net/mlx5e: Turn on HW tunnel offload in all TIRs

2019-05-01 Thread Saeed Mahameed
From: Tariq Toukan Hardware requires that all TIRs that steer traffic to the same RQ should share identical tunneled_offload_en value. For that, the tunneled_offload_en bit should be set/unset (according to the HW capability) for all TIRs', not only the ones dedicated for tunneled (inner) traffic

[net-next V2 14/15] net/mlx5: E-Switch, Fix the check of legal vport

2019-05-01 Thread Saeed Mahameed
From: Bodong Wang The check of legal vport is to ensure the vport number falls between 0 and total number of vports. Along with the introduction of uplink rep, enabled vports are not consecutive any more. Therefore, rely on the eswitch vport getter function to check if it's a valid vport. As the

[net-next V2 13/15] net/mlx5: E-Switch, Use getter to access all vport array

2019-05-01 Thread Saeed Mahameed
From: Bodong Wang Some functions issue vport commands and access vport array using vport_index/vport_num interchangeably which is OK for VFs vports. However, this creates potential bug if those vports are not VFs (E.g, uplink, sf) where their vport_index don't equal to vport_num. Prepare code to

[net-next V2 05/15] net/mlx5e: Return error when trying to insert existing flower filter

2019-05-01 Thread Saeed Mahameed
From: Vlad Buslov With unlocked TC it is possible to have spurious deletes and inserts of same filter. TC layer needs drivers to always return error when flow insertion failed in order to correctly calculate "in_hw_count" for each filter. Fix mlx5e_configure_flower() to return -EEXIST when TC tri

[net-next V2 01/15] net/mlx5e: Take common TIR context settings into a function

2019-05-01 Thread Saeed Mahameed
From: Tariq Toukan Many TIR context settings are common to different TIR types, take them into a common function. Signed-off-by: Tariq Toukan Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_main.c | 49 --- 1 file changed, 21 in

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

2019-05-01 Thread Saeed Mahameed
Hi Dave, 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 ethtool usage: #define ETH_MODULE_SFF_8636_MAX_LEN 640

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

2019-05-01 Thread Saeed Mahameed
On Tue, 2019-04-30 at 20:39 +, Saeed Mahameed wrote: > Hi Dave, > > 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 de

Re: [PATCH net] ipv6: A few fixes on dereferencing rt->from

2019-05-01 Thread David Miller
From: Martin KaFai Lau Date: Tue, 30 Apr 2019 10:45:12 -0700 > It is a followup after the fix in > commit 9c69a1320515 ("route: Avoid crash from dereferencing NULL rt->from") > > rt6_do_redirect(): > 1. NULL checking is needed on rt->from because a parallel >fib6_info delete could happen tha

Re: [PATCH net] ipv6: A few fixes on dereferencing rt->from

2019-05-01 Thread Eric Dumazet
On 4/30/19 10:45 AM, Martin KaFai Lau wrote: > It is a followup after the fix in > commit 9c69a1320515 ("route: Avoid crash from dereferencing NULL rt->from") > > rt6_do_redirect(): > 1. NULL checking is needed on rt->from because a parallel >fib6_info delete could happen that sets rt->from

Re: [PATCH mlx5-next] net/mlx5: Fix broken hca cap offset

2019-05-01 Thread Saeed Mahameed
On Wed, 2019-05-01 at 03:21 +, Saeed Mahameed wrote: > The cited commit broke the offsets of hca cap struct, fix it. > While at it, cleanup a white space introduced by the same commit. > > Fixes: b169e64a2444 ("net/mlx5: Geneve, Add flow table capabilities > for Geneve decap with TLV options")

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

2019-05-01 Thread Saeed Mahameed
On Wed, 2019-05-01 at 13:11 +, Eran Ben Elisha wrote: > > On 4/30/2019 9:50 PM, Cong Wang wrote: > > 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.

[PATCH 2/5] net: dsa: lantiq: Add VLAN unaware bridge offloading

2019-05-01 Thread Hauke Mehrtens
This allows to offload bridges with DSA to the switch hardware and do the packet forwarding in hardware. This implements generic functions to access the switch hardware tables, which are used to control many features of the switch. This patch activates the MAC learning by removing the MAC address

[PATCH 4/5] net: dsa: lantiq: Add fast age function

2019-05-01 Thread Hauke Mehrtens
Fast aging per port is not supported directly by the hardware, it is only possible to configure a global aging time. Do the fast aging by iterating over the MAC forwarding table and remove all dynamic entries for a given port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 3

[PATCH 5/5] net: dsa: lantiq: Add Forwarding Database access

2019-05-01 Thread Hauke Mehrtens
This adds functions to add and remove static entries to and from the forwarding database and dump the full forwarding database. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 98 ++ 1 file changed, 98 insertions(+) diff --git a/drivers/net/dsa

[PATCH 1/5] net: dsa: lantiq: Allow special tags only on CPU port

2019-05-01 Thread Hauke Mehrtens
Allow the special tag in ingress only on the CPU port and not on all ports. A packet with a special tag could circumvent the hardware forwarding and should only be allowed on the CPU port where Linux controls the port. Signed-off-by: Hauke Mehrtens --- drivers/net/dsa/lantiq_gswip.c | 6 --

[PATCH 3/5] net: dsa: lantiq: Add VLAN aware bridge offloading

2019-05-01 Thread Hauke Mehrtens
The VLAN aware bridge offloading is similar to the VLAN unaware offloading, this makes it possible to offload the VLAN bridge functionalities. The hardware supports up to 64 VLAN bridge entries, we already use one entry for each LAN port to prevent forwarding of packets between the ports when the

[PATCH 0/5] net: dsa: lantiq: Add bridge offloading

2019-05-01 Thread Hauke Mehrtens
This adds bridge offloading for the Intel / Lantiq GSWIP 2.1 switch. Hauke Mehrtens (5): net: dsa: lantiq: Allow special tags only on CPU port net: dsa: lantiq: Add VLAN unaware bridge offloading net: dsa: lantiq: Add VLAN aware bridge offloading net: dsa: lantiq: Add fast age function n

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

2019-05-01 Thread Andrew Lunn
On Wed, May 01, 2019 at 09:34:43PM +0200, Heiner Kallweit wrote: > 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 w

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

2019-05-01 Thread Andrew Lunn
On Wed, May 01, 2019 at 10:14:21PM +0200, Heiner Kallweit wrote: > 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. Ther

Re: Bug#927825: arm: mvneta driver used on Armada XP GP boards does not receive packets (regression from 4.9)

2019-05-01 Thread Aurelien Jarno
Hi, On 2019-05-01 00:04, Aurelien Jarno wrote: > On 2019-04-30 10:12, Uwe Kleine-König wrote: > > > > More precisely the board is a "Marvell Armada XP Development Board > > > > DB-MV784MP-GP" > > > > > > > > > anymore. Using tcpdump on both the buildd and a remote host, it > > > > > appears > >

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

2019-05-01 Thread Heiner Kallweit
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. Therefore, when resuming, we shouldn't expect that what the PHY advertises is

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

2019-05-01 Thread Heiner Kallweit
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 trigger advertising pause, and that's not what we want. Therefore add

[PATCH net] net: phy: fix phy_validate_pause

2019-05-01 Thread Heiner Kallweit
We have valid scenarios where ETHTOOL_LINK_MODE_Pause_BIT doesn't need to be supported. Therefore extend the first check to check for rx_pause being set. See also phy_set_asym_pause: rx=0 and tx=1: advertise asym pause only rx=0 and tx=0: stop advertising both pause modes The fixed commit isn't w

Re: [PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-05-01 Thread Heiner Kallweit
On 30.04.2019 07:06, Heiner Kallweit wrote: > On 29.04.2019 23:52, Andrew Lunn wrote: >>> @@ -2078,6 +2089,11 @@ EXPORT_SYMBOL(phy_set_sym_pause); >>> void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) >>> { >>> __ETHTOOL_DECLARE_LINK_MODE_MASK(oldadv); >>> + bool asym_pau

Re: [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed

2019-05-01 Thread David Miller
From: Hangbin Liu Date: Tue, 30 Apr 2019 10:46:10 +0800 > Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests") > Signed-off-by: Hangbin Liu Applied.

Re: [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe()

2019-05-01 Thread David Miller
From: YueHaibing Date: Tue, 30 Apr 2019 01:55:24 + > Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe, > The proper pointer to use is clk instead of mode. > > This issue was detected with the help of Coccinelle. > > Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group com

Re: [PATCH v2 3/7] net: Use skb accessors in network drivers

2019-05-01 Thread Matthew Wilcox
On Wed, May 01, 2019 at 07:44:53AM -0700, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > In preparation for renaming skb_frag fields, use the fine accessors which > already exist. It turns out not all network drivers are under drivers/net. And others aren't built on x86 by allyesco

Re: [net-next][PATCH v2 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-05-01 Thread Santosh Shilimkar
On 5/1/2019 12:45 AM, Leon Romanovsky wrote: On Mon, Apr 29, 2019 at 04:37:20PM -0700, Santosh Shilimkar wrote: RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. A sysctl is added to indicate whether RDMA requiring ODP is supported. Reviewe

Re: [net-next][PATCH v2 1/2] rds: handle unsupported rdma request to fs dax memory

2019-05-01 Thread Santosh Shilimkar
On 5/1/2019 12:44 AM, Leon Romanovsky wrote: On Mon, Apr 29, 2019 at 04:37:19PM -0700, Santosh Shilimkar wrote: From: Hans Westgaard Ry RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. User applications can try to use RDS to perform RDMA

Re: [PATCH net] ipv4: ip_do_fragment: Preserve skb_iif during fragmentation

2019-05-01 Thread David Miller
From: Shmulik Ladkani Date: Mon, 29 Apr 2019 16:39:30 +0300 > Previously, during fragmentation after forwarding, skb->skb_iif isn't > preserved, i.e. 'ip_copy_metadata' does not copy skb_iif from given > 'from' skb. > > As a result, ip_do_fragment's creates fragments with zero skb_iif, > leading

Re: [net-next][PATCH v2 1/2] rds: handle unsupported rdma request to fs dax memory

2019-05-01 Thread Leon Romanovsky
On Mon, Apr 29, 2019 at 04:37:19PM -0700, Santosh Shilimkar wrote: > From: Hans Westgaard Ry > > RDS doesn't support RDMA on memory apertures that require On Demand > Paging (ODP), such as FS DAX memory. User applications can try to use > RDS to perform RDMA over such memories and since it doesn't

Re: [net-next][PATCH v2 2/2] rds: add sysctl for rds support of On-Demand-Paging

2019-05-01 Thread Leon Romanovsky
On Mon, Apr 29, 2019 at 04:37:20PM -0700, Santosh Shilimkar wrote: > RDS doesn't support RDMA on memory apertures that require On Demand > Paging (ODP), such as FS DAX memory. A sysctl is added to indicate > whether RDMA requiring ODP is supported. > > Reviewed-by: Håkon Bugge > Reviewed-tested-by

please let me know

2019-05-01 Thread Mr.Peter Sina
Greeting, Did you received my message? please let me know.Thanks.Mr.Peter Sina.

MPLS encapsulation and arp table overflow

2019-05-01 Thread Alan Maguire
I'm seeing the following repeated error [ 130.821362] neighbour: arp_cache: neighbor table overflow! when using MPLSoverGRE or MPLSoverUDP tunnels on bits synced with bpf-next as of this morning. The test script below reliably reproduces the problem, while working fine on a 4.14 (I haven't bisec

Re: [PATCH net-next v1 0/4] net/sched: taprio change schedules

2019-05-01 Thread David Miller
From: Vinicius Costa Gomes Date: Mon, 29 Apr 2019 15:48:29 -0700 > Overview > > > This RFC has two objectives, it adds support for changing the running > schedules during "runtime", explained in more detail later, and > proposes an interface between taprio and the drivers for hardware >

Re: [PATCH net-next 0/8] undo congestion window on spurious SYN or SYNACK timeout

2019-05-01 Thread David Miller
From: Yuchung Cheng Date: Mon, 29 Apr 2019 15:46:12 -0700 > Linux TCP currently uses the initial congestion window of 1 packet > if multiple SYN or SYNACK timeouts per RFC6298. However such > timeouts are often spurious on wireless or cellular networks that > experience high delay variances (e.g.

Re: [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed

2019-05-01 Thread David Ahern
On 4/29/19 8:46 PM, Hangbin Liu wrote: > Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests") > Signed-off-by: Hangbin Liu > --- > tools/testing/selftests/net/fib_rule_tests.sh | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tools/testing/selftests/net/fib_rule_tests.s

Re: [PATCH net] ipv6: A few fixes on dereferencing rt->from

2019-05-01 Thread David Ahern
On 4/30/19 11:45 AM, Martin KaFai Lau wrote: > It is a followup after the fix in > commit 9c69a1320515 ("route: Avoid crash from dereferencing NULL rt->from") > > rt6_do_redirect(): > 1. NULL checking is needed on rt->from because a parallel >fib6_info delete could happen that sets rt->from to

Re: [PATCH net] net/tls: avoid NULL pointer deref on nskb->sk in fallback

2019-05-01 Thread David Miller
From: Jakub Kicinski Date: Mon, 29 Apr 2019 12:19:12 -0700 > update_chksum() accesses nskb->sk before it has been set > by complete_skb(), move the init up. > > Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") > Signed-off-by: Jakub Kicinski > Reviewed-by: Simon Horman

Re: [PATCH net] selftests: fib_rule_tests: Fix icmp proto with ipv6

2019-05-01 Thread David Miller
From: David Ahern Date: Mon, 29 Apr 2019 10:30:09 -0700 > From: David Ahern > > A recent commit returns an error if icmp is used as the ip-proto for > IPv6 fib rules. Update fib_rule_tests to send ipv6-icmp instead of icmp. > > Fixes: 5e1a99eae8499 ("ipv4: Add ICMPv6 support when parse route i

Re: [PATCH net v2] packet: validate msg_namelen in send directly

2019-05-01 Thread David Miller
From: Willem de Bruijn Date: Mon, 29 Apr 2019 11:53:18 -0400 > From: Willem de Bruijn > > Packet sockets in datagram mode take a destination address. Verify its > length before passing to dev_hard_header. > > Prior to 2.6.14-rc3, the send code ignored sll_halen. This is > established behavior.

Re: [PATCH net v2] packet: in recvmsg msg_name return at least sizeof sockaddr_ll

2019-05-01 Thread David Miller
From: Willem de Bruijn Date: Mon, 29 Apr 2019 11:46:55 -0400 > From: Willem de Bruijn > > Packet send checks that msg_name is at least sizeof sockaddr_ll. > Packet recv must return at least this length, so that its output > can be passed unmodified to packet send. > > This ceased to be true si

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

2019-05-01 Thread Jiong Wang
> > 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 insn) for JITs. > > Got it.

[PATCH v2 5/7] net: Rename skb_frag page to bv_page

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" One step closer to turning the skb_frag_t into a bio_vec. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/skbuff.h | 12 +--- net/core/skbuff.c | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/linux/skbuff.h b

[PATCH v2 2/7] net: Reorder the contents of skb_frag_t

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Match the layout of bio_vec. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/skbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 23f05c64aa31..9c6193a57241 100644 --- a/inclu

[PATCH v2 4/7] net: Use skb accessors in network core

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" In preparation for renaming skb_frag_t members, use the fine accessors which already exist. Signed-off-by: Matthew Wilcox (Oracle) --- net/core/skbuff.c| 22 +- net/core/tso.c | 8 net/ipv4/tcp.c | 12 +++- n

[PATCH v2 6/7] net: Rename skb_frag_t size to bv_len

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Improved compatibility with bvec Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/skbuff.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a75e85226bea..df07b3144c77 100

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

2019-05-01 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 v2 3/7] net: Use skb accessors in network drivers

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" In preparation for renaming skb_frag fields, use the fine accessors which already exist. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/hsi/clients/ssi_protocol.c | 3 ++- drivers/net/ethernet/3com/3c59x.c | 2 +- drivers/net/eth

[PATCH v5 bpf-next 03/17] bpf: verifier: mark patched-insn with sub-register zext flag

2019-05-01 Thread Jiong Wang
Patched insns do not go through generic verification, therefore doesn't has zero extension information collected during insn walking. We don't bother analyze them at the moment, for any sub-register def comes from them, just conservatively mark it as needing zero extension. Signed-off-by: Jiong W

[PATCH v2 1/7] net: Increase the size of skb_frag_t

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" To increase commonality between block and net, we are going to replace the skb_frag_t with the bio_vec. This patch increases the size of skb_frag_t on 32-bit machines from 8 bytes to 12 bytes. The size is unchanged on 64-bit machines. Signed-off-by: Matthew Wilc

[PATCH v2 0/7] Convert skb_frag_t to bio_vec

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The skb_frag_t and bio_vec are fundamentally the same (page, offset, length) tuple. This patch series unifies the two, leaving the skb_frag_t typedef in place. This has the immediate advantage that we already have iov_iter support for bvecs and don't need to add

[PATCH v5 bpf-next 05/17] bpf: verifier: insert BPF_ZEXT according to zext analysis result

2019-05-01 Thread Jiong Wang
After previous patches, verifier has marked those instructions that really need zero extension on dst_reg. It is then for all back-ends to decide how to use such information to eliminate unnecessary zero extension code-gen during JIT compilation. One approach is: 1. Verifier insert explicit zer

[PATCH v5 bpf-next 06/17] bpf: introduce new bpf prog load flags "BPF_F_TEST_RND_HI32"

2019-05-01 Thread Jiong Wang
x86_64 and AArch64 perhaps are two arches that running bpf testsuite frequently, however the zero extension insertion pass is not enabled for them because of their hardware support. It is critical to guarantee the pass correction as it is supposed to be enabled at default for a couple of other arc

[PATCH v5 bpf-next 01/17] bpf: verifier: offer more accurate helper function arg and return type

2019-05-01 Thread Jiong Wang
BPF helper call transfers execution from eBPF insns to native functions while verifier insn walker only walks eBPF insns. So, verifier can only knows argument and return value types from explicit helper function prototype descriptions. For 32-bit optimization, it is important to know whether argum

[PATCH v2 7/7] net: Convert skb_frag_t to bio_vec

2019-05-01 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" There are a lot of users of frag->page_offset, and of struct skb_frag_struct, so use a union and a compatibility define respectively to avoid converting those users today. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/bvec.h | 5 - include/linux

[PATCH v5 bpf-next 04/17] bpf: introduce new alu insn BPF_ZEXT for explicit zero extension

2019-05-01 Thread Jiong Wang
This patch introduce new alu32 insn BPF_ZEXT, and allocate the unused opcode 0xe0 to it. Compared with the other alu32 insns, zero extension on low 32-bit is the only semantics for this instruction. It also allows various JIT back-ends to do optimal zero extension code-gen. BPF_ZEXT is supposed t

[PATCH v5 bpf-next 16/17] riscv: bpf: eliminate zero extension code-gen

2019-05-01 Thread Jiong Wang
Acked-by: Björn Töpel Signed-off-by: Jiong Wang --- arch/riscv/net/bpf_jit_comp.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/arch/riscv/net/bpf_jit_comp.c b/arch/riscv/net/bpf_jit_comp.c index 80b12aa..5075e70 100644 --- a/arch/risc

[PATCH v5 bpf-next 09/17] selftests: bpf: adjust several test_verifier helpers for insn insertion

2019-05-01 Thread Jiong Wang
- bpf_fill_ld_abs_vlan_push_pop: Prevent zext happens inside PUSH_CNT loop. This could happen because of BPF_LD_ABS (32-bit def) + BPF_JMP (64-bit use), or BPF_LD_ABS + EXIT (64-bit use of R0). So, change BPF_JMP to BPF_JMP32 and redefine R0 at exit path to cut off the data-flow f

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

2019-05-01 Thread Jiong Wang
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(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 51dd026..45ee379 100644 --- a/arch/s39

[PATCH v5 bpf-next 14/17] sparc: bpf: eliminate zero extension code-gen

2019-05-01 Thread Jiong Wang
Cc: David S. Miller Signed-off-by: Jiong Wang --- arch/sparc/net/bpf_jit_comp_64.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c index 65428e7..8318d3a 100644 --- a/arch/sparc/net/bpf_jit_comp_

[PATCH v5 bpf-next 10/17] selftests: bpf: enable hi32 randomization for all tests

2019-05-01 Thread Jiong Wang
The previous libbpf patch allows user to specify "prog_flags" to bpf program load APIs. To enable high 32-bit randomization for a test, we need to set BPF_F_TEST_RND_HI32 in "prog_flags". To enable such randomization for all tests, we need to make sure all places are passing BPF_F_TEST_RND_HI32. C

[PATCH v5 bpf-next 02/17] bpf: verifier: mark verified-insn with sub-register zext flag

2019-05-01 Thread Jiong Wang
eBPF ISA specification requires high 32-bit cleared when low 32-bit sub-register is written. This applies to destination register of ALU32 etc. JIT back-ends must guarantee this semantic when doing code-gen. x86-64 and arm64 ISA has the same semantic, so the corresponding JIT back-end doesn't need

[PATCH v5 bpf-next 12/17] powerpc: bpf: eliminate zero extension code-gen

2019-05-01 Thread Jiong Wang
Cc: Naveen N. Rao Cc: Sandipan Das Signed-off-by: Jiong Wang --- arch/powerpc/net/bpf_jit_comp64.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index 21a1dcd..2266c7c 100644 --- a/arch/po

[PATCH v5 bpf-next 15/17] x32: bpf: eliminate zero extension code-gen

2019-05-01 Thread Jiong Wang
Cc: Wang YanQing Signed-off-by: Jiong Wang --- arch/x86/net/bpf_jit_comp32.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index 0d9cdff..8b2576e 100644 --- a/arch/x86/ne

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

2019-05-01 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..a9f5639 100644 --- a/arch/arm/net/bpf_jit_32.c

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

2019-05-01 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-

[PATCH v5 bpf-next 07/17] bpf: verifier: randomize high 32-bit when BPF_F_TEST_RND_HI32 is set

2019-05-01 Thread Jiong Wang
This patch randomizes high 32-bit of a definition when BPF_F_TEST_RND_HI32 is set. It does this once the flag set no matter there is hardware zero extension support or not. Because this is a test feature and we want to deliver the most stressful test. Suggested-by: Alexei Starovoitov Signed-off-

[PATCH v5 bpf-next 00/17] bpf: eliminate zero extensions for sub-register writes

2019-05-01 Thread Jiong Wang
v5: - Adjusted several test_verifier helpers to make them works on hosts w and w/o hardware zext. (Naveen) - Make sure zext flag not set when verifier by-passed, for example, libtest_bpf.ko. (Naveen) - Conservatively mark bpf main return value as 64-bit. (Alexei) - Make sure read fl

[PATCH V1 net 2/8] net: ena: fix: set freed objects to NULL to avoid failing future allocations

2019-05-01 Thread sameehj
From: Sameeh Jubran In some cases when a queue related allocation fails, successful past allocations are freed but the pointer that pointed to them is not set to NULL. This is a problem for 2 reasons: 1. This is generally a bad practice since this pointer might be accidentally accessed in the fut

[PATCH V1 net 3/8] net: ena: fix: Free napi resources when ena_up() fails

2019-05-01 Thread sameehj
From: Sameeh Jubran ena_up() calls ena_init_napi() but does not call ena_del_napi() in case of failure. This causes a segmentation fault upon rmmod when netif_napi_del() is called. Fix this bug by calling ena_del_napi() before returning error from ena_up(). Fixes: 1738cd3ed342 ("net: ena: Add a

[PATCH V1 net 6/8] net: ena: improve latency by disabling adaptive interrupt moderation by default

2019-05-01 Thread sameehj
From: Sameeh Jubran Adaptive interrupt moderation was erroneously enabled by default in the driver. In case the device supports adaptive interrupt moderation it will be automatically used, which may potentially increase latency. The adaptive moderation can be enabled from ethtool command in cas

[PATCH V1 net 8/8] net: ena: gcc 8: fix compilation warning

2019-05-01 Thread sameehj
From: Sameeh Jubran GCC 8 contains a number of new warnings as well as enhancements to existing checkers. The warning - Wstringop-truncation - warns for calls to bounded string manipulation functions such as strncat, strncpy, and stpncpy that may either truncate the copied string or leave the des

[PATCH V1 net 7/8] net: ena: fix ena_com_fill_hash_function() implementation

2019-05-01 Thread sameehj
From: Sameeh Jubran ena_com_fill_hash_function() didn't configure the rss->hash_func. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 1 + 1

[PATCH V1 net 4/8] net: ena: fix incorrect test of supported hash function

2019-05-01 Thread sameehj
From: Sameeh Jubran ena_com_set_hash_function() tests if a hash function is supported by the device before setting it. The test returns the opposite result than needed. Reverse the condition to return the correct value. Also use the BIT macro instead of inline shift. Fixes: 1738cd3ed342 ("net: e

[PATCH V1 net 5/8] net: ena: fix return value of ena_com_config_llq_info()

2019-05-01 Thread sameehj
From: Sameeh Jubran ena_com_config_llq_info() returns 0 even if ena_com_set_llq() fails. Return the failure code of ena_com_set_llq() in case it fails. fixes: 689b2bdaaa14 ("net: ena: add functions for handling Low Latency Queues in ena_com") Signed-off-by: Arthur Kiyanovski Signed-off-by: Sa

[PATCH V1 net 1/8] net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry

2019-05-01 Thread sameehj
From: Sameeh Jubran second parameter should be the index of the table rather than the value. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Saeed Bshara Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c |

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

2019-05-01 Thread sameehj
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 resources when ena_up() fails net: ena: fix incorrect test o

  1   2   >