Re: [PATCH net-next 00/12] nfp: add flower app with representors

2017-06-22 Thread Jakub Kicinski
On Thu, 22 Jun 2017 17:28:25 +0300, Or Gerlitz wrote: > On Wed, Jun 21, 2017 at 12:42 PM, Jakub Kicinski wrote: > > > Let me try to describe it a bit more instead. Sorry but I'm not great > > at ASCII art at this level of complexity and while having to stay > > within 80 chars

[PATCH 11/11] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-06-22 Thread David Wu
Let's enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts

[PATCH 10/11] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-06-22 Thread David Wu
The gmac2phy controller of rk3328 is connected to internal phy directly inside, add the node for the internal phy support. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 25 + 1 file changed, 25 insertions(+) diff --git

[PATCH 09/11] ARM: dts: rk3228-evb: Enable the internal phy for gmac

2017-06-22 Thread David Wu
This patch enables the internal phy for rk3228 evb board by default. To use the external 1000M phy on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu --- arch/arm/boot/dts/rk3228-evb.dts | 20 1 file changed, 20

[PATCH 08/11] ARM: dts: rk322x: Add support internal phy for gmac

2017-06-22 Thread David Wu
This patch adds internal mac phy clock and internal mac phy reset for rk gmac using. Signed-off-by: David Wu --- arch/arm/boot/dts/rk322x.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi

[PATCH 07/11] net: stmmac: dwmac-rk: Add internal phy supprot for rk3328

2017-06-22 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external phy, and the other one connects to internal phy. Like the mac of external phy, the internal phy's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu ---

[PATCH 06/11] net: stmmac: dwmac-rk: Add internal phy support for rk3228

2017-06-22 Thread David Wu
There is only one mac controller in rk3228, which could connect to external phy or internal phy, use the grf_com_mux bit15 to route external/internal phy. Change-Id: I3a366677047b8032eb535abb0c3e56fa7722aa2e Signed-off-by: David Wu ---

[PATCH 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-06-22 Thread David Wu
To make internal phy worked, need to configure the phy_clock, phy cru_reset and related registers. Change-Id: I6971c0a769754b824b1b908b56080cbaf7867d13 Signed-off-by: David Wu --- .../devicetree/bindings/net/rockchip-dwmac.txt | 3 +

[PATCH 04/11] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-06-22 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Change-Id: I9953784ea44335d90710e5473960c95b3d68a5fd Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 03/11] arm64: defconfig: Enable CONFIG_ROCKCHIP_MAC_PHY

2017-06-22 Thread David Wu
Make the rockchip mac phy driver built into the kernel. Signed-off-by: David Wu --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 97c123e..b4abe7f 100644 ---

[PATCH 00/11] Add the mac internal ephy support

2017-06-22 Thread David Wu
The rk3228 and rk3328 support internal mac phy inside, let's enable it to work. And the internal phy need to do some special setting, so register the rockchip mac internal phy driver, not use the genphy driver. David Wu (11): net: phy: Add rockchip phy driver support multi_v7_defconfig: Make

[PATCH 02/11] multi_v7_defconfig: Make rockchip mac phy built-in

2017-06-22 Thread David Wu
Enable the rockchip mac phy for multi_v7_defconfig builds Signed-off-by: David Wu --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index

[PATCH 01/11] net: phy: Add rockchip phy driver support

2017-06-22 Thread David Wu
Support internal ephy currently. Signed-off-by: David Wu --- drivers/net/phy/Kconfig| 4 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/rockchip.c | 94 ++ 3 files changed, 99 insertions(+) create mode 100644

Re: [PATCH 1/2] tcp: add mode parameter to tcp_proc_register

2017-06-22 Thread David Miller
From: Ivan Delalande Date: Thu, 22 Jun 2017 18:40:27 -0700 > This will be used to create a proc file that regular users cannot read. > > Signed-off-by: Ivan Delalande /proc is deprecated. Export this information via inet_diag.

