Re: [PATCH] rpc: properly check debugfs dentry before using it

2019-02-12 Thread gre...@linuxfoundation.org
On Tue, Feb 12, 2019 at 08:52:53PM +, Schumaker, Anna wrote: > On Tue, 2019-02-12 at 19:27 +0100, Greg Kroah-Hartman wrote: > > debugfs can now report an error code if something went wrong instead of > > just NULL. So if the return value is to be used as a "real" dentry, it > > needs to be che

Re: [PATCH] net: phy: at803x: disable delay only for RGMII mode

2019-02-12 Thread Peter Ujfalusi
Hi Vinod, On 12/02/2019 16.19, Vinod Koul wrote: > Per "Documentation/devicetree/bindings/net/ethernet.txt" RGMII mode > should not have delay in PHY whereas RGMII_ID and RGMII_RXID/RGMII_TXID > can have delay in phy. > > So disable the delay only for RGMII mode and disable for other modes s/disa

[PATCH mlx5-next 13/15] net/mlx5: Add new fields to Port Type and Speed register

2019-02-12 Thread Saeed Mahameed
From: Aya Levin Register Port Type and Speed (PTYS) introduces three new fields extending the speed/protocols the can be reported and configured. Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- include/linux/mlx5/mlx5_ifc.h | 12 1 file ch

[PATCH mlx5-next 12/15] net/mlx5: Refactor queries to speed fields in Port Type and Speed register

2019-02-12 Thread Saeed Mahameed
From: Aya Levin This patch fascicles queries to speed related fields in Port Type and Speed register (PTYS) into a single API. I addition, this patch refactors functions which serves only Ethernet driver: remove the protocol type as an input parameter, move code from 'core' directory into 'en' di

[PATCH mlx5-next 15/15] IB/mlx5: Add support for 50Gbps per lane link modes

2019-02-12 Thread Saeed Mahameed
From: Aya Levin Driver now supports new link modes: 50Gbps per lane support for 50G/100G/200G. This patch reads the correct field (legacy vs. extended) based on a FW indication bit, and adds a translation function (link modes to IB width and speed) to the new link modes. Signed-off-by: Aya Levin

[PATCH mlx5-next 08/15] net/mlx5: Provide an alternative VF upper bound for ECPF

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang ECPF doesn't support SR-IOV, but an ECPF E-Switch manager shall know the max VFs supported by its peer host PF in order to control those VF vports. The current driver implementation uses the total vfs quantity as provided by the pci sub-system for an upper bound of the VF vport

[PATCH mlx5-next 05/15] net/mlx5: Update enable HCA dependency

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang With the introduction of ECPF, we require that the ECPF driver will aways call enable/disable HCA for that PF in the same way a PF does this for its VFs. The PF is still responsible for calling enable and disable HCA for its VFs. To distinguish between the ECPF executing enable

[PATCH mlx5-next 14/15] net/mlx5: Add support to ext_* fields introduced in Port Type and Speed register

2019-02-12 Thread Saeed Mahameed
From: Aya Levin This patch exposes new link modes (including 50Gbps per lane), and ext_* fields which describes the new link modes in Port Type and Speed register (PTYS). Access functions, translation functions (speed <-> HW bits) and link max speed function were modified. Signed-off-by: Aya Lev

[PATCH mlx5-next 04/15] net/mlx5: Introduce Mellanox SmartNIC and modify page management logic

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang Mellanox's SmartNIC combines embedded CPU(e.g, ARM) processing power with advanced network offloads to accelerate a multitude of security, networking and storage applications. With the introduction of the SmartNIC, there is a new PCI function called Embedded CPU Physical Functi

[PATCH mlx5-next 07/15] net/mlx5: Add host params change event

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang In Embedded CPU (EC) configurations, the EC driver needs to know when the number of virtual functions change on the corresponding PF at the host side. This is required so the EC driver can create or destroy representor net devices that represent the VFs ports. Whenever a change

[PATCH mlx5-next 10/15] net/mlx5: Relocate vport macros to the vport header file

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang These are two macros in the driver general header which deal with the number of total vports and if a vport is vport manager. Such macros are vport entities, better to place them at the vport header file. This patch doesn't change any functionality. Signed-off-by: Bodong Wang

[PATCH mlx5-next 02/15] net/mlx5: Use consistent vport num argument type

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang Use u16 for vport number, which matches how hardware refers to this argument throughout commands. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed --- .../net/ethernet/me

[PATCH mlx5-next 06/15] net/mlx5: Add query host params command

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang The QUERY_HOST_PARAMS command is used by an Embedded CPU Physical Function (ECPF) driver to identify and retrieve information about the PF on the host side. E.g, number of virtual functions and PCI BDF. The number of VFs can be changed on the fly, a function is added to query c

[PATCH mlx5-next 09/15] net/mlx5: E-Switch, Normalize the name of uplink vport number

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang Driver used to name uplink vport as FDB_UPLINK_VPORT, it's hard to comply with the same naming convention along with the introduction of other vports. Use MLX5_VPORT as the prefix for such vports and relocate the uplink vport definition to public header file for the benefits of

