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

2019-04-22 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

Re:

2019-04-22 Thread Othman Bin Faisal
Good day , my name is Othman Bin Faisal , i sent you a mail and there was no response , please confirm that you did get this mail for more details. Regards. Othman Bin Faisal

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

2019-04-22 Thread Jason Wang
On 2019/4/22 上午11:57, YueHaibing wrote: We get a KASAN report as below, but don't have any reproducer. Any comments are appreciated. == BUG: KASAN: use-after-free in tun_net_xmit+0x1670/0x1750 drivers/net/tun.c:1104 Read of size

[PATCH v2] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-04-22 Thread Vinod Koul
stmmac_check_ether_addr() checks the MAC address and assigns one in driver open(). In many cases when we create slave netdevice, the dev addr is inherited from master but the master dev addr maybe NULL at that time, so move this call to driver probe so that address is always valid. Signed-off-by:

Re: [PATCH iproute2-next v2] ip fou: Support binding FOU ports

2019-04-22 Thread Kristian Evensen
Hi David, On Sun, Apr 21, 2019 at 3:33 AM David Ahern wrote: > Missed this in v1: you definitely do not want to call ll_init_map here. > It does a full kink dump which can be expensive on large scale setups. > ll_name_to_index alone should be fine. Thanks a lot for all your comments! It is not s

[PATCH v8 0/2] net: phy: mscc: Improvements to VSC8514 PHY driver.

2019-04-22 Thread Kavyasree.Kotagiri
The VSC8514 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X, can communicate with the MAC via QSGMII. The MAC interface protocol for each port within QSGMII can be either 1000BASE-X or SGMII, if the QSGMII MAC that the VSC8514 is connecting to supports thi

[PATCH v8 2/2] net: phy: vitesse: Remove support for VSC8514.

2019-04-22 Thread Kavyasree.Kotagiri
From: Kavya Sree Kotagiri Add support for VSC8514 in Microsemi driver (mscc.c) with more features. Signed-off-by: Kavya Sree Kotagiri --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/

[PATCH v8 1/2] net: phy: mscc: add support for VSC8514 PHY.

2019-04-22 Thread Kavyasree.Kotagiri
From: Kavya Sree Kotagiri The VSC8514 PHY is a 4-ports PHY that is 10/100/1000BASE-T, 100BASE-FX, 1000BASE-X, can communicate with the MAC via QSGMII. The MAC interface protocol for each port within QSGMII can be either 1000BASE-X or SGMII, if the QSGMII MAC that the VSC8514 is connecting to supp

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

2019-04-22 Thread Ido Schimmel
This patchset includes two improvements with regards to shared buffer configuration in mlxsw. The first part of this patchset forbids the user from performing illegal shared buffer configuration that can result in unnecessary packet loss. In order to better communicate these configuration failures

[PATCH net-next 13/14] mlxsw: spectrum_buffers: Allow skipping ingress port quota configuration

2019-04-22 Thread Ido Schimmel
The CPU port is used to transmit traffic that is trapped to the host CPU. It is therefore irrelevant to define ingress quota for it. Add a 'skip_ingress' argument to the function tasked with configuring per-port quotas, so that ingress quotas could be skipped in case the passed local port is the C

[PATCH net-next 03/14] mlxsw: spectrum_buffers: Use defines for pool indices

2019-04-22 Thread Ido Schimmel
The pool indices are currently hard coded throughout the code, which makes the code hard to follow and extend. Overcome this by using defines for the pool indices. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Jiri Pirko --- .../mellanox/mlxsw/spectrum_buffers.c | 18

[PATCH net-next 05/14] mlxsw: spectrum_buffers: Add ability to veto TC's configuration

2019-04-22 Thread Ido Schimmel
Subsequent patches are going to need to veto changes in certain TCs' binding and threshold configurations. Add fields to the TC's struct that indicate if the TC can be bound to a different pool and whether its threshold can change and enforce that. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirk

[PATCH net-next 14/14] mlxsw: spectrum_buffers: Adjust CPU port shared buffer egress quotas

2019-04-22 Thread Ido Schimmel
Switch the CPU port to use the new dedicated egress pool instead the previously used egress pool which was shared with normal front panel ports. Add per-port quotas for the amount of traffic that can be buffered for the CPU port and also adjust the per-{port, TC} quotas. Signed-off-by: Ido Schimm

[PATCH net-next 02/14] mlxsw: spectrum_buffers: Add extack messages for invalid configurations

2019-04-22 Thread Ido Schimmel
Add extack messages to better communicate invalid configuration to the user. Example: # devlink sb pool set pci/:01:00.0 pool 0 size 104857600 thtype dynamic Error: mlxsw_spectrum: Exceeded shared buffer size. devlink answers: Invalid argument Signed-off-by: Ido Schimmel Acked-by: Jiri Pirk

[PATCH net-next 04/14] mlxsw: spectrum_buffers: Add ability to veto pool's configuration

2019-04-22 Thread Ido Schimmel
Subsequent patches are going to need to veto changes in certain pools' size and / or threshold type (mode). Add two fields to the pool's struct that indicate if either of these attributes is allowed to change and enforce that. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: Petr M

[PATCH net-next 08/14] mlxsw: spectrum_buffers: Forbid changing multicast TCs' attributes

2019-04-22 Thread Ido Schimmel
Commit e83c045e53d7 ("mlxsw: spectrum_buffers: Configure MC pool") configured the threshold of the multicast TCs as infinite so that the admission of multicast packets is only depended on per-switch priority threshold. Forbid the user from changing the thresholds of these multicast TCs and their b

[PATCH net-next 07/14] mlxsw: spectrum_buffers: Forbid changing threshold type of first egress pool

2019-04-22 Thread Ido Schimmel
Multicast packets have three egress quotas: * Per egress port * Per egress port and traffic class * Per switch priority The limits on the switch priority are not exposed to the user and specified as dynamic threshold on the first egress pool. Forbid changing the threshold type of the first egress

[PATCH net-next 12/14] mlxsw: spectrum_buffers: Split business logic from mlxsw_sp_port_sb_pms_init()

2019-04-22 Thread Ido Schimmel
The function is used to set the per-port shared buffer quotas. Currently, these quotas are only set for front panel ports, but a subsequent patch will configure these quotas for the CPU port as well. The configuration required for the CPU port is a bit different than that of the front panel ports,

[PATCH net-next 11/14] mlxsw: spectrum_buffers: Use new CPU ingress pool for control packets

2019-04-22 Thread Ido Schimmel
Use the new ingress pool that was added in the previous patch for control packets (e.g., STP, LACP) that are trapped to the CPU. The previous management pool is no longer necessary and therefore its size is set to 0. The maximum quota for traffic towards the CPU is increased to 50% of the free sp

[PATCH net-next 09/14] mlxsw: spectrum_buffers: Remove assumption about pool order

2019-04-22 Thread Ido Schimmel
The code currently assumes that ingress pools have lower indices than egress pools. This makes it impossible to add more ingress pools without breaking user configuration that relies on a certain pool index to correspond to an egress pool. Remove such assumptions from the code, so that more ingres

[PATCH net-next 01/14] net: devlink: Add extack to shared buffer operations

2019-04-22 Thread Ido Schimmel
Add extack to shared buffer set operations, so that meaningful error messages could be propagated to the user. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: Petr Machata Cc: Jakub Kicinski --- drivers/net/ethernet/mellanox/mlxsw/core.c| 9 +--- .../net/ethernet/netron

[PATCH net-next 06/14] mlxsw: spectrum_buffers: Forbid configuration of multicast pool

2019-04-22 Thread Ido Schimmel
Commit e83c045e53d7 ("mlxsw: spectrum_buffers: Configure MC pool") added a dedicated pool for multicast traffic. The pool is visible to the user so that it would be possible to monitor its occupancy, but its configuration should be forbidden in order to maintain its intended operation. Signed-off-

[PATCH net-next 10/14] mlxsw: spectrum_buffers: Add pools for CPU traffic

2019-04-22 Thread Ido Schimmel
Packets that are trapped to the CPU are transmitted through the CPU port to the attached host. The CPU port is therefore like any other port and needs to have shared buffer configuration. The maximum quotas configured for the CPU are provided using dynamic threshold and cannot be changed by the us

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

2019-04-22 Thread YueHaibing
On 2019/4/22 17:41, 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 appreciated. >> >> == >> BUG: KASAN: use-after-free in tun_net_

Re: [PATCH rdma-next 3/6] RDMA/ucontext: Do not allow BAR mappings to be executable

2019-04-22 Thread Jason Gunthorpe
On Thu, Apr 18, 2019 at 02:23:26AM -0500, Kees Cook wrote: > On Thu, Apr 18, 2019 at 2:01 AM Jason Gunthorpe wrote: > > > > On Thu, Apr 18, 2019 at 01:30:07AM -0500, Kees Cook wrote: > > > > > Anything running with READ_IMPLIES_EXEC (i.e. a gnu stack marked WITH > > > execute) should be considered

Re: [PATCH 0/3] PCI: add help pci_dev_id

2019-04-22 Thread Bjorn Helgaas
On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote: > From: Heiner Kallweit > Date: Fri, 19 Apr 2019 20:27:45 +0200 > > > In several places in the kernel we find PCI_DEVID used like this: > > PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper > > for it. > > I'll wait fo

Re: [PATCH v2] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-04-22 Thread Andrew Lunn
On Mon, Apr 22, 2019 at 03:15:32PM +0530, Vinod Koul wrote: > stmmac_check_ether_addr() checks the MAC address and assigns one in > driver open(). In many cases when we create slave netdevice, the dev > addr is inherited from master but the master dev addr maybe NULL at > that time, so move this ca

[PATCH v2 61/79] docs: leds: convert to ReST

2019-04-22 Thread Mauro Carvalho Chehab
Rename the leds documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro

Re: [PATCH netnext 02/16] net: aquantia: implement hwmon api for chip temperature

2019-04-22 Thread Igor Russkikh
>> Thanks for the suggestion, I'll investigate. >> On my current system I however see it is named correctly after interface >> rename, >> like 'enp1s0-pci-0100'. > > Interesting. > > So you register the hwmon device after registering the netdev. So it > could be on your system that systemd has

ipsec tunnel performance degrade

2019-04-22 Thread Vakul Garg
Hi Post kernel 4.9, I am experiencing more than 50% degrade in ipsec performance on my arm64 based systems (with onchip crypto accelerator). (We use only lts kernels). My understanding is that it is mainly due to xfrm flow cache removal in version 4.12. I am not sure whether any subsequent work

Re: [PATCH iproute2-next v2] ip fou: Support binding FOU ports

2019-04-22 Thread David Ahern
On 4/22/19 5:29 AM, Kristian Evensen wrote: > Hi David, > > On Sun, Apr 21, 2019 at 3:33 AM David Ahern wrote: >> Missed this in v1: you definitely do not want to call ll_init_map here. >> It does a full kink dump which can be expensive on large scale setups. >> ll_name_to_index alone should be f

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

2019-04-22 Thread Willem de Bruijn
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 Patch 2 tests it with a 6in4 tunnel Willem de Bruijn (2):

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

2019-04-22 Thread Willem de Bruijn
From: Willem de Bruijn Some tunnels, like sit, change the network protocol of packet. If so, update skb->protocol to match the new type. Signed-off-by: Willem de Bruijn --- net/core/filter.c | 8 1 file changed, 8 insertions(+) diff --git a/net/core/filter.c b/net/core/filter.c index

[PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Willem de Bruijn
From: Willem de Bruijn So far, all BPF tc tunnel testcases encapsulate in the same network protocol. Add an encap testcase that requires updating skb->protocol. The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel. Verify that bpf_skb_net_grow correctly updates skb->protocol to sele

Re: [PATCH v5 net-next 5/6] ip6tlvs: Add netlink interface

2019-04-22 Thread David Ahern
On 4/22/19 6:33 AM, Tom Herbert wrote: > > > On Sun, Apr 21, 2019, 11:43 PM David Ahern > wrote: > > On 4/19/19 4:36 PM, Tom Herbert wrote: > > Add a netlink interface to manage the TX TLV parameters. Managed > > parameters include those for validating and

[PATCH iproute2-next v3] ip fou: Support binding FOU ports

2019-04-22 Thread Kristian Evensen
This patch adds support for binding FOU ports using iproute2. Kernel-support was added in 1713cb37bf67 ("fou: Support binding FoU socket"). The parse function now handles new arguments for setting the binding-related attributes, while the print function writes the new attributes if they are set. A

[PATCH bpf-next v6 8/9] selftests/bpf: properly return error from bpf_flow_load

2019-04-22 Thread Stanislav Fomichev
Right now we incorrectly return 'ret' which is always zero at that point. Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/flow_dissector_load.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/flow_dissector_load.h b/tools

[PATCH bpf-next v6 1/9] flow_dissector: switch kernel context to struct bpf_flow_dissector

2019-04-22 Thread Stanislav Fomichev
struct bpf_flow_dissector has a small subset of sk_buff fields that flow dissector BPF program is allowed to access and an optional pointer to real skb. Real skb is used only in bpf_skb_load_bytes helper to read non-linear data. The real motivation for this is to be able to call flow dissector fro

[PATCH bpf-next v6 6/9] selftests/bpf: add flow dissector bpf_skb_load_bytes helper test

2019-04-22 Thread Stanislav Fomichev
When flow dissector is called without skb, we want to make sure bpf_skb_load_bytes invocations return error. Add small test which tries to read single byte from a packet. bpf_skb_load_bytes should always fail under BPF_PROG_TEST_RUN because it was converted to the skb-less mode. Signed-off-by: St

[PATCH bpf-next v6 2/9] bpf: when doing BPF_PROG_TEST_RUN for flow dissector use no-skb mode

2019-04-22 Thread Stanislav Fomichev
Now that we have bpf_flow_dissect which can work on raw data, use it when doing BPF_PROG_TEST_RUN for flow dissector. Simplifies bpf_prog_test_run_flow_dissector and allows us to test no-skb mode. Note, that previously, with bpf_flow_dissect_skb we used to call eth_type_trans which pulled L2 (ETH

[PATCH bpf-next v6 4/9] flow_dissector: handle no-skb use case

2019-04-22 Thread Stanislav Fomichev
When called without skb, gather all required data from the __skb_flow_dissect's arguments and use recently introduces no-skb mode of bpf flow dissector. Note: WARN_ON_ONCE(!net) will now trigger for eth_get_headlen users. Signed-off-by: Stanislav Fomichev --- include/linux/skbuff.h| 5

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

2019-04-22 Thread Stanislav Fomichev
Currently, when eth_get_headlen calls flow dissector, it doesn't pass any skb. Because we use passed skb to lookup associated networking namespace to find whether we have a BPF program attached or not, we always use C-based flow dissector in this case. The goal of this patch series is to add new n

[PATCH bpf-next v6 7/9] selftests/bpf: run flow dissector tests in skb-less mode

2019-04-22 Thread Stanislav Fomichev
Export last_dissection map from flow dissector and use a known place in tun driver to trigger BPF flow dissection. Signed-off-by: Stanislav Fomichev --- .../selftests/bpf/flow_dissector_load.c | 2 +- .../selftests/bpf/flow_dissector_load.h | 16 ++- .../selftests/bpf/prog_tests/f

[PATCH bpf-next v6 3/9] net: plumb network namespace into __skb_flow_dissect

2019-04-22 Thread Stanislav Fomichev
This new argument will be used in the next patches for the eth_get_headlen use case. eth_get_headlen calls flow dissector with only data (without skb) so there is currently no way to pull attached BPF flow dissector program. With this new argument, we can amend the callers to explicitly pass networ

[PATCH bpf-next v6 5/9] net: pass net_device argument to the eth_get_headlen

2019-04-22 Thread Stanislav Fomichev
Update all users of eth_get_headlen to pass network device, fetch network namespace from it and pass it down to the flow dissector. This commit is a noop until administrator inserts BPF flow dissector program. Cc: Maxim Krasnyansky Cc: Saeed Mahameed Cc: Jeff Kirsher Cc: intel-wired-...@lists.o

[PATCH bpf-next v6 9/9] bpf/flow_dissector: don't adjust nhoff by ETH_HLEN in BPF_PROG_TEST_RUN

2019-04-22 Thread Stanislav Fomichev
Now that we use skb-less flow dissector let's return true nhoff and thoff. We used to adjust them by ETH_HLEN because that's how it was done in the skb case. For VLAN tests that looks confusing: nhoff is pointing to vlan parts :-\ Warning, this is an API change for BPF_PROG_TEST_RUN! Feel free to

[PATCH net-next] net: systemport: Remove need for DMA descriptor

2019-04-22 Thread Florian Fainelli
All we do is write the length/status and address bits to a DMA descriptor only to write its contents into on-chip registers right after, eliminate this unnecessary step. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 56 +++--- drivers/net/ethern

Re: [PATCH bpf 0/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Yonghong Song
On 4/20/19 5:38 AM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are mark

Re: [PATCH bpf 1/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Yonghong Song
On 4/20/19 5:39 AM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are mark

Re: ipsec tunnel performance degrade

2019-04-22 Thread Florian Westphal
Vakul Garg wrote: > Post kernel 4.9, I am experiencing more than 50% degrade in ipsec performance > on my arm64 based systems (with onchip crypto accelerator). > (We use only lts kernels). My understanding is that it is mainly due to xfrm > flow cache removal in version 4.12. Yes, likely. > I

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-22 Thread Cong Wang
On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes wrote: > > If 'entry' is NULL we WARN_ON() but dereference the pointer anyway, > generating a null pointer dereference bug. This patch fixes should_ > restart_cycle() so we return if the pointer is NULL. Hmm, while you are on it, how is it possible to

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-22 Thread Cong Wang
On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: > > On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes wrote: > > > > If 'entry' is NULL we WARN_ON() but dereference the pointer anyway, > > generating a null pointer dereference bug. This patch fixes should_ > > restart_cycle() so we return if the poi

Re: [PATCH bpf-next v6 3/9] net: plumb network namespace into __skb_flow_dissect

2019-04-22 Thread Saeed Mahameed
On Mon, 2019-04-22 at 08:55 -0700, Stanislav Fomichev wrote: > This new argument will be used in the next patches for the > eth_get_headlen use case. eth_get_headlen calls flow dissector > with only data (without skb) so there is currently no way to > pull attached BPF flow dissector program. With

Re: [PATCH bpf 0/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Paul Chaignon
On Mon, Apr 22, 2019 04:57PM, Yonghong Song wrote: > On 4/20/19 5:38 AM, Paul Chaignon wrote: > > In case of a null check on a pointer inside a subprog, we should mark all > > registers with this pointer as either safe or unknown, in both the current > > and previous frames. Currently, only spill

[PATCH bpf v2 0/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Paul Chaignon
In case of a null check on a pointer inside a subprog, we should mark all registers with this pointer as either safe or unknown, in both the current and previous frames. Currently, only spilled registers and registers in the current frame are marked. This first patch also marks registers in previ

[PATCH bpf v2 1/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Paul Chaignon
In case of a null check on a pointer inside a subprog, we should mark all registers with this pointer as either safe or unknown, in both the current and previous frames. Currently, only spilled registers and registers in the current frame are marked. This patch also marks registers in previous fr

[PATCH bpf v2 2/2] selftests/bpf: test case for pointer null check in subprog

2019-04-22 Thread Paul Chaignon
This test case is equivalent to the following pseudo-code. It checks that the verifier does not complain on line 6 and recognizes that ptr isn't null. 1: ptr = bpf_map_lookup_elem(map, &key); 2: ret = subprog(ptr) { 3: return ptr != NULL; 4: } 5: if (ret) 6: value = *ptr; Signed-off-by: Paul

Re: [PATCH iproute2-next v3] ip fou: Support binding FOU ports

2019-04-22 Thread David Ahern
On 4/22/19 9:27 AM, Kristian Evensen wrote: > This patch adds support for binding FOU ports using iproute2. > Kernel-support was added in 1713cb37bf67 ("fou: Support binding FoU > socket"). > > The parse function now handles new arguments for setting the > binding-related attributes, while the pri

Re: [PATCH bpf-next v6 3/9] net: plumb network namespace into __skb_flow_dissect

2019-04-22 Thread Stanislav Fomichev
On Mon, Apr 22, 2019 at 11:08 AM Saeed Mahameed wrote: > > On Mon, 2019-04-22 at 08:55 -0700, Stanislav Fomichev wrote: > > This new argument will be used in the next patches for the > > eth_get_headlen use case. eth_get_headlen calls flow dissector > > with only data (without skb) so there is cur

[PATCH 2/2] spi: ST ST95HF NFC: declare missing of table

2019-04-22 Thread Daniel Gomez
Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/nfc/st95hf/st95hf.ko | grep alias alias: spi:st95hf After this patch: modinfo drivers/nfc/st95hf/st95hf.ko | grep alias alias: spi:st

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

2019-04-22 Thread Daniel Gomez
Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/net/phy/spi_ks8995.ko | grep alias alias: spi:ksz8795 alias: spi:ksz8864 alias: spi:ks8995 After this patch: modinfo drivers

Re: [PATCH 0/5] Taprio qdisc fixes

2019-04-22 Thread Guedes, Andre
Hi David, > On Apr 20, 2019, at 8:46 PM, David Miller wrote: > > From: Andre Guedes > Date: Fri, 19 Apr 2019 17:00:47 -0700 > >> This series contains some minor improvements (patches 1 and 2) and >> fixes (patches 3-5) to taprio qdisc. > > This series does not apply cleanly at all to the net

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-22 Thread Guedes, Andre
> On Apr 22, 2019, at 11:07 AM, Cong Wang wrote: > > On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: >> >> On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes wrote: >>> >>> If 'entry' is NULL we WARN_ON() but dereference the pointer anyway, >>> generating a null pointer dereference bug. This pa

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jakub Kicinski
On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: > +static ssize_t del_device_store(struct bus_type *bus, const char *buf, > + size_t count) Please use the existing format of breaking multiline function declaration, if retype is longer than 3 chars it should be on

Re: [patch net-next v2 08/16] netdevsim: add bus attributes to add new and delete devices

2019-04-22 Thread Jakub Kicinski
On Sat, 20 Apr 2019 12:29:14 +0200, Jiri Pirko wrote: > - err = ida_alloc(&nsim_bus_dev_ids, GFP_KERNEL); > + err = ida_alloc_range(&nsim_bus_dev_ids, > + id == ~0 ? 0 : id, id, GFP_KERNEL); #define for ~0 ?

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

2019-04-22 Thread Jakub Kicinski
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/testing/selftests/bpf/test_offload.py > +++ b/tools/testing/selftests/bpf/test_of

Re: [PATCH 3/5] net: sched: taprio: Fix null pointer deref bug

2019-04-22 Thread Cong Wang
On Mon, Apr 22, 2019 at 12:24 PM Guedes, Andre wrote: > > > > On Apr 22, 2019, at 11:07 AM, Cong Wang wrote: > > > > On Mon, Apr 22, 2019 at 11:04 AM Cong Wang wrote: > >> > >> On Fri, Apr 19, 2019 at 6:06 PM Andre Guedes > >> wrote: > >>> > >>> If 'entry' is NULL we WARN_ON() but dereference

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

2019-04-22 Thread Saeed Mahameed
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 with 'hw_filters' list that is used to store > filters that

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

2019-04-22 Thread Jakub Kicinski
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 'hw_filters' list that is used to store > filters that don

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

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 12:08:38 +, Ido Schimmel wrote: > This patchset includes two improvements with regards to shared buffer > configuration in mlxsw. > > The first part of this patchset forbids the user from performing illegal > shared buffer configuration that can result in unnecessary packet

Re: [PATCH bpf-next v3 1/5] bpf: add writable context for raw tracepoints

2019-04-22 Thread Yonghong Song
On 4/22/19 12:23 PM, Matt Mullins wrote: > On Mon, 2019-04-22 at 18:12 +, Yonghong Song wrote: >> >> On 4/19/19 2:04 PM, Matt Mullins wrote: >>> This is an opt-in interface that allows a tracepoint to provide a safe >>> buffer that can be written from a BPF_PROG_TYPE_RAW_TRACEPOINT program. >

Re: [PATCH net-next] net: systemport: Remove need for DMA descriptor

2019-04-22 Thread Jakub Kicinski
On Mon, 22 Apr 2019 09:46:44 -0700, Florian Fainelli wrote: > All we do is write the length/status and address bits to a DMA > descriptor only to write its contents into on-chip registers right > after, eliminate this unnecessary step. > > Signed-off-by: Florian Fainelli Reviewed-by: Jakub Kicin

Re: [PATCH bpf v2 0/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Yonghong Song
On 4/22/19 11:34 AM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are mar

[PATCH 4.14 stable 3/5] ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module

2019-04-22 Thread Peter Oskolkov
From: Florian Westphal [ Upstream commit 70b095c84326640eeacfd69a411db8fc36e8ab1a ] IPV6=m DEFRAG_IPV6=m CONNTRACK=y yields: net/netfilter/nf_conntrack_proto.o: In function `nf_ct_netns_do_get': net/netfilter/nf_conntrack_proto.c:802: undefined reference to `nf_defrag_ipv6_enable' net/netfilte

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

2019-04-22 Thread Peter Oskolkov
[ 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 defragmentation code. Signed-off-by: Peter Oskolkov Cc: Eric Dumaz

[PATCH 4.14 stable 0/5] net: ip6 defrag: backport fixes

2019-04-22 Thread Peter Oskolkov
This is a backport of a 5.1rc patchset: https://patchwork.ozlabs.org/cover/1029418/ Which was backported into 4.19: https://patchwork.ozlabs.org/cover/1081619/ I had to backport two additional patches into 4.14 to make it work. John Masinter (captwiggum), could you, please, confirm that thi

[PATCH 4.14 stable 4/5] net: IP6 defrag: use rbtrees for IPv6 defrag

2019-04-22 Thread Peter Oskolkov
[ Upstream commit d4289fcc9b16b89619ee1c54f829e05e56de8b9a ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable 5/5] net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c

2019-04-22 Thread Peter Oskolkov
[ Upstream commit 997dd96471641e147cb2c33ad54284000d0f5e35 ] Currently, IPv6 defragmentation code drops non-last fragments that are smaller than 1280 bytes: see commit 0ed4229b08c1 ("ipv6: defrag: drop non-last frags smaller than min mtu") This behavior is not specified in IPv6 RFCs and appears t

[PATCH 4.14 stable 1/5] ipv6: frags: fix a lockdep false positive

2019-04-22 Thread Peter Oskolkov
From: Eric Dumazet [ Upstream commit 415787d7799f4fccbe8d49cb0b8e5811be6b0389 ] lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes. It complains because of following chains : 1) sch_direct_xmit()(lock txq->_xmit_lock) dev_har

[net-next 03/14] net/mlx5e: XDP, Fix shifted flag index in RQ bitmap

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan Values in enum mlx5e_rq_flag are used as bit indixes. Intention was to use them with no BIT(i) wrapping. No functional bug fix here, as the same (shifted)flag bit is used for all set, test, and clear operations. Fixes: 121e89275471 ("net/mlx5e: Refactor RQ XDP_TX indication")

[net-next 13/14] net/mlx5e: Remove unused rx_page_reuse stat

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy Remove the no longer used page_reuse stat of RQs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 2 -- 2 fi

[net-next 07/14] net/mlx5e: Remove unused parameter

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy params is unused in mlx5e_init_di_list. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/e

[net-next 12/14] net/mlx5e: Take HW interrupt trigger into a function

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_trigger_irq posts a NOP to the ICO SQ just to trigger an IRQ and enter the NAPI poll on the right CPU according to the affinity. Use it in mlx5e_activate_rq. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/n

[net-next 02/14] net/mlx5e: RX, Support multiple outstanding UMR posts

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan The buffers mapping of the Multi-Packet WQEs (of Striding RQ) is done via UMR posts, one UMR WQE per an RX MPWQE. A single MPWQE is capable of serving many incoming packets, usually larger than the budget of a single napi cycle. Hence, posting a single UMR WQE per napi cycle (

[net-next 14/14] net/mlx5e: Use #define for the WQE wait timeout constant

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy Create a #define for the timeout of mlx5e_wait_for_min_rx_wqes to clarify the meaning of a magic number. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++--- 1

[pull request][net-next 00/14] Mellanox, mlx5 RX and XDP improvements

2019-04-22 Thread Saeed Mahameed
Hi Dave, This series includes updates to mlx5e driver RX data path and some significant XDP RX/TX improvements to overcome/mitigate HW and PCIE bottlenecks. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts wit

[net-next 05/14] net/mlx5e: XDP, Add TX MPWQE session counter

2019-04-22 Thread Saeed Mahameed
From: Shay Agroskin This counter tracks how many TX MPWQE sessions are started in XDP SQ in XDP TX/REDIRECT flow. It counts per-channel and global stats. Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++ drivers/net/ether

[PATCH net-next] mlxsw: spectrum_router: Do not allow ipv6 gateway with v4 route via replace

2019-04-22 Thread David Ahern
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. Add a catch for it too. $ ip ro add 172.16.2.0/24 via 10.99.1.2 $

[net-next 09/14] net/mlx5e: Move parameter calculation functions to en/params.c

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy This commit moves the parameter calculation functions to a separate file for better modularity and code sharing with future features. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/Mak

[net-next 10/14] net/mlx5e: Add an underflow warning comment

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mlx5e_mpwqe_get_log_rq_size calculates the number of WQEs (N) based on the requested number of frames in the RQ (F) and the number of packets per WQE (P). It ensures that N is not less than the minimum number of WQEs in an RQ (N_min). Arithmetically, it means that F / P >

[net-next 04/14] net/mlx5e: XDP, Enhance RQ indication for XDP redirect flush

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan The XDP redirect flush indication belongs to the receive queue, not to its XDP send queue. For this, use a new bit on rq->flags. Signed-off-by: Tariq Toukan Reviewed-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +

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

2019-04-22 Thread Saeed Mahameed
From: Tariq Toukan A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Issue an additional prefetch in this case. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h| 17 + .../net/e

[net-next 08/14] net/mlx5e: Report mlx5e_xdp_set errors

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy If the channels fail to reopen after setting an XDP program, return the error code instead of 0. A proper fix is still needed, as now any error while reopening the channels brings the interface down. This patch only adds error reporting. Signed-off-by: Maxim Mikityanskiy

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

2019-04-22 Thread Saeed Mahameed
From: Shay Agroskin Upon high packet rate with multiple CPUs TX workloads, much of the HCA's resources are spent on prefetching TX descriptors, thus affecting transmission rates. This patch comes to mitigate this problem by moving some workload to the CPU and reducing the HW data prefetch overhea

[net-next 11/14] net/mlx5e: Remove unused parameter

2019-04-22 Thread Saeed Mahameed
From: Maxim Mikityanskiy mdev is unused in mlx5e_rx_is_linear_skb. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 7 +++ drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 3 +-- dri

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

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > Some tunnels, like sit, change the network protocol of packet. > If so, update skb->protocol to match the new type. > > Signed-off-by: Willem de Bruijn Acked-by: Yonghong Song > --- > net/core/filter.c | 8

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn wrote: > > From: Willem de Bruijn > > So far, all BPF tc tunnel testcases encapsulate in the same network > protocol. Add an encap testcase that requires updating skb->protocol. > > The 6in4 tunnel encapsulates an IPv6 packet inside an IPv4 tunnel.

Re: [PATCH bpf v2 1/2] bpf: mark registers as safe or unknown in all frames

2019-04-22 Thread Daniel Borkmann
On 04/22/2019 08:34 PM, Paul Chaignon wrote: > In case of a null check on a pointer inside a subprog, we should mark all > registers with this pointer as either safe or unknown, in both the current > and previous frames. Currently, only spilled registers and registers in > the current frame are ma

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Willem de Bruijn
On Mon, Apr 22, 2019 at 7:40 PM Y Song wrote: > > On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn > wrote: > > > > From: Willem de Bruijn > > > > So far, all BPF tc tunnel testcases encapsulate in the same network > > protocol. Add an encap testcase that requires updating skb->protocol. > > > >

Re: [PATCH bpf-next 2/2] selftests/bpf: expand test_tc_tunnel with SIT encap

2019-04-22 Thread Y Song
On Mon, Apr 22, 2019 at 4:47 PM Willem de Bruijn wrote: > > On Mon, Apr 22, 2019 at 7:40 PM Y Song wrote: > > > > On Mon, Apr 22, 2019 at 7:58 AM Willem de Bruijn > > wrote: > > > > > > From: Willem de Bruijn > > > > > > So far, all BPF tc tunnel testcases encapsulate in the same network > > >

  1   2   >