Re: [PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-22 Thread Andrew Lunn
> what should the Mac driver do when it receive the error? I assume that it > will return it to userspace. because the rtnl_lock ensure only one ethtool > is executing, if the function return error, it means some bug in the mac > driver, am I right? Yes, return it. It could be there are other use

Re: [PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-22 Thread Willem de Bruijn
On Thu, Jun 22, 2017 at 9:36 PM, David Miller wrote: > From: Willem de Bruijn > Date: Thu, 22 Jun 2017 16:57:07 -0400 > >>> >>> Likewise. >>> + f_off = f->page_offset; + f_size = f->size; + +

Re: [PATCH NET 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-22 Thread Yunsheng Lin
Hi, Andrew On 2017/6/23 11:16, Andrew Lunn wrote: >> +int genphy_loopback(struct phy_device *phydev, bool enable) >> +{ >> +int value; >> + >> +if (enable) { >> +value = phy_read(phydev, MII_BMCR); >> +phy_write(phydev, MII_BMCR, value | BMCR_LOOPBACK); >> +}

Re: [PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-22 Thread Yunsheng Lin
hi, Andrew On 2017/6/23 11:20, Andrew Lunn wrote: > On Thu, Jun 22, 2017 at 04:53:33PM +0800, Lin Yun Sheng wrote: >> Use function set_loopback in phy_driver to setup phy loopback >> when doing ethtool self test. >> >> Signed-off-by: Lin Yun Sheng >> --- >>

linux-next: manual merge of the devicetree tree with the net-next tree

2017-06-22 Thread Stephen Rothwell
Hi Rob, Today's linux-next merge of the devicetree tree got a conflict in: Documentation/devicetree/bindings/net/ethernet.txt between commit: c125ca091873 ("net: phy: add XAUI and 10GBASE-KR PHY connection types") from the net-next tree and commit: 076fb0c4b6e1 ("of: update ePAPR

Re: [PATCH NET 2/2] net: hns: Use phy_driver to setup Phy loopback

2017-06-22 Thread Andrew Lunn
On Thu, Jun 22, 2017 at 04:53:33PM +0800, Lin Yun Sheng wrote: > Use function set_loopback in phy_driver to setup phy loopback > when doing ethtool self test. > > Signed-off-by: Lin Yun Sheng > --- > drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 64 >

Re: [PATCH NET 1/2] net: phy: Add phy loopback support in net phy framework

2017-06-22 Thread Andrew Lunn
> +int genphy_loopback(struct phy_device *phydev, bool enable) > +{ > + int value; > + > + if (enable) { > + value = phy_read(phydev, MII_BMCR); > + phy_write(phydev, MII_BMCR, value | BMCR_LOOPBACK); > + } else { > + value = phy_read(phydev,

[PATCH net-next] tcp: fix out-of-bounds access in ULP sysctl

2017-06-22 Thread Jakub Kicinski
KASAN reports out-of-bound access in proc_dostring() coming from proc_tcp_available_ulp() because in case TCP ULP list is empty the buffer allocated for the response will not have anything printed into it. Set the first byte to zero to avoid strlen() going out-of-bounds. Fixes: 734942cc4ea6

[PATCH 1/2] tcp: add mode parameter to tcp_proc_register

2017-06-22 Thread Ivan Delalande
This will be used to create a proc file that regular users cannot read. Signed-off-by: Ivan Delalande --- include/net/tcp.h | 3 ++- net/ipv4/tcp_ipv4.c | 7 --- net/ipv6/tcp_ipv6.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/net/tcp.h

[PATCH 2/2] tcp: md5: export all configured signature keys in /proc/net

2017-06-22 Thread Ivan Delalande
Add files "tcpmd5" and "tcp6md5" in /proc/net containing all the TCP MD5 keys configured for sockets using this signature option (RFC2385). These files contain a line for each key configured on each socket, with the index number of the socket (as found in /proc/net/tcp{,6}), its inode number, the

Re: [PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Thu, 22 Jun 2017 16:57:07 -0400 >> >> Likewise. >> >>> + f_off = f->page_offset; >>> + f_size = f->size; >>> + >>> + vaddr = kmap_atomic(skb_frag_page(f)); >> >> I looked at some kmap_atomic()

Re: [PATCH] nfc: nci: remove unnecessary null check

2017-06-22 Thread Gustavo A. R. Silva
Hi Samuel, Quoting Samuel Ortiz : Hi Gustavo, On Tue, Jun 13, 2017 at 11:37:18AM -0500, Gustavo A. R. Silva wrote: Remove unnecessary NULL check for pointer conn_info. conn_info is set in list_for_each_entry() using container_of(), which is never NULL.

linux-next: manual merge of the net-next tree with the net tree

2017-06-22 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/macvlan.c between commits: e26f43faa0d7 ("macvlan: Do not return error when setting the same mac address") 18c8c54de9a6 ("macvlan: Let passthru macvlan correctly restore lower mac address") from the

Re: [PATCH v1 1/2] dt-binding: ptp: add bindings document for dte based ptp clock

2017-06-22 Thread Florian Fainelli
On 06/22/2017 05:42 PM, Scott Branden wrote: > > > On 17-06-21 08:19 PM, Rob Herring wrote: >> On Tue, Jun 20, 2017 at 3:48 PM, Scott Branden >> wrote: >>> Hi Rob, >>> >>> >>> On 17-06-18 07:04 AM, Rob Herring wrote: On Mon, Jun 12, 2017 at 01:26:00PM -0700,

Re: [PATCH v1 1/2] dt-binding: ptp: add bindings document for dte based ptp clock

2017-06-22 Thread Scott Branden
On 17-06-21 08:19 PM, Rob Herring wrote: On Tue, Jun 20, 2017 at 3:48 PM, Scott Branden wrote: Hi Rob, On 17-06-18 07:04 AM, Rob Herring wrote: On Mon, Jun 12, 2017 at 01:26:00PM -0700, Arun Parameswaran wrote: Add device tree binding documentation for the

Re: [PATCH net-next v3 01/15] bpf: BPF support for sock_ops

2017-06-22 Thread Lawrence Brakmo
On 6/22/17, 4:19 PM, "netdev-ow...@vger.kernel.org on behalf of Daniel Borkmann" wrote: On 06/23/2017 12:58 AM, Lawrence Brakmo wrote: [...] > Daniel, I see value for having a global program, so I would like to keep

Re: [PATCH net-next v3 01/15] bpf: BPF support for sock_ops

2017-06-22 Thread Daniel Borkmann
On 06/23/2017 12:58 AM, Lawrence Brakmo wrote: [...] Daniel, I see value for having a global program, so I would like to keep that. When this patchset is accepted, I will submit one that adds support for per cgroup sock_ops programs, with the option to use the global one if none is specified

Re: [PATCH net-next v3 01/15] bpf: BPF support for sock_ops

2017-06-22 Thread Lawrence Brakmo
On 6/22/17, 3:41 PM, "Daniel Borkmann" wrote: On 06/20/2017 05:00 AM, Lawrence Brakmo wrote: [...] > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index f94b48b..861dbe9 100644 > --- a/include/uapi/linux/bpf.h > +++

Re: [PATCH] nfc: Add sockaddr length checks before accessing sa_family in bind handlers

2017-06-22 Thread Samuel Ortiz
On Tue, Jun 13, 2017 at 06:44:28PM +0200, Mateusz Jurczyk wrote: > Verify that the caller-provided sockaddr structure is large enough to > contain the sa_family field, before accessing it in bind() handlers of the > AF_NFC socket. Since the syscall doesn't enforce a minimum size of the >

Re: [PATCH net-next v3 01/15] bpf: BPF support for sock_ops

2017-06-22 Thread Daniel Borkmann
On 06/20/2017 05:00 AM, Lawrence Brakmo wrote: [...] diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index f94b48b..861dbe9 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -120,12 +120,14 @@ enum bpf_prog_type { BPF_PROG_TYPE_LWT_IN,

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Jakub Kicinski
On Thu, 22 Jun 2017 11:33:39 +0300, Gal Pressman wrote: > > Is my reading correct that in case the reason is not in the > > pddr2ethtool_table opaque binary data will be passed from the firmware > > to user space? Is there any particular reason to allow for this? If > > it's just for the rare

Re: [PATCH] nfc: nci: remove unnecessary null check

2017-06-22 Thread Samuel Ortiz
Hi Gustavo, On Tue, Jun 13, 2017 at 11:37:18AM -0500, Gustavo A. R. Silva wrote: > Remove unnecessary NULL check for pointer conn_info. > conn_info is set in list_for_each_entry() using container_of(), > which is never NULL. > > Addresses-Coverity-ID: 1362349 > Cc: Guenter Roeck

[Patch net] sit: use __GFP_NOWARN for user controlled allocation

2017-06-22 Thread Cong Wang
The memory allocation size is controlled by user-space, if it is too large just fail silently and return NULL, not to mention there is a fallback allocation later. Reported-by: Andrey Konovalov Cc: Andrey Konovalov Signed-off-by: Cong Wang

Re: [PATCH] nfc: Ensure presence of required attributes in the activate_target netlink handler

2017-06-22 Thread Samuel Ortiz
Hi Mateusz, On Wed, May 24, 2017 at 12:42:26PM +0200, Mateusz Jurczyk wrote: > Check that the NFC_ATTR_TARGET_INDEX and NFC_ATTR_PROTOCOLS attributes (in > addition to NFC_ATTR_DEVICE_INDEX) are provided by the netlink client > prior to accessing them. This prevents potential unhandled NULL

Re: [PATCH] nfc: Fix the sockaddr length sanitization in llcp_sock_connect

2017-06-22 Thread Samuel Ortiz
Hi Mateusz, On Wed, May 24, 2017 at 12:26:20PM +0200, Mateusz Jurczyk wrote: > Fix the sockaddr length verification in the connect() handler of NFC/LLCP > sockets, to compare against the size of the actual structure expected on > input (sockaddr_nfc_llcp) instead of its shorter version

Re: [PATCH 0/2] NFC-digital: Adjustments for four function implementations

2017-06-22 Thread Samuel Ortiz
Hi Markus, On Mon, May 22, 2017 at 02:57:42PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 14:50:05 +0200 > > Two update suggestions were taken into account > from static source code analysis. > > Markus Elfring (2): > Improve

[PATCH net-next] bpf: possibly avoid extra masking for narrower load in verifier

2017-06-22 Thread Yonghong Song
Commit 31fd85816dbe ("bpf: permits narrower load from bpf program context fields") permits narrower load for certain ctx fields. The commit however will already generate a masking even if the prog-specific ctx conversion produces the result with narrower size. For example, for

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-22 Thread Jakub Kicinski
On Thu, 22 Jun 2017 14:37:26 +0300, Gal Pressman wrote: > > Any particular reason for implementing this ABI in ethtool rather than > > via some netlink-based interface? Devlink naturally comes to mind, > > given that cabling problems are not really related to the L2 and netdev > > shouldn't be

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-22 Thread Stephen Rothwell
Hi all, On Wed, 21 Jun 2017 15:32:39 +0200 Marek Szyprowski wrote: > > On 2017-06-20 15:16, Christoph Hellwig wrote: > > On Tue, Jun 20, 2017 at 11:04:00PM +1000, Stephen Rothwell wrote: > >>

Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)

2017-06-22 Thread Hannes Frederic Sowa
On Thu, Jun 22, 2017, at 22:57, Paolo Abeni wrote: > > Can you please check if the following patch fixes the issue? Only > compiled tested here. > > Thanks!!! > --- > diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c > index 067a607..80d89fe 100644 > --- a/net/ipv4/udp.c > +++ b/net/ipv4/udp.c > @@

Re: [PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-22 Thread Willem de Bruijn
> > Likewise. > >> + f_off = f->page_offset; >> + f_size = f->size; >> + >> + vaddr = kmap_atomic(skb_frag_page(f)); > > I looked at some kmap_atomic() implementations and I do not think > it supports compound pages. Indeed. Thanks. It appears that I can do the

Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 23:06 +1000, Michael Ellerman wrote: > Paolo wrote: > > when udp_recvmsg() is executed, on x86_64 and other archs, most skb > > fields are on cold cachelines. > > If the skb are linear and the kernel don't need to compute the udp > > csum, only a handful of skb fields are

Re: [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()

2017-06-22 Thread Jesper Dangaard Brouer
On Thu, 22 Jun 2017 15:01:22 +0200 Paolo Abeni wrote: > very similar to commit dd99e425be23 ("udp: prefetch > rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache > miss when the BH is bottle-neck for UDP over ipv6 packet > processing, e.g. for small packets when a

Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 18:43 +0200, Paolo Abeni wrote: > On Thu, 2017-06-22 at 23:06 +1000, Michael Ellerman wrote: > > Paolo wrote: > > > when udp_recvmsg() is executed, on x86_64 and other archs, most skb > > > fields are on cold cachelines. > > > If the skb are linear and the kernel don't need

Re: [PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Maciej Żenczykowski
So this is clearly an improvement over the current state of things. However, I think there is still a very slight race condition in the error case, since I imagine udp early demux might find the socket while ip6_datagram_dst_update() is running. It's possible that inet_dport assignment could

Re: [PATCH] dt-bindings: gpmc: Correct location of generic gpmc binding

2017-06-22 Thread Boris Brezillon
On Wed, 21 Jun 2017 08:14:54 -0400 Tom Rini wrote: > The binding bus/ti-gpmc.txt has been moved to > memory-controllers/omap-gpmc.txt. Update all references to this in > order to make reading and understanding a given binding easier. > > Cc: David Woodhouse

Re: [oss-drivers] Re: [PATCH net-next 00/12] nfp: add flower app with representors

2017-06-22 Thread Simon Horman
On Thu, Jun 22, 2017 at 05:39:09PM +0300, Or Gerlitz wrote: > On Wed, Jun 21, 2017 at 12:32 PM, Simon Horman > wrote: > > > This patchset is in two parts. > > > > The first 9 patches add code to allow representors to be instantiated > > etc... The remaining patches

Re: [PATCH net-next v2 12/12] nfp: add VF and PF representors to flower app

2017-06-22 Thread Simon Horman
On Thu, Jun 22, 2017 at 05:50:29PM +0300, Or Gerlitz wrote: > On Wed, Jun 21, 2017 at 12:36 AM, Simon Horman > wrote: > > Initialise VF and PF representors in flower app. > > > > Based in part on work by Benjamin LaHaise, Bert van Leeuwen and > > Jakub Kicinski. > > >

[PATCH v2 net] udpv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
From: Wei Wang In __ip6_datagram_connect(), reset sk->sk_v6_daddr and inet->dport if error occurs so that udp_v6_early_demux() won't consider this socket as a valid candidate for early demux. v2: fix compilation error Signed-off-by: Wei Wang Acked-by:

Re: BUG: KASAN: use-after-free in free_old_xmit_skbs

2017-06-22 Thread Michael S. Tsirkin
On Thu, Jun 22, 2017 at 08:15:58AM +0200, jean-philippe menil wrote: > 2017-06-06 1:52 GMT+02:00 Michael S. Tsirkin : > > On Mon, Jun 05, 2017 at 05:08:25AM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 05, 2017 at 12:48:53AM +0200, Jean-Philippe Menil wrote: > > >

[PATCH 3/3] net: qcom/emac: add support for emulation systems

2017-06-22 Thread Timur Tabi
On emulation systems, the EMAC's internal PHY ("SGMII") is not present, but is not needed for network functionality. So just display a warning message and ignore the SGMII. Tested-by: Philip Elcan Tested-by: Adam Wallis Signed-off-by: Timur Tabi

[PATCH 1/3] net: qcom/emac: add shutdown function

2017-06-22 Thread Timur Tabi
The shutdown function halts all DMA and interrupts, so that all operations are discontinued when the system shuts down, e.g. via kexec or a forced reboot. Tested-by: Tyler Baicar Signed-off-by: Timur Tabi ---

[PATCH 0/3] net: qcom/emac: various minor improvements

2017-06-22 Thread Timur Tabi
A collection of minor fixes and features to the Qualcomm Technologies EMAC network driver. Timur Tabi (3): net: qcom/emac: add shutdown function net: qcom/emac: do not reset the EMAC during initialization net: qcom/emac: add support for emulation systems

[PATCH 2/3] net: qcom/emac: do not reset the EMAC during initialization

2017-06-22 Thread Timur Tabi
It doesn't make sense to reset the EMAC in the middle of initializing it during the probe. Tested-by: Richard Ruigrok Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
On Thu, Jun 22, 2017 at 10:54 AM, David Miller wrote: > From: Wei Wang > Date: Thu, 22 Jun 2017 10:49:24 -0700 > >> On Thu, Jun 22, 2017 at 10:25 AM, David Miller wrote: >>> From: Wei Wang >>> Date: Wed, 21 Jun

Re: [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 13:44 -0400, David Miller wrote: > From: Paolo Abeni > Date: Thu, 22 Jun 2017 15:01:22 +0200 > > > very similar to commit dd99e425be23 ("udp: prefetch > > rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache > > miss when the BH is bottle-neck

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread David Miller
From: Wei Wang Date: Thu, 22 Jun 2017 10:49:24 -0700 > On Thu, Jun 22, 2017 at 10:25 AM, David Miller wrote: >> From: Wei Wang >> Date: Wed, 21 Jun 2017 14:36:31 -0700 >> >>> + memset(>sk_v6_daddr, 0

Re: [PATCH v5 0/5] stmmac: pci: Refactor DMI probing

2017-06-22 Thread David Miller
From: Jan Kiszka Date: Thu, 22 Jun 2017 19:43:51 +0200 > On 2017-06-22 19:40, David Miller wrote: >> From: Jan Kiszka >> Date: Thu, 22 Jun 2017 08:17:56 +0200 >> >>> Some cleanups of the way we probe DMI platforms in the driver. Reduces >>> a bit

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread kbuild test robot
Hi Wei, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Wei-Wang/udp-ipv6-reset-daddr-and-dport-in-sk-if-connect-fails/20170623-011149 config: alpha-allyesconfig (attached as .config) compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread Wei Wang
On Thu, Jun 22, 2017 at 10:25 AM, David Miller wrote: > From: Wei Wang > Date: Wed, 21 Jun 2017 14:36:31 -0700 > >> + memset(>sk_v6_daddr, 0 sizeof(sk->sk_v6_daddr); > > Tell me how that compiles. Really sorry about that. I ported over the

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread kbuild test robot
Hi Wei, [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Wei-Wang/udp-ipv6-reset-daddr-and-dport-in-sk-if-connect-fails/20170623-011149 config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget

Re: [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()

2017-06-22 Thread David Miller
From: Paolo Abeni Date: Thu, 22 Jun 2017 15:01:22 +0200 > very similar to commit dd99e425be23 ("udp: prefetch > rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache > miss when the BH is bottle-neck for UDP over ipv6 packet > processing, e.g. for small packets when

Re: [PATCH v5 0/5] stmmac: pci: Refactor DMI probing

2017-06-22 Thread Jan Kiszka
On 2017-06-22 19:40, David Miller wrote: > From: Jan Kiszka > Date: Thu, 22 Jun 2017 08:17:56 +0200 > >> Some cleanups of the way we probe DMI platforms in the driver. Reduces >> a bit of open-coding and makes the logic easier reusable for any >> potential DMI platform !=

Re: [PATCH net-next 0/3] net: mvpp2: misc improvements

2017-06-22 Thread David Miller
From: Thomas Petazzoni Date: Thu, 22 Jun 2017 14:23:17 +0200 > Here are a few patches making various small improvements/refactoring > in the mvpp2 driver. They are based on today's net-next. Series applied to net-next, thanks.

Re: [PATCH net] sfc: Fix MCDI command size for filter operations

2017-06-22 Thread David Miller
From: Martin Habets Date: Thu, 22 Jun 2017 10:50:41 +0100 > The 8000 series adapters uses catch-all filters for encapsulated traffic > to support filtering VXLAN, NVGRE and GENEVE traffic. > This new filter functionality requires a longer MCDI command. > This patch

Re: [PATCH v5 0/5] stmmac: pci: Refactor DMI probing

2017-06-22 Thread David Miller
From: Jan Kiszka Date: Thu, 22 Jun 2017 08:17:56 +0200 > Some cleanups of the way we probe DMI platforms in the driver. Reduces > a bit of open-coding and makes the logic easier reusable for any > potential DMI platform != Quark. > > Tested on IOT2000 and Galileo Gen2. >

Re: [PATCH net-next,2/2] hv_netvsc: Fix the carrier state error when data path is off

2017-06-22 Thread David Miller
From: Haiyang Zhang Date: Wed, 21 Jun 2017 16:40:47 -0700 > From: Haiyang Zhang > > When the VF NIC is opened, the synthetic NIC's carrier state is set to > off. This tells the host to transitions data path to the VF device. But > if

Re: [PATCH net-next,1/2] hv_netvsc: Remove unnecessary var link_state from struct netvsc_device_info

2017-06-22 Thread David Miller
From: Haiyang Zhang Date: Wed, 21 Jun 2017 16:40:46 -0700 > From: Haiyang Zhang > > We simply use rndis_device->link_state in the netdev_dbg. The variable, > link_state from struct netvsc_device_info, is not used anywhere else. > >

Re: [PATCH] netvsc: don't access netdev->num_rx_queues directly

2017-06-22 Thread David Miller
From: Arnd Bergmann Date: Thu, 22 Jun 2017 00:16:37 +0200 > This structure member is hidden behind CONFIG_SYSFS, and we > get a build error when that is disabled: > > drivers/net/hyperv/netvsc_drv.c: In function 'netvsc_set_channels': > drivers/net/hyperv/netvsc_drv.c:754:49:

Re: [PATCH net] udp: ipv6: reset daddr and dport in sk if connect() fails

2017-06-22 Thread David Miller
From: Wei Wang Date: Wed, 21 Jun 2017 14:36:31 -0700 > + memset(>sk_v6_daddr, 0 sizeof(sk->sk_v6_daddr); Tell me how that compiles.

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev()

Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback

2017-06-22 Thread David Miller
From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev()

[PATCH v3 09/11] brcmsmac: split up wlc_phy_workarounds_nphy

2017-06-22 Thread Arnd Bergmann
The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes

[PATCH v3 06/11] r820t: mark register functions as noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
With KASAN, we get an overly long stack frame due to inlining the register access function: drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7': drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] An

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

2017-06-22 Thread Arnd Bergmann
With KASAN and a couple of other patches applied, this driver is one of the few remaining ones that actually use more than 2048 bytes of kernel stack: broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function 'wlc_phy_workarounds_nphy_gainctrl': broadcom/brcm80211/brcmsmac/phy/phy_n.c:16065:1:

[PATCH v3 03/11] rocker: mark rocker_tlv_put_* functions as noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
Inlining these functions creates lots of stack variables when KASAN is enabled, leading to this warning about potential stack overflow: drivers/net/ethernet/rocker/rocker_ofdpa.c: In function 'ofdpa_cmd_flow_tbl_add': drivers/net/ethernet/rocker/rocker_ofdpa.c:621:1: error: the frame size of

[PATCH v3 01/11] compiler: introduce noinline_if_stackbloat annotation

2017-06-22 Thread Arnd Bergmann
When CONFIG_KASAN is set, we can run into some code that uses incredible amounts of kernel stack: drivers/staging/dgnc/dgnc_neo.c:1056:1: error: the frame size of 2 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] drivers/media/i2c/cx25840/cx25840-core.c:4960:1: error: the frame

[PATCH v3 10/11] brcmsmac: reindent split functions

2017-06-22 Thread Arnd Bergmann
In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann

[PATCH v3 11/11] kasan: rework Kconfig settings

2017-06-22 Thread Arnd Bergmann
We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan-stack=1 options, which can easily cause an overflow of the kernel stack, e.g. drivers/acpi/nfit/core.c:2686:1: warning: the frame size of 4080 bytes is larger than 2048 bytes

[PATCH v3 07/11] tty: improve tty_insert_flip_char() fast path

2017-06-22 Thread Arnd Bergmann
kernelci.org reports a crazy stack usage for the VT code when CONFIG_KASAN is enabled: drivers/tty/vt/keyboard.c: In function 'kbd_keycode': drivers/tty/vt/keyboard.c:1452:1: error: the frame size of 2240 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] The problem is that

[PATCH v3 02/11] netlink: mark nla_put_{u8,u16,u32} noinline_if_stackbloat

2017-06-22 Thread Arnd Bergmann
When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large stack frames in some functions. This goes unnoticed normally because CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit 3f181b4d8652 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with

[PATCH v3 04/11] mtd: cfi: reduce stack size with KASAN

2017-06-22 Thread Arnd Bergmann
When CONFIG_KASAN is used, we consume a lot of extra stack space: drivers/mtd/chips/cfi_cmdset_0020.c: In function 'do_write_buffer': drivers/mtd/chips/cfi_cmdset_0020.c:603:1: error: the frame size of 2184 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]

[PATCH v3 00/11] bring back stack frame warning with KASAN

2017-06-22 Thread Arnd Bergmann
This is a new version of patches I originally submitted back in March [1], this time reducing the size of the series even further. This minimal set of patches only makes sure that we do get frame size warnings in allmodconfig for x86_64 and arm64 again, even with KASAN enabled. The changes this

[PATCH v3 05/11] dvb-frontends: reduce stack size in i2c access

2017-06-22 Thread Arnd Bergmann
A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with -fsanitize-address-use-after-scope, e.g. drivers/media/dvb-frontends/cxd2841er.c:3225:1: error: the frame size of 3992 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]

[next-queue PATCH] i40evf: remove unnecessary __packed

2017-06-22 Thread Tushar Dave
This is similar to 'commit 9588397d24eec ("i40e: remove unnecessary __packed")' to avoid unaligned access. Signed-off-by: Tushar Dave --- drivers/net/ethernet/intel/i40evf/i40e_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH net-next v3 06/13] sock: MSG_ZEROCOPY notification coalescing

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Wed, 21 Jun 2017 17:18:09 -0400 > +static bool skb_zerocopy_notify_extend(struct sk_buff *skb, u32 lo, u16 len) > +{ > + struct sock_exterr_skb *serr = SKB_EXT_ERR(skb); > + u64 sum_len; > + u32 old_lo, old_hi; Reverse

Re: [PATCH net-next v3 03/13] sock: add MSG_ZEROCOPY

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Wed, 21 Jun 2017 17:18:06 -0400 > +struct ubuf_info *sock_zerocopy_alloc(struct sock *sk, size_t size) > +{ > + struct sk_buff *skb; > + struct ubuf_info *uarg; Reverse christmas tree. > +void sock_zerocopy_callback(struct

Re: [PATCH net-next v3 02/13] sock: skb_copy_ubufs support for compound pages

2017-06-22 Thread David Miller
From: Willem de Bruijn Date: Wed, 21 Jun 2017 17:18:05 -0400 > @@ -958,15 +958,20 @@ EXPORT_SYMBOL_GPL(skb_morph); > */ > int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask) > { > - int i; > int num_frags = skb_shinfo(skb)->nr_frags; >

[PATCH] rsi: add in missing RSI_FSM_STATES into array fsm_state

2017-06-22 Thread Colin King
From: Colin Ian King Two recent commits added new RSI_FSM_STATES (namely FSM_FW_NOT_LOADED and FSM_COMMON_DEV_PARAMS_SENT) and the corresponding table fsm_state was not updated to match. This can lead to an array overrun when accessing the latter two states in

[next-queue PATCH] i40evf: Use le32_to_cpu before evaluating HW desc fields

2017-06-22 Thread Tushar Dave
i40e hardware descriptor fields are in little-endian format. Driver must use le32_to_cpu while evaluating these fields otherwise on big-endian arch we end up evaluating incorrect values, cause errors like: i40evf :03:0a.0: Expected response 24 from PF, received 402653184 i40evf :03:0a.1:

Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 23:06 +1000, Michael Ellerman wrote: > Paolo wrote: > > when udp_recvmsg() is executed, on x86_64 and other archs, most skb > > fields are on cold cachelines. > > If the skb are linear and the kernel don't need to compute the udp > > csum, only a handful of skb fields are

Re: [PATCH v2] of: update ePAPR references to point to Devicetree Specification

2017-06-22 Thread Rob Herring
On Thu, Jun 22, 2017 at 09:15:39AM -0700, frowand.l...@gmail.com wrote: > From: Frank Rowand > > The Devicetree Specification has superseded the ePAPR as the > base specification for bindings. Update files in Documentation > to reference the new document. > > First

[PATCH] net: stmmac: make some functions static

2017-06-22 Thread Colin King
From: Colin Ian King The functions dwmac4_dma_init_rx_chan, dwmac4_dma_init_tx_chan and dwmac4_dma_init_channel do not need to be in global scope, so them static. Cleans up sparse warnings: "symbol 'dwmac4_dma_init_rx_chan' was not declared. Should it be static?"

[PATCH v2] of: update ePAPR references to point to Devicetree Specification

2017-06-22 Thread frowand . list
From: Frank Rowand The Devicetree Specification has superseded the ePAPR as the base specification for bindings. Update files in Documentation to reference the new document. First reference to ePAPR in Documentation/devicetree/bindings/arm/cci.txt is generic, remove it.

Re: [PATCH] samples/bpf: fix a build problem

2017-06-22 Thread Yonghong Song
On 6/22/17 8:36 AM, David Miller wrote: From: Yonghong Song Date: Wed, 21 Jun 2017 13:48:27 -0700 tracex5_kern.c build failed with the following error message: ../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not found #include "syscall_nrs.h" The

Re: [PATCH] samples/bpf: fix a build problem

2017-06-22 Thread David Miller
From: Yonghong Song Date: Wed, 21 Jun 2017 13:48:27 -0700 > tracex5_kern.c build failed with the following error message: > ../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not > found > #include "syscall_nrs.h" > The generated file syscall_nrs.h is put in

  1   2   >