Re: [PATCH v2] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
> Hi, > > On Mon, Apr 29, 2019 at 03:38:39PM +0800, Zhiqiang Liu wrote: >> From: Zhiqiang Liu >> >> Follow the following steps: >> # ip netns add net1 >> # export MALLOC_MMAP_THRESHOLD_=0 >> # ip netns list >> then Segmentation fault (core dumped) will occur. >> >> In get_netnsid_from_name func,

[PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread Zhiqiang Liu
From: Zhiqiang Liu Follow the following steps: # ip netns add net1 # export MALLOC_MMAP_THRESHOLD_=0 # ip netns list then Segmentation fault (core dumped) will occur. In get_netnsid_from_name func, answer is freed before rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers to answer`s content. I

[PATCH net-next] r8169: make use of phy_set_asym_pause

2019-05-04 Thread Heiner Kallweit
phy_probe() takes care that all supported modes are advertised, in addition use phy_support_asym_pause() to advertise pause modes. This way we don't have to deal with phylib internals directly. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 3 +-- 1 file changed, 1 ins

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

2019-05-04 Thread Jakub Kicinski
On Fri, 3 May 2019 16:09:39 -0700, Jeff Kirsher wrote: > From: Alice Michael > > This patch introduces "recovery mode" to the i40e driver. It is > part of a new Any2Any idea of upgrading the firmware. In this > approach, it is required for the driver to have support for > "transition firmware",

[PATCH net-next 03/13] mlxsw: use intermediate representation for matchall offload

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Updates the Mellanox spectrum driver to use the newer intermediate representation for flow actions in matchall offloads. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 38 +-

[PATCH net-next 07/13] net/sched: add police action to the hardware intermediate representation

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Add police action to the hardware intermediate representation which would subsequently allow it to be used by drivers for offload. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 5 + net/sched/cls_api.c

[PATCH net-next 06/13] net/sched: move police action structures to header

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Move tcf_police_params, tcf_police and tc_police_compat structures to a header. Making them usable to other code for example drivers that would offload police actions to hardware. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- include/ne

[PATCH net-next 02/13] net/sched: use the hardware intermediate representation for matchall

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Extends matchall offload to make use of the hardware intermediate representation. More specifically, this patch moves the native TC actions in cls_matchall offload to the newer flow_action representation. This ultimately allows us to avoid a direct dependency on nat

[PATCH net-next 04/13] net/dsa: use intermediate representation for matchall offload

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Updates dsa hardware switch handling infrastructure to use the newer intermediate representation for flow actions in matchall offloads. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- net/dsa/slave.c | 16 +++- 1 file changed,

[PATCH net-next 05/13] net/sched: remove unused functions for matchall offload

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Cleanup unused functions and variables after porting to the newer intermediate representation. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- include/net/pkt_cls.h| 25 - net/sched/cls_matchall.c | 2 -- 2 fi

[PATCH net-next 01/13] net/sched: add sample action to the hardware intermediate representation

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Add sample action to the hardware intermediate representation model which would subsequently allow it to be used by drivers for offload. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- include/net/flow_offload.h | 7 +++ net/sched/cls

[PATCH net-next 10/13] net/sched: add block pointer to tc_cls_common_offload structure

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Some actions like the police action are stateful and could share state between devices. This is incompatible with offloading to multiple devices and drivers might want to test for shared blocks when offloading. Store a pointer to the tcf_block structure in the tc_cl

[PATCH net-next 00/13] net: act_police offload support

2019-05-04 Thread Jakub Kicinski
Hi, this set starts by converting cls_matchall to the new flow offload infrastructure. It so happens that all drivers implementing cls_matchall offload today also offload cls_flower, so its a little easier for them to handle the actions in unified flow_rule format, even though in cls_matchall ther

[PATCH net-next 08/13] net/sched: extend matchall offload for hardware statistics

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Introduce a new command for matchall classifiers that allows hardware to update statistics. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- include/net/pkt_cls.h| 2 ++ net/sched/cls_matchall.c | 20 2 files chan

[PATCH net-next 09/13] net/sched: allow stats updates from offloaded police actions

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Implement the stats_update callback for the police action that will be used by drivers for hardware offload. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- net/sched/act_police.c | 15 +++ 1 file changed, 15 insertions(+) di

[PATCH net-next 11/13] nfp: flower: add qos offload framework

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Introduce matchall filter offload infrastructure that is needed to offload qos features like policing. Subsequent patches will make use of police-filters for ingress rate limiting. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- drivers/n

[PATCH net-next 12/13] nfp: flower: add qos offload install and remove functionality.

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Add install and remove offload functionality for qos offloads. We first check that a police filter can be implemented by the VF rate limiting feature in hw, then we install the filter via the qos infrastructure. Finally we implement the mechanism for removing these

[PATCH net-next 13/13] nfp: flower: add qos offload stats request and reply

2019-05-04 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Add stats request function that sends a stats request message to hw for a specific police-filter. Process stats reply from hw and update the stored qos structure. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski --- .../net/ethernet/netronome/

Re: [PATCH net-next 01/13] net/sched: add sample action to the hardware intermediate representation

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:16PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Add sample action to the hardware intermediate representation model which >would subsequently allow it to be used by drivers for offload. > >Signed-off-by: Pieter Jansen van Vuuren >Review

Re: [PATCH net-next 02/13] net/sched: use the hardware intermediate representation for matchall

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:17PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Extends matchall offload to make use of the hardware intermediate >representation. More specifically, this patch moves the native TC >actions in cls_matchall offload to the newer flow_actio

Re: [PATCH net-next 03/13] mlxsw: use intermediate representation for matchall offload

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:18PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Updates the Mellanox spectrum driver to use the newer intermediate >representation for flow actions in matchall offloads. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewed-by: Jakub Kic

Re: [PATCH net-next 04/13] net/dsa: use intermediate representation for matchall offload

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:19PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Updates dsa hardware switch handling infrastructure to use the newer >intermediate representation for flow actions in matchall offloads. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewe

Re: [PATCH net-next 05/13] net/sched: remove unused functions for matchall offload

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:20PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Cleanup unused functions and variables after porting to the newer >intermediate representation. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewed-by: Jakub Kicinski Acked-by: Jiri Pir

Re: [PATCH net-next 07/13] net/sched: add police action to the hardware intermediate representation

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:22PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Add police action to the hardware intermediate representation which >would subsequently allow it to be used by drivers for offload. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewed-by:

Re: [PATCH net-next 06/13] net/sched: move police action structures to header

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:21PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Move tcf_police_params, tcf_police and tc_police_compat structures to a >header. Making them usable to other code for example drivers that would >offload police actions to hardware. > >Sign

Re: [PATCH net-next 08/13] net/sched: extend matchall offload for hardware statistics

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:23PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Introduce a new command for matchall classifiers that allows hardware >to update statistics. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewed-by: Jakub Kicinski Acked-by: Jiri Pirko

Re: [PATCH net-next 10/13] net/sched: add block pointer to tc_cls_common_offload structure

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:25PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Some actions like the police action are stateful and could share state >between devices. This is incompatible with offloading to multiple devices >and drivers might want to test for shared

Re: [PATCH net-next 09/13] net/sched: allow stats updates from offloaded police actions

2019-05-04 Thread Jiri Pirko
Sat, May 04, 2019 at 01:46:24PM CEST, jakub.kicin...@netronome.com wrote: >From: Pieter Jansen van Vuuren > >Implement the stats_update callback for the police action that >will be used by drivers for hardware offload. > >Signed-off-by: Pieter Jansen van Vuuren >Reviewed-by: Jakub Kicinski Acke

[PATCH net-next] r8169: speed up rtl_loop_wait

2019-05-04 Thread Heiner Kallweit
When testing I figured out that most operations signal finish even before we trigger the first delay. Seems like PCI(e) access and memory barriers typically add enough latency. Therefore move the first delay after the first check. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r

[PATCH net-next v2 6/9] net: dsa: Add a private structure pointer to dsa_port

2019-05-04 Thread Vladimir Oltean
This is supposed to share information between the driver and the tagger, or used by the tagger to keep some state. Its use is optional. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- Changes in v2: - None. include/net/dsa.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH net-next v2 0/9] Traffic support for SJA1105 DSA driver

