[PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN

2019-04-23 Thread David Ahern
From: David Ahern fib rule actions should return -EAGAIN for the rules to continue to the next one. A recent change overwrote err with the lookup always returning 0 (future change will make it more like IPv4) which means the rules stopped at the first (e.g., local table lookup only). Catch and re

Re: [Patch net v2 1/3] bluetooth: validate HCI_EVENT_PKT packet carefully

2019-04-23 Thread Cong Wang
On Tue, Apr 23, 2019 at 12:42 PM Marcel Holtmann wrote: > > Hi Cong, > > > hci_event_packet() blindly assumes all packets are sane, at least > > for packets allocated via vhci_get_user() path this is not true. > > We have to check if we access skb data out-of-bound with > > pskb_may_pull() before

Re: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-23 Thread David Miller
From: Haiqing Bai Date: Tue, 23 Apr 2019 17:00:23 +0800 > diff --git a/net/socket.c b/net/socket.c > index 8255f5bda0aa..7927c2bcad65 100644 > --- a/net/socket.c > +++ b/net/socket.c > @@ -1339,6 +1339,11 @@ int __sock_create(struct net *net, int family, int > type, int protocol, > if (typ

Re: [PATCH iproute2-next] devlink: Increase column size for larger shared buffers

2019-04-23 Thread David Ahern
On 4/23/19 12:36 AM, Ido Schimmel wrote: > From: Ido Schimmel > > With current number of spaces the output is mangled if the shared buffer > is congested. > > Before: > > # devlink sb occupancy show swp32 > swp32: > pool: 0:10220112/10222128 1: 0/0 2: 0/0 >

Re: [PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-23 Thread David Miller
From: Arnd Bergmann Date: Tue, 23 Apr 2019 17:11:32 +0200 > When isdn4linux came up in the context of another patch series, I > remembered that we had discussed removing it a while ago. This seems long overdue to me. Could you please respin against net-next and I'll just apply this? Thank you.

Re: [PATCH 1/1, v2] net: socionext: replace napi_alloc_frag with the netdev variant on init

2019-04-23 Thread David Miller
From: Ilias Apalodimas Date: Tue, 23 Apr 2019 09:01:41 +0300 > The netdev variant is usable on any context since it disables interrupts. > The napi variant of the call should only be used within softirq context. > Replace napi_alloc_frag on driver init with the correct netdev_alloc_frag > call >

Re: [PATCH net-next] lwtunnel: Pass encap and encap type attributes to lwtunnel_fill_encap

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 08:23:41 -0700 > From: David Ahern > > Currently, lwtunnel_fill_encap hardcodes the encap and encap type > attributes as RTA_ENCAP and RTA_ENCAP_TYPE, respectively. The nexthop > objects want to re-use this code but the encap attributes passed to > users

Re: [PATCH net-next] net: Change nhc_flags to unsigned char

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 08:48:09 -0700 > From: David Ahern > > nhc_flags holds the RTNH_F flags for a given nexthop (fib{6}_nh). > All of the RTNH_F_ flags fit in an unsigned char, and since the API to > userspace (rtnh_flags and lower byte of rtm_flags) is 1 byte it can not >

Re: [PATCH net-next v2 0/5] Taprio qdisc fixes

2019-04-23 Thread David Miller
From: Andre Guedes Date: Tue, 23 Apr 2019 12:44:19 -0700 > I'm re-sending this series, now with the "net-next" prefix in the subject. > > The only change from the previous version is in patch 3. As suggested by Cong > Wang, it removes the !entry check within should_restart_cycle() since it is >

Re: [PATCH v2 net-next] mlxsw: spectrum_router: Prevent ipv6 gateway with v4 route via replace and append

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 16:03:29 -0700 > From: David Ahern > > mlxsw currently does not support v6 gateways with v4 routes. Commit > 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") > prevents a route from being added, but nothing stops the replace or > app

RE: [PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-23 Thread Bai, Haiqing
Actually I know this clearly, just bring your attention on this issue , I think this is a mechanism issue. Though we have no good idea to fix this, but I believe firmly that you kernel experts must have some smart and beautiful solution. Thanks. -Original Message- From: David Miller [m

Re: [PATCH net-next] ipv6: Use result arg in fib_lookup_arg consistently

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 18:05:33 -0700 > From: David Ahern > > arg.result is sometimes used as fib6_result and sometimes used to > hold the rt6_info. Add rt6_info to fib6_result and make the use > of arg.result consistent through ipv6 rules. > > The rt6 entry is filled in for

Re: [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN

2019-04-23 Thread David Miller
From: David Ahern Date: Tue, 23 Apr 2019 18:06:30 -0700 > From: David Ahern > > fib rule actions should return -EAGAIN for the rules to continue to the > next one. A recent change overwrote err with the lookup always returning > 0 (future change will make it more like IPv4) which means the rule

Re: [PATCH 1/1] be2net: Detach interface for avoiding a system crash

2019-04-23 Thread Firo
On 4/20/19 6:31 AM, Saeed Mahameed wrote: > On Fri, 2019-04-19 at 21:07 +0800, Firo wrote: >> >> On 4/19/19 2:17 AM, Saeed Mahameed wrote: >>> On Thu, 2019-04-18 at 15:05 +0800, Firo wrote: On 4/2/19 12:25 AM, Saeed Mahameed wrote: > On Mon, 2019-04-01 at 20:24 +0800, Firo Yang wrote: >

Re: [PATCH] libbpf: fix samples/bpf build failure due to undefined UINT32_MAX

2019-04-23 Thread Y Song
On Tue, Apr 23, 2019 at 6:02 PM Daniel T. Lee wrote: > > Oh, I've found what's the problem. > About the files you've mentioned, nothing seems to matter on my system. > But the problem is the order of the '-I' option matters. > > user@host:~/linux/samples/bpf $ make -n > > gcc -Wp,-MD,./sam

[PATCH 1/1] net: rds: exchange of 8K and 1M pool

2019-04-23 Thread Zhu Yanjun
Before the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), when the dirty_count is greater than 9/10 of max_items of 8K pool, 1M pool is used, Vice versa. After the commit 490ea5967b0d ("RDS: IB: move FMR code to its own file"), the above is removed. When we make the following tests

[PATCH net-next v2] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Vlad Buslov
Recent changes that introduced unlocked flower did not properly account for case when reoffload is initiated concurrently with filter updates. To fix the issue, extend flower with 'hw_filters' list that is used to store filters that don't have 'skip_hw' flag set. Filter is added to the list when it

[PATCH 2/4] iprule: avoid trailing space in print_rule() after printing protocol

2019-04-23 Thread Thomas Haller
It seems print_rule() tries to avoid a trailing space at the end of the line. At least, when printing details about the actions, they no longer append the space. Probably expecting to be the last attribute that will be printed. Don't let the protocol add the trailing space. The space at the end of

[PATCH 1/4] iprule: avoid printing extra space after gateway for nat action

2019-04-23 Thread Thomas Haller
For all other actions we avoid the trailing space, so do it here as well. Signed-off-by: Thomas Haller --- ip/iprule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iprule.c b/ip/iprule.c index 83aef38e..2479c3ab 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -443,7 +443,

[PATCH 3/4] iprule: refactor print_rule() to use leading space before printing attribute

2019-04-23 Thread Thomas Haller
When printing the actions, we avoid adding the trailing space after the attribute. Possibly because we expect the action to be the last output on the line and not end with a space. But for FR_ACT_TO_TBL nothing is printed. That means, we add double spaces if a protocol is printed as well: # i

[PATCH 4/4] iprule: always print realms keyword for rule

2019-04-23 Thread Thomas Haller
# rule add priority 10 realms 1/0xF # rule add priority 10 realms 0/0xF # ip rule 10: from all lookup main 15 10: from all lookup main realms 1/15 The previous behavior was there since the beginning. Signed-off-by: Thomas Haller --- ip/iprule.c | 2 +- 1 file changed

Re: [PATCH net-next 00/14] mlxsw: Shared buffer improvements

2019-04-23 Thread Jiri Pirko
Tue, Apr 23, 2019 at 07:26:06AM CEST, ido...@mellanox.com wrote: >On Mon, Apr 22, 2019 at 02:17:39PM -0700, Jakub Kicinski wrote: >> Out of curiosity - are you guys considering adding CPU flavour ports, >> or is there a good reason not to have it exposed? > >Yes, we are considering that. In fact, A

[PATCH 2/2] Bluetooth: Set HCI_QUIRK_WAIT_FOR_MATCHING_CC for QCA9377

2019-04-23 Thread João Paulo Rechi Vita
The QCA9377 devices send an extra command complete for the LE_SET_RANDOM_ADDR when trying to start an active scanning procedure. It has to be ignored to avoid confusing the kernel into thinking a passive scanning procedure is being performed instead, which makes impossible to discover BTLE devices

Re: [patch net-next v2 15/16] netdevsim: move netdev creation/destruction to dev probe

2019-04-23 Thread Jiri Pirko
Mon, Apr 22, 2019 at 09:31:33PM CEST, jakub.kicin...@netronome.com wrote: >On Sat, 20 Apr 2019 12:29:21 +0200, Jiri Pirko wrote: >> diff --git a/tools/testing/selftests/bpf/test_offload.py >> b/tools/testing/selftests/bpf/test_offload.py >> index 5f2e4f9e70e4..a0566dcf064a 100755 >> --- a/tools/te

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Vlad Buslov
On Tue 23 Apr 2019 at 00:02, Jakub Kicinski wrote: > On Mon, 22 Apr 2019 10:21:34 +0300, Vlad Buslov wrote: >> Recent changes that introduced unlocked flower did not properly account for >> case when reoffload is initiated concurrently with filter updates. To fix >> the issue, extend flower with

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Vlad Buslov
On Mon 22 Apr 2019 at 23:34, Saeed Mahameed wrote: > On Mon, 2019-04-22 at 10:21 +0300, Vlad Buslov wrote: >> Recent changes that introduced unlocked flower did not properly >> account for >> case when reoffload is initiated concurrently with filter updates. To >> fix >> the issue, extend flower

[PATCH next 19/25] net: calxedaxgmac: Use dev_get_drvdata()

2019-04-23 Thread Kefeng Wang
Using dev_get_drvdata directly. Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/net/ethernet/calxeda/xgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac

[PATCH net-next v2] net: mvpp2: cls: Add Classification offload support

2019-04-23 Thread Maxime Chevallier
This commit introduces basic classification offloading support for the PPv2 controller. The PPv2 classifier has many classification engines, for now we only use the C2 TCAM match engine. This engine allows to perform ternary lookups on 64 bits keys (called Header Extracted Key), that are built by

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-04-23 Thread Miroslav Lichvar
On Tue, Apr 23, 2019 at 12:18:17PM +0800, Hangbin Liu wrote: > On Thu, Apr 18, 2019 at 10:05:09AM +0200, Miroslav Lichvar wrote: > > select a more general filter. A container could run a PTP clock if it > > Do you have an idea about how to select a general filter? If we have enabled > HWTSTAMP_FIL

Re: [PATCH bpf-next v6 11/16] bpf, libbpf: support global data/bss/rodata sections

2019-04-23 Thread Daniel Borkmann
On 04/23/2019 06:06 AM, Andrii Nakryiko wrote: > On Mon, Apr 22, 2019 at 5:58 PM Daniel Borkmann wrote: >> On 04/19/2019 03:18 AM, Andrii Nakryiko wrote: >>> On Tue, Apr 9, 2019 at 2:20 PM Daniel Borkmann wrote: >> [...] + def->type = BPF_MAP_TYPE_ARRAY; + def->key_size

[PATCH] net: socket: Exit earlier from __sock_create if CONFIG_IPV6 is disabled

2019-04-23 Thread Haiqing Bai
From: Radovan Prodanovic Tests shows that it takes more than 10ms for __sock_create with AF_INET6 returning failure if CONFIG_IPV6 is not set The fix checks this case and make it exit with not supporting error before calling request_module if 'CONFIG_MODULE=y' and 'CONFIG_IPV6 is not set' socket

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-04-23 Thread Hangbin Liu
On Tue, Apr 23, 2019 at 10:31:41AM +0200, Miroslav Lichvar wrote: > On Tue, Apr 23, 2019 at 12:18:17PM +0800, Hangbin Liu wrote: > > On Thu, Apr 18, 2019 at 10:05:09AM +0200, Miroslav Lichvar wrote: > > > select a more general filter. A container could run a PTP clock if it > > > > Do you have an

Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device

2019-04-23 Thread Miroslav Lichvar
On Tue, Apr 23, 2019 at 05:15:43PM +0800, Hangbin Liu wrote: > On Tue, Apr 23, 2019 at 10:31:41AM +0200, Miroslav Lichvar wrote: > > V2_L4_SYNC is already selected, only the following filters could be > > selected on the macvlan interface: > > > > HWTSTAMP_FILTER_PTP_V2_L4_SYNC, > > HWTSTA

RE: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread David Laight
From: Willem de Bruijn > Sent: 22 December 2018 21:54 > Validate packet socket address length if a length is given. Zero > length is equivalent to not setting an address. > > Fixes: 99137b7888f4 ("packet: validate address length") > Reported-by: Ido Schimmel > Signed-off-by: Willem de Bruijn > -

Re: [PATCH bpf-next 0/2] update skb->protocol in bpf_skb_net_grow

2019-04-23 Thread Alan Maguire
On Mon, 22 Apr 2019, Willem de Bruijn wrote: > From: Willem de Bruijn > > Expand the tc tunnel encap support with protocols that convert the > network layer protocol, such as 6in4. This is analogous to existing > support in bpf_skb_proto_6_to_4. > > Patch 1 implements the straightforward logic

Re: [PATCH 4.14 stable 2/5] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-23 Thread Lars Persson
On Tue, Apr 23, 2019 at 12:29 AM Peter Oskolkov wrote: > > [ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] > > This is a refactoring patch: without changing runtime behavior, > it moves rbtree-related code from IPv4-specific files/functions > into .h/.c defrag files shared with IPv6 d

Re: [PATCH 1/2] spi: Micrel eth switch: declare missing of table

2019-04-23 Thread Andrew Lunn
> I wonder why this SPI driver is under drivers/net/phy. Just because > the SPI IP is found on an ethernet switch chip? And even then it > would be wrong, I see no link to a PHY at all. I'd say the driver > belongs to drivers/spi. Shouldn't we move it? This driver is old. It is probably from befor

Re: [net-next 06/14] net/mlx5e: XDP, Inline small packets into the TX MPWQE in XDP xmit flow

2019-04-23 Thread Gal Pressman
On 23-Apr-19 01:32, Saeed Mahameed wrote: > static inline void > -mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, dma_addr_t dma_addr, u16 > dma_len) > +mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, struct mlx5e_xdp_info *xdpi, > + struct mlx5e_xdpsq_stats *stats) Passin

[PATCH v2 net-next 00/16] net: atlantic: Aquantia driver updates 2019-04

2019-04-23 Thread Igor Russkikh
This patchset contains various improvements: - Work targeting link up speedups: link interrupt introduced, some other logic changes to imrove this. - FW operations securing with mutex - Counters and statistics logic improved by Dmitry - read out of chip temperature via hwmon interface implement

[PATCH v2 net-next 04/16] net: aquantia: link interrupt handling function

2019-04-23 Thread Igor Russkikh
Define link interrupt handler Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlan

[PATCH v2 net-next 08/16] net: aquantia: use macros for better visibility

2019-04-23 Thread Igor Russkikh
Improve for better readability Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 8 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --

[PATCH v2 net-next 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-23 Thread Igor Russkikh
From: Yana Esina Added support for hwmon api to fetch out chip temperature Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/Makefile | 1 + .../ethernet/aquantia/atlantic/aq_drvinfo.c | 129 ++ .

[PATCH v2 net-next 07/16] net: aquantia: improve ifup link detection

2019-04-23 Thread Igor Russkikh
Original code detected link only after 1 sec is passed after up. Here we replace this with direct service callback which updates link status immediately Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v2 net-next 14/16] net: aquantia: get total counters from DMA block

2019-04-23 Thread Igor Russkikh
From: Dmitry Bogdanov aq_nic_update_ndev_stats pushes statistics to ndev->stats from system interface. This is not always good because it counts packets/bytes before any of rx filters (including mac filter). Its better to report the packet/bytes statistics from DMA counters which gives actual va

[PATCH v2 net-next 05/16] net: aquantia: create global service workqueue

2019-04-23 Thread Igor Russkikh
From: Nikita Danilov We need this to schedule link interrupt handling and various service tasks. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_main.c | 41 +++ .../net/ethernet/aquantia/atlantic/aq_main.h | 2 + .../eth

[PATCH v2 net-next 10/16] net: aquantia: introduce fwreq mutex

2019-04-23 Thread Igor Russkikh
From: Nikita Danilov Some of FW operations could be invoked simultaneously, from f.e. ethtool context and from service service activity work. Here we introduce a fw mutex to secure and serialize access to FW logic. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/eth

[PATCH v2 net-next 01/16] net: aquantia: add infrastructure to readout chip temperature

2019-04-23 Thread Igor Russkikh
From: Yana Esina Ability to read the chip temperature from memory via hwmon interface Signed-off-by: Yana Esina Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_hw.h| 2 ++ .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 1 + .../atla

[PATCH v2 net-next 09/16] net: aquantia: user correct MSI irq type

2019-04-23 Thread Igor Russkikh
Typo in msi code. No much impact though. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/et

[PATCH v2 net-next 13/16] net: aquantia: fetch up to date statistics on ethtool request

2019-04-23 Thread Igor Russkikh
From: Dmitry Bogdanov This improves ethtool -S usage, where stats are now actual on each request. Before that stats only were updated at service timer period. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- drivers/net/ethernet/aquantia/atlantic/aq_n

[PATCH v2 net-next 12/16] net: aquantia: wrap fw ops by mutex

2019-04-23 Thread Igor Russkikh
From: Nikita Danilov Since fw ops may be invoked from different threads all its invocation must be wrapped by mutex. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/aq_ethtool.c | 22 +--- .../net/ethernet/aquantia/atlantic/aq_nic.c

[PATCH v2 net-next 16/16] net: aquantia: remove outdated device ids

2019-04-23 Thread Igor Russkikh
From: Nikita Danilov Some device ids were never released and does not exist. Cleanup these. Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_common.h| 3 --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 6 -- d

[PATCH v2 net-next 06/16] net: aquantia: link status irq handling

2019-04-23 Thread Igor Russkikh
Here we define and request an extra interrupt line, assign it on link isr handler and restructure abit aq_pci code to better support that. We also remove logic for using different timer intervals depending on link state, since thats now useless. Signed-off-by: Igor Russkikh --- .../net/ethernet

[PATCH v2 net-next 03/16] net: aquantia: add link interrupt fields

2019-04-23 Thread Igor Russkikh
Declare macroes and nic fields to support link interrupt handling Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 2 ++ drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v2 net-next 11/16] net: aquantia: extract timer cb into work job

2019-04-23 Thread Igor Russkikh
Service timer callback fetches statistics from FW and that may cause a long delay in error cases. We also now need to use fw mutex to prevent concurrent access to FW, thus - extract that logic from timer callback into the job in the separate work queue. Signed-off-by: Nikita Danilov Signed-off-by

[PATCH v2 net-next 15/16] net: aquantia: fixups on 64bit dma counters

2019-04-23 Thread Igor Russkikh
From: Dmitry Bogdanov DMA counters are 64 bit and we can fetch that to reduce counter overflow, espesially on byte counters. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov --- .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 5 - .../ethernet/a

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Jesper Dangaard Brouer
On Mon, 22 Apr 2019 19:46:47 -0700 Jakub Kicinski wrote: > On Mon, 22 Apr 2019 15:32:53 -0700, Saeed Mahameed wrote: > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > > b/drivers/net/ethernet/mellanox/mlx5/core/en.h > > index 51e109fdeec1..6147be23a9b9 100644 > > --- a/drivers/net/

Re: [RFC PATCH net-next 1/3] net: rtnetlink: Add link-down reason to RTNL messages

2019-04-23 Thread Jiri Pirko
Thu, Mar 28, 2019 at 08:51:34PM CET, and...@lunn.ch wrote: >On Thu, Mar 28, 2019 at 05:59:50PM +, Petr Machata wrote: > >Hi Petr > >> - PHY driver: dev->phydev->drv->get_link_down_reason >> Certain PHY drivers might want to have a custom handling for some >> PHY-specific insight. Something

RE: ipsec tunnel performance degrade

2019-04-23 Thread Vakul Garg
> -Original Message- > From: Florian Westphal > Sent: Tuesday, April 23, 2019 11:27 AM > To: Vakul Garg > Cc: Florian Westphal ; netdev@vger.kernel.org > Subject: Re: ipsec tunnel performance degrade > > Vakul Garg wrote: > > > Do you use xfrm interfaces? > > > > I don't think so. I

Re: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 5:59 AM David Laight wrote: > > From: Willem de Bruijn > > Sent: 22 December 2018 21:54 > > Validate packet socket address length if a length is given. Zero > > length is equivalent to not setting an address. > > > > Fixes: 99137b7888f4 ("packet: validate address length") >

[PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-23 Thread Arnd Bergmann
When isdn4linux came up in the context of another patch series, I remembered that we had discussed removing it a while ago. It turns out that the suggestion from Karsten Keil wa to remove I4L in 2018 after the last public ISDN networks are shut down. This has happened now (with a very small number

[PATCH 1/5] isdn: gigaset: remove i4l support

2019-04-23 Thread Arnd Bergmann
isdn4linux is getting removed, and the gigaset driver can still use the CAPI support, so this can all go away. Signed-off-by: Arnd Bergmann --- Documentation/isdn/README.gigaset | 36 +- drivers/isdn/gigaset/Kconfig | 22 +- drivers/isdn/gigaset/Makefile | 5 +- drivers/isdn/gigaset

[PATCH 0/5] isdn: deprecate non-mISDN drivers

2019-04-23 Thread Arnd Bergmann
When isdn4linux came up in the context of another patch series, I remembered that we had discussed removing it a while ago. It turns out that the suggestion from Karsten Keil wa to remove I4L in 2018 after the last public ISDN networks are shut down. This has happened now (with a very small number

[PATCH 4/5] isdn: hdlc: move into mISDN

2019-04-23 Thread Arnd Bergmann
The last remnant of the isdn4linux interface is now the isdnhdlc support, used by the netjet driver. Move it next to that driver. Signed-off-by: Arnd Bergmann --- drivers/isdn/Makefile | 1 - drivers/isdn/hardware/mISDN/Kconfig| 7

[PATCH 2/5] isdn: remove hisax driver

2019-04-23 Thread Arnd Bergmann
With the decline of ISDN, this seems to have become completely obsolete, and even in the past years, all remaining users appear to have used mISDN instead. Signed-off-by: Arnd Bergmann --- Documentation/isdn/HiSax.cert | 96 - Documentation/isdn/README.HiSax | 659 -- drivers/is

[PATCH 5/5] isdn: move capi drivers to staging

2019-04-23 Thread Arnd Bergmann
I tried to find any indication of whether the capi drivers are still in use, and have not found anything from a long time ago. With public ISDN networks almost completely shut down over the past 12 months, there is very little you can actually do with this hardware. The main remaining use case wo

[PATCH 5/5] isdn: move capi drivers to staging

2019-04-23 Thread Arnd Bergmann
I tried to find any indication of whether the capi drivers are still in use, and have not found anything from a long time ago. With public ISDN networks almost completely shut down over the past 12 months, there is very little you can actually do with this hardware. The main remaining use case wo

[PATCH 3/5] isdn: remove isdn4linux

2019-04-23 Thread Arnd Bergmann
With all isdn4linux hardware drivers gone, this is only a wrapper around CAPI to support old user space. However, from looking at the mailing list, it seems that the last time anyone asked about it was in 2014, when the upgrade from a linux-2.4 installation failed, and mISDN was suggested as a repl

[PATCH 3/5] isdn: remove isdn4linux

2019-04-23 Thread Arnd Bergmann
With all isdn4linux hardware drivers gone, this is only a wrapper around CAPI to support old user space. However, from looking at the mailing list, it seems that the last time anyone asked about it was in 2014, when the upgrade from a linux-2.4 installation failed, and mISDN was suggested as a repl

[PATCH 2/5] isdn: remove hisax driver

2019-04-23 Thread Arnd Bergmann
With the decline of ISDN, this seems to have become completely obsolete, and even in the past years, all remaining users appear to have used mISDN instead. Signed-off-by: Arnd Bergmann --- Documentation/isdn/HiSax.cert | 96 - Documentation/isdn/README.HiSax | 659 -- drivers/is

[PATCH 1/5] isdn: gigaset: remove i4l support

2019-04-23 Thread Arnd Bergmann
isdn4linux is getting removed, and the gigaset driver can still use the CAPI support, so this can all go away. Signed-off-by: Arnd Bergmann --- Documentation/isdn/README.gigaset | 36 +- drivers/isdn/gigaset/Kconfig | 22 +- drivers/isdn/gigaset/Makefile | 5 +- drivers/isdn/gigaset

[PATCH 4/5] isdn: hdlc: move into mISDN

2019-04-23 Thread Arnd Bergmann
The last remnant of the isdn4linux interface is now the isdnhdlc support, used by the netjet driver. Move it next to that driver. Signed-off-by: Arnd Bergmann --- drivers/isdn/Makefile | 1 - drivers/isdn/hardware/mISDN/Kconfig| 7

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Alexander Duyck
On Tue, Apr 23, 2019 at 6:23 AM Jesper Dangaard Brouer wrote: > > On Mon, 22 Apr 2019 19:46:47 -0700 > Jakub Kicinski wrote: > > > On Mon, 22 Apr 2019 15:32:53 -0700, Saeed Mahameed wrote: > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h > > > b/drivers/net/ethernet/mellanox/mlx5/

[PATCH net-next] lwtunnel: Pass encap and encap type attributes to lwtunnel_fill_encap

2019-04-23 Thread David Ahern
From: David Ahern Currently, lwtunnel_fill_encap hardcodes the encap and encap type attributes as RTA_ENCAP and RTA_ENCAP_TYPE, respectively. The nexthop objects want to re-use this code but the encap attributes passed to userspace as NHA_ENCAP and NHA_ENCAP_TYPE. Since that is the only differenc

[PATCH net-next] net: Change nhc_flags to unsigned char

2019-04-23 Thread David Ahern
From: David Ahern nhc_flags holds the RTNH_F flags for a given nexthop (fib{6}_nh). All of the RTNH_F_ flags fit in an unsigned char, and since the API to userspace (rtnh_flags and lower byte of rtm_flags) is 1 byte it can not grow. Make nhc_flags in fib_nh_common an unsigned char and shrink the

[PATCH net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread Eric Dumazet
After commit 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook"), rxrpc_input_packet() is directly called from lockless UDP receive path, under rcu_read_lock() protection. It must therefore use RCU rules : - udp_sk->sk_user_data can be cleared at any point in this function. rcu_dereference_sk_us

RE: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread David Laight
From: Willem de Bruijn > Sent: 23 April 2019 16:08 > On Tue, Apr 23, 2019 at 5:59 AM David Laight wrote: > > > > From: Willem de Bruijn > > > Sent: 22 December 2018 21:54 > > > Validate packet socket address length if a length is given. Zero > > > length is equivalent to not setting an address. >

Re: [PATCH bpf-next v6 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-04-23 Thread Eric Dumazet
On Mon, Apr 22, 2019 at 9:15 PM Alexei Starovoitov wrote: > Eric and Willem, could you please take a look as well > and hopefully ack it ? Sure, I am taking a look.

Re: [PATCH 4.14 stable 2/5] net: IP defrag: encapsulate rbtree defrag code into callable functions

2019-04-23 Thread Peter Oskolkov
On Tue, Apr 23, 2019 at 5:07 AM Lars Persson wrote: > > On Tue, Apr 23, 2019 at 12:29 AM Peter Oskolkov wrote: > > > > [ Upstream commit c23f35d19db3b36ffb9e04b08f1d91565d15f84f ] > > > > This is a refactoring patch: without changing runtime behavior, > > it moves rbtree-related code from IPv4-sp

Re: [PATCH bpf-next v6 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-04-23 Thread Eric Dumazet
On Tue, Apr 23, 2019 at 9:00 AM Eric Dumazet wrote: > > On Mon, Apr 22, 2019 at 9:15 PM Alexei Starovoitov > wrote: > > > Eric and Willem, could you please take a look as well > > and hopefully ack it ? > > Sure, I am taking a look. For the series : Acked-by: Eric Dumazet Thanks

[PATCH net-next] tipc: tipc_udp_recv() cleanup vs rcu verbs

2019-04-23 Thread Eric Dumazet
First thing tipc_udp_recv() does is to use rcu_dereference_sk_user_data(), and this is really hinting we already own rcu_read_lock() from the caller (UDP stack). No need to add another rcu_read_lock()/rcu_read_unlock() pair. Also use rcu_dereference() instead of rcu_dereference_rtnl() in the data

Re: [PATCH bpf-next v6 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-04-23 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 12:21 PM Eric Dumazet wrote: > > On Tue, Apr 23, 2019 at 9:00 AM Eric Dumazet wrote: > > > > On Mon, Apr 22, 2019 at 9:15 PM Alexei Starovoitov > > wrote: > > > > > Eric and Willem, could you please take a look as well > > > and hopefully ack it ? > > > > Sure, I am takin

Re: ipsec tunnel performance degrade

2019-04-23 Thread Florian Westphal
Vakul Garg wrote: > > Vakul Garg wrote: > > > > Do you use xfrm interfaces? > > > > > > I don't think so. I use setkey to create policies/SAs. > > > Can you please give me some hint about it? > > > > Then you're not using ipsec interfaces. > > > Instead of creating policies/SA using setkey, I s

Re: [PATCH net-next 00/14] mlxsw: Shared buffer improvements

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 09:28:02 +0200, Jiri Pirko wrote: > Tue, Apr 23, 2019 at 07:26:06AM CEST, ido...@mellanox.com wrote: > >On Mon, Apr 22, 2019 at 02:17:39PM -0700, Jakub Kicinski wrote: > >> Out of curiosity - are you guys considering adding CPU flavour ports, > >> or is there a good reason not

Re: [PATCH net-next 2/3] ipv6: broadly use fib6_info_hold() helper

2019-04-23 Thread Wei Wang
On Mon, Apr 22, 2019 at 6:35 PM Eric Dumazet wrote: > > Instead of using atomic_inc(), prefer fib6_info_hold() > so that upcoming refcount_t conversion is simpler. > > Only fib6_info_alloc() is using atomic_set() since we > just allocated a new object. > > Signed-off-by: Eric Dumazet > Cc: Wei Wa

Re: [PATCH net-next 1/3] ipv6: fib6_info_destroy_rcu() cleanup

2019-04-23 Thread Wei Wang
On Mon, Apr 22, 2019 at 6:35 PM Eric Dumazet wrote: > > We do not need to clear f6i->rt6i_exception_bucket right before > freeing f6i. > > Note that f6i->rt6i_exception_bucket is properly protected by > f6i->exception_bucket_flushed being set to one in rt6_flush_exceptions() > under the protection

Re: [PATCH net-next 3/3] ipv6: convert fib6_ref to refcount_t

2019-04-23 Thread Wei Wang
On Mon, Apr 22, 2019 at 6:35 PM Eric Dumazet wrote: > > We suspect some issues involving fib6_ref 0 -> 1 transitions might > cause strange syzbot reports. > > Lets convert fib6_ref to refcount_t to catch them earlier. > > Signed-off-by: Eric Dumazet > Cc: Wei Wang > --- Acked-by: Wei Wang Than

Re: [PATCH net-next 1/3] ipv6: fib6_info_destroy_rcu() cleanup

2019-04-23 Thread David Ahern
On 4/22/19 7:35 PM, Eric Dumazet wrote: > We do not need to clear f6i->rt6i_exception_bucket right before > freeing f6i. > > Note that f6i->rt6i_exception_bucket is properly protected by > f6i->exception_bucket_flushed being set to one in rt6_flush_exceptions() > under the protection of rt6_except

Re: [PATCH net-next 2/3] ipv6: broadly use fib6_info_hold() helper

2019-04-23 Thread David Ahern
On 4/22/19 7:35 PM, Eric Dumazet wrote: > Instead of using atomic_inc(), prefer fib6_info_hold() > so that upcoming refcount_t conversion is simpler. > > Only fib6_info_alloc() is using atomic_set() since we > just allocated a new object. > > Signed-off-by: Eric Dumazet > Cc: Wei Wang > --- >

Re: [PATCH net-next 3/3] ipv6: convert fib6_ref to refcount_t

2019-04-23 Thread David Ahern
On 4/22/19 7:35 PM, Eric Dumazet wrote: > We suspect some issues involving fib6_ref 0 -> 1 transitions might > cause strange syzbot reports. > > Lets convert fib6_ref to refcount_t to catch them earlier. > > Signed-off-by: Eric Dumazet > Cc: Wei Wang > --- > include/net/ip6_fib.h | 8

Fw: [Bug 203399] New: Slow internet download speed

2019-04-23 Thread Stephen Hemminger
Interesting regression, but not sure if there is enough data to provide any clue as to how to diagnose the problem. Begin forwarded message: Date: Tue, 23 Apr 2019 13:54:23 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 203399] New: Slow internet dow

Re: BUG: KASAN: use-after-free Read in tun_net_xmit

2019-04-23 Thread Cong Wang
On Mon, Apr 22, 2019 at 11:42 PM Jason Wang wrote: > > > On 2019/4/23 下午2:00, Cong Wang wrote: > > On Mon, Apr 22, 2019 at 2:41 AM Jason Wang wrote: > >> > >> On 2019/4/22 上午11:57, YueHaibing wrote: > >>> We get a KASAN report as below, but don't have any reproducer. > >>> > >>> Any comments are

Re: [net-next 01/14] net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES

2019-04-23 Thread Saeed Mahameed
On Tue, 2019-04-23 at 08:21 -0700, Alexander Duyck wrote: > On Tue, Apr 23, 2019 at 6:23 AM Jesper Dangaard Brouer > wrote: > > On Mon, 22 Apr 2019 19:46:47 -0700 > > Jakub Kicinski wrote: > > > > > On Mon, 22 Apr 2019 15:32:53 -0700, Saeed Mahameed wrote: > > > > diff --git a/drivers/net/ethern

[PATCH net] l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()

2019-04-23 Thread Eric Dumazet
Canonical way to fetch sk_user_data from an encap_rcv() handler called from UDP stack in rcu protected section is to use rcu_dereference_sk_user_data(), otherwise compiler might read it multiple times. Fixes: d00fa9adc528 ("il2tp: fix races with tunnel socket close") Signed-off-by: Eric Dumazet

Re: [net-next 06/14] net/mlx5e: XDP, Inline small packets into the TX MPWQE in XDP xmit flow

2019-04-23 Thread Saeed Mahameed
On Tue, 2019-04-23 at 15:53 +0300, Gal Pressman wrote: > On 23-Apr-19 01:32, Saeed Mahameed wrote: > > static inline void > > -mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, dma_addr_t > > dma_addr, u16 dma_len) > > +mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, struct > > mlx5e_xdp_info *xdp

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Jakub Kicinski
On Tue, 23 Apr 2019 07:34:20 +, Vlad Buslov wrote: > >> @@ -382,6 +395,8 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, > >> struct cls_fl_filter *f, > >> > >>tc_setup_cb_call(block, TC_SETUP_CLSFLOWER, &cls_flower, false); > >>spin_lock(&tp->lock); > >> + if (!list_empty

Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access

2019-04-23 Thread Saeed Mahameed
On Tue, 2019-04-23 at 07:43 +, Vlad Buslov wrote: > On Mon 22 Apr 2019 at 23:34, Saeed Mahameed > wrote: > > On Mon, 2019-04-22 at 10:21 +0300, Vlad Buslov wrote: > > > Recent changes that introduced unlocked flower did not properly > > > account for > > > case when reoffload is initiated conc

Re: [PATCH net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread David Howells
Eric Dumazet wrote: > @@ -1181,6 +1177,9 @@ int rxrpc_input_packet(struct sock *udp_sk, struct > sk_buff *skb) > > _enter("%p", udp_sk); > > + if (!local) > + return -ENOENT; > + > This looks wrong. Did you mean "return -AF_INET"? The comment in net/ipv6/udp.c says

Re: [PATCH net] rxrpc: fix race condition in rxrpc_input_packet()

2019-04-23 Thread Eric Dumazet
On Tue, Apr 23, 2019 at 9:55 AM David Howells wrote: > > Eric Dumazet wrote: > > > @@ -1181,6 +1177,9 @@ int rxrpc_input_packet(struct sock *udp_sk, struct > > sk_buff *skb) > > > > _enter("%p", udp_sk); > > > > + if (!local) > > + return -ENOENT; > > + > > > > This looks w

Re: [PATCH bpf-next v6 0/9] net: flow_dissector: trigger BPF hook when called from eth_get_headlen

2019-04-23 Thread Daniel Borkmann
On 04/23/2019 06:24 PM, Willem de Bruijn wrote: > On Tue, Apr 23, 2019 at 12:21 PM Eric Dumazet wrote: >> >> On Tue, Apr 23, 2019 at 9:00 AM Eric Dumazet wrote: >>> >>> On Mon, Apr 22, 2019 at 9:15 PM Alexei Starovoitov >>> wrote: >>> Eric and Willem, could you please take a look as well >>

Re: [PATCH net] packet: validate address length if non-zero

2019-04-23 Thread Willem de Bruijn
On Tue, Apr 23, 2019 at 11:52 AM David Laight wrote: > > From: Willem de Bruijn > > Sent: 23 April 2019 16:08 > > On Tue, Apr 23, 2019 at 5:59 AM David Laight > > wrote: > > > > > > From: Willem de Bruijn > > > > Sent: 22 December 2018 21:54 > > > > Validate packet socket address length if a len

  1   2   >