[PATCH] net: ethtool: not call vzalloc for zero sized memory request

2019-03-27 Thread Li RongQing
NULL or ZERO_SIZE_PTR will be returned for zero sized memory request, and derefencing them will lead to a segfault so it is unnecessory to call vzalloc for zero sized memory request and not call __ethtool_get_strings which always uses the allocated memory this also fixes a possible memory leak if

Re: [PATCH net v2 0/2] thunderx: fix receive buffer page recycling

2019-03-27 Thread David Miller
From: Dean Nelson Date: > In attempting to optimize receive buffer page recycling for XDP, commit > 773225388dae15e72790 ("net: thunderx: Optimize page recycling for XDP") > inadvertently introduced two problems for the non-XDP case, that will be > addressed by this patch series. Series applied

Re: [PATCH net] vrf: prevent adding upper devices

2019-03-27 Thread David Miller
From: Sabrina Dubroca Date: Tue, 26 Mar 2019 18:22:16 +0100 > VRF devices don't work with upper devices. Currently, it's possible to > add a VRF device to a bridge or team, and to create macvlan, macsec, or > ipvlan devices on top of a VRF (bond and vlan are prevented respectively > by the lack o

Re: [net] net: phy: micrel: set soft_reset callback to genphy_soft_reset, for KSZ9031

2019-03-27 Thread Smith, Andrew
> So far genphy_soft_reset was used automatically if the PHY driver > didn't implement the soft_reset callback. This changed with the > mentioned commit and broke KSZ9031. To fix this configure the > KSZ9031 PHY driver to use genphy_soft_reset. > > Fixes: 6e2d85ec0559 ("net: phy: Stop with excessiv

Re: [PATCH] net: mii: Fix PAUSE cap advertisement from linkmode_adv_to_lcl_adv_t() helper

2019-03-27 Thread David Miller
From: Claudiu Manoil Date: Tue, 26 Mar 2019 11:48:57 +0200 > With a recent link mode advertisement code update this helper > providing local pause capability translation used for flow > control link mode negotiation got broken. > For eth drivers using this helper, the issue is apparent only > if

Re: [PATCH] ila: Fix rhashtable walker list corruption

2019-03-27 Thread David Miller
From: Herbert Xu Date: Tue, 26 Mar 2019 13:50:14 +0800 > ila_xlat_nl_cmd_flush uses rhashtable walkers allocated from the > stack but it never frees them. This corrupts the walker list of > the hash table. > > This patch fixes it. > > Reported-by: syzbot+dae72a112334aa65a...@syzkaller.appspotm

Re: [PATCH net] MAINTAINERS: Fix documentation file name for PHY Library

2019-03-27 Thread David Miller
From: Florian Fainelli Date: Mon, 25 Mar 2019 14:35:30 -0700 > MAINTAINERS still pointed to phy.txt after moving this file into the rst > format, fix this. > > Reported-by: Joe Perches > Fixes: 25fe02d00a1e ("Documentation: net: phy: switch documentation to rst > format") > Signed-off-by: Flor

Re: [PATCH net] net: datagram: fix unbounded loop in __skb_try_recv_datagram()

2019-03-27 Thread David Miller
From: Paolo Abeni Date: Mon, 25 Mar 2019 14:18:06 +0100 > Christoph reported a stall while peeking datagram with an offset when > busy polling is enabled. __skb_try_recv_datagram() uses as the loop > termination condition 'queue empty'. When peeking, the socket > queue can be not empty, even when

Re: [PATCH net] net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode

2019-03-27 Thread David Miller
From: Heiner Kallweit Date: Sat, 23 Mar 2019 19:41:32 +0100 > This patches fixes few issues in mv88e6390x_port_set_cmode(). > > 1. When entering the function the old cmode may be 0, in this case >mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail >out and have no chance to s

[PATCH net-next v5] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-27 Thread wenxu
From: wenxu There is currently no support for the multicast/broadcast aspects of VXLAN in ovs. In the datapath flow the tun_dst must specific. But in the IP_TUNNEL_INFO_BRIDGE mode the tun_dst can not be specific. And the packet can forward through the fdb table of vxlan devcice. In this mode the

Re: [PATCH] net: dsa: Implement flow_dissect callback for tag_qca

2019-03-27 Thread xiaofeis
On 2019-03-27 18:15, Vinod Koul wrote: On 27-03-19, 11:59, xiaofeis wrote: Add flow_dissect for qca tagged packet to get the right hash. Ideally this patch should have been tagged as V2. Anyhow the change looks fine so: Reviewed-by: Vinod Koul Signed-off-by: Xiaofei Shen --- net/dsa/tag_

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-27 Thread Stanislav Fomichev
On 03/27, Alexei Starovoitov wrote: > On Wed, Mar 27, 2019 at 11:14:46PM -0400, Willem de Bruijn wrote: > > On Wed, Mar 27, 2019 at 9:26 PM Alexei Starovoitov > > wrote: > > > > > > On Wed, Mar 27, 2019 at 12:58:20PM -0700, Stanislav Fomichev wrote: > > > > On 03/27, Alexei Starovoitov wrote: > >

[PATCH v3 net-next 04/13] ipv4: Create cleanup helper for fib_nh

2019-03-27 Thread David Ahern
From: David Ahern Move the fib_nh cleanup code from free_fib_info_rcu into a new helper, fib_nh_release. Move classid accounting into fib_nh_release which is called per fib_nh to make accounting symmetrical with fib_nh_init. Export the helper to allow for use with nexthop objects in the future.

[PATCH v3 net-next 03/13] ipv4: Create init helper for fib_nh

2019-03-27 Thread David Ahern
From: David Ahern Consolidate the fib_nh initialization which is duplicated between fib_create_info for single path and fib_get_nhs for multipath. Export the helper to allow for use with nexthop objects in the future. Signed-off-by: David Ahern --- include/net/ip_fib.h | 4 ++ net/ipv4/f

[PATCH v3 net-next 00/13] net: Move fib_nh and fib6_nh to a common struct

2019-03-27 Thread David Ahern
From: David Ahern First set of three with the end goal of enabling IPv6 gateways with IPv4 routes. This set refactors ipv4 and ipv6 code to create init and release helpers for each protocol and moving common elements to a fib_nh_common struct. v3 - split the reject setting into 2 with helper to

[PATCH v3 net-next 06/13] ipv6: Create cleanup helper for fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern Move the fib6_nh cleanup code to a new helper, fib6_nh_release. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 1 + net/ipv6/ip6_fib.c| 5 + net/ipv6/route.c | 8 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/net/ip6_fib

[PATCH v3 net-next 08/13] ipv6: Refactor fib6_ignore_linkdown

2019-03-27 Thread David Ahern
From: David Ahern fib6_ignore_linkdown takes a fib6_info but only looks at the net_device and its IPv6 config. Change it to take a net_device over a fib6_info as its input argument. In addition, move it to a header file to make the check inline and usable later with IPv4 code without going throu

[PATCH v3 net-next 13/13] net: Use common nexthop init and release helpers

2019-03-27 Thread David Ahern
From: David Ahern With fib_nh_common in place, move common initialization and release code into helpers used by both ipv4 and ipv6. For the moment, the init is just the lwt encap and the release is both the netdev reference and the the lwt state reference. More will be added later. Signed-off-by

[PATCH v3 net-next 09/13] ipv6: Change rt6_add_nexthop and rt6_nexthop_info to take fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern rt6_add_nexthop and rt6_nexthop_info only need the fib6_info for the gateway flag and the nexthop weight, and the presence of a gateway is now per-nexthop. Update the signatures to take a fib6_nh and nexthop weight and better align with the ipv4 versions. Signed-off-by: David A

[PATCH v3 net-next 11/13] ipv6: Rename fib6_nh entries

2019-03-27 Thread David Ahern
From: David Ahern Rename fib6_nh entries that will be moved to a fib_nh_common struct. Specifically, the device, gateway, flags, and lwtstate are common with all nexthop definitions. In some places new temporary variables are declared or local variables renamed to maintain line lengths. Rename o

[PATCH v3 net-next 02/13] ipv4: Move IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN to helper

2019-03-27 Thread David Ahern
From: David Ahern in_dev lookup followed by IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN check is called in several places, some with the rcu lock and others with the rtnl held. Move the check to a helper similar to what IPv6 has. Since the helper can be invoked from either context use rcu_dereference_rtn

[PATCH v3 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern Similar to IPv4, consolidate the fib6_nh initialization into a helper. As a new standalone function, add a cleanup path to put lwtstate on error. To avoid modifying fib6_config flags, move the reject check to a helper that is invoked once by fib6_nh_init to reset the device and

[PATCH v3 net-next 12/13] net: Add fib_nh_common and update fib_nh and fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern Add fib_nh_common struct with common nexthop attributes. Convert fib_nh and fib6_nh to use it. Use macros to move existing fib_nh_* references to the new nh_common.nhc_*. Signed-off-by: David Ahern --- include/net/ip6_fib.h| 10 ++ include/net/ip_fib.h | 41 ++

[PATCH v3 net-next 10/13] ipv4: Rename fib_nh entries

2019-03-27 Thread David Ahern
From: David Ahern Rename fib_nh entries that will be moved to a fib_nh_common struct. Specifically, the device, oif, gateway, flags, scope, lwtstate, nh_weight and nh_upper_bound are common with all nexthop definitions. In the process shorten fib_nh_lwtstate to fib_nh_lws to avoid really long lin

[PATCH v3 net-next 07/13] ipv6: Move gateway checks to a fib6_nh setting

2019-03-27 Thread David Ahern
From: David Ahern The gateway setting is not per fib6_info entry but per-fib6_nh. Add a new fib_nh_has_gw flag to fib6_nh and convert references to RTF_GATEWAY to the new flag. For IPv6 address the flag is cheaper than checking that nh_gw is non-0 like IPv4 does. While this increases fib6_nh by

[PATCH v3 net-next 01/13] ipv4: Define fib_get_nhs when CONFIG_IP_ROUTE_MULTIPATH is disabled

2019-03-27 Thread David Ahern
From: David Ahern Define fib_get_nhs to return EINVAL when CONFIG_IP_ROUTE_MULTIPATH is not enabled and remove the ifdef check for CONFIG_IP_ROUTE_MULTIPATH in fib_create_info. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel --- net/ipv4/fib_semantics.c | 15 +-- 1 file chang

Re: [PATCH net-next v4] openvswitch: Make metadata_dst tunnel work in IP_TUNNEL_INFO_BRIDGE mode

2019-03-27 Thread Pravin Shelar
On Tue, Mar 26, 2019 at 8:16 PM wrote: > > From: wenxu > > There is currently no support for the multicast/broadcast aspects > of VXLAN in ovs. In the datapath flow the tun_dst must specific. > But in the IP_TUNNEL_INFO_BRIDGE mode the tun_dst can not be specific. > And the packet can forward thr

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 11:14:46PM -0400, Willem de Bruijn wrote: > On Wed, Mar 27, 2019 at 9:26 PM Alexei Starovoitov > wrote: > > > > On Wed, Mar 27, 2019 at 12:58:20PM -0700, Stanislav Fomichev wrote: > > > On 03/27, Alexei Starovoitov wrote: > > > > On Tue, Mar 26, 2019 at 07:44:21PM -0700, St

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-27 Thread Willem de Bruijn
On Wed, Mar 27, 2019 at 9:26 PM Alexei Starovoitov wrote: > > On Wed, Mar 27, 2019 at 12:58:20PM -0700, Stanislav Fomichev wrote: > > On 03/27, Alexei Starovoitov wrote: > > > On Tue, Mar 26, 2019 at 07:44:21PM -0700, Stanislav Fomichev wrote: > > > > On 03/26, Alexei Starovoitov wrote: > > > > >

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 08:50:19PM -0600, David Ahern wrote: > On 3/27/19 8:29 PM, Alexei Starovoitov wrote:]\ > > that was a typo. I meant fib6_flags. > > why mess with cfg and use it as weird side effect only to > > get rt->fib6_flags = cfg->fc_flags; working after fib6_nh_init() returns? > > Why

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
On 3/27/19 8:29 PM, Alexei Starovoitov wrote:]\ > that was a typo. I meant fib6_flags. > why mess with cfg and use it as weird side effect only to > get rt->fib6_flags = cfg->fc_flags; working after fib6_nh_init() returns? > Why not to move that fib6_flags = fc_flags assignment into fib6_nh_init ?

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 08:05:03PM -0600, David Ahern wrote: > On 3/27/19 7:30 PM, Alexei Starovoitov wrote: > >>> > >>> imo it would be cleaner not to mess with cfg. > >>> Ideally it should be marked 'const'. > >> > >> Existing code sets those flags but on a fib6_info. This is not used for > >> ne

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
On 3/27/19 7:30 PM, Alexei Starovoitov wrote: > cfg should really be const. and BTW, it is not const now to ip6_route_info_create and making it const affects a long list of helper functions invoked by now fib6_nh_init.

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
On 3/27/19 7:30 PM, Alexei Starovoitov wrote: >>> >>> imo it would be cleaner not to mess with cfg. >>> Ideally it should be marked 'const'. >> >> Existing code sets those flags but on a fib6_info. This is not used for >> nexthop objects and is kept here to not duplicate this if branch in the >> cr