2019-05-04 Thread Vladimir Oltean
This patch set is a continuation of the "NXP SJA1105 DSA driver" v3 series, which was split in multiple pieces for easier review. Supporting a fully-featured (traffic-capable) driver for this switch requires some rework in DSA and also leaves behind a more generic infrastructure for other dumb swi

[PATCH net-next v2 1/9] net: dsa: Call driver's setup callback after setting up its switchdev notifier

2019-05-04 Thread Vladimir Oltean
This allows the driver to perform some manipulations of its own during setup, using generic switchdev calls. Having the notifiers registered at setup time is important because otherwise any switchdev transaction emitted during this time would be ignored (dispatched to an empty call chain). One cur

[PATCH net-next v2 4/9] net: dsa: Keep private info in the skb->cb

2019-05-04 Thread Vladimir Oltean
Map a DSA structure over the 48-byte control block that will hold skb info on transmit and receive. This is only for use within the DSA processing layer (e.g. communicating between DSA core and tagger) and not for passing info around with other layers such as the master net device. Also add a DSA_

[PATCH net-next v2 5/9] net: dsa: Add support for deferred xmit

2019-05-04 Thread Vladimir Oltean
Some hardware needs to take work to get convinced to receive frames on the CPU port (such as the sja1105 which takes temporary L2 forwarding rules over SPI that last for a single frame). Such work needs a sleepable context, and because the regular .ndo_start_xmit is atomic, this cannot be done in t

[PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vladimir Oltean
Frames get processed by DSA and redirected to switch port net devices based on the ETH_P_XDSA multiplexed packet_type handler found by the network stack when calling eth_type_trans(). The running assumption is that once the DSA .rcv function is called, DSA is always able to decode the switch tag i

[PATCH net-next v2 8/9] net: dsa: sja1105: Add support for Spanning Tree Protocol

2019-05-04 Thread Vladimir Oltean
While not explicitly documented as supported in UM10944, compliance with the STP states can be obtained by manipulating 3 settings at the (per-port) MAC config level: dynamic learning, inhibiting reception of regular traffic, and inhibiting transmission of regular traffic. In all these modes, tran

[PATCH net-next v2 7/9] net: dsa: sja1105: Add support for traffic through standalone ports

2019-05-04 Thread Vladimir Oltean
In order to support this, we are creating a make-shift switch tag out of a VLAN trunk configured on the CPU port. Termination of normal traffic on switch ports only works when not under a vlan_filtering bridge. Termination of management (PTP, BPDU) traffic works under all circumstances because it u

[PATCH net-next v2 9/9] Documentation: net: dsa: sja1105: Add info about supported traffic modes

2019-05-04 Thread Vladimir Oltean
Signed-off-by: Vladimir Oltean --- Changes in v2: - Added clarification about bridging other netdevices with swich ports. - Removed "Other notable features" section. Documentation/networking/dsa/sja1105.rst | 54 1 file changed, 54 insertions(+) diff --git a/Doc

[PATCH net-next v2 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-05-04 Thread Vladimir Oltean
This patch provides generic DSA code for using VLAN (802.1Q) tags for the same purpose as a dedicated switch tag for injection/extraction. It is based on the discussions and interest that has been so far expressed in https://www.spinics.net/lists/netdev/msg556125.html. Unlike all other DSA-support

[PATCH net-next] r8169: simplify rtl_writephy_batch and rtl_ephy_init

2019-05-04 Thread Heiner Kallweit
Make both functions macros to allow omitting the ARRAY_SIZE(x) argument. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 100 ++- 1 file changed, 52 insertions(+), 48 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/

Re: [PATCH iproute2 v3] ipnetns: use-after-free problem in get_netnsid_from_name func

2019-05-04 Thread David Ahern
On 5/4/19 1:26 AM, Zhiqiang Liu wrote: > > diff --git a/ip/ipnetns.c b/ip/ipnetns.c > index 430d884..d72be95 100644 > --- a/ip/ipnetns.c > +++ b/ip/ipnetns.c > @@ -107,7 +107,7 @@ int get_netnsid_from_name(const char *name) > struct nlmsghdr *answer; > struct rtattr *tb[NETNSA_MAX + 1];

[PATCH net-next] r8169: move EEE LED config to rtl8168_config_eee_mac

2019-05-04 Thread Heiner Kallweit
Move adjusting the EEE LED frequency to rtl8168_config_eee_mac. Exclude RTL8411 (version 38) like in the existing code. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/net/eth

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On 5/2/19 2:06 PM, Cong Wang wrote: > In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits > counter") > we added an overlimits counter for each HTB class which could > properly reflect how many times we use up all the bandwidth > on each class. However, the overlimits counter

CVE-2019-11683

2019-05-04 Thread Reindl Harald
is this fixed in 5.0.12 and just not visible in the changelog? because if not there's no poiunt to reboot a over a long time randomly crahsing firewall setup which *appears* stable now after replace "LOG" with "NFLOG" and remove --reap from the xt_recent rules -- https://www.

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 11:49 AM, Reindl Harald wrote: > is this fixed in 5.0.12 and just not visible in the changelog? > > because if not there's no poiunt to reboot a over a long time randomly > crahsing firewall setup which *appears* stable now after replace "LOG" > with "NFLOG" and remove --reap from the

[PATCH bpf-next 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-05-04 Thread Björn Töpel
From: Björn Töpel When an AF_XDP socket is released/closed the XSKMAP still holds a reference to the socket in a "released" state. The socket will still use the netdev queue resource, and block newly created sockets from attaching to that queue, but no user application can access the fill/complet

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:06 schrieb Eric Dumazet: >> -- >> >> https://www.openwall.com/lists/oss-security/2019/05/02/1 >> >> syzbot has reported a remotely triggerable memory corruption in the >> Linux kernel. It's been introduced quite recently in e20cf8d3f1f7 >> ("udp: implement G

Re: [PATCH iproute2-next v2] tc: add support for plug qdisc

2019-05-04 Thread David Ahern
On 4/30/19 10:53 AM, Paolo Abeni wrote: > sch_plug can be used to perform functional qdisc unit tests > controlling explicitly the queuing behaviour from user-space. Hi Paolo: Do you have or are you planning to write unit tests? > > Plug support lacks since its introduction in 2012. This change

Re: [PATCH 1/3] nsfs: add evict callback into struct proc_ns_operations

2019-05-04 Thread Wenbin Zeng
On Thu, May 02, 2019 at 04:04:06AM +0100, Al Viro wrote: > On Wed, May 01, 2019 at 02:42:23PM +0800, Wenbin Zeng wrote: > > The newly added evict callback shall be called by nsfs_evict(). Currently > > only put() callback is called in nsfs_evict(), it is not able to release > > all netns refcount,

[PATCH bpf-next 0/2] Two XSKMAP improvements

2019-05-04 Thread Björn Töpel
This series add two improvements for the XSKMAP, used by AF_XDP sockets. 1. Automatic cleanup when an AF_XDP socket goes out of scope. Instead of manually cleaning out the "released" state socket from the map, this is done automatically. 2. The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST

[PATCH bpf-next 2/2] xsk: honor BPF_EXIST and BPF_NOEXIST flags in XSKMAP

2019-05-04 Thread Björn Töpel
From: Björn Töpel The XSKMAP did not honor the BPF_EXIST/BPF_NOEXIST flags when updating an entry. This patch addresses that. Signed-off-by: Björn Töpel --- kernel/bpf/xskmap.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/xskmap.c b/kernel/b

Re: [PATCH iproute2 net-next v1 2/3] taprio: Add support for changing schedules

2019-05-04 Thread David Ahern
On 4/29/19 4:52 PM, Vinicius Costa Gomes wrote: > This allows for a new schedule to be specified during runtime, without > removing the current one. > > For that, the semantics of the 'tc qdisc change' operation in the > context of taprio is that if "change" is called and there is a running > sche

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 12:13 PM, Reindl Harald wrote: > > > > ok, so the answer is no > > what's the point then release every 2 days a new "stable" kernel? > even distributions like Fedora are not able to cope with that That is a question for distros, not for netdev@ ?

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:32 schrieb Eric Dumazet: > On 5/4/19 12:13 PM, Reindl Harald wrote: >> >> ok, so the answer is no >> >> what's the point then release every 2 days a new "stable" kernel? >> even distributions like Fedora are not able to cope with that > > That is a question for distros, not fo

Re: CVE-2019-11683

2019-05-04 Thread Stephen Hemminger
On Sat, 4 May 2019 18:39:15 +0200 Reindl Harald wrote: > Am 04.05.19 um 18:32 schrieb Eric Dumazet: > > On 5/4/19 12:13 PM, Reindl Harald wrote: > >> > >> ok, so the answer is no > >> > >> what's the point then release every 2 days a new "stable" kernel? > >> even distributions like Fedora are

Re: CVE-2019-11683

2019-05-04 Thread Eric Dumazet
On 5/4/19 12:39 PM, Reindl Harald wrote: > > > Am 04.05.19 um 18:32 schrieb Eric Dumazet: >> On 5/4/19 12:13 PM, Reindl Harald wrote: >>> >>> ok, so the answer is no >>> >>> what's the point then release every 2 days a new "stable" kernel? >>> even distributions like Fedora are not able to cop

Re: CVE-2019-11683

2019-05-04 Thread Reindl Harald
Am 04.05.19 um 18:43 schrieb Eric Dumazet: > In any case, this discussion has nothing to do with netdev@ > > Are you suggesting that we should not fix bugs at given period of times, > just because a 'release of some stable kernel' happened one day before? sorry to get cynical but that's likely

Re: [PATCH bpf-next v2 00/16] AF_XDP infrastructure improvements and mlx5e support

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > This series contains improvements to the AF_XDP kernel infrastructure > and AF_XDP support in mlx5e. The infrastructure improvements are > required for mlx5e, but also some of them benefit to all drivers, and > some can be useful for othe

Re: [PATCH bpf-next v2 02/16] xsk: Add getsockopt XDP_OPTIONS

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > Make it possible for the application to determine whether the AF_XDP > socket is running in zero-copy mode. To achieve this, add a new > getsockopt option XDP_OPTIONS that returns flags. The only flag > supported for now is the zero-copy

Re: [PATCH bpf-next v2 04/16] xsk: Extend channels to support combined XSK/non-XSK traffic

2019-05-04 Thread Björn Töpel
On Tue, 30 Apr 2019 at 20:12, Maxim Mikityanskiy wrote: > > Currently, the drivers that implement AF_XDP zero-copy support (e.g., > i40e) switch the channel into a different mode when an XSK is opened. It > causes some issues that have to be taken into account. For example, RSS > needs to be recon

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
On Sat, May 4, 2019 at 8:41 AM Eric Dumazet wrote: > > > > On 5/2/19 2:06 PM, Cong Wang wrote: > > In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits > > counter") > > we added an overlimits counter for each HTB class which could > > properly reflect how many times we use up al

Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Florian Westphal
Eric Dumazet wrote: Sorry for late reply. > It looks that unless RTNL is held, accessing ifa_list needs proper RCU > protection ? > > indev->ifa_list can be changed under us by another cpu (which owns RTNL) > > Lets took an example. > > (A proper rcu_dereference() with an happy sparse suppor

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: > Sure, v2 is coming. :) Another possibility would to reuse existing sch->qstats.overlimits ?

Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Eric Dumazet
On 5/4/19 2:01 PM, Florian Westphal wrote: > Eric Dumazet wrote: > > Sorry for late reply. > >> It looks that unless RTNL is held, accessing ifa_list needs proper RCU >> protection ? >> >> indev->ifa_list can be changed under us by another cpu (which owns RTNL) >> >> Lets took an example. >>

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
On Sat, May 4, 2019 at 11:10 AM Eric Dumazet wrote: > > On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: > > > Sure, v2 is coming. :) > > Another possibility would to reuse existing sch->qstats.overlimits ? I don't find any way to retrieve qdisc pointer from struct htb_sched, unless we add a poin

[Patch net-next v2] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Cong Wang
In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits counter") we added an overlimits counter for each HTB class which could properly reflect how many times we use up all the bandwidth on each class. However, the overlimits counter in HTB qdisc does not, it is way bigger than the s

Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits

2019-05-04 Thread Eric Dumazet
On 5/4/19 2:27 PM, Cong Wang wrote: > On Sat, May 4, 2019 at 11:10 AM Eric Dumazet wrote: >> >> On Sat, May 4, 2019 at 1:49 PM Cong Wang wrote: >> >>> Sure, v2 is coming. :) >> >> Another possibility would to reuse existing sch->qstats.overlimits ? > > I don't find any way to retrieve qdisc p

Hello

2019-05-04 Thread Chris Ben
-- Hello dear. I am Mr Chris Ben, while going through your profile I pick interest on you. I will introduce myself better. Write me at my private email (chrisben...@gmail.com) Mr. Chris Ben +22898632395

Re: [PATCH net-next v2 1/9] net: dsa: Call driver's setup callback after setting up its switchdev notifier

2019-05-04 Thread Vivien Didelot
On Sat, 4 May 2019 16:59:11 +0300, Vladimir Oltean wrote: > This allows the driver to perform some manipulations of its own during > setup, using generic switchdev calls. Having the notifiers registered at > setup time is important because otherwise any switchdev transaction > emitted during this

Re: [PATCH net-next v2 2/9] net: dsa: Optional VLAN-based port separation for switches without tagging

2019-05-04 Thread Vivien Didelot
Hi Vladimir, On Sat, 4 May 2019 16:59:12 +0300, Vladimir Oltean wrote: > This patch provides generic DSA code for using VLAN (802.1Q) tags for > the same purpose as a dedicated switch tag for injection/extraction. > It is based on the discussions and interest that has been so far > expressed in

Re: [PATCH net-next v2 6/9] net: dsa: Add a private structure pointer to dsa_port

2019-05-04 Thread Vivien Didelot
On Sat, 4 May 2019 16:59:16 +0300, Vladimir Oltean wrote: > This is supposed to share information between the driver and the tagger, > or used by the tagger to keep some state. Its use is optional. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Florian Fainelli Reviewed-by: Vivien Didelot

Re: [PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vivien Didelot
Hi Vladimir, On Sat, 4 May 2019 16:59:13 +0300, Vladimir Oltean wrote: > Frames get processed by DSA and redirected to switch port net devices > based on the ETH_P_XDSA multiplexed packet_type handler found by the > network stack when calling eth_type_trans(). > > The running assumption is that

Re: [PATCH net-next v2 3/9] net: dsa: Allow drivers to filter packets they can decode source port from

2019-05-04 Thread Vladimir Oltean
On Sun, 5 May 2019 at 01:49, Vivien Didelot wrote: > > Hi Vladimir, > > On Sat, 4 May 2019 16:59:13 +0300, Vladimir Oltean wrote: > > Frames get processed by DSA and redirected to switch port net devices > > based on the ETH_P_XDSA multiplexed packet_type handler found by the > > network stack w

[PATCH net-next 0/2] net_sched: sch_fq: enable in-kernel pacing for QUIC servers

2019-05-04 Thread Eric Dumazet
Willem added GSO support to UDP stack, greatly improving performance of QUIC servers. We also want to enable in-kernel pacing, which is possible thanks to EDT model, since each sendmsg() can provide a timestamp for the skbs. We have to change sch_fq to enable feeding packets in arbitrary EDT orde

[PATCH net-next 1/2] net_sched: sch_fq: do not assume EDT packets are ordered

2019-05-04 Thread Eric Dumazet
TCP stack makes sure packets for a given flow are monotically increasing, but we want to allow UDP packets to use EDT as well, so that QUIC servers can use in-kernel pacing. This patch adds a per-flow rb-tree on which packets might be stored. We still try to use the linear list for the typical cas

[net-next 14/15] ice: Use more efficient structures

2019-05-04 Thread Jeff Kirsher
From: Jesse Brandeburg Move a bunch of members around to make more efficient use of memory, eliminating holes where possible. None of these members are hot path so cache line alignment is not very important here. Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by:

[net-next 15/15] ice: Disable sniffing VF traffic on PF

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Delete code that add default Tx rule on PF. With this rule PF can see Tx VF traffic that should go outside. For traffic from VF to another VF default Tx rule on PF doesn't apply because of lower priority than VF mac rule. With this change on PF in promisc mode we can see

[net-next 13/15] ice: Use bitfields where possible

2019-05-04 Thread Jeff Kirsher
From: Jesse Brandeburg The driver was converted to not use bool, but it was neglected that the bools should have been converted to bit fields as bit fields in software structures are ok, as long as they use the correct kinds of unsigned types. This avoids wasting lots of storage space to store si

[PATCH net-next 2/2] net_sched: sch_fq: handle non connected flows

2019-05-04 Thread Eric Dumazet
FQ packet scheduler assumed that packets could be classified based on their owning socket. This means that if a UDP server uses one UDP socket to send packets to different destinations, packets all land in one FQ flow. This is unfair, since each TCP flow has a unique bucket, meaning that in case

[net-next 09/15] ice: Suppress false-positive style issues reported by static analyzer

2019-05-04 Thread Jeff Kirsher
From: Bruce Allan A recent version of cppcheck falsely reports- Variable ip.hdr is assigned a value that is never used. ip is a union so the pointer ip.hdr is actually used when referenced as ip.v4 and ip.v6. Silence these false reports when using cppcheck with the --inline-suppr command-li

[net-next 12/15] ice: Add function to program ethertype based filter rule on VSIs

2019-05-04 Thread Jeff Kirsher
From: Akeem G Abodunrin This patch adds function to program VSI with ethertype based filter rule, so that all flow control frames would be disallowed from being transmitted to the client, in order to prevent malicious VSI, especially VF from sending out PAUSE or PFC frames, and then control other

[net-next 08/15] ice: Refactor getting/setting coalesce

2019-05-04 Thread Jeff Kirsher
From: Brett Creeley Currently if the driver has an uneven amount of Rx/Tx queues setting the coalesce settings through ethtool will result in an error. This is happening because in the setting coalesce flow we are reporting an error if either Rx or Tx fails. Also, the flow for setting/getting pe

[net-next 07/15] ice: Always free/allocate q_vectors

2019-05-04 Thread Jeff Kirsher
From: Brett Creeley Currently when probing/removing the driver we allocate/deallocate each vsi->q_vectors array in ice_vsi_alloc_arrays() and ice_vsi_free_arrays() respectively. However, we don't do this during the reset and VSI rebuild flow. This is inconsistent and unnecessary to have a differe

[net-next 05/15] ice: Add more validation in ice_vc_cfg_irq_map_msg

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Add few checks to validate msg from iavf driver. Test if we have got enough q_vectors allocated in VSI connected with VF. Add masks for itr_indx and msix_indx to avoid writing to reserved fieldi of QINT. Clear q_vector->num_ring_rx/tx, without it we can increment this va

[net-next 06/15] ice: Do not unnecessarily initialize local variable

2019-05-04 Thread Jeff Kirsher
From: Bruce Allan The local variable speed does not need to be initialized and can cause some static analysis tools to complain the initial assigned value is never used. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 10/15] ice: Remove __always_unused attribute

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen The variable netdev is being used in this function; remove the __always_unused attribute from it. 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_ethtool.c | 2 +-

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

2019-05-04 Thread Jeff Kirsher
This series contains updates to the ice driver only. Jesse updated the driver to make more functions consistent in their use of a local variable for vsi->back. Updates the driver to use bit fields when possible to avoid wasting lots of storage space to store single bit values. Optimized the driv

[net-next 03/15] ice: Preserve VLAN Rx stripping settings

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen When Tx insertion is set, we are not accounting for the state of Rx stripping. This causes Rx stripping to be enabled any time Tx insertion is changed, even when it's supposed to be disabled. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew

[net-next 11/15] ice: Separate if conditions for ice_set_features()

2019-05-04 Thread Jeff Kirsher
From: Tony Nguyen Set features can have multiple features turned on|off in a single call. Grouping these all in an if/else means after one condition is met, other conditions/features will not be evaluated. Break the if/else statements by feature to ensure all features will be handled properly.

[net-next 02/15] ice: Fix for allowing too many MDD events on VF

2019-05-04 Thread Jeff Kirsher
From: Michal Swiatkowski Disable VF if any malicious device driver (MDD) event is detected by hardware. Track vf->num_mdd_events for information about VF MDD events. Signed-off-by: Michal Swiatkowski Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher -

[net-next 04/15] ice: Don't remove VLAN filters that were never programmed

2019-05-04 Thread Jeff Kirsher
From: Akeem G Abodunrin In case of non-trusted VFs, it is possible to program VLAN filter far less than what is requested by the VF originally, thereby makes number of VLAN elements being tracked by VF different from actual VLAN tags. This patch makes sure that we are not attempting to remove VLA

[net-next 01/15] net/mlx5: Move all devlink related functions calls to devlink.c

2019-05-04 Thread Saeed Mahameed
From: Eran Ben Elisha Centralize all devlink related callbacks in one file. In the downstream patch, some more functionality will be added, this patch is preparing the driver infrastructure for it. Currently, move devlink un/register functions calls into this file. Signed-off-by: Eran Ben Elish

[net-next 04/15] net/mlx5: Add support for devlink region_snapshot parameter

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker This parameter enables capturing region snapshot of the crspace during critical errors. The default value of this parameter is disabled, it can be enabled using devlink param commands. It is possible to configure during runtime and also driver init. Command line examples: Dele

[net-next 05/15] net/mlx5: Handle SW reset of FW in error flow

2019-05-04 Thread Saeed Mahameed
From: Feras Daoud New mlx5 adapters allow the driver to reset the FW in the event of an error, this action called "SW Reset". When an SW reset is issued on any PF all PFs enter reset state which is a recoverable condition. The existing recovery flow was designed to allow the recovery of a VF afte

[net-next 03/15] net/mlx5: Add Crdump FW snapshot support

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker Crdump allows the driver to create a snapshot of the FW PCI crspace. This is useful in case of catastrophic issues which may require FW reset. The snapshot can be used for later debug. The snapshot is exposed using devlink region_snapshot in downstream patch, cr-space address r

[net-next 02/15] net/mlx5: Add Vendor Specific Capability access gateway

2019-05-04 Thread Saeed Mahameed
From: Alex Vesker The Vendor Specific Capability (VSC) is used to activate a gateway interfacing with the device. The gateway is used to read or write device configurations, which are organized in different domains (spaces). A configuration access may result in multiple actions, reads, writes. E

[pull request][net-next 00/15] Mellanox, mlx5 Firmware devlink health and sw reset

2019-05-04 Thread Saeed Mahameed
Hi Dave, This series provides the support for mlx5 Firmware devlink health and sw reset. We plan to follow up this series with a patch that provides mlx5 documentation under Documentation/networking/mlx5.rst, first thing in 5.3 kernel release, it will include all new mlx5 devlink options and more

[net-next 10/15] net/mlx5: Add core dump register access functions

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Add access functions to core dump register to enable trigger FW core dump. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 34 +++ include/linux/mlx5/driver.h

[net-next 06/15] net/mlx5: Control CR-space access by different PFs

2019-05-04 Thread Saeed Mahameed
From: Feras Daoud Since the FW can be shared between different PFs/VFs it is common that more than one health poll will detected a failure, this can lead to multiple resets which are unneeded. The solution is to use a FW locking mechanism using semaphore space to provide a way to allow only one

[net-next 08/15] net/mlx5: Refactor print health info

2019-05-04 Thread Saeed Mahameed
From: Moshe Shemesh Refactor print health info code, split to two functions: 1. mlx5_get_health_info() - writes the health info into a buffer. 2. mlx5_print_health_info() - prints the health info to kernel log. This refactoring is done to enable using the health info data by devlink health repo

  1   2   >