Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-07 Thread Akshay Bhat
On 01/17/2017 02:22 PM, Akshay Bhat wrote: > This patch adds support for the Holt HI-311x CAN controller. The HI311x > CAN controller is capable of transmitting and receiving standard data > frames, extended data frames and remote frames. The HI311x interfaces > with the host over SPI. > >

Re: [PATCH net-next 1/1] net: rmnet_data: Initial implementation

2017-03-07 Thread David Miller
From: Subash Abhinov Kasiviswanathan Date: Thu, 23 Feb 2017 20:30:54 -0700 > +struct rmnet_nl_msg_s { > + uint16_t reserved; > + uint16_t message_type; > + uint16_t reserved2:14; > + uint16_t crd:2; Inside the kernel you should use "u32", "u16", "u8",

Re: [PATCH v2] dt: emac: document device-tree based phy discovery and setup

2017-03-07 Thread David Miller
From: Christian Lamparter Date: Mon, 27 Feb 2017 21:54:50 +0100 > This patch adds documentation for a new "phy-handle" property, > "fixed-link" and "mdio" sub-node. These allows the enumeration > of PHYs which are supported by the phy library under drivers/net/phy. > >

Re: [PATCH] net: toshiba: ps3_genic_net: use new api ethtool_{get|set}_link_ksettings

2017-03-07 Thread Geoff Levand
On 03/05/2017 02:21 PM, Philippe Reynes wrote: The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. I tested this applied to v4.11-rc1 and it seems to work

[PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-03-07 Thread Dmitry V. Levin
Replace MAX_ADDR_LEN with its numeric value to fix the following linux/packet_diag.h userspace compilation error: /usr/include/linux/packet_diag.h:67:17: error: 'MAX_ADDR_LEN' undeclared here (not in a function) __u8 pdmc_addr[MAX_ADDR_LEN]; This is not the first case in the UAPI where the

Re: [RFC PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-03-07 Thread David Miller
From: "Dmitry V. Levin" Date: Tue, 28 Feb 2017 04:39:30 +0300 > Replace MAX_ADDR_LEN with its numeric value to fix the following > linux/packet_diag.h userspace compilation error: > > /usr/include/linux/packet_diag.h:67:17: error: 'MAX_ADDR_LEN' undeclared here > (not in a

Re: [PATCH] net: qcom/emac: optimize QDF2400 SGMII RX/TX impedence values

2017-03-07 Thread David Miller
From: Timur Tabi Date: Tue, 28 Feb 2017 17:16:02 -0600 > Adjust the impedance values of the RX and TX lanes in the SGMII block > so that they are closer to optimal values. > > Signed-off-by: Timur Tabi Applied to net-next, thanks.

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 8:02 PM, Dmitry Vyukov wrote: > On Tue, Mar 7, 2017 at 7:43 PM, David Ahern wrote: >> On 3/7/17 11:13 AM, Dmitry Vyukov wrote: on this warning: /* dst.next really should not be set at this point */ if

Re: [PATCH] net/mlx5e: add IPV6 dependency

2017-03-07 Thread David Miller
From: Arnd Bergmann Date: Tue, 28 Feb 2017 22:12:04 +0100 > The ethernet support now calls directly into the ipv6 core code, which > fails if IPV6 is a loadable module but mlx5 is built-in: > > drivers/net/ethernet/mellanox/mlx5/core/en_tc.o: In function >

Re: [PATCH v1 net-next] net: dwc-xlgmac: Initial driver for DesignWare Enterprise Ethernet

2017-03-07 Thread David Miller
From: Jie Deng Date: Wed, 1 Mar 2017 12:00:25 +0800 > +static int xlgmac_init(struct xlgmac_pdata *pdata) > +{ > + struct net_device *netdev = pdata->netdev; > + struct xlgmac_hw_ops *hw_ops = >hw_ops; Please order local variable declarations from longest to

Re: [RFC PATCH] uapi: fix linux/packet_diag.h userspace compilation error

2017-03-07 Thread Dmitry V. Levin
On Tue, Mar 07, 2017 at 12:16:49PM -0800, David Miller wrote: > From: "Dmitry V. Levin" > Date: Tue, 28 Feb 2017 04:39:30 +0300 > > > Replace MAX_ADDR_LEN with its numeric value to fix the following > > linux/packet_diag.h userspace compilation error: > > > >

RE: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> On 03/06/2017 03:21 PM, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > > situations. > >

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 12:41 AM, David Ahern wrote: > On 3/6/17 11:51 AM, Dmitry Vyukov wrote: >> We hit it several thousand times, but we get only several dozens of >> crashes per day on ~80 VMs. So if you try to reproduce it on a single >> machine it can take days for

Re: [PATCH net 0/3] rds: tcp: fix various rds-tcp issues during netns create/delete sequences

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 2:04 AM, santosh.shilim...@oracle.com wrote: > On 3/4/17 8:57 AM, Sowmini Varadhan wrote: >> >> Dmitry Vyukov reported some syszkaller panics during netns deletion. >> >> While I have not been able to reproduce those exact panics, my attempts

Re: net: BUG in unix_notinflight

2017-03-07 Thread Dmitry Vyukov
On Mon, Mar 6, 2017 at 11:34 PM, Cong Wang wrote: > On Mon, Mar 6, 2017 at 2:40 AM, Dmitry Vyukov wrote: >> Now with a nice single-threaded C reproducer! > > Excellent... > >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >>

Re: [PATCH] udp: avoid ufo handling on IP payload compression packets

2017-03-07 Thread Steffen Klassert
On Tue, Mar 07, 2017 at 03:01:50PM +0800, Herbert Xu wrote: > On Mon, Mar 06, 2017 at 07:16:57AM +0100, Steffen Klassert wrote: > > > > > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > > > index b67719f..18383ef 100644 > > > --- a/net/ipv4/ip_output.c > > > +++ b/net/ipv4/ip_output.c >

Re: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

RE: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hello. > > On 03/06/2017 05:20 PM, Elena Reshetova wrote: > > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to use-after-free > >

Re: [PATCH net-next] net: ipv4: add support for ECMP hash policy choice

2017-03-07 Thread Roopa Prabhu
On 3/6/17, 6:59 AM, Nikolay Aleksandrov wrote: > This patch adds support for ECMP hash policy choice via a new sysctl > called fib_multipath_hash_policy and also adds support for L4 hashes. > The current values for fib_multipath_hash_policy are: > 0 - layer 3 > 1 - layer 4 (new default) > If

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
On Mon, Mar 06, 2017 at 04:20:58PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. >

Re: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
Hi Elena, On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free >

Re: [PATCH 1/2] net: sched: make default fifo qdiscs appear in the dump

2017-03-07 Thread Jiri Kosina
On Mon, 6 Mar 2017, David Miller wrote: > > Ah, right you are, thanks. The complete fix is not super trivial, as it > > needs some more surgery to tc_dump_qdisc_root(), tc_dump_tclass_root() and > > qdisc_match_from_root() (see 69012ae42 for some details). > > > > There are two options: > > >

Re: [PATCH 08/26] brcmsmac: make some local variables 'static const' to reduce stack size

2017-03-07 Thread Kalle Valo
Arnd Bergmann writes: > On Mon, Mar 6, 2017 at 5:19 PM, Kalle Valo wrote: >> Arend Van Spriel writes: >> >>> On 2-3-2017 17:38, Arnd Bergmann wrote: With KASAN and a couple of other patches applied, this driver is one

Re: [PATCH 08/26] brcmsmac: make some local variables 'static const' to reduce stack size

2017-03-07 Thread Arend Van Spriel
On 7-3-2017 10:44, Kalle Valo wrote: > Arnd Bergmann writes: > >> On Mon, Mar 6, 2017 at 5:19 PM, Kalle Valo wrote: >>> Arend Van Spriel writes: >>> On 2-3-2017 17:38, Arnd Bergmann wrote: > With KASAN and a couple of

Re: [PATCH net] sctp: change to save MSG_MORE flag into assoc

2017-03-07 Thread Xin Long
On Sat, Mar 4, 2017 at 12:51 PM, Xin Long wrote: > On Sat, Mar 4, 2017 at 1:57 AM, Xin Long wrote: >> On Sat, Mar 4, 2017 at 12:31 AM, David Laight >> wrote: >>> From: Xin Long Sent: 03 March 2017 15:43 >>> ... > It

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sergei Shtylyov
On 3/7/2017 10:52 AM, Reshetova, Elena wrote: refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena

[PATCH] xfrm: Added the auth and enc update support in "state update"

2017-03-07 Thread trajaraman
From: Thiruvadi rajaraman The "ip xfrm state update" process doesn't update the new authendication and encryption keys as well as it doesn't return an error. Test logs: (Default) == ~# ip xfrm state list ~# ip xfrm state add src fe80::/10 dst ff02::3 proto esp spi

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 9:43 AM, Dmitry Vyukov wrote: > On Tue, Mar 7, 2017 at 12:41 AM, David Ahern wrote: >> On 3/6/17 11:51 AM, Dmitry Vyukov wrote: >>> We hit it several thousand times, but we get only several dozens of >>> crashes per day on ~80

[PATCH net-next v2] net: ipv4: add support for ECMP hash policy choice

2017-03-07 Thread Nikolay Aleksandrov
This patch adds support for ECMP hash policy choice via a new sysctl called fib_multipath_hash_policy and also adds support for L4 hashes. The current values for fib_multipath_hash_policy are: 0 - layer 3 (default) 1 - layer 4 If there's an skb hash already set and it matches the chosen policy

Re: [xfrm] xfrm: Added the auth and enc update support in "state update"

2017-03-07 Thread Steffen Klassert
On Fri, Mar 03, 2017 at 03:53:39PM +0530, trajara...@mvista.com wrote: > From: Thiruvadi rajaraman > > Updated the xfrm state update process to update the > Authendication and Encryption keys. > > Signed-off-by: Thiruvadi rajaraman > --- >

Re: [4.9.13] use after free in ipv4_mtu

2017-03-07 Thread Daniel J Blueman
On 7 March 2017 at 00:20, Eric Dumazet wrote: > On Mon, 2017-03-06 at 05:45 -0800, Eric Dumazet wrote: >> On Mon, 2017-03-06 at 14:33 +0800, Daniel J Blueman wrote: > >> > I do change the network queueing discipline and related at runtime [1] >> > which may be triggering

Re: [PATCH] xfrm: Added the auth and enc update support in "state update"

2017-03-07 Thread Steffen Klassert
On Tue, Mar 07, 2017 at 05:33:13PM +0530, trajara...@mvista.com wrote: > From: Thiruvadi rajaraman > > The "ip xfrm state update" process doesn't update the new authendication > and encryption keys as well as it doesn't return an error. > > Test logs: (Default) >

Re: [PATCH] net: initialize msg.msg_flags in recvfrom

2017-03-07 Thread Eric Dumazet
On Tue, 2017-03-07 at 14:58 +0100, Alexander Potapenko wrote: > KMSAN (KernelMemorySanitizer, a new error detection tool) reports use > of uninitialized memory in put_cmsg()): I would prefer that you do not put the stack trace in the changelog, same for the reproducer since this has little value

Re: netlink: GPF in netlink_unicast

2017-03-07 Thread Paul Moore
On Mon, Mar 6, 2017 at 11:03 PM, Richard Guy Briggs wrote: > On 2017-03-06 10:10, Cong Wang wrote: >> On Mon, Mar 6, 2017 at 2:54 AM, Dmitry Vyukov wrote: >> > Hello, >> > >> > I've got the following crash while running syzkaller fuzzer on >> >

Re: [PATCH] net: initialize msg.msg_flags in recvfrom

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 2:58 PM, Alexander Potapenko wrote: > KMSAN (KernelMemorySanitizer, a new error detection tool) reports use > of uninitialized memory in put_cmsg()): > > == > BUG: KMSAN: use of unitialized

[PATCH v2 0/4] net: thunderx: Miscellaneous fixes

2017-03-07 Thread sunil . kovvuri
From: Sunil Goutham This patch set fixes multiple issues such as IOMMU translation faults when kernel is booted with IOMMU enabled on host, incorrect MAC ID reading from ACPI tables and IPv6 UDP packet drop due to failure of checksum validation. Changes from v1: - As

[PATCH v2 2/4] net: thunderx: Fix LMAC mode debug prints for QSGMII mode

2017-03-07 Thread sunil . kovvuri
From: Sunil Goutham When BGX/LMACs are in QSGMII mode, for some LMACs, mode info is not being printed. This patch will fix that. With changes already done to not do any sort of serdes 2 lane mapping config calculation in kernel driver, we can get rid of this logic.

[PATCH] net: initialize msg.msg_flags in recvfrom

2017-03-07 Thread Alexander Potapenko
KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of uninitialized memory in put_cmsg()): == BUG: KMSAN: use of unitialized memory inter: 0 CPU: 3 PID: 1086 Comm: syz-executor0 Not tainted 4.8.0-rc6+ #1920

Re: [PATCH 1/4] net: thunderx: Fix IOMMU translation faults

2017-03-07 Thread Sunil Kovvuri
On Mon, Mar 6, 2017 at 10:02 PM, Robin Murphy wrote: > On 06/03/17 12:57, Sunil Kovvuri wrote: We are seeing a 0.75Mpps drop with IP forwarding rate due to that. Hence I have restricted calling DMA interfaces to only when IOMMU is enabled. >>> >>> What's

[PATCH v2 4/4] net: thunderx: Allow IPv6 frames with zero UDP checksum

2017-03-07 Thread sunil . kovvuri
From: Thanneeru Srinivasulu Do not consider IPv6 frames with zero UDP checksum as frames with bad checksum and drop them. Signed-off-by: Thanneeru Srinivasulu Signed-off-by: Sunil Goutham ---

[PATCH v2 3/4] net: thunderx: Fix invalid mac addresses for node1 interfaces

2017-03-07 Thread sunil . kovvuri
From: Sunil Goutham When booted with ACPI, random mac addresses are being assigned to node1 interfaces due to mismatch of bgx_id in BGX driver and ACPI tables. This patch fixes this issue by setting maximum BGX devices per node based on platform/soc instead of a macro. This

[PATCH v2 1/4] net: thunderx: Fix IOMMU translation faults

2017-03-07 Thread sunil . kovvuri
From: Sunil Goutham ACPI support has been added to ARM IOMMU driver in 4.10 kernel and that has resulted in VNIC interfaces throwing translation faults when kernel is booted with ACPI as driver was not using DMA API. This patch fixes the issue by using DMA API which inturn

RE: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:20:59PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to

RE: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Reshetova, Elena
> Hi Elena, > > On Mon, Mar 06, 2017 at 04:21:00PM +0200, Elena Reshetova wrote: > > refcount_t type and corresponding API should be > > used instead of atomic_t when the variable is used as > > a reference counter. This allows to avoid accidental > > refcounter overflows that might lead to

[PATCH net-next 2/2] net: Eliminate duplicated codes by creating one new function in_dev_select_addr

2017-03-07 Thread fgao
From: Gao Feng There are two duplicated loop codes which used to select right address in current codes. Now eliminate these codes by creating one new function in_dev_select_addr. Signed-off-by: Gao Feng --- net/ipv4/devinet.c | 34

[PATCH net-next 1/2] net: Avoid unnessary loop when master_idx is invalid in inet_select_addr

2017-03-07 Thread fgao
From: Gao Feng When master_idx is invalid, it is zero. It is unnecessary to iterate all netdevs. Because l3mdev_master_ifindex_rcu(dev) != master_idx must be true. Now put this loop into the condition block when master_idx is valid. Signed-off-by: Gao Feng ---

[PATCH] net: mediatek: Use eth_hw_addr_random()

2017-03-07 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random dev_addr and update addr_assign_type instead of open-coding it. Signed-off-by: Tobias Klauser --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH][V2] rtlwifi: rtl8192de: ix spelling mistake: "althougth" -> "though"

2017-03-07 Thread Kalle Valo
Larry Finger writes: > On 02/26/2017 12:52 PM, Colin King wrote: >> From: Colin Ian King >> >> trivial fix to spelling mistake in RT_TRACE message >> >> Signed-off-by: Colin Ian King >> --- >>

With due respect

2017-03-07 Thread U B A
Base on the last email i sent to you, I wish to bring to your notice that i am still waiting patiently for your response. Mrs. Anna Johnson.

Re: [PATCH v2] {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function

2017-03-07 Thread Leon Romanovsky
On Mon, Mar 06, 2017 at 08:54:06PM +0200, Yuval Shaia wrote: > This logic seems to be duplicated in (at least) three separate files. > Move it to one place so code can be re-use. > > Signed-off-by: Yuval Shaia > --- > v0 -> v1: > * Add missing #include > *

[PATCH] PCI: Add pci reset quirk for Cavium VNIC

2017-03-07 Thread Radoslaw Biernacki
From: Radoslaw Biernacki PCI reset quirk is needed for Cavium Function NIC since it does not handle a function level reset. This cause problems when VNIC is used from userspace by vfio. If application (or VM) does not stop the VNIC queues, HW may cause overwrite of

[PATCHv3 net-next 14/22] net: mvpp2: adjust mvpp2_{rxq,txq}_init for PPv2.2

2017-03-07 Thread Thomas Petazzoni
In PPv2.2, the MVPP2_RXQ_DESC_ADDR_REG and MVPP2_TXQ_DESC_ADDR_REG registers have a slightly different layout, because they need to contain a 64-bit address for the RX and TX descriptor arrays. This commit adjusts those functions accordingly. Signed-off-by: Thomas Petazzoni

[PATCHv3 net-next 12/22] net: mvpp2: adapt the mvpp2_rxq_*_pool_set functions to PPv2.2

2017-03-07 Thread Thomas Petazzoni
The MVPP2_RXQ_CONFIG_REG register has a slightly different layout between PPv2.1 and PPv2.2, so this commit adapts the functions modifying this register to accommodate for both the PPv2.1 and PPv2.2 cases. Signed-off-by: Thomas Petazzoni ---

[PATCHv3 net-next 09/22] net: mvpp2: introduce an intermediate union for the TX/RX descriptors

2017-03-07 Thread Thomas Petazzoni
Since the format of the HW descriptors is different between PPv2.1 and PPv2.2, this commit introduces an intermediate union, with for now only the PPv2.1 descriptors. The bulk of the driver code only manipulates opaque mvpp2_tx_desc and mvpp2_rx_desc pointers, and the descriptors can only be

[PATCHv3 net-next 06/22] net: mvpp2: store physical address of buffer in rx_desc->buf_cookie

2017-03-07 Thread Thomas Petazzoni
The RX descriptors of the PPv2 hardware allow to store several information, amongst which: - the DMA address of the buffer in which the data has been received - a "cookie" field, left to the use of the driver, and not used by the hardware In the current implementation, the "cookie" field is

[PATCHv3 net-next 10/22] net: mvpp2: introduce PPv2.2 HW descriptors and adapt accessors

2017-03-07 Thread Thomas Petazzoni
This commit adds the definition of the PPv2.2 HW descriptors, adjusts the mvpp2_tx_desc and mvpp2_rx_desc structures accordingly, and adapts the accessors to work on both PPv2.1 and PPv2.2. Signed-off-by: Thomas Petazzoni ---

[PATCHv3 net-next 11/22] net: mvpp2: adjust the allocation/free of BM pools for PPv2.2

2017-03-07 Thread Thomas Petazzoni
This commit adjusts the allocation and freeing of BM pools to support PPv2.2. This involves: - Checking that the number of buffer pointers is a multiple of 16, as required by the hardware. - Adjusting the size of the DMA coherent area allocated for buffer pointers. Indeed, PPv2.2 needs

Re: [PATCH] net: initialize msg.msg_flags in recvfrom

2017-03-07 Thread Alexander Potapenko
On Tue, Mar 7, 2017 at 3:23 PM, Dmitry Vyukov wrote: > On Tue, Mar 7, 2017 at 2:58 PM, Alexander Potapenko wrote: >> KMSAN (KernelMemorySanitizer, a new error detection tool) reports use >> of uninitialized memory in put_cmsg()): >> >>

Re: [PATCH net-next 2/2] net: Eliminate duplicated codes by creating one new function in_dev_select_addr

2017-03-07 Thread Sergei Shtylyov
Hello! On 03/07/2017 05:51 PM, f...@ikuai8.com wrote: From: Gao Feng There are two duplicated loop codes which used to select right Just "loops". address in current codes. Now eliminate these codes by creating one new function in_dev_select_addr. Signed-off-by: Gao

[PATCHv3 net-next 07/22] net: mvpp2: add and use accessors for TX/RX descriptors

2017-03-07 Thread Thomas Petazzoni
The PPv2.2 IP has a different TX and RX descriptor layout compared to PPv2.1. In order to prepare for the introduction of PPv2.2 support in mvpp2, this commit adds accessors for the different fields of the TX and RX descriptors, and changes the code to use them. For now, the mvpp2_port argument

[PATCHv3 net-next 13/22] net: mvpp2: adapt mvpp2_defaults_set() to PPv2.2

2017-03-07 Thread Thomas Petazzoni
This commit modifies the mvpp2_defaults_set() function to not do the loopback and FIFO threshold initialization, which are not needed for PPv2.2. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 22 -- 1 file

[PATCHv3 net-next 05/22] net: mvpp2: remove mvpp2_txq_pend_desc_num_get() function

2017-03-07 Thread Thomas Petazzoni
The mvpp2_txq_pend_desc_num_get() function only selects a TX queue, and reads the number of pending descriptors. It is used in only one place, in mvpp2_txq_clean(), where the TX queue has already been selected by a write to MVPP2_TXQ_NUM_REG. Therefore, this function is useless, and the caller

[PATCHv3 net-next 08/22] net: mvpp2: add hw_version field in "struct mvpp2"

2017-03-07 Thread Thomas Petazzoni
In preparation to the introduction for the support of PPv2.2 in the mvpp2 driver, this commit adds a hw_version field to the struct mvpp2, and uses the .data field of the DT match table to fill it in. Having the MVPP21 and MVPP22 definitions available will allow to start adding the necessary

Re: [PATCH net-next] tg3: Add the ability to conditionally build w/ HWMON

2017-03-07 Thread Siva Reddy Kallam
On Tue, Mar 7, 2017 at 2:26 AM, Florian Fainelli wrote: > Introduce a Kconfig option: CONFIG_TIGON3_HWMON which allows to build > in/out support for thermal sensors reported by Tigon3 NICs. > > Signed-off-by: Florian Fainelli Acked-by: Siva Reddy

[PATCHv3 net-next 18/22] net: mvpp2: rework RXQ interrupt group initialization for PPv2.2

2017-03-07 Thread Thomas Petazzoni
This commit adjusts how the MVPP2_ISR_RXQ_GROUP_REG register is configured, since it changed between PPv2.1 and PPv2.2. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 46 1 file changed, 42

[PATCHv3 net-next 15/22] net: mvpp2: handle register mapping and access for PPv2.2

2017-03-07 Thread Thomas Petazzoni
This commit adjusts the mvpp2 driver register mapping and access logic to support PPv2.2, to handle a number of differences. Due to how the registers are laid out in memory, the Device Tree binding for the "reg" property is different: - On PPv2.1, we had a first area for the packet processor

[PATCHv3 net-next 00/22] net: mvpp2: add initial support for PPv2.2

2017-03-07 Thread Thomas Petazzoni
The goal of this patch series is to add basic support for PPv2.2 in the existing mvpp2 driver. mvpp2 currently supported the PPv2.1 version of the IP, used in the 32 bits Marvell Armada 375 SoC. PPv2.2 is an evolution of this IP block, used in the 64 bits Marvell Armada 7K/8K SoCs. In order to

[PATCHv3 net-next 17/22] net: mvpp2: add AXI bridge initialization for PPv2.2

2017-03-07 Thread Thomas Petazzoni
The PPv2.2 unit is connected to an AXI bus on Armada 7K/8K, so this commit adds the necessary initialization of the AXI bridge. Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 85 1 file

[PATCHv3 net-next 04/22] net: mvpp2: remove unused register definition MVPP2_TXQ_THRESH_REG

2017-03-07 Thread Thomas Petazzoni
This register is no longer used since commit edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer"). Signed-off-by: Thomas Petazzoni --- drivers/net/ethernet/marvell/mvpp2.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCHv3 net-next 22/22] net: mvpp2: finally add the PPv2.2 compatible string

2017-03-07 Thread Thomas Petazzoni
Now that the mvpp2 driver has been modified to accommodate the support for PPv2.2, we can finally advertise this support by adding the appropriate compatible string. At the same time, we update the Kconfig description of the MVPP2 driver. Signed-off-by: Thomas Petazzoni

Re: netlink: GPF in netlink_unicast

2017-03-07 Thread Richard Guy Briggs
On 2017-03-07 09:29, Paul Moore wrote: > On Mon, Mar 6, 2017 at 11:03 PM, Richard Guy Briggs wrote: > > On 2017-03-06 10:10, Cong Wang wrote: > >> On Mon, Mar 6, 2017 at 2:54 AM, Dmitry Vyukov wrote: > >> > Hello, > >> > > >> > I've got the following crash

Re: [4.9.13] use after free in ipv4_mtu

2017-03-07 Thread Stephen Hemminger
On Mon, 06 Mar 2017 08:20:03 -0800 Eric Dumazet wrote: > On Mon, 2017-03-06 at 05:45 -0800, Eric Dumazet wrote: > > On Mon, 2017-03-06 at 14:33 +0800, Daniel J Blueman wrote: > > > > I do change the network queueing discipline and related at runtime [1] > > > which may

Re: [PATCH net 0/3] rds: tcp: fix various rds-tcp issues during netns create/delete sequences

2017-03-07 Thread Santosh Shilimkar
On 3/7/2017 12:28 AM, Dmitry Vyukov wrote: On Tue, Mar 7, 2017 at 2:04 AM, santosh.shilim...@oracle.com wrote: On 3/4/17 8:57 AM, Sowmini Varadhan wrote: Dmitry Vyukov reported some syszkaller panics during netns deletion. While I have not been able to

[PATCHv3 net-next 21/22] net: mvpp2: set dma mask and coherent dma mask on PPv2.2

2017-03-07 Thread Thomas Petazzoni
On PPv2.2, the streaming mappings can be anywhere in the first 40 bits of the physical address space. However, for the coherent mappings, we still need them to be in the first 32 bits of the address space, because all BM pools share a single register to store the high 32 bits of the BM pool

[PATCHv3 net-next 16/22] net: mvpp2: handle misc PPv2.1/PPv2.2 differences

2017-03-07 Thread Thomas Petazzoni
This commit handles a few miscellaneous differences between PPv2.1 and PPv2.2 in different areas, where code done for PPv2.1 doesn't apply for PPv2.2 or needs to be adjusted (getting the MAC address, disabling PHY polling, etc.). Thanks to Russell King for providing the initial implementation of

[PATCHv3 net-next 01/22] dt-bindings: net: update Marvell PPv2 binding for PPv2.2 support

2017-03-07 Thread Thomas Petazzoni
The Marvell PPv2 Device Tree binding was so far only used to describe the PPv2.1 network controller, used in the Marvell Armada 375. A new version of this IP block, PPv2.2 is used in the Marvell Armada 7K/8K processor. This commit extends the existing binding so that it can also be used to

[PATCHv3 net-next 02/22] net: mvpp2: use "dma" instead of "phys" where appropriate

2017-03-07 Thread Thomas Petazzoni
As indicated by Russell King, the mvpp2 driver currently uses a lot "phys" or "phys_addr" to store what really is a DMA address. This commit clarifies this by using "dma" or "dma_addr" where appropriate. This is especially important as we are going to introduce more changes where the distinction

[PATCHv3 net-next 20/22] net: mvpp2: add support for an additional clock needed for PPv2.2

2017-03-07 Thread Thomas Petazzoni
The PPv2.2 variant of the network controller needs an additional clock, the "MG clock" in order for the IP block to operate properly. This commit adds support for this additional clock to the driver, reworking as needed the error handling path. Signed-off-by: Thomas Petazzoni

[PATCHv3 net-next 03/22] net: mvpp2: remove support for buffer header

2017-03-07 Thread Thomas Petazzoni
The "buffer header" functionality is a functionality used by the hardware to split an incoming packets over multiple BM buffers if they are not large enough. However, the mvpp2 driver guarantees that a pool of BM buffers has buffers with a size large enough to store MTU-sized packets. Therefore,

[PATCHv3 net-next 19/22] net: mvpp2: adapt rxq distribution to PPv2.2

2017-03-07 Thread Thomas Petazzoni
In PPv2.1, we have a maximum of 8 RXQs per port, with a default of 4 RXQs per port, and we were assigning RXQs 0->3 to the first port, 4->7 to the second port, 8->11 to the third port, etc. In PPv2.2, we have a maximum of 32 RXQs per port, and we must allocate RXQs from the range of 32 RXQs

Re: [PATCH] PCI: Add pci reset quirk for Cavium VNIC

2017-03-07 Thread Robin Murphy
On 07/03/17 15:04, Radoslaw Biernacki wrote: > From: Radoslaw Biernacki > > PCI reset quirk is needed for Cavium Function NIC since it does not > handle a function level reset. > This cause problems when VNIC is used from userspace by vfio. > If application (or VM)

[PATCH RESEND v1] qed: Fix copy of uninitialized memory

2017-03-07 Thread Robert Foss
In qed_ll2_start_ooo() the ll2_info variable is uninitialized and then passed to qed_ll2_acquire_connection() where it is copied into a new memory space. This shouldn't cause any issue as long as non of the copied memory is every read. But the potential for a bug being introduced by reading this

Re: [PATCH v2 0/6] Updates for Marvell Switch SoCs

2017-03-07 Thread Gregory CLEMENT
Hi Chris, On jeu., févr. 16 2017, Chris Packham wrote: > Shortly after I posted my last series I got access to a more recent > Marvell SDK which had some device tree support for the switch SoCs I'd > been wanting. It was still based on an older kernel but

RE: [PATCHv3 net-next 21/22] net: mvpp2: set dma mask and coherent dma mask on PPv2.2

2017-03-07 Thread David Laight
From: Thomas Petazzoni > Sent: 07 March 2017 15:53 > On PPv2.2, the streaming mappings can be anywhere in the first 40 bits > of the physical address space. However, for the coherent mappings, we > still need them to be in the first 32 bits of the address space, > because all BM pools share a

hello

2017-03-07 Thread duncan
hi

Re: [4.9.13] use after free in ipv4_mtu

2017-03-07 Thread Eric Dumazet
On Tue, 2017-03-07 at 08:29 -0800, Stephen Hemminger wrote: > + WARN_ONCE(strcmp(default_qdisc_ops->id, "fq"), > + "TCP BBR should only be used with FQ qdisc\n"); > + > Why would that be needed, especially for people that properly setup their qdisc ? Maybe they do not

[PATCH net] net/tunnel: set inner protocol in network gro hooks

2017-03-07 Thread Paolo Abeni
The gso code of several tunnels type (gre and udp tunnels) takes for granted that the skb->inner_protocol is properly initialized and drops the packet elsewhere. On the forwarding path no one is initializing such field, so gro encapsulated packets are dropped on forward. Since commit

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 6:17 PM, 'David Ahern' via syzkaller wrote: > On 3/7/17 1:43 AM, Dmitry Vyukov wrote: >> This is on c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201. No other kernel >> output from your patch (pr_err). > > Is the below supposed to be from the same qemu

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread Dmitry Vyukov
On Tue, Mar 7, 2017 at 7:03 PM, David Ahern wrote: > On 3/7/17 2:21 AM, Dmitry Vyukov wrote: >> I've commented that warning just to see I can obtain more information. >> Then I also got this: >> >> [ cut here ] >> WARNING: CPU: 2 PID: 3990 at

Re: net: heap out-of-bounds in fib6_clean_node/rt6_fill_node/fib6_age/fib6_prune_clone

2017-03-07 Thread David Ahern
On 3/7/17 2:21 AM, Dmitry Vyukov wrote: > I've commented that warning just to see I can obtain more information. > Then I also got this: > > [ cut here ] > WARNING: CPU: 2 PID: 3990 at net/ipv6/ip6_fib.c:991 > fib6_add+0x2e12/0x3290 net/ipv6/ip6_fib.c:991

Re: [PATCH net 0/2] net: fix possible sock_hold() misuses

2017-03-07 Thread David Miller
From: Eric Dumazet Date: Fri, 3 Mar 2017 21:01:01 -0800 > skb_complete_wifi_ack() and skb_complete_tx_timestamp() currently > call sock_hold() on sockets that might have transitioned their sk_refcnt > to zero already. Series applied and queued up for -stable, thanks.

Re: [PATCH net] dccp: fix use-after-free in dccp_feat_activate_values

2017-03-07 Thread David Miller
From: Eric Dumazet Date: Sun, 05 Mar 2017 10:52:16 -0800 > From: Eric Dumazet > > Dmitry reported crashes in DCCP stack [1] > > Problem here is that when I got rid of listener spinlock, I missed the > fact that DCCP stores a complex state in struct

Re: [PATCH v3 net-next 2/6] drivers: net: xgene-v2: Add mac configuration

2017-03-07 Thread David Miller
From: Iyappan Subramanian Date: Fri, 3 Mar 2017 17:09:28 -0800 > +void xge_mac_set_station_addr(struct xge_pdata *pdata) > +{ > + u32 addr0, addr1; > + u8 *dev_addr = pdata->ndev->dev_addr; Please order local variable declarations from longest to shortest line.

Re: [PATCH] udp: avoid ufo handling on IP payload compression packets

2017-03-07 Thread David Miller
From: Alexey Kodanev Date: Fri, 3 Mar 2017 15:37:32 +0300 > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > index b67719f..18383ef 100644 > --- a/net/ipv4/ip_output.c > +++ b/net/ipv4/ip_output.c > @@ -960,7 +960,10 @@ static int __ip_append_data(struct

Re: pull request (net): ipsec 2017-03-06

2017-03-07 Thread David Miller
From: Steffen Klassert Date: Mon, 6 Mar 2017 07:57:25 +0100 > 1) Fix lockdep splat on xfrm policy subsystem initialization. >From Florian Westphal. > > 2) When using socket policies on IPv4-mapped IPv6 addresses, >we access the flow informations of the

Re: [PATCH net] rxrpc: Call state should be read with READ_ONCE() under some circumstances

2017-03-07 Thread David Miller
From: David Howells Date: Sat, 04 Mar 2017 00:01:41 + > The call state may be changed at any time by the data-ready routine in > response to received packets, so if the call state is to be read and acted > upon several times in a function, READ_ONCE() must be used unless

Re: [PATCH net] tcp: fix various issues for sockets morphing to listen state

2017-03-07 Thread David Miller
From: Eric Dumazet Date: Fri, 03 Mar 2017 14:08:21 -0800 > From: Eric Dumazet > > Dmitry Vyukov reported a divide by 0 triggered by syzkaller, exploiting > tcp_disconnect() path that was never really considered and/or used > before syzkaller ;) > >

Re: [PATCH net-next RFC 3/4] vhost: interrupt coalescing support

2017-03-07 Thread Jason Wang
On 2017年03月07日 01:31, Willem de Bruijn wrote: On Mon, Mar 6, 2017 at 4:28 AM, Jason Wang wrote: On 2017年03月03日 22:39, Willem de Bruijn wrote: +void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq); +static enum hrtimer_restart vhost_coalesce_timer(struct

Re: [PATCH v4 net-next 4/6] drivers: net: xgene-v2: Add base driver

2017-03-07 Thread Rami Rosen
Hi, One minor comment: The return type of xge_init_hw() should be changed to be void, as the method xge_port_reset() always returns 0; and also the return type of xge_port_reset() should be changed to be void, it never fails; see in [PATCH v4 net-next 3/6] drivers: net: xgene-v2: Add ethernet

[PATCH net 0/2] bpf: htab fixes

2017-03-07 Thread Alexei Starovoitov
Two bpf hashtable fixes. See individual patches for details. Alexei Starovoitov (2): bpf: fix struct htab_elem layout bpf: convert htab map to hlist_nulls include/linux/list_nulls.h| 5 ++ include/linux/rculist_nulls.h | 14 + kernel/bpf/hashtab.c | 119

  1   2   >