[PATCH v2 net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-29 Thread Ioana Ciornei
In case a call to dsa_tree_setup() fails, an attempt to cleanup is made by calling dsa_tree_remove_switch(), which should take care of removing/unregistering any resources previously allocated. This does not happen because it is conditioned by dst->setup being true, which is set only after _all_ se

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Mark Zhang
On 5/29/2019 11:44 PM, Jason Gunthorpe wrote: > On Wed, May 29, 2019 at 02:05:24PM +0300, Leon Romanovsky wrote: >> On Wed, May 22, 2019 at 02:26:36PM -0300, Jason Gunthorpe wrote: >>> On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: diff --git a/drivers/infiniband/core/device.

Re: [PATCH net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-29 Thread Ioana Ciornei
On 5/30/19 2:17 AM, Andrew Lunn wrote: >> @@ -423,18 +434,41 @@ static int dsa_tree_setup_switches(struct >> dsa_switch_tree *dst) >> >> err = dsa_switch_setup(ds); >> if (err) >> -return err; >> +goto setup_switch_err; > > Mino

Re: [PATCH v2 net-next 00/11] Decoupling PHYLINK from struct net_device

2019-05-29 Thread David Miller
From: Ioana Ciornei Date: Tue, 28 May 2019 20:38:06 +0300 > Following two separate discussion threads in: > https://www.spinics.net/lists/netdev/msg569087.html > and: > https://www.spinics.net/lists/netdev/msg570450.html > > Previous RFC patch set: https://www.spinics.net/lists/netdev/msg571

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

2019-05-29 Thread David Miller
From: Kevin 'ldir' Darbyshire-Bryant Date: Tue, 28 May 2019 17:03:50 + > ctinfo is a new tc filter action module. It is designed to restore > information contained in firewall conntrack marks to other packet fields > and is typically used on packet ingress paths. At present it has two > ind

Re: [PATCH net-next] r8169: remove 1000/Half from supported modes

2019-05-29 Thread David Miller
From: Heiner Kallweit Date: Tue, 28 May 2019 18:43:46 +0200 > MAC on the GBit versions supports 1000/Full only, however the PHY > partially claims to support 1000/Half. So let's explicitly remove > this mode. > > Signed-off-by: Heiner Kallweit Applied.

[PATCH iproute2-next 7/9] Add support for nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern Add nexthop subcommand to ip. Implement basic commands for creating, deleting and dumping nexthop objects. Syntax follows 'nexthop' syntax from existing 'ip route' command. Signed-off-by: David Ahern --- ip/Makefile| 3 +- ip/ip.c| 3 +- ip/ip_common.h | 2 +

[PATCH iproute2-next 6/9] ip route: Export print_rt_flags and print_rta_if

2019-05-29 Thread David Ahern
From: David Ahern Export print_rt_flags and print_rta_if for use by the nexthop command. Signed-off-by: David Ahern --- ip/ip_common.h | 3 ++- ip/iproute.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ip/ip_common.h b/ip/ip_common.h index df279e4f7b9a..1c90770be

[PATCH iproute2-next 9/9] ipmonitor: Add nexthop option to monitor

2019-05-29 Thread David Ahern
From: David Ahern Add capability to ip-monitor to listen and dump nexthop messages Signed-off-by: David Ahern --- ip/ipmonitor.c | 24 1 file changed, 24 insertions(+) diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c index 9ecc7fd2011a..5da1256450b3 100644 --- a/ip/ipmoni

[PATCH iproute2-next 3/9] libnetlink: Add helper to add a group via setsockopt

2019-05-29 Thread David Ahern
From: David Ahern groups > 31 have to be joined using the setsockopt. Since the nexthop group is 32, add a helper to allow 'ip monitor' to listen for nexthop messages. Signed-off-by: David Ahern --- include/libnetlink.h | 3 ++- lib/libnetlink.c | 6 ++ 2 files changed, 8 insertions(+)

[PATCH iproute2-next 8/9] ip route: Add option to use nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern Add nhid option for routes to use nexthop objects by id. Signed-off-by: David Ahern --- ip/iproute.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ip/iproute.c b/ip/iproute.c index c5a473704d95..68f7f75f2336 100644 --- a/ip/iproute.c +++

[PATCH iproute2-next 2/9] lwtunnel: Pass encap and encap_type attributes to lwt_parse_encap

2019-05-29 Thread David Ahern
From: David Ahern lwt_parse_encap currently assumes the encap attribute is RTA_ENCAP and the type is RTA_ENCAP_TYPE. Change lwt_parse_encap to take these as input arguments for reuse by nexthop code which has the attributes as NHA_ENCAP and NHA_ENCAP_TYPE. Signed-off-by: David Ahern --- ip/ip_

[PATCH iproute2-next 1/9] libnetlink: Set NLA_F_NESTED in rta_nest

2019-05-29 Thread David Ahern
From: David Ahern Kernel now requires NLA_F_NESTED to be set on new nested attributes. Set NLA_F_NESTED in rta_nest. Signed-off-by: David Ahern --- lib/libnetlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 0d48a3d43cf0..6ae51a9dba14 100644 -

[PATCH iproute2-next 0/9] ip: Add support for nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern This set adds support for nexthop objects to the ip command. The syntax for nexthop objects is identical to the current 'ip route .. nexthop ...' syntax making it easy to convert existing use cases. David Ahern (9): libnetlink: Set NLA_F_NESTED in rta_nest lwtunnel: Pass en

[PATCH iproute2-next 4/9] uapi: Import nexthop object API

2019-05-29 Thread David Ahern
From: David Ahern Add nexthop.h from kernel with the uapi for nexthop objects. Signed-off-by: David Ahern --- include/uapi/linux/nexthop.h | 56 1 file changed, 56 insertions(+) create mode 100644 include/uapi/linux/nexthop.h diff --git a/include/

Re: [PATCH net-next] vrf: local route leaking

2019-05-29 Thread David Ahern
On 5/27/19 2:34 AM, George Wilkie wrote: > On Sat, May 25, 2019 at 09:13:13AM -0600, David Ahern wrote: >>> Using a loopback doesn't work, e.g. if 10.1.1.0/24 was on a global >>> interface: >>>ip ro add vrf vrf-a 10.1.1.0/24 dev lo >> >> That works for MPLS when you exit the LSP and deliver lo

[PATCH iproute2-next 5/9] libnetlink: Add helper to create nexthop dump request

2019-05-29 Thread David Ahern
From: David Ahern Add rtnl_nexthopdump_req to initiate a dump request of nexthop objects. Signed-off-by: David Ahern --- include/libnetlink.h | 4 lib/libnetlink.c | 27 +++ 2 files changed, 31 insertions(+) diff --git a/include/libnetlink.h b/include/libnetl

[PATCH net-next 3/7] ipv4: Plumb support for nexthop object in a fib_info

2019-05-29 Thread David Ahern
From: David Ahern Add 'struct nexthop' and nh_list list_head to fib_info. nh_list is the fib_info side of the nexthop <-> fib_info relationship. Add fi_list list_head to 'struct nexthop' to track fib_info entries using a nexthop instance. Add __remove_nexthop_fib and add it to __remove_nexthop t

[PATCH net-next 5/7] mlxsw: Fail attempts to use routes with nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/s

[PATCH net-next 6/7] mlx5: Fail attempts to use routes with nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern --- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/dr

[PATCH net-next 1/7] ipv4: Use accessors for fib_info nexthop data

2019-05-29 Thread David Ahern
From: David Ahern Use helpers to access fib_nh and fib_nhs fields of a fib_info. Drop the fib_dev macro which is an alias for the first nexthop. Replacements: fib_dev--> fib_info_nh(fi, 0)->fib_nh_dev fi->fib_nh --> fib_info_nh(fi, 0) fi->fib_nh[i] --> fib_info_nh(fi, i) fi-

[PATCH net-next 0/7] net: add struct nexthop to fib{6}_info

2019-05-29 Thread David Ahern
From: David Ahern This sets adds 'struct nexthop' to fib_info and fib6_info. IPv4 already handles multiple fib_nh entries in a single fib_info, so the conversion to use a nexthop struct is fairly mechanical. IPv6 using a nexthop struct with a fib6_info impacts a lot of core logic which is built a

[PATCH net-next 7/7] rocker: Fail attempts to use routes with nexthop objects

2019-05-29 Thread David Ahern
From: David Ahern Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern --- drivers/net/ethernet/rocker/rocker_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethe

[PATCH net-next 2/7] ipv4: Prepare for fib6_nh from a nexthop object

2019-05-29 Thread David Ahern
From: David Ahern Convert more IPv4 code to use fib_nh_common over fib_nh to enable routes to use a fib6_nh based nexthop. In the end, only code not using a nexthop object in a fib_info should directly access fib_nh in a fib_info without checking the famiy and going through fib_nh_common. Those f

[PATCH net-next 4/7] ipv6: Plumb support for nexthop object in a fib6_info

2019-05-29 Thread David Ahern
From: David Ahern Add struct nexthop and nh_list list_head to fib6_info. nh_list is the fib6_info side of the nexthop <-> fib_info relationship. Since a fib6_info referencing a nexthop object can not have 'sibling' entries (the old way of doing multipath routes), the nh_list is a union with fib6_

Re: [PATCH net-next v1 3/7] taprio: Add the skeleton to enable hardware offloading

2019-05-29 Thread Patel, Vedang
> On May 29, 2019, at 2:06 PM, Jakub Kicinski > wrote: > > On Wed, 29 May 2019 20:05:16 +, Patel, Vedang wrote: >> [Sending the email again since the last one was rejected by netdev because >> it was html.] >> >>> On May 29, 2019, at 12:14 PM, Jakub Kicinski >>> wrote: >>> >>> On Wed,

[PATCH net] net: don't clear sock->sk early to avoid trouble in strparser

2019-05-29 Thread Jakub Kicinski
af_inet sets sock->sk to NULL which trips strparser over: BUG: kernel NULL pointer dereference, address: 0012 PGD 0 P4D 0 Oops: [#1] SMP PTI CPU: 7 PID: 0 Comm: swapper/7 Not tainted 5.2.0-rc1-00139-g14629453a6d3 #21 RIP: 0010:tcp_peek_len+0x10/0x60 RSP: 0018:c02e41c54b98 EFLA

Re: [PATCH v2 bpf-next 0/9] libbpf random fixes

2019-05-29 Thread Daniel Borkmann
On 05/29/2019 07:36 PM, Andrii Nakryiko wrote: > This patch set is a collection of unrelated fixes for libbpf. > > Patch #1 fixes detection of corrupted BPF section w/ instructions. > Patch #2 fixes possible errno clobbering. > Patch #3 simplifies endianness check and brings it in line with few ot

Re: [PATCH net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-29 Thread Andrew Lunn
> @@ -423,18 +434,41 @@ static int dsa_tree_setup_switches(struct > dsa_switch_tree *dst) > > err = dsa_switch_setup(ds); > if (err) > - return err; > + goto setup_switch_err; Minor nit pick. All the other labels you add are e

Re: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c

2019-05-29 Thread Andrew Lunn
> phydev = dsa_port_get_phy_device(dp); > if (!phydev) > return 0; > > I don't see how this method is sane either. If i remember correctly, the thinking was, you can get away without the PHY, at least during bring up of a new switch/board. So don't consider this a fatal error. N

[PATCH mlx5-next 4/6] net/mlx5: E-Switch, Honor eswitch functions changed event cap

2019-05-29 Thread Saeed Mahameed
From: Vu Pham Whenever device supports eswitch functions changed event, honor such device setting. Do not limit it to ECPF. Signed-off-by: Parav Pandit Signed-off-by: Vu Pham Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eq.c| 2 +- drivers/net/ethernet/m

[PATCH mlx5-next 0/6] Mellanox, mlx5-next minor updates 2019-05-29

2019-05-29 Thread Saeed Mahameed
Hi All, This series provides some low level updates for mlx5 driver needed for both rdma and netdev trees. Eli adds termination flow steering table bits and hardware definitions. Moshe introduces the core dump HW access registers definitions. Parav refactors and cleans-up VF representors functi

[PATCH mlx5-next 1/6] net/mlx5: Add core dump register access HW bits

2019-05-29 Thread Saeed Mahameed
From: Moshe Shemesh Add Firmware core dump registers and HW definitions. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 17 - 2 files changed, 17 insertions(+)

[PATCH mlx5-next 2/6] net/mlx5: Introduce termination table bits

2019-05-29 Thread Saeed Mahameed
From: Eli Britstein Termination table is a flow table with a termination flag. The flag allows the firmware to assume that the the specified actions are the last actions list. This assumption allows the FW to safely perform potential looping logic (e.g. hairpin). Introduce the bits for this attri

[PATCH mlx5-next 5/6] {IB,net}/mlx5: No need to typecast from void* to mlx5_ib_dev*

2019-05-29 Thread Saeed Mahameed
From: Parav Pandit Avoid typecasting from void* to mlx5_ib_dev* or mlx5e_rep_priv* as it is not needed. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +- 2 files chang

[PATCH mlx5-next 6/6] {IB,net}/mlx5: Constify rep ops functions pointers

2019-05-29 Thread Saeed Mahameed
From: Parav Pandit Currently for every representor type and for every single vport, representer function pointers copy is stored even though they don't change from one to other vport. Additionally priv data entry for the rep is not passed during registration, but its copied. It is used (set and

[PATCH mlx5-next 3/6] net/mlx5: E-Switch, Replace host_params event with functions_changed event

2019-05-29 Thread Saeed Mahameed
From: Vu Pham To support sriov on a E-Switch manager, num_vfs are queried to the firmware whenever E-Switch manager is notified by esw_functions_changed event. Replace host_params event with esw_functions_changed event that reflects more appropriate naming. While at it, also correct num_vfs typ

Re: [PATCH bpf-next v2] selftests/bpf: measure RTT from xdp using xdping

2019-05-29 Thread Song Liu
> On May 29, 2019, at 3:10 PM, Alan Maguire wrote: > > xdping allows us to get latency estimates from XDP. Output looks > like this: > > ./xdping -I eth4 192.168.55.8 > Setting up XDP for eth4, please wait... > XDP setup disrupts network connectivity, hit Ctrl+C to quit > > Normal ping RTT

Re: [PATCH net-next 1/7] net: Don't disable interrupts in napi_alloc_frag()

2019-05-29 Thread Eric Dumazet
On 5/29/19 3:15 PM, Sebastian Andrzej Siewior wrote: > netdev_alloc_frag() can be used from any context and is used by NAPI > and non-NAPI drivers. Non-NAPI drivers use it in interrupt context > and NAPI drivers use it during initial allocation (->ndo_open() or > ->ndo_change_mtu()). Some NAPI d

[PATCH net] net-gro: fix use-after-free read in napi_gro_frags()

2019-05-29 Thread Eric Dumazet
If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the end of napi_frags_skb() might read

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-29 Thread Russell King - ARM Linux admin
On Wed, May 29, 2019 at 02:26:34PM -0700, David Miller wrote: > From: Russell King > Date: Tue, 28 May 2019 10:34:42 +0100 > > > Some boards do not have the PHY firmware programmed in the 3310's flash, > > which leads to the PHY not working as expected. Warn the user when the > > PHY fails to bo

[PATCH net-next 5/7] bnx2x: Use napi_alloc_frag()

2019-05-29 Thread Sebastian Andrzej Siewior
SKB allocation via bnx2x_frag_alloc() is always performed in NAPI context. Preemptible context passes GFP_KERNEL and bnx2x_frag_alloc() uses then __get_free_page() for the allocation. Use napi_alloc_frag() for memory allocation. Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: gr-everest-linux...@marv

[PATCH net-next 0/7] Avoid local_irq_save() and use napi_alloc_frag() where possible

2019-05-29 Thread Sebastian Andrzej Siewior
The first two patches remove local_irq_save() around `netdev_alloc_cache' which does not work on -RT. Besides helping -RT it whould benefit the users of the function since they can avoid disabling interrupts and save a few cycles. The remaining patches are from a time when I tried to remove `netdev

[PATCH net-next 3/7] dpaa2-eth: Remove preempt_disable() from seed_pool()

2019-05-29 Thread Sebastian Andrzej Siewior
According to the comment, the preempt_disable() statement is required due to synchronisation in napi_alloc_frag(). The awful truth is that local_bh_disable() is required because otherwise the NAPI poll callback can be invoked while the open function setup buffers. This isn't unlikely since the dpaa

[PATCH net-next 1/7] net: Don't disable interrupts in napi_alloc_frag()

2019-05-29 Thread Sebastian Andrzej Siewior
netdev_alloc_frag() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and th

[PATCH net-next 6/7] tg3: Use napi_alloc_frag()

2019-05-29 Thread Sebastian Andrzej Siewior
tg3_alloc_rx_data() uses netdev_alloc_frag() for sbk allocation. All callers of tg3_alloc_rx_data() either hold the tp->lock lock (which is held with BH disabled) or run in NAPI context. Use napi_alloc_frag() for skb allocations. Cc: Siva Reddy Kallam Cc: Prashant Sreedharan Cc: Michael Chan S

[PATCH net-next 4/7] dpaa2-eth: Use napi_alloc_frag()

2019-05-29 Thread Sebastian Andrzej Siewior
The driver is using netdev_alloc_frag() for allocation in the ->ndo_start_xmit() path. That one is always invoked in a BH disabled region so we could also use napi_alloc_frag(). Use napi_alloc_frag() for skb allocation. Cc: Ioana Radulescu Signed-off-by: Sebastian Andrzej Siewior --- drivers/n

[PATCH net-next 7/7] net: hwbm: Make the hwbm_pool lock a mutex

2019-05-29 Thread Sebastian Andrzej Siewior
Based on review, `lock' is only acquired in hwbm_pool_add() which is invoked via ->probe(), ->resume() and ->ndo_change_mtu(). Based on this the lock can become a mutex and there is no need to disable interrupts during the procedure. Now that the lock is a mutex, hwbm_pool_add() no longer invokes h

[PATCH net-next 2/7] net: Don't disable interrupts in __netdev_alloc_skb()

2019-05-29 Thread Sebastian Andrzej Siewior
__netdev_alloc_skb() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and t

[PATCH net-next] net: dsa: Add error path handling in dsa_tree_setup()

2019-05-29 Thread Ioana Ciornei
In case a call to dsa_tree_setup() fails, an attempt to cleanup is made by calling dsa_tree_remove_switch(), which should take care of removing/unregistering any resources previously allocated. This does not happen because it is conditioned by dst->setup being true, which is set only after _all_ se

[PATCH bpf-next v2] selftests/bpf: measure RTT from xdp using xdping

2019-05-29 Thread Alan Maguire
xdping allows us to get latency estimates from XDP. Output looks like this: ./xdping -I eth4 192.168.55.8 Setting up XDP for eth4, please wait... XDP setup disrupts network connectivity, hit Ctrl+C to quit Normal ping RTT data [Ignore final RTT; it is distorted by XDP using the reply] PING 192.1

Re: [PATCH V1 net-next 02/11] net: ena: ethtool: add extra properties retrieval via get_priv_flags

2019-05-29 Thread Jakub Kicinski
On Wed, 29 May 2019 12:49:55 +0300, same...@amazon.com wrote: > From: Arthur Kiyanovski > > This commit adds a mechanism for exposing different driver > properties via ethtool's priv_flags. > > In this commit we: > > Add commands, structs and defines necessary for handling > extra properties >

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

2019-05-29 Thread David Miller
From: Jeff Kirsher Date: Wed, 29 May 2019 11:47:39 -0700 > This series contains updates to ice driver only. Pulled, thanks Jeff.

[PATCH net 1/1] net: dsa: sja1105: Don't store frame type in skb->cb

2019-05-29 Thread Vladimir Oltean
Due to a confusion I thought that eth_type_trans() was called by the network stack whereas it can actually be called by network drivers to figure out the skb protocol and next packet_type handlers. In light of the above, it is not safe to store the frame type from the DSA tagger's .filter callback

[PATCH v2 net 2/2] net: dsa: tag_8021q: Create a stable binary format

2019-05-29 Thread Vladimir Oltean
Tools like tcpdump need to be able to decode the significance of fake VLAN headers that DSA uses to separate switch ports. But currently these have no global significance - they are simply an ordered list of DSA_MAX_SWITCHES x DSA_MAX_PORTS numbers ending at 4095. The reason why this is submitted

[PATCH v2 net 0/2] Fixes for DSA tagging using 802.1Q

2019-05-29 Thread Vladimir Oltean
During the prototyping for the "Decoupling PHYLINK from struct net_device" patchset, the CPU port of the sja1105 driver was moved to a different spot. This uncovered an issue in the tag_8021q DSA code, which used to work by mistake - the CPU port was the last hardware port numerically, and this wa

[PATCH v2 net 1/2] net: dsa: tag_8021q: Change order of rx_vid setup

2019-05-29 Thread Vladimir Oltean
From: Ioana Ciornei The 802.1Q tagging performs an unbalanced setup in terms of RX VIDs on the CPU port. For the ingress path of a 802.1Q switch to work, the RX VID of a port needs to be seen as tagged egress on the CPU port. While configuring the other front-panel ports to be part of this VID,

Re: [PATCH] inet: frags: Remove unnecessary smp_store_release/READ_ONCE

2019-05-29 Thread Eric Dumazet
On 5/28/19 10:40 PM, Herbert Xu wrote: > I see now that it is actually relying on the barrier/locking > semantics of call_rcu vs. rcu_read_lock. So the smp_store_release > and READ_ONCE are simply unnecessary and could be confusing to > future readers. > > ---8<--- > The smp_store_release cal

Re: [PATCH v3 0/4] net: phy: dp83867: add some fixes

2019-05-29 Thread David Miller
From: Max Uvarov Date: Tue, 28 May 2019 13:00:48 +0300 > v3: use phy_modify_mmd() > v2: fix minor comments by Heiner Kallweit and Florian Fainelli Series applied, thank you.

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-29 Thread David Miller
From: Russell King Date: Tue, 28 May 2019 10:34:42 +0100 > Some boards do not have the PHY firmware programmed in the 3310's flash, > which leads to the PHY not working as expected. Warn the user when the > PHY fails to boot the firmware and refuse to initialise. > > Signed-off-by: Russell King

Re: [PATCH net-next 2/5] net: phylink: support for link gpio interrupt

2019-05-29 Thread David Miller
From: Russell King - ARM Linux admin Date: Tue, 28 May 2019 11:02:49 +0100 > I was intending to add a note to this patch indicating that it > depends on "net: phylink: ensure consistent phy interface mode" but > failed to do before sending it out - sorry! If you'd prefer a patch > that doesn't d

Re: [PATCH net-next v1 3/7] taprio: Add the skeleton to enable hardware offloading

2019-05-29 Thread Jakub Kicinski
On Wed, 29 May 2019 20:05:16 +, Patel, Vedang wrote: > [Sending the email again since the last one was rejected by netdev because it > was html.] > > > On May 29, 2019, at 12:14 PM, Jakub Kicinski > > wrote: > > > > On Wed, 29 May 2019 17:06:49 +, Patel, Vedang wrote: > >>> On May 28

Re: [PATCH] rhashtable: Add rht_ptr_rcu and improve rht_ptr

2019-05-29 Thread David Miller
From: Herbert Xu Date: Tue, 28 May 2019 15:02:31 +0800 > This patch moves common code between rht_ptr and rht_ptr_exclusive > into __rht_ptr. It also adds a new helper rht_ptr_rcu exclusively > for the RCU case. This way rht_ptr becomes a lock-only construct > so we can use the lighter rcu_dere

[RFC PATCH net-next 1/2] net/sched: add callback to get stats on an action from clsflower offload

2019-05-29 Thread Edward Cree
When handling RTM_GETACTION (e.g. tc actions get/list), make a callback to blocks with hardware offload of the action to update stats from hardware. In order to support this, track each action/block binding by allocating a struct tc_action_block_binding and adding it to a list on the action. Sig

[RFC PATCH net-next 2/2] net/sched: add action block binding to other classifiers

2019-05-29 Thread Edward Cree
cls_matchall, cls_u32, and cls_bpf all have offloads as well, so they also need to bind actions to blocks for RTM_GETACTION stats collection. Signed-off-by: Edward Cree --- net/sched/cls_bpf.c | 10 +- net/sched/cls_matchall.c | 7 +++ net/sched/cls_u32.c | 7 +++ 3

Re: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c

2019-05-29 Thread Ioana Ciornei
On 5/29/19 7:25 PM, Russell King - ARM Linux admin wrote: > On Wed, May 29, 2019 at 04:11:57PM +, Ioana Ciornei wrote: >>> Subject: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c >>> >>> FYI, we noticed the following commit (built with gcc-6): >>> >>> commit: 9dd6d07682b10a55d1f49d4

[RFC PATCH net-next 0/2] RTM_GETACTION stats offload

2019-05-29 Thread Edward Cree
Additional patches on top of [v3] flow_offload: Re-add per-action statistics. Each time we offload a rule to a block, if any hardware offload results (in_hw_count), we allocate a binding object for each action, and add it to a list on that action (hw_blocks); this is then updated on reoffload and

Re: [PATCH net-next v1 3/7] taprio: Add the skeleton to enable hardware offloading

2019-05-29 Thread Patel, Vedang
[Sending the email again since the last one was rejected by netdev because it was html.] > On May 29, 2019, at 12:14 PM, Jakub Kicinski > wrote: > > On Wed, 29 May 2019 17:06:49 +, Patel, Vedang wrote: >>> On May 28, 2019, at 3:45 PM, Jakub Kicinski >>> wrote: >>> On Tue, 28 May 2019 10:

[PATCH net] net: correct zerocopy refcnt with udp MSG_MORE

2019-05-29 Thread Willem de Bruijn
From: Willem de Bruijn TCP zerocopy takes a uarg reference for every skb, plus one for the tcp_sendmsg_locked datapath temporarily, to avoid reaching refcnt zero as it builds, sends and frees skbs inside its inner loop. UDP and RAW zerocopy do not send inside the inner loop so do not need the ex

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-29 Thread Jiri Pirko
Wed, May 29, 2019 at 06:47:54PM CEST, jakub.kicin...@netronome.com wrote: >On Wed, 29 May 2019 10:00:16 +0200, Jiri Pirko wrote: >> Tue, May 28, 2019 at 10:01:15PM CEST, jakub.kicin...@netronome.com wrote: >> >On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> >>

[PATCH net-next 1/2] r8169: improve rtl_fw_format_ok

2019-05-29 Thread Heiner Kallweit
Simplify the function a little bit and use strscpy() where appropriate. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/etherne

[PATCH net-next 2/2] r8169: decouple rtl_phy_write_fw from actual driver code

2019-05-29 Thread Heiner Kallweit
This patch is a further step towards decoupling firmware handling from the actual driver code. Firmware can be for PHY and/or MAC, and two pairs of read/write functions are needed for handling PHY firmware and MAC firmware respectively. Pass these functions via struct rtl_fw and avoid the ugly swit

Re: [PATCH net-next v1 3/7] taprio: Add the skeleton to enable hardware offloading

2019-05-29 Thread Jakub Kicinski
On Wed, 29 May 2019 17:06:49 +, Patel, Vedang wrote: > > On May 28, 2019, at 3:45 PM, Jakub Kicinski > > wrote: > > On Tue, 28 May 2019 10:46:44 -0700, Vedang Patel wrote: > >> From: Vinicius Costa Gomes > >> > >> This adds the UAPI and the core bits necessary for userspace to > >> reques

[PATCH net-next 0/2] r8169: decouple firmware handling code from actual driver code

2019-05-29 Thread Heiner Kallweit
These two patches are a step towards eventually factoring out firmware handling code to a separate source file. Heiner Kallweit (2): r8169: improve rtl_fw_format_ok r8169: decouple rtl_phy_write_fw from actual driver code drivers/net/ethernet/realtek/r8169.c | 71 +++-

[PATCH net-next] r8169: enable WoL speed down on more chip versions

2019-05-29 Thread Heiner Kallweit
Call the pll power down function also for chip versions 02..06 and 13..15. The MAC can't be powered down on these chip versions, but at least they benefit from the speed-down power-saving if WoL is enabled. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 26 ++--

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

2019-05-29 Thread Jeff Kirsher
This series contains updates to ice driver only. Bruce cleans up white space issues and fixes complaints about using bitop assignments using operands of different sizes. Anirudh cleans up code that is no longer needed now that the firmware supports the functionality. Adds support for ethtool sel

[net-next 07/15] ice: Add handler for ethtool selftest

2019-05-29 Thread Jeff Kirsher
From: Anirudh Venkataramanan This patch adds a handler for ethtool selftest. Selftest includes testing link, interrupts, eeprom, registers and packet loopback. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice.h

[net-next 03/15] ice: Implement toggling ethtool rx-vlan-filter

2019-05-29 Thread Jeff Kirsher
From: Tony Nguyen Implement the toggling of rx-vlan-filter; enable|disable VLAN pruning based on on|off, respectively. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 7

[net-next 05/15] ice: Set minimum default Rx descriptor count to 512

2019-05-29 Thread Jeff Kirsher
From: Brett Creeley Currently we set the default number of Rx descriptors per queue to the system's page size divided by the number of bytes per descriptor. For 4K page size systems this is resulting in 128 Rx descriptors per queue. This is causing more dropped packets than desired in the default

[net-next 15/15] ice: Add a helper to trigger software interrupt

2019-05-29 Thread Jeff Kirsher
From: Brett Creeley Add a new function ice_trigger_sw_intr to trigger interrupts. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_lib.c | 24 +-- drivers/net/e

[net-next 02/15] ice: Remove direct write for GLLAN_RCTL_0

2019-05-29 Thread Jeff Kirsher
From: Anirudh Venkataramanan Clear PXE mode AQ call (opcode 0x0110) is now supported in FW. So remove the direct register write to GLLAN_RCTL_0. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_common.c | 3 ---

[net-next 08/15] ice: Refactor interrupt tracking

2019-05-29 Thread Jeff Kirsher
From: Brett Creeley Currently we have two MSI-x (IRQ) trackers, one for OS requested MSI-x entries (sw_irq_tracker) and one for hardware MSI-x vectors (hw_irq_tracker). Generally the sw_irq_tracker has less entries than the hw_irq_tracker because the hw_irq_tracker has entries equal to the max al

Re: [PATCH AUTOSEL 5.1 011/375] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-29 Thread Sasha Levin
On Thu, May 23, 2019 at 09:47:23AM +0200, Stefan Bader wrote: On 22.05.19 21:15, Sasha Levin wrote: From: Eric Dumazet [ Upstream commit 47d3d7fdb10a21c223036b58bd70ffdc24a472c4 ] Since ip6frag_expire_frag_queue() now pulls the head skb from frag queue, we should no longer use skb_get(), sinc

[net-next 06/15] ice: Don't call ice_cfg_itr() for SR-IOV

2019-05-29 Thread Jeff Kirsher
From: Brett Creeley ice_cfg_itr() sets the ITR granularity and default ITR values for the PF's interrupt vectors. For VF's this will be done in the AVF driver flow. Fix this by not calling ice_cfg_itr() for SR-IOV. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: A

[net-next 12/15] ice: Minor cleanup in ice_switch.h

2019-05-29 Thread Jeff Kirsher
From: Anirudh Venkataramanan Remove duplicate define for ICE_INVAL_Q_HANDLE. Move defines to the top of the file. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_switch.h | 7 +++ 1 file changed, 3 insertio

[net-next 09/15] ice: Check all VFs for MDD activity, don't disable

2019-05-29 Thread Jeff Kirsher
From: Mitch Williams Don't use the mdd_detected variable as an exit condition for this loop; the first VF to NOT have an MDD event will cause the loop to terminate. Instead just look at all of the VFs, but don't disable them. This prevents proper release of resources if the VFs are rebooted or t

[net-next 04/15] ice: Resolve static analysis warning

2019-05-29 Thread Jeff Kirsher
From: Bruce Allan Some static analysis tools can complain when doing a bitop assignment using operands of different sizes. Fix that. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_t

[net-next 11/15] ice: Remove redundant and premature event config

2019-05-29 Thread Jeff Kirsher
From: Dave Ertman In the path for re-enabling FW LLDP engine, there is a call to register for LLDP MIB change events. This call is redundant, in that the call to ice_pf_dcb_cfg will already register the driver for these events. Also, the call as it stands now is too early in the flow before bef

[net-next 10/15] ice: Change message level

2019-05-29 Thread Jeff Kirsher
From: Mitch Williams Change the message level of the MTU change log message from debug to info. Signed-off-by: Mitch Williams Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 in

[net-next 13/15] ice: Add ice_get_fw_log_cfg to init FW logging

2019-05-29 Thread Jeff Kirsher
From: Dan Nowlin In order to initialize the current status of the FW logging, this patch adds ice_get_fw_log_cfg. The function retrieves the current setting of the FW logging from HW and updates the ice_hw structure accordingly. Signed-off-by: Dan Nowlin Signed-off-by: Anirudh Venkataramanan T

[net-next 01/15] ice: Fix LINE_SPACING style issue

2019-05-29 Thread Jeff Kirsher
From: Bruce Allan Fix a checkpatch "LINE_SPACING: Please don't use multiple blank lines" issue that has snuck in to the code. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_common.c

[net-next 14/15] ice: Configure RSS LUT key only if RSS is enabled

2019-05-29 Thread Jeff Kirsher
From: Md Fahad Iqbal Polash Call ice_vsi_cfg_rss_lut_key only if RSS is enabled. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++ 1 file changed, 7 insert

Re: [PATCH v2 bpf-next 1/9] libbpf: fix detection of corrupted BPF instructions section

2019-05-29 Thread Song Liu
> On May 29, 2019, at 10:36 AM, Andrii Nakryiko wrote: > > Ensure that size of a section w/ BPF instruction is exactly a multiple > of BPF instruction size. > > Signed-off-by: Andrii Nakryiko Acked-by: Song Liu > --- > tools/lib/bpf/libbpf.c | 12 +++- > 1 file changed, 7 insertion

[PATCH iproute2] bridge: mdb: restore text output format

2019-05-29 Thread Nikolay Aleksandrov
While I fixed the mdb json output, I did overlook the text output. This patch returns the original text output format: dev port grp Example (old format, restored by this patch): dev br0 port eth8 grp 239.1.1.11 temp Example (changed format after the commit below): 23: br0 eth8 239.1.1.1

Re: [PATCH bpf-next v2] libbpf: prevent overwriting of log_level in bpf_object__load_progs()

2019-05-29 Thread Daniel Borkmann
On 05/29/2019 04:26 PM, Quentin Monnet wrote: > There are two functions in libbpf that support passing a log_level > parameter for the verifier for loading programs: > bpf_object__load_xattr() and bpf_prog_load_xattr(). Both accept an > attribute object containing the log_level, and apply it to the

[PATCH v2 bpf-next 7/9] libbpf: simplify two pieces of logic

2019-05-29 Thread Andrii Nakryiko
Extra check for type is unnecessary in first case. Extra zeroing is unnecessary, as snprintf guarantees that it will zero-terminate string. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/

[PATCH v2 bpf-next 9/9] libbpf: reduce unnecessary line wrapping

2019-05-29 Thread Andrii Nakryiko
There are a bunch of lines of code or comments that are unnecessary wrapped into multi-lines. Fix that without violating any code guidelines. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 52 +- 1 file changed, 16 insertio

[PATCH v2 bpf-next 8/9] libbpf: typo and formatting fixes

2019-05-29 Thread Andrii Nakryiko
A bunch of typo and formatting fixes. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 5ea84ab69db1..6bd7dd544e41 100644 --- a/to

[PATCH v2 bpf-next 6/9] libbpf: use negative fd to specify missing BTF

2019-05-29 Thread Andrii Nakryiko
0 is a valid FD, so it's better to initialize it to -1, as is done in other places. Also, technically, BTF type ID 0 is valid (it's a VOID type), so it's more reliable to check btf_fd, instead of btf_key_type_id, to determine if there is any BTF associated with a map. Acked-by: Song Liu Signed-of

[PATCH v2 bpf-next 2/9] libbpf: preserve errno before calling into user callback

2019-05-29 Thread Andrii Nakryiko
pr_warning ultimately may call into user-provided callback function, which can clobber errno value, so we need to save it before that. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/l

  1   2   3   >