Re: [PATCH net-next V4 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-27 Thread Florian Fainelli
On 3/27/2019 4:59 PM, Leandro Dorileo wrote: > The Time Aware Priority Scheduler is heavily dependent to link speed, > it relies on it to calculate transmission bytes per cycle, we can't > properly calculate the so called budget if the device has failed > to report the link speed. > > In that c

Re: linux-next: manual merge of the bpf-next tree with the net tree

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 8:15 AM Alexei Starovoitov wrote: > then get propagated into net-next and then bpf-next will get them as well. Now it's done. Luca, could you please rebase on bpf-next and resubmit your patch?

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 06:47:23PM -0600, David Ahern wrote: > On 3/27/19 4:52 PM, Alexei Starovoitov wrote: > >> + > >> + /* We cannot add true routes via loopback here, > >> + * they would result in kernel looping; promote them to reject routes > >> + */ > >> + addr_type = ipv6_addr_type(&c

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 12:58:20PM -0700, Stanislav Fomichev wrote: > On 03/27, Alexei Starovoitov wrote: > > On Tue, Mar 26, 2019 at 07:44:21PM -0700, Stanislav Fomichev wrote: > > > On 03/26, Alexei Starovoitov wrote: > > > > On Tue, Mar 26, 2019 at 11:54:56AM -0700, Stanislav Fomichev wrote: > >

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
On 3/27/19 4:52 PM, Alexei Starovoitov wrote: >> + >> +/* We cannot add true routes via loopback here, >> + * they would result in kernel looping; promote them to reject routes >> + */ >> +addr_type = ipv6_addr_type(&cfg->fc_dst); >> +if ((cfg->fc_flags & RTF_REJECT) || >> +

[PATCH net-next V4 1/2] net/sched: taprio: fix picos_per_byte miscalculation

2019-03-27 Thread Leandro Dorileo
The Time Aware Priority Scheduler is heavily dependent to link speed, it relies on it to calculate transmission bytes per cycle, we can't properly calculate the so called budget if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong budget. This p

[PATCH net-next V4 2/2] net/sched: cbs: fix port_rate miscalculation

2019-03-27 Thread Leandro Dorileo
The Credit Based Shaper heavily depends on link speed to calculate the scheduling credits, we can't properly calculate the credits if the device has failed to report the link speed. In that case we can't dequeue packets assuming a wrong port rate that will result into an inconsistent credit distri

[PATCH net-next V4 0/2] net/sched: taprio: cbs: Fix using invalid link speed

2019-03-27 Thread Leandro Dorileo
This set fixes miscalculations based on invalid link speed values. Changes in v4: + converted pr_info calls to netdev_dbg (suggested by: Florian Fainelli); Changes in v3: + yet pr_info() format warnings; Changes in v2: + fixed pr_info() format both on cbs and taprio patches; Leandro Dorileo

Re: [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port

2019-03-27 Thread Jiri Pirko
Wed, Mar 27, 2019 at 09:13:00PM CET, f.faine...@gmail.com wrote: >On 3/27/19 1:01 PM, Jiri Pirko wrote: >> Wed, Mar 27, 2019 at 08:54:41PM CET, f.faine...@gmail.com wrote: >>> On 3/26/2019 5:03 AM, Jiri Pirko wrote: From: Jiri Pirko In order for devlink compat functions to work, imp

Re: [PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread Alexei Starovoitov
On Wed, Mar 27, 2019 at 11:23:21AM -0700, David Ahern wrote: > From: David Ahern > > Similar to IPv4, consolidate the fib6_nh initialization into a helper. > > Signed-off-by: David Ahern > --- > include/net/ip6_fib.h | 4 + > net/ipv6/route.c | 235 > +++

Re: Revising prandom_32 generator

2019-03-27 Thread George Spelvin
On Wed, 27 Mar 2019 at 14:32:55 -0400, Hannes Frederic Sowa wrote: > On Tue, Mar 26, 2019, at 20:07, George Spelvin wrote: >> On Tue, 26 Mar 2019 at 14:03:55 -0400, Hannes Frederic Sowa wrote: >>> Are you trying to fix the modulo biases? I think that prandom_u32_max >>> also has bias, would that be

Re: [PATCH net] net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode

2019-03-27 Thread Heiner Kallweit
On 27.03.2019 22:22, Florian Fainelli wrote: > On 3/23/19 11:41 AM, Heiner Kallweit wrote: >> This patches fixes few issues in mv88e6390x_port_set_cmode(). >> >> 1. When entering the function the old cmode may be 0, in this case >>mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail

Re: [PATCH net-next 0/2] mlxsw: Add support for devlink info command

2019-03-27 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 01:58:02PM -0700, David Miller wrote: > Are you going to respin this to add the psid documentation? Yes

Re: [PATCH net-next] inet: switch IP ID generator to siphash

2019-03-27 Thread David Miller
From: Eric Dumazet Date: Wed, 27 Mar 2019 12:40:33 -0700 > According to Amit Klein and Benny Pinkas, IP ID generation is too weak > and might be used by attackers. > > Even with recent net_hash_mix() fix (netns: provide pure entropy for > net_hash_mix()) > having 64bit key and Jenkins hash is r

Re: [PATCH] ibmvnic: Move debug printk out of spinlock

2019-03-27 Thread David Miller
From: Thomas Falcon Date: Wed, 27 Mar 2019 10:58:14 -0500 > Move this print statement out of the reset queue spinlock > in case it sleeps. > > Signed-off-by: Thomas Falcon printk does not sleep and can be used in any context, even with spinlocks held

[PATCH net,v2] vrf: check accept_source_route on the original netdevice

2019-03-27 Thread Stephen Suryaputra
Configuration check to accept source route IP options should be made on the incoming netdevice when the skb->dev is an l3mdev master. The route lookup for the source route next hop also needs the incoming netdev. Signed-off-by: Stephen Suryaputra --- net/ipv4/ip_input.c | 3 +++ net/ipv4/ip_op

Re: [PATCH net] net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode

2019-03-27 Thread Florian Fainelli
On 3/23/19 11:41 AM, Heiner Kallweit wrote: > This patches fixes few issues in mv88e6390x_port_set_cmode(). > > 1. When entering the function the old cmode may be 0, in this case >mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail >out and have no chance to set a new mode. The

Re: [PATCH net] vrf: check accept_source_route on the original netdevice

2019-03-27 Thread Stephen Suryaputra
Hit send too soon. There is another related problem that I think needs fixing. On Wed, Mar 27, 2019 at 3:55 PM Stephen Suryaputra wrote: > > Configuration check to accept source route IP options should be made on the > incoming netdevice when the skb->dev is an l3mdev master. > > Signed-off-by: S

[PATCH net-next 2/3] net: phy: use genphy_read_abilities in genphy driver

2019-03-27 Thread Heiner Kallweit
Currently the genphy driver populates phydev->supported like this: First all possible feature bits are set, then genphy_config_init() reads the available features from the chip and remove all unsupported features from phydev->supported. This can be simplified by using genphy_read_abilities(). Sign

[PATCH net-next 3/3] net: phy: realtek: use genphy_read_abilities

2019-03-27 Thread Heiner Kallweit
Use new function genphy_read_abilities(). This allows to remove all calls to genphy_config_init(). Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/drivers/net/phy/realtek.c b/d

[PATCH net-next 1/3] net: phy: add genphy_read_abilities

2019-03-27 Thread Heiner Kallweit
Similar to genphy_c45_pma_read_abilities() add a function to dynamically detect the abilities of a Clause 22 PHY. This is mainly copied from genphy_config_init(). Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 48 include/linux/phy.h

Re: [PATCH v2 net-next] tcp: fix zerocopy and notsent_lowat issues

2019-03-27 Thread David Miller
From: Eric Dumazet Date: Tue, 26 Mar 2019 08:34:55 -0700 > My recent patch had at least three problems : > > 1) TX zerocopy wants notification when skb is acknowledged, >thus we need to call skb_zcopy_clear() if the skb is >cached into sk->sk_tx_skb_cache > > 2) Some applications might

Re: [PATCH net-next 0/2] mlxsw: Add support for devlink info command

2019-03-27 Thread David Miller
From: Ido Schimmel Date: Tue, 26 Mar 2019 13:46:24 + > Shalom says: > > Expose the following ASIC information via devlink info command: > - Hardware revision > - Firmware PSID > - Running firmware version > > Standard output example: > $ devlink dev info pci/:03:00.0 > pci/000

[PATCH net-next 0/3] net: phy: add and use new function genphy_read_abilities

2019-03-27 Thread Heiner Kallweit
Similar to genphy_c45_pma_read_abilities() add a function to dynamically detect the abilities of a Clause 22 PHY. This is mainly copied from genphy_config_init(). Main benefit is that PHY drivers no longer have to specify whether they support GBit or not (provided they keep to the C22 standard). H

Re: [PATCH v2 net-next] net: openvswitch: Add a new action check_pkt_len

2019-03-27 Thread David Miller
From: nusid...@redhat.com Date: Tue, 26 Mar 2019 06:13:46 +0530 > From: Numan Siddique > > This patch adds a new action - 'check_pkt_len' which checks the > packet length and executes a set of actions if the packet > length is greater than the specified length or executes > another set of action

Re: [PATCH 1/2] net: sch_generic: add flag IFF_FIFO_QUEUE to use pfifo_fast as default scheduler

2019-03-27 Thread Cong Wang
On Wed, Mar 27, 2019 at 1:11 PM Marc Kleine-Budde wrote: > Doubts aside, how should an arbitrary default qdisc per netdevice look > like? Add a string "default_qdisc" to the netdev? Lookup qdisc by string > during DOWN->UP transition? What do if that qdisc is not compiled into > the kernel? Or rat

Re: [PATCH net-next v2 0/2] ethtool: add support for Fast Link Down as new PHY tunable

2019-03-27 Thread David Miller
From: Heiner Kallweit Date: Mon, 25 Mar 2019 19:33:39 +0100 > This adds support for Fast Link Down as new PHY tunable. > Fast Link Down reduces the time until a link down event is reported > for 1000BaseT. According to the standard it's 750ms what is too long > for several use cases. > > This is

Re: [PATCH net-next] net: dsa: mv88e6xxx: remove unneeded cmode initialization

2019-03-27 Thread David Miller
From: Heiner Kallweit Date: Sat, 23 Mar 2019 19:45:13 +0100 > This partially reverts ed8fe20205ac ("net: dsa: mv88e6xxx: prevent > interrupt storm caused by mv88e6390x_port_set_cmode"). I missed > that chip->ports[].cmode is overwritten anyway by the cmode > caching in mv88e6xxx_setup(). > > Sig

Re: [PATCH net] net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode

2019-03-27 Thread David Miller
From: Heiner Kallweit Date: Sat, 23 Mar 2019 19:41:32 +0100 > This patches fixes few issues in mv88e6390x_port_set_cmode(). > > 1. When entering the function the old cmode may be 0, in this case >mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail >out and have no chance to s

Re: [PATCH v4 bpf-next 1/3] bpf: add bpf_progenyof helper

2019-03-27 Thread Brendan Gregg
On Wed, Mar 27, 2019 at 8:59 AM Javier Honduvilla Coto wrote: > > On Mon, Mar 25, 2019 at 03:17:03PM +0100, Daniel Borkmann wrote: > > On 03/22/2019 11:38 PM, Javier Honduvilla Coto wrote: > > > This patch adds the bpf_progenyof helper which receives a PID and returns > > > 1 if the process curren

Re: [PATCH net-next 1/1] bnx2x: Utilize FW 7.13.11.0.

2019-03-27 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Wed, 27 Mar 2019 04:40:43 -0700 > Commit 8fcf0ec44c11f "bnx2x: Add FW 7.13.11.0" added said .bin FW to > linux-firmware; This patch incorporates the FW in the bnx2x driver. > This introduces few FW fixes and the support for Tx VLAN filtering. > > Please consid

Re: [PATCH ghak90 V5 02/10] audit: add container id

2019-03-27 Thread Ondrej Mosnacek
On Fri, Mar 15, 2019 at 7:33 PM Richard Guy Briggs wrote: > Implement the proc fs write to set the audit container identifier of a > process, emitting an AUDIT_CONTAINER_OP record to document the event. > > This is a write from the container orchestrator task to a proc entry of > the form /proc/PI

Re: [PATCH net-next 2/2] mlxsw: core: Add support for devlink info command

2019-03-27 Thread Jakub Kicinski
On Wed, 27 Mar 2019 19:44:11 +, Ido Schimmel wrote: > On Wed, Mar 27, 2019 at 10:53:37AM -0700, Jakub Kicinski wrote: > > On Wed, 27 Mar 2019 09:47:14 +, Petr Machata wrote: > > > Jakub Kicinski writes: > > > > > > > Looks good & glad to see it, but what's a PSID? ;) > > > > > > > > I

Re: [PATCH net-next v2] fou: Support binding FoU socket

2019-03-27 Thread David Miller
From: Kristian Evensen Date: Wed, 27 Mar 2019 11:16:03 +0100 > An FoU socket is currently bound to the wildcard-address. While this > works fine, there are several use-cases where the use of the > wildcard-address is not desirable. For example, I use FoU on some > multi-homed servers and would li

Re: [RFC PATCH 1/1 v2] net: sched: Introduce conndscp action

2019-03-27 Thread Kevin 'ldir' Darbyshire-Bryant
Hi Cong, Thanks for getting back to me once again and apologies for the delayed reply. > On 25 Mar 2019, at 19:17, Cong Wang wrote: > > On Sat, Mar 23, 2019 at 10:45 AM Kevin 'ldir' Darbyshire-Bryant > wrote: >> >> I will remove the functionality from conndscp that changes the conntrack >> m

Re: [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port

2019-03-27 Thread Florian Fainelli
On 3/27/19 1:01 PM, Jiri Pirko wrote: > Wed, Mar 27, 2019 at 08:54:41PM CET, f.faine...@gmail.com wrote: >> On 3/26/2019 5:03 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> In order for devlink compat functions to work, implement >>> ndo_get_devlink_port. Legacy slaves does not have devlink po

Re: [PATCH 1/2] net: sch_generic: add flag IFF_FIFO_QUEUE to use pfifo_fast as default scheduler

2019-03-27 Thread Marc Kleine-Budde
On 3/27/19 6:14 PM, Cong Wang wrote: > On Wed, Mar 27, 2019 at 9:56 AM Marc Kleine-Budde wrote: >> >> There is networking hardware that isn't based on Ethernet for layers 1 and 2. >> >> For example CAN. >> >> CAN is a multi-master serial bus standard for connecting Electronic Control >> Units [ECU

Re: [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port

2019-03-27 Thread Jiri Pirko
Wed, Mar 27, 2019 at 08:54:41PM CET, f.faine...@gmail.com wrote: >On 3/26/2019 5:03 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> In order for devlink compat functions to work, implement >> ndo_get_devlink_port. Legacy slaves does not have devlink port instances >> created for themselves. > >No

Re: [RFC bpf-next v3 6/8] flow_dissector: handle no-skb use case

2019-03-27 Thread Stanislav Fomichev
On 03/27, Alexei Starovoitov wrote: > On Tue, Mar 26, 2019 at 07:44:21PM -0700, Stanislav Fomichev wrote: > > On 03/26, Alexei Starovoitov wrote: > > > On Tue, Mar 26, 2019 at 11:54:56AM -0700, Stanislav Fomichev wrote: > > > > On 03/26, Alexei Starovoitov wrote: > > > > > On Tue, Mar 26, 2019 at 1

[PATCH net] vrf: check accept_source_route on the original netdevice

2019-03-27 Thread Stephen Suryaputra
Configuration check to accept source route IP options should be made on the incoming netdevice when the skb->dev is an l3mdev master. Signed-off-by: Stephen Suryaputra --- net/ipv4/ip_input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index e

Re: [patch net-next v2 08/12] dsa: implement ndo_get_devlink_port

2019-03-27 Thread Florian Fainelli
On 3/26/2019 5:03 AM, Jiri Pirko wrote: > From: Jiri Pirko > > In order for devlink compat functions to work, implement > ndo_get_devlink_port. Legacy slaves does not have devlink port instances > created for themselves. Not a big fan of de-duplicating the entire set of netdev_ops for legacy vs.

Re: [PATCH net-next 2/2] mlxsw: core: Add support for devlink info command

2019-03-27 Thread Ido Schimmel
On Wed, Mar 27, 2019 at 10:53:37AM -0700, Jakub Kicinski wrote: > On Wed, 27 Mar 2019 09:47:14 +, Petr Machata wrote: > > Jakub Kicinski writes: > > > > > Looks good & glad to see it, but what's a PSID? ;) > > > > > > I found this after 5 seconds of googling: > > > > > > http://www.mellanox.c

[PATCH net-next] inet: switch IP ID generator to siphash

2019-03-27 Thread Eric Dumazet
According to Amit Klein and Benny Pinkas, IP ID generation is too weak and might be used by attackers. Even with recent net_hash_mix() fix (netns: provide pure entropy for net_hash_mix()) having 64bit key and Jenkins hash is risky. It is time to switch to siphash and its 128bit keys. Signed-off

Re: [PATCH 1/2] net: sch_generic: add flag IFF_FIFO_QUEUE to use pfifo_fast as default scheduler

2019-03-27 Thread Marc Kleine-Budde
On 3/27/19 7:53 PM, Uwe Kleine-König wrote: > On Wed, Mar 27, 2019 at 05:56:31PM +0100, Marc Kleine-Budde wrote: >> There is networking hardware that isn't based on Ethernet for layers 1 and 2. >> >> For example CAN. >> >> CAN is a multi-master serial bus standard for connecting Electronic Control

[PATCH AUTOSEL 5.0 093/262] net: dsa: mv88e6xxx: Add lockdep classes to fix false positive splat

2019-03-27 Thread Sasha Levin
From: Andrew Lunn [ Upstream commit f6d9758b12660484b6639364cc406da92a918c96 ] The following false positive lockdep splat has been observed. == WARNING: possible circular locking dependency detected 4.20.0+ #302 Not tainted ---

Re: TSN: taprio scheduler

2019-03-27 Thread Murali Karicheri
Hi Vinicius, On 03/26/2019 05:02 PM, Vinicius Costa Gomes wrote: Hi Murali, Murali Karicheri writes: Hi Vinicius, My name is Murali Karicheri from Texas Instruments Ltd. We have AM65x/DRA80xMProcessor, that is capable of supporting TSN. Our solution would use the ICSSG_PRU which is a fully

[PATCH AUTOSEL 5.0 096/262] e1000e: Fix -Wformat-truncation warnings

2019-03-27 Thread Sasha Levin
From: Florian Fainelli [ Upstream commit 135e7245479addc6b1f5d031e3d7e2ddb3d2b109 ] Provide precision hints to snprintf() since we know the destination buffer size of the RX/TX ring names are IFNAMSIZ + 5 - 1. This fixes the following warnings: drivers/net/ethernet/intel/e1000e/netdev.c: In fun

Re: [RFC] net: sch_generic: fq_codel vs pfifo_fast

2019-03-27 Thread Marc Kleine-Budde
On 3/27/19 7:30 PM, Stephen Hemminger wrote: >> on CAN networking hardware we (the CAN community) experience a lot silent, >> unwanted frame drops inside the kernel. (See first patch for details.) So >> here's a patch series to keep pfifo_fast as default scheduler for CAN >> hardware >> by default

[PATCH AUTOSEL 5.0 127/262] mt76: usb: do not run mt76u_queues_deinit twice

2019-03-27 Thread Sasha Levin
From: Lorenzo Bianconi [ Upstream commit b3098121c42caaf3aea239b8655cf52d45be116f ] Do not call mt76u_queues_deinit routine in mt76u_alloc_queues error path since it will be run in mt76x0u_register_device or mt76x2u_register_device error path. Current implementation triggers the following kernel

Re: [PATCH/RFC bpf-next 06/16] bpf: new sysctl "bpf_jit_32bit_opt"

2019-03-27 Thread Jiong Wang
Alexei Starovoitov writes: > On Wed, Mar 27, 2019 at 05:18:35PM +, Jiong Wang wrote: >> >> > On 27 Mar 2019, at 17:17, Alexei Starovoitov >> > wrote: >> > >> > On Wed, Mar 27, 2019 at 05:06:01PM +, Jiong Wang wrote: >> >> >> >>> On 27 Mar 2019, at 17:00, Alexei Starovoitov >> >>>

Re: [PATCH net-next v5 00/22] ethtool netlink interface, part 1

2019-03-27 Thread David Miller
From: Michal Kubecek Date: Wed, 27 Mar 2019 15:28:06 +0100 > On Wed, Mar 27, 2019 at 02:09:28PM +0100, Jiri Pirko wrote: >> Could you please perhaps split the patchset so it contains max ~15 patches? > > Would 1-17 still be acceptable? I'm OK with ~17 especially considering the scope of this wo

[PATCH AUTOSEL 4.14 006/123] net/mlx5: Avoid panic when setting vport rate

2019-03-27 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit 24319258660a84dd77f4be026a55b10a12524919 ] If we try to set VFs rate on a VF (not PF) net device, the kernel will be crash. The commands are show as below: $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs $ ip link set $MLX_VF0 vf 0 max_tx_rate 2 min_

[PATCH AUTOSEL 4.14 007/123] net/mlx5: Avoid panic when setting vport mac, getting vport config

2019-03-27 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit 6e77c413e8e73d0f36b5358b601389d75ec4451c ] If we try to set VFs mac address on a VF (not PF) net device, the kernel will be crash. The commands are show as below: $ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs $ ip link set $MLX_VF0 vf 0 mac 00:11:2

Re: netif_receive_skb_list and interrupts enabled/disabled

2019-03-27 Thread Heiner Kallweit
On 27.03.2019 09:20, Jesper Dangaard Brouer wrote: > On Tue, 26 Mar 2019 21:04:09 +0100 > Heiner Kallweit wrote: > >> A question inspired by 0a25d92c6f4f ("dpaa2-eth: use >> netif_receive_skb_list"): >> kerneldoc of netif_receive_skb_list states that interrupts should be >> enabled. > > Do not

Re: [PATCH 1/2] net: sch_generic: add flag IFF_FIFO_QUEUE to use pfifo_fast as default scheduler

2019-03-27 Thread Uwe Kleine-König
On Wed, Mar 27, 2019 at 05:56:31PM +0100, Marc Kleine-Budde wrote: > There is networking hardware that isn't based on Ethernet for layers 1 and 2. > > For example CAN. > > CAN is a multi-master serial bus standard for connecting Electronic Control > Units [ECUs] also known as nodes. A frame on th

Re: "r8169: Reinstate ASPM Support" causes increased packet latency on Asus H87M-E motherboard

2019-03-27 Thread Heiner Kallweit
On 27.03.2019 16:20, Mike Crowe wrote: > On Wednesday 27 March 2019 at 15:05:46 +, Mike Crowe wrote: >> After upgrading the kernel to v4.19 we started seeing increased packet >> latency on two machines with ASUS H87M-E motherboards with on-board Realtek >> Gigabit Ethernet. This didn't happen w

[PATCH AUTOSEL 4.14 110/123] netfilter: physdev: relax br_netfilter dependency

2019-03-27 Thread Sasha Levin
From: Florian Westphal [ Upstream commit 8e2f311a68494a6677c1724bdcb10bada21af37c ] Following command: iptables -D FORWARD -m physdev ... causes connectivity loss in some setups. Reason is that iptables userspace will probe kernel for the module revision of the physdev patch, and physdev has

[PATCH net 1/2] nfp: validate the return code from dev_queue_xmit()

2019-03-27 Thread Jakub Kicinski
dev_queue_xmit() may return error codes as well as netdev_tx_t, and it always consumes the skb. Make sure we always return a correct netdev_tx_t value. Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors") Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Reviewed-by: Si

[PATCH net 2/2] nfp: disable netpoll on representors

2019-03-27 Thread Jakub Kicinski
NFP reprs are software device on top of the PF's vNIC. The comment above __dev_queue_xmit() sayeth: When calling this method, interrupts MUST be enabled. This is because the BH enable code must have IRQs enabled so that it will not deadlock. For netconsole we can't guarantee IRQ state, let's j

[PATCH net 0/2] nfp: fix retcode and disable netpoll on representors

2019-03-27 Thread Jakub Kicinski
Hi! This series avoids a potential crash on nfp representor devices when netpoll is in use. If transmitting the frame through underlying vNIC fails we'd return an error code (by passing on error code from __dev_queue_xmit()) and cause double free in netpoll code. Fix the error code and disable n

[PATCH v2 net-next 04/13] ipv4: Create cleanup helper for fib_nh

2019-03-27 Thread David Ahern
From: David Ahern Move the fib_nh cleanup code from free_fib_info_rcu into a new helper, fib_nh_release. Move classid accounting into fib_nh_release which is called per fib_nh to make accounting symmetrical with fib_nh_init. Export the helper to allow for use with nexthop objects in the future.

[PATCH v2 net-next 08/13] ipv6: Refactor fib6_ignore_linkdown

2019-03-27 Thread David Ahern
From: David Ahern fib6_ignore_linkdown takes a fib6_info but only looks at the net_device and its IPv6 config. Change it to take a net_device over a fib6_info as its input argument. In addition, move it to a header file to make the check inline and usable later with IPv4 code without going throu

[PATCH v2 net-next 07/13] ipv6: Move gateway checks to a fib6_nh setting

2019-03-27 Thread David Ahern
From: David Ahern The gateway setting is not per fib6_info entry but per-fib6_nh. Add a new fib_nh_has_gw flag to fib6_nh and convert references to RTF_GATEWAY to the new flag. For IPv6 address the flag is cheaper than checking that nh_gw is non-0 like IPv4 does. While this increases fib6_nh by

[PATCH v2 net-next 03/13] ipv4: Create init helper for fib_nh

2019-03-27 Thread David Ahern
From: David Ahern Consolidate the fib_nh initialization which is duplicated between fib_create_info for single path and fib_get_nhs for multipath. Export the helper to allow for use with nexthop objects in the future. Signed-off-by: David Ahern --- include/net/ip_fib.h | 4 ++ net/ipv4/f

[PATCH v2 net-next 05/13] ipv6: Create init helper for fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern Similar to IPv4, consolidate the fib6_nh initialization into a helper. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 4 + net/ipv6/route.c | 235 +++--- 2 files changed, 131 insertions(+), 108 deletions(-) diff --gi

[PATCH v2 net-next 09/13] ipv6: Change rt6_add_nexthop and rt6_nexthop_info to take fib6_nh

2019-03-27 Thread David Ahern
From: David Ahern rt6_add_nexthop and rt6_nexthop_info only need the fib6_info for the gateway flag and the nexthop weight, and the presence of a gateway is now per-nexthop. Update the signatures to take a fib6_nh and nexthop weight and better align with the ipv4 versions. Signed-off-by: David A

  1   2   3   >