[PATCH mlx5-next 11/15] net/mlx5: E-Switch, Avoid magic numbers when initializing offloads mode

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang When dealing with the offloads mode initialization, driver refers to the number of VFs and add magic number one (1) to take account of the uplink. This is not clear and will make the code less readable after adding other vports (e.g. host PF). As these are special vports compare

[PATCH mlx5-next 03/15] IB/mlx5: Use unified register/load function for uplink and VF vports

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang IB driver maintains different registration and load function calls for uplink and VF vports. This is not necessary as they only differ with each other on their profiles. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Mark Bloch Signed-of

[PATCH mlx5-next 01/15] net/mlx5: Use void pointer as the type in address_of macro

2019-02-12 Thread Saeed Mahameed
From: Bodong Wang Better to use void * and avoid unnecessary casts. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed --- include/linux/mlx5/device.h | 2 +- 1

[PATCH mlx5-next 00/15] mlx5-next updates (ECPF & 50Gbps per lane)

2019-02-12 Thread Saeed Mahameed
Hi All, This series from Bodong and Aya provides two low level updates to mlx5 core driver that are required for both mlx5e netdev and mlx5_ib drivers. >From Bodong Wang: 1) Introduction of ECPF (Embedded CPU Physical Function), and low level bits for mlx5 SmartNic capabilities support. 2) Vport

Re: [PATCH iproute2] lib/libnetlink: ensure a minimum of 32KB for the buffer used in rtnl_recvmsg()

2019-02-12 Thread Hangbin Liu
Hi David, On Tue, Feb 12, 2019 at 06:08:13PM -0800, Eric Dumazet wrote: > >> diff --git a/lib/libnetlink.c b/lib/libnetlink.c > >> index > >> 1892a02ab5d0d73776c9882ffc77edcd2c663d01..0d48a3d43cf03065dacbd419578ab10af56431a4 > >> 100644 > >> --- a/lib/libnetlink.c > >> +++ b/lib/libnetlink.c > >>

[PATCH] rhashtable: Remove obsolete rhashtable_walk_init function

2019-02-12 Thread Herbert Xu
Here is another patch on top the fixes to mac80211 to finally remove the obsolete rhashtable_walk_init API. ---8<--- The rhashtable_walk_init function has been obsolete for more than two years. This patch finally converts its last users over to rhashtable_walk_enter and removes it. Signed-off-by

[PATCH] mac80211: Use rhashtable_lookup_get_insert_fast instead of racy code

2019-02-12 Thread Herbert Xu
On Wed, Feb 13, 2019 at 01:05:51PM +0800, Herbert Xu wrote: > Hi: > > This patch fixes a number of issues with the use of the rhashtable API > in mac80211. First of all it converts the use of rashtable walks over > to a simple linked list. This is because an rhashtable walk is > inherently unsta

[PATCH net-next] cxgb4vf: Few more link management changes.

2019-02-12 Thread Vishal Kulkarni
CR4_QSFP 10G Speed technology should be 1baseKR_Full And also report available FEC modes. Signed-off-by: Vishal Kulkarni --- drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cx

[PATCH 1/2] mac80211: Use linked list instead of rhashtable walk for mesh tables

2019-02-12 Thread Herbert Xu
The mesh table code walks over hash tables for two purposes. First of all it's used as part of a netlink dump process, but it is also used for looking up entries to delete using criteria other than the hash key. The second purpose is directly contrary to the design specification of rhashtable wal

[PATCH 2/2] mac80211: Free mpath object when rhashtable insertion fails

2019-02-12 Thread Herbert Xu
When rhashtable insertion fails the mesh table code doesn't free the now-orphan mesh path object. This patch fixes that. Signed-off-by: Herbert Xu --- net/mac80211/mesh_pathtbl.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net

[PATCH net-next 0/2] cxgb4/cxgb4vf:Support for SGE doorbell queue timer

2019-02-12 Thread Vishal Kulkarni
This series of patchs add SGE doorbell queue timer for faster DMA completions. Patch 1 Implements SGE doorbell queue timer Patch 2 Adds ethtool capability to set/get SGE doorbell queue timer tick Vishal Kulkarni (2): cxgb4/cxgb4vf: Add support for SGE doorbell queue timer cxgb4: Add capabil

[PATCH net-next 2/2] cxgb4: Add capability to get/set SGE Doorbell Queue Timer Tick

2019-02-12 Thread Vishal Kulkarni
This patch gets/sets SGE Doorbell Queue timer ticks via ethtool Original work by: Casey Leedom Signed-off-by: Vishal Kulkarni --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 187 - drivers/net/ethernet/che

[PATCH net-next 1/2] cxgb4/cxgb4vf: Add support for SGE doorbell queue timer

2019-02-12 Thread Vishal Kulkarni
T6 introduced a Timer Mechanism in SGE called the SGE Doorbell Queue Timer. With this we can now configure TX Queues to get CIDX Updates when: Time(CIDX == PIDX) >= Timer Previously we rely on TX Queue Status Page updates by hardware for DMA completions. This will make Hardware/Firmware actua

[PATCH 0/2] mac80211: Fix incorrect usage of rhashtable walk API

2019-02-12 Thread Herbert Xu
Hi: This patch fixes a number of issues with the use of the rhashtable API in mac80211. First of all it converts the use of rashtable walks over to a simple linked list. This is because an rhashtable walk is inherently unstable and not meant for uses that require stability, e.g., when you're try

Re: [PATCH v2] rhashtable: make walk safe from softirq context

2019-02-12 Thread Herbert Xu
On Tue, Feb 12, 2019 at 10:43:39AM -0800, David Miller wrote: > > Herbert and Johannes, I need some guidance. > > It seems Herbert wants the softirq usage of rhashtables removed, but > since things have been like this for so long that's not the most > reasonable requirement if we can fix it more s

Re: KASAN: use-after-free Read in sctp_outq_tail

2019-02-12 Thread Xin Long
On Wed, Feb 13, 2019 at 4:00 AM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:d4104460aec1 Add linux-next specific files for 20190211 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=14140124c0 > kernel config: ht

RE: [PATCH v1 net-next 2/4] net: dsa: microchip: add MIB counter reading support

2019-02-12 Thread Florian Fainelli
On February 12, 2019 6:39:49 PM PST, tristram...@microchip.com wrote: >> > +static void ksz9477_freeze_mib(struct ksz_device *dev, int port, >bool >> freeze) >> > +{ >> > + struct ksz_port *p = &dev->ports[port]; >> > + u32 val = freeze ? MIB_COUNTER_FLUSH_FREEZE : 0; >> >> Reverse Christmas

Re: [RFC 03/19] net/ice: Add support for ice peer devices and drivers

2019-02-12 Thread Jason Gunthorpe
On Tue, Feb 12, 2019 at 03:43:46PM -0600, Shiraz Saleem wrote: > From: Anirudh Venkataramanan > > The E800 series of Ethernet devices has multiple hardware blocks, of > which RDMA is one. The RDMA block isn't interfaced directly to PCI > or any other bus. The RDMA driver (irdma) thus depends on t

[PATCH net-next] sock: consistent handling of extreme SO_SNDBUF/SO_RCVBUF values

2019-02-12 Thread Guillaume Nault
SO_SNDBUF and SO_RCVBUF (and their *BUFFORCE version) may overflow or underflow their input value. This patch aims at providing explicit handling of these extreme cases, to get a clear behaviour even with values bigger than INT_MAX / 2 or lower than INT_MIN / 2. For simplicity, only SO_SNDBUF and

Re: [PATCH v1 net-next 2/4] net: dsa: microchip: add MIB counter reading support

2019-02-12 Thread Andrew Lunn
> All of the MIB counters, except some that may be marked by driver, > do not get updated when the link is down, so it is a waste of time > to read them. Hi Tristram O.K, so make this clear in the code. Maybe rather than having this link_just_down, have the adjust link callback update the cached

[PATCH net-next 2/2] errqueue.h: Include time_types.h

2019-02-12 Thread Deepa Dinamani
Now that we have a separate header for struct __kernel_timespec, include it directly without relying on userspace to do it. Reported-by: Ran Rozenstein Signed-off-by: Deepa Dinamani --- include/uapi/linux/errqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/errqueue

[PATCH net-next 1/2] time: Add time_types.h

2019-02-12 Thread Deepa Dinamani
sys/time.h is the mandated include for many time related defines. However, linux/time.h overlaps sys/time.h significantly and this makes including both from userspace or one from the other impossible. This also means that userspace can get away with including sys/time.h whenever it needs linux/tim

[PATCH net-next 0/2] uapi: Add a new header for time types

2019-02-12 Thread Deepa Dinamani
The series aims at adding a new time header: time_types.h. This header is what will eventually hold all the uapi time types that we plan to leave across the interfaces after the y2038 cleanup. The series was discussed with Arnd Bergmann. The second patch fixes the errqueue.h header, which has a

RE: [PATCH] net: stmmac: Add SMC support for EMAC System Manager register

2019-02-12 Thread Ooi, Joyce
> -Original Message- > From: Thor Thayer [mailto:thor.tha...@linux.intel.com] > Sent: Wednesday, February 13, 2019 4:53 AM > To: Ooi, Joyce ; Giuseppe Cavallaro > ; Alexandre Torgue ; > Jose Abreu ; David S. Miller ; > Maxime Coquelin > Cc: netdev@vger.kernel.org; linux-st...@st-md-mailman

Re: mmotm 2019-02-12-15-37 uploaded (net/ipv4/devinit.c)

2019-02-12 Thread Randy Dunlap
On 2/12/19 3:37 PM, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2019-02-12-15-37 has been uploaded to > >http://www.ozlabs.org/~akpm/mmotm/ > > mmotm-readme.txt says > > README for mm-of-the-moment: > > http://www.ozlabs.org/~akpm/mmotm/ > > This is a snapshot of my -m

[PATCH AUTOSEL 4.20 022/105] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2019-02-12 Thread Sasha Levin
From: Wen Yang [ Upstream commit 8d68100ab4ad92560a16a68b72e068613ac4d573 ] Currently there are some issues with the ucc_of_parse_tdm function: 1, a possible null pointer dereference in ucc_of_parse_tdm, detected by the semantic patch deref_null.cocci, with the following warning: drivers/soc/fsl

Re: [bpf-next 1/2] tcp: replace SOCK_DEBUG() with tcp_stats()

2019-02-12 Thread Yafang Shao
On Wed, Feb 13, 2019 at 10:49 AM Alexei Starovoitov wrote: > > On Tue, Feb 12, 2019 at 6:15 PM Eric Dumazet wrote: > > > > Do not add more debugging stuff unless you can demonstrate > > they actually allowed you to find a real bug and that you sent a > > public fix for it. > > > > Just adding "co

[PATCH AUTOSEL 4.20 032/105] net/mlx4: Get rid of page operation after dma_alloc_coherent

2019-02-12 Thread Sasha Levin
From: Stephen Warren [ Upstream commit f65e192af35058e5c82da9e90871b472d24912bc ] This patch solves a crash at the time of mlx4 driver unload or system shutdown. The crash occurs because dma_alloc_coherent() returns one value in mlx4_alloc_icm_coherent(), but a different value is passed to dma_f

[PATCH AUTOSEL 4.20 036/105] mlxsw: spectrum: Add VXLAN dependency for spectrum

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 143a8e038ac599ca73c6354c8af6a8fdeee9fa7d ] When VXLAN is a loadable module, MLXSW_SPECTRUM must not be built-in: drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:2547: undefined reference to `vxlan_fdb_find_uc' Add Kconfig dependency to enforce usab

[PATCH AUTOSEL 4.20 035/105] mlxsw: spectrum_acl: Add cleanup after C-TCAM update error condition

2019-02-12 Thread Sasha Levin
From: Nir Dotan [ Upstream commit ff0db43cd6c530ff944773ccf48ece55d32d0c22 ] When writing to C-TCAM, mlxsw driver uses cregion->ops->entry_insert(). In case of C-TCAM HW insertion error, the opposite action should take place. Add error handling case in which the C-TCAM region entry is removed, b

[PATCH AUTOSEL 4.20 047/105] bpf: fix panic in stack_map_get_build_id() on i386 and arm32

2019-02-12 Thread Sasha Levin
From: Song Liu [ Upstream commit beaf3d1901f4ea46fbd5c9d857227d99751de469 ] As Naresh reported, test_stacktrace_build_id() causes panic on i386 and arm32 systems. This is caused by page_address() returns NULL in certain cases. This patch fixes this error by using kmap_atomic/kunmap_atomic inste

[PATCH AUTOSEL 4.20 043/105] netfilter: nft_flow_offload: Fix reverse route lookup

2019-02-12 Thread Sasha Levin
From: wenxu [ Upstream commit a799aea0988ea0d1b1f263e996fdad2f6133c680 ] Using the following example: client 1.1.1.7 ---> 2.2.2.7 which dnat to 10.0.0.7 server The first reply packet (ie. syn+ack) uses an incorrect destination address for the reverse route lookup since it uses:

[PATCH AUTOSEL 4.20 037/105] selftests: forwarding: Add a test for VLAN deletion

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 4fabf3bf93a194c7fa5288da3e0af37e4b943cf3 ] Add a VLAN on a bridge port, delete it and make sure the PVID VLAN is not affected. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../selftests/net/forwarding/bridge_v

[PATCH AUTOSEL 4.20 044/105] bpf: correctly set initial window on active Fast Open sender

2019-02-12 Thread Sasha Levin
From: Yuchung Cheng [ Upstream commit 31aa6503a15ba00182ea6dbbf51afb63bf9e851d ] The existing BPF TCP initial congestion window (TCP_BPF_IW) does not to work on (active) Fast Open sender. This is because it changes the (initial) window only if data_segs_out is zero -- but data_segs_out is also i

[PATCH AUTOSEL 4.20 046/105] selftests: bpf: install files tcp_(server|client)*.py

2019-02-12 Thread Sasha Levin
From: Anders Roxell [ Upstream commit f98937c6bb73ae11717a15aec85c187d33ca5d34 ] When test_tcpbpf_user runs it complains that it can't find files tcp_server.py and tcp_client.py. Rework so that tcp_server.py and tcp_client.py gets installed, added them to the variable TEST_PROGS_EXTENDED. Fixe

[PATCH AUTOSEL 4.20 038/105] netfilter: nf_tables: fix leaking object reference count

2019-02-12 Thread Sasha Levin
From: Taehee Yoo [ Upstream commit b91d9036883793122cf6575ca4dfbfbdd201a83d ] There is no code that decreases the reference count of stateful objects in error path of the nft_add_set_elem(). this causes a leak of reference count of stateful objects. Test commands: $nft add table ip filter

[PATCH AUTOSEL 4.20 049/105] netfilter: nft_flow_offload: fix interaction with vrf slave device

2019-02-12 Thread Sasha Levin
From: wenxu [ Upstream commit 10f4e765879e514e1ce7f52ed26603047af196e2 ] In the forward chain, the iif is changed from slave device to master vrf device. Thus, flow offload does not find a match on the lower slave device. This patch uses the cached route, ie. dst->dev, to update the iif and oif

[PATCH AUTOSEL 4.20 053/105] net: stmmac: Fix PCI module removal leak

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 6dea7e1881fd86b80da64e476ac398008daed857 ] Since commit b7d0f08e9129, the enable / disable of PCI device is not managed which will result in IO regions not being automatically unmapped. As regions continue mapped it is currently not possible to remove and then

[PATCH AUTOSEL 4.20 054/105] net: stmmac: dwxgmac2: Only clear interrupts that are active

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit fcc509eb10ff4794641e6ad3082118287a750d0a ] In DMA interrupt handler we were clearing all interrupts status, even the ones that were not active. Fix this and only clear the active interrupts. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alex

[PATCH AUTOSEL 4.20 056/105] net: stmmac: Fix the logic of checking if RX Watchdog must be enabled

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 3b5094665e273c4a2a99f7f5f16977c0f1e19095 ] RX Watchdog can be disabled by platform definitions but currently we are initializing the descriptors before checking if Watchdog must be disabled or not. Fix this by checking earlier if user wants Watchdog disabled o

[PATCH AUTOSEL 4.20 055/105] net: stmmac: Check if CBS is supported before configuring

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 0650d4017f4d2eee67230a02285a7ae5204240c2 ] Check if CBS is currently supported before trying to configure it in HW. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller Si

[PATCH AUTOSEL 4.20 058/105] isdn: i4l: isdn_tty: Fix some concurrency double-free bugs

2019-02-12 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 2ff33d6637393fe9348357285931811b76e1402f ] The functions isdn_tty_tiocmset() and isdn_tty_set_termios() may be concurrently executed. isdn_tty_tiocmset isdn_tty_modem_hup line 719: kfree(info->dtmf_state); line 721: kfree(info->silence_state); li

[PATCH AUTOSEL 4.20 057/105] net: stmmac: Prevent RX starvation in stmmac_napi_poll()

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit fa0be0a43f101888ac677dba31b590963eafeaa1 ] Currently, TX is given a budget which is consumed by stmmac_tx_clean() and stmmac_rx() is given the remaining non-consumed budget. This is wrong and in case we are sending a large number of packets this can starve RX

[PATCH AUTOSEL 4.20 065/105] netfilter: nft_flow_offload: fix checking method of conntrack helper

2019-02-12 Thread Sasha Levin
From: Henry Yen [ Upstream commit 2314e879747e82896f51cce4488f6a00f3e1af7b ] This patch uses nfct_help() to detect whether an established connection needs conntrack helper instead of using test_bit(IPS_HELPER_BIT, &ct->status). The reason is that IPS_HELPER_BIT is only set when using explicit C

[PATCH AUTOSEL 4.20 073/105] selftests/bpf: install with_tunnels.sh for test_flow_dissector.sh

2019-02-12 Thread Sasha Levin
From: Stanislav Fomichev [ Upstream commit 1be72f29bfb98be27a95309f18b4ab5249967b59 ] test_flow_dissector.sh depends on both with_addr.sh and with_tunnels.sh However, we install only with_addr.sh. Add with_tunnels.sh to TEST_PROGS_EXTENDED to make sure it gets installed as well. Tested with: m

[PATCH AUTOSEL 4.20 075/105] SUNRPC: Ensure rq_bytes_sent is reset before request transmission

2019-02-12 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit e66721f0436396f779291a29616858b76bfd9415 ] When we resend a request, ensure that the 'rq_bytes_sent' is reset to zero. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 1 - net/sunrpc/xprt

[PATCH AUTOSEL 4.20 071/105] vhost/scsi: Use copy_to_iter() to send control queue response

2019-02-12 Thread Sasha Levin
From: Bijan Mottahedeh [ Upstream commit 8e5dadfe76cf2862ebf3e4f22adef29982df7766 ] Uses copy_to_iter() instead of __copy_to_user() in order to ensure we support arbitrary layouts and an input buffer split across iov entries. Fixes: 0d02dbd68c47b ("vhost/scsi: Respond to control queue operation

[PATCH AUTOSEL 4.20 090/105] bpf: zero out build_id for BPF_STACK_BUILD_ID_IP

2019-02-12 Thread Sasha Levin
From: Stanislav Fomichev [ Upstream commit 4af396ae4836c4ecab61e975b8e61270c551894d ] When returning BPF_STACK_BUILD_ID_IP from stack_map_get_build_id_offset, make sure that build_id field is empty. Since we are using percpu free list, there is a possibility that we might reuse some previous bpf

[PATCH AUTOSEL 4.20 076/105] SUNRPC: Ensure we respect the RPCSEC_GSS sequence number limit

2019-02-12 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit 97b78ae96ba76f4ca2d8f5afee6a2e567ccb8f45 ] According to RFC2203, the RPCSEC_GSS sequence numbers are bounded to an upper limit of MAXSEQ = 0x8000. Ensure that we handle that correctly. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Sig

[PATCH AUTOSEL 4.20 080/105] net: phy: micrel: set soft_reset callback to genphy_soft_reset for KSZ9031

2019-02-12 Thread Sasha Levin
From: Heiner Kallweit [ Upstream commit 1d16073a326891c2a964e4cb95bc18fbcafb5f74 ] So far genphy_soft_reset was used automatically if the PHY driver didn't implement the soft_reset callback. This changed with the mentioned commit and broke KSZ9031. To fix this configure the KSZ9031 PHY driver to

[PATCH AUTOSEL 4.20 074/105] samples/bpf: workaround clang asm goto compilation errors

2019-02-12 Thread Sasha Levin
From: Yonghong Song [ Upstream commit 6bf3bbe1f4d4cf405e3c2bf07bbdff56d3223ec8 ] x86 compilation has required asm goto support since 4.17. Since clang does not support asm goto, at 4.17, Commit b1ae32dbab50 ("x86/cpufeature: Guard asm_volatile_goto usage for BPF compilation") worked around the i

[PATCH AUTOSEL 4.20 097/105] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start

2019-02-12 Thread Sasha Levin
From: Madalin Bucur [ Upstream commit c6ddfb9a963f0cac0f7365acfc87f3f3b33a3b69 ] As txq_trans_update() only updates trans_start when the lock is held, trans_start does not get updated if NETIF_F_LLTX is declared. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller Signed-off-by: Sasha

[PATCH AUTOSEL 4.20 098/105] mlxsw: pci: Return error on PCI reset timeout

2019-02-12 Thread Sasha Levin
From: Nir Dotan [ Upstream commit 67c14cc9b35055264fc0efed00159a7de1819f1b ] Return an appropriate error in the case when the driver timeouts on waiting for firmware to go out of PCI reset. Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check") Signed-off-by: Nir Dotan Acked-by: Jiri P

[PATCH AUTOSEL 4.20 096/105] bpf: fix SO_MAX_PACING_RATE to support TCP internal pacing

2019-02-12 Thread Sasha Levin
From: Yuchung Cheng [ Upstream commit e224c390a6259c529f7b2a6bd215a087b3344f5c ] If sch_fq packet scheduler is not used, TCP can fallback to internal pacing, but this requires sk_pacing_status to be properly set. Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper function to bpf") Signed-off-by:

[PATCH AUTOSEL 4.20 089/105] bpf: don't assume build-id length is always 20 bytes

2019-02-12 Thread Sasha Levin
From: Stanislav Fomichev [ Upstream commit 0b698005a9d11c0e91141ec11a2c4918a129f703 ] Build-id length is not fixed to 20, it can be (`man ld` /--build-id): * 128-bit (uuid) * 160-bit (sha1) * any length specified in ld --build-id=0xhexstring To fix the issue of missing BPF_STACK_BUILD_ID_

[PATCH AUTOSEL 4.20 092/105] atm: he: fix sign-extension overflow on large shift

2019-02-12 Thread Sasha Levin
From: Colin Ian King [ Upstream commit cb12d72b27a6f41325ae23a11033cf5fedfa1b97 ] Shifting the 1 by exp by an int can lead to sign-extension overlow when exp is 31 since 1 is an signed int and sign-extending this result to an unsigned long long will set the upper 32 bits. Fix this by shifting a

[PATCH AUTOSEL 4.20 091/105] selftests/bpf: retry tests that expect build-id

2019-02-12 Thread Sasha Levin
From: Stanislav Fomichev [ Upstream commit f67ad87ab3120e82845521b18a2b99273a340308 ] While running test_progs in a loop I found out that I'm sometimes hitting "Didn't find expected build ID from the map" error. Looking at stack_map_get_build_id_offset() it seems that it is racy (by design) and

[PATCH AUTOSEL 4.20 101/105] selftests: forwarding: Add a test case for externally learned FDB entries

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 479a2b761d61c04e2ae97325aa391a8a8c99c23e ] Test that externally learned FDB entries can roam, but not age out. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../net/forwarding/bridge_

[PATCH AUTOSEL 4.20 099/105] net: bridge: Mark FDB entries that were added by user as such

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 710ae72877378e7cde611efd30fe90502a6e5b30 ] Externally learned entries can be added by a user or by a switch driver that is notifying the bridge driver about entries that were learned in hardware. In the first case, the entries are not marked with the 'added_

[PATCH AUTOSEL 4.20 104/105] net/mlx5e: Fix wrong (zero) TX drop counter indication for representor

2019-02-12 Thread Sasha Levin
From: Tariq Toukan [ Upstream commit 7fdc1adc52d3975740547a78c2df329bb207f15d ] For representors, the TX dropped counter is not folded from the per-ring counters. Fix it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/m

Re: [PATCH bpf-next v10 5/7] bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c

2019-02-12 Thread David Ahern
On 2/12/19 10:32 AM, Peter Oskolkov wrote: > @@ -148,6 +174,87 @@ static int xmit_check_hhlen(struct sk_buff *skb) > return 0; > } > > +static int bpf_lwt_xmit_reroute(struct sk_buff *skb) > +{ > + struct net_device *l3mdev = l3mdev_master_dev_rcu(skb_dst(skb)->dev); > + int oif =

[PATCH AUTOSEL 4.20 103/105] net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames

2019-02-12 Thread Sasha Levin
From: Cong Wang [ Upstream commit e8c8b53ccaff568fef4c13a6ccaf08bf241aa01a ] When an ethernet frame is padded to meet the minimum ethernet frame size, the padding octets are not covered by the hardware checksum. Fortunately the padding octets are usually zero's, which don't affect checksum. Howe

[PATCH AUTOSEL 4.20 070/105] vhost: return EINVAL if iovecs size does not match the message size

2019-02-12 Thread Sasha Levin
From: Pavel Tikhomirov [ Upstream commit 74ad7419489ddade8044e3c9ab064ad656520306 ] We've failed to copy and process vhost_iotlb_msg so let userspace at least know about it. For instance before these patch the code below runs without any error: int main() { struct vhost_msg msg; struct iove

[PATCH AUTOSEL 4.19 22/83] qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory barrier

2019-02-12 Thread Sasha Levin
From: Denis Bolotin [ Upstream commit 46721c3d9e273aea880e9ff835b0e1271e1cd2fb ] Make sure chain element is updated before ringing the doorbell. Signed-off-by: Denis Bolotin Signed-off-by: Ariel Elior Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic

[PATCH AUTOSEL 4.19 21/83] qed: Fix qed_chain_set_prod() for PBL chains with non power of 2 page count

2019-02-12 Thread Sasha Levin
From: Denis Bolotin [ Upstream commit 2d533a9287f2011632977e87ce2783f4c689c984 ] In PBL chains with non power of 2 page count, the producer is not at the beginning of the chain when index is 0 after a wrap. Therefore, after the producer index wrap around, page index should be calculated more car

[PATCH AUTOSEL 4.19 29/83] xprtrdma: Double free in rpcrdma_sendctxs_create()

2019-02-12 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 6e17f58c486d9554341f70aa5b63b8fbed07b3fa ] The clean up is handled by the caller, rpcrdma_buffer_create(), so this call to rpcrdma_sendctxs_destroy() leads to a double free. Fixes: ae72950abf99 ("xprtrdma: Add data structure to manage RDMA Send arguments")

[PATCH AUTOSEL 4.19 38/83] bpf: correctly set initial window on active Fast Open sender

2019-02-12 Thread Sasha Levin
From: Yuchung Cheng [ Upstream commit 31aa6503a15ba00182ea6dbbf51afb63bf9e851d ] The existing BPF TCP initial congestion window (TCP_BPF_IW) does not to work on (active) Fast Open sender. This is because it changes the (initial) window only if data_segs_out is zero -- but data_segs_out is also i

[PATCH AUTOSEL 4.19 37/83] netfilter: nft_flow_offload: Fix reverse route lookup

2019-02-12 Thread Sasha Levin
From: wenxu [ Upstream commit a799aea0988ea0d1b1f263e996fdad2f6133c680 ] Using the following example: client 1.1.1.7 ---> 2.2.2.7 which dnat to 10.0.0.7 server The first reply packet (ie. syn+ack) uses an incorrect destination address for the reverse route lookup since it uses:

[PATCH AUTOSEL 4.19 32/83] netfilter: nf_tables: fix leaking object reference count

2019-02-12 Thread Sasha Levin
From: Taehee Yoo [ Upstream commit b91d9036883793122cf6575ca4dfbfbdd201a83d ] There is no code that decreases the reference count of stateful objects in error path of the nft_add_set_elem(). this causes a leak of reference count of stateful objects. Test commands: $nft add table ip filter

[PATCH AUTOSEL 4.19 27/83] net/mlx4: Get rid of page operation after dma_alloc_coherent

2019-02-12 Thread Sasha Levin
From: Stephen Warren [ Upstream commit f65e192af35058e5c82da9e90871b472d24912bc ] This patch solves a crash at the time of mlx4 driver unload or system shutdown. The crash occurs because dma_alloc_coherent() returns one value in mlx4_alloc_icm_coherent(), but a different value is passed to dma_f

RE: [PATCH v1 net-next 3/4] net: dsa: microchip: use readx_poll_time for polling

2019-02-12 Thread Tristram.Ha
> > -static int ksz9477_wait_vlan_ctrl_ready(struct ksz_device *dev, u32 > waiton, > > - int timeout) > > -{ > > - u8 data; > > - > > - do { > > - ksz_read8(dev, REG_SW_VLAN_CTRL, &data); > > - if (!(data & waiton)) > > - b

[PATCH AUTOSEL 4.19 25/83] selftests/bpf: Test [::] -> [::1] rewrite in sys_sendmsg in test_sock_addr

2019-02-12 Thread Sasha Levin
From: Andrey Ignatov [ Upstream commit 976b4f3a4646fbf0d189caca25f91f82e4be4b5a ] Test that sys_sendmsg BPF hook doesn't break sys_sendmsg behaviour to rewrite destination IPv6 = [::] with [::1] (BSD'ism). Two test cases are added: 1) User passes dst IPv6 = [::] and BPF_CGROUP_UDP6_SENDMSG pro

[PATCH AUTOSEL 4.19 31/83] selftests: forwarding: Add a test for VLAN deletion

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 4fabf3bf93a194c7fa5288da3e0af37e4b943cf3 ] Add a VLAN on a bridge port, delete it and make sure the PVID VLAN is not affected. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../selftests/net/forwarding/bridge_v

[PATCH AUTOSEL 4.19 45/83] net: stmmac: Fix PCI module removal leak

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 6dea7e1881fd86b80da64e476ac398008daed857 ] Since commit b7d0f08e9129, the enable / disable of PCI device is not managed which will result in IO regions not being automatically unmapped. As regions continue mapped it is currently not possible to remove and then

[PATCH AUTOSEL 4.19 46/83] net: stmmac: dwxgmac2: Only clear interrupts that are active

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit fcc509eb10ff4794641e6ad3082118287a750d0a ] In DMA interrupt handler we were clearing all interrupts status, even the ones that were not active. Fix this and only clear the active interrupts. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alex

[PATCH AUTOSEL 4.19 41/83] netfilter: nft_flow_offload: fix interaction with vrf slave device

2019-02-12 Thread Sasha Levin
From: wenxu [ Upstream commit 10f4e765879e514e1ce7f52ed26603047af196e2 ] In the forward chain, the iif is changed from slave device to master vrf device. Thus, flow offload does not find a match on the lower slave device. This patch uses the cached route, ie. dst->dev, to update the iif and oif

[PATCH AUTOSEL 4.19 49/83] net: stmmac: Prevent RX starvation in stmmac_napi_poll()

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit fa0be0a43f101888ac677dba31b590963eafeaa1 ] Currently, TX is given a budget which is consumed by stmmac_tx_clean() and stmmac_rx() is given the remaining non-consumed budget. This is wrong and in case we are sending a large number of packets this can starve RX

[PATCH AUTOSEL 4.19 50/83] isdn: i4l: isdn_tty: Fix some concurrency double-free bugs

2019-02-12 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 2ff33d6637393fe9348357285931811b76e1402f ] The functions isdn_tty_tiocmset() and isdn_tty_set_termios() may be concurrently executed. isdn_tty_tiocmset isdn_tty_modem_hup line 719: kfree(info->dtmf_state); line 721: kfree(info->silence_state); li

[PATCH AUTOSEL 4.19 48/83] net: stmmac: Fix the logic of checking if RX Watchdog must be enabled

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 3b5094665e273c4a2a99f7f5f16977c0f1e19095 ] RX Watchdog can be disabled by platform definitions but currently we are initializing the descriptors before checking if Watchdog must be disabled or not. Fix this by checking earlier if user wants Watchdog disabled o

[PATCH AUTOSEL 4.19 47/83] net: stmmac: Check if CBS is supported before configuring

2019-02-12 Thread Sasha Levin
From: Jose Abreu [ Upstream commit 0650d4017f4d2eee67230a02285a7ae5204240c2 ] Check if CBS is currently supported before trying to configure it in HW. Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: Jose Abreu Signed-off-by: David S. Miller Si

[PATCH AUTOSEL 4.19 56/83] netfilter: nft_flow_offload: fix checking method of conntrack helper

2019-02-12 Thread Sasha Levin
From: Henry Yen [ Upstream commit 2314e879747e82896f51cce4488f6a00f3e1af7b ] This patch uses nfct_help() to detect whether an established connection needs conntrack helper instead of using test_bit(IPS_HELPER_BIT, &ct->status). The reason is that IPS_HELPER_BIT is only set when using explicit C

[PATCH AUTOSEL 4.19 61/83] vhost: return EINVAL if iovecs size does not match the message size

2019-02-12 Thread Sasha Levin
From: Pavel Tikhomirov [ Upstream commit 74ad7419489ddade8044e3c9ab064ad656520306 ] We've failed to copy and process vhost_iotlb_msg so let userspace at least know about it. For instance before these patch the code below runs without any error: int main() { struct vhost_msg msg; struct iove

[PATCH AUTOSEL 4.19 77/83] dpaa_eth: NETIF_F_LLTX requires to do our own update of trans_start

2019-02-12 Thread Sasha Levin
From: Madalin Bucur [ Upstream commit c6ddfb9a963f0cac0f7365acfc87f3f3b33a3b69 ] As txq_trans_update() only updates trans_start when the lock is held, trans_start does not get updated if NETIF_F_LLTX is declared. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller Signed-off-by: Sasha

[PATCH AUTOSEL 4.19 72/83] selftests/bpf: retry tests that expect build-id

2019-02-12 Thread Sasha Levin
From: Stanislav Fomichev [ Upstream commit f67ad87ab3120e82845521b18a2b99273a340308 ] While running test_progs in a loop I found out that I'm sometimes hitting "Didn't find expected build ID from the map" error. Looking at stack_map_get_build_id_offset() it seems that it is racy (by design) and

[PATCH AUTOSEL 4.19 76/83] bpf: bpf_setsockopt: reset sock dst on SO_MARK changes

2019-02-12 Thread Sasha Levin
From: Peter Oskolkov [ Upstream commit f4924f24da8c7ef64195096817f3cde324091d97 ] In sock_setsockopt() (net/core/sock.h), when SO_MARK option is used to change sk_mark, sk_dst_reset(sk) is called. The same should be done in bpf_setsockopt(). Fixes: 8c4b4c7e9ff0 ("bpf: Add setsockopt helper func

[PATCH AUTOSEL 4.19 80/83] mlxsw: spectrum_switchdev: Do not treat static FDB entries as sticky

2019-02-12 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 64254a2054611205798e6bde634639bc704573ac ] The driver currently treats static FDB entries as both static and sticky. This is incorrect and prevents such entries from being roamed to a different port via learning. Fix this by configuring static entries with a

  1   2   3   4   5   >