Re: Hardware capabilities and bonding offload

2015-11-16 Thread John Fastabend
On 15-11-16 07:30 AM, Jiri Pirko wrote: > Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: >> Hello, >> >> I am looking to offload bond interfaces to hardware for forwarding. Linux >> allows for configuring >> a variety of parameters on bonds or slave interfaces. Not all >>

Re: Hardware capabilities and bonding offload

2015-11-16 Thread Jiri Pirko
Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: >Hello, > >I am looking to offload bond interfaces to hardware for forwarding. Linux >allows for configuring >a variety of parameters on bonds or slave interfaces. Not all configurations >can be offloaded to >hardware. For

Re: [PATCH] net: thunder: Fix crash upon shutdown after failed probe

2015-11-16 Thread David Miller
From: Pavel Fedin Date: Mon, 16 Nov 2015 16:21:06 +0300 > Thank you very much, however i've just found one more case where i > still get this crash. I should have done this from the beginning, > but please revert it in your repo, i'm sending v2, which covers more > cases.

[PATCH] net: thunder: Check for driver data in nicvf_remove()

2015-11-16 Thread Pavel Fedin
In some cases the crash is caused by nicvf_remove() being called from outside. For example, if we try to feed the device to vfio after the probe has failed for some reason. So, move the check to better place. Signed-off-by: Pavel Fedin ---

[PATCH] vhost: relax log address alignment

2015-11-16 Thread Michael S. Tsirkin
commit 5d9a07b0de512b77bf28d2401e5fe3351f00a240 ("vhost: relax used address alignment") fixed the alignment for the used virtual address, but not for the physical address used for logging. That's a mistake: alignment should clearly be the same for virtual and physical addresses, Signed-off-by:

[PATCH net] af_unix: don't append consumed skbs to sk_receive_queue

2015-11-16 Thread Hannes Frederic Sowa
In case multiple writes to a unix stream socket race we could end up in a situation where we pre-allocate a new skb for use in unix_stream_sendpage but have to free it again in the locked section because another skb has been appended meanwhile, which we must use. Accidentally we didn't clear the

Re: [PATCH] bonding: Offloading bonds to hardware

2015-11-16 Thread John Fastabend
On 15-11-15 01:01 AM, Jiri Pirko wrote: > Sun, Nov 15, 2015 at 06:51:28AM CET, john.fastab...@gmail.com wrote: >> On 15-11-14 01:39 AM, Jiri Pirko wrote: >>> Thu, Nov 12, 2015 at 05:02:18PM CET, pjonn...@broadcom.com wrote: Packet forwarding to/from bond interfaces is done in software.

Re: [PATCH net] af_unix: don't append consumed skbs to sk_receive_queue

2015-11-16 Thread Eric Dumazet
On Mon, 2015-11-16 at 16:25 +0100, Hannes Frederic Sowa wrote: > In case multiple writes to a unix stream socket race we could end up in a > situation where we pre-allocate a new skb for use in unix_stream_sendpage > but have to free it again in the locked section because another skb > has been

Re: [PATCH 13/14] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-11-16 Thread Michal Hocko
On Thu 12-11-15 18:41:32, Johannes Weiner wrote: > Socket memory can be a significant share of overall memory consumed by > common workloads. In order to provide reasonable resource isolation in > the unified hierarchy, this type of memory needs to be included in the > tracking/accounting of a

Re: [PATCH v2 net-next] net: hisilicon: fix binding document of mdio

2015-11-16 Thread Rob Herring
On Mon, Nov 16, 2015 at 05:38:24PM +0800, huangdaode wrote: > This patch explains the occasion of "hisilcon,mdio" and > "hisilicon,hns-mdio" according to Arnd's comments. > and reformat it according to comments from Rob. > > chang log: > > v2: > 1) reformat the style. > 2)

SV: Donation

2015-11-16 Thread Kristine Krarup
Fra: Kristine Krarup Sendt: 16. november 2015 15:58 Emne: Donation cash grant to you by a kind hearted Family , send an email to them now requesting more information (sessil_malcol...@outlook.com) Thank you -- To unsubscribe from this list: send the line

[PATCH] rtlwifi: Delete unnecessary checks before the function call "kfree_skb"

2015-11-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Nov 2015 13:12:25 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software.

[PATCH] NFC: nci: fix memory leak

2015-11-16 Thread Sudip Mukherjee
In case of invalid number_destination_params we were returning error but we missed releasing cmd. Lets check for the number of parameter before allocating memory so that we don't have a memory leak. Signed-off-by: Sudip Mukherjee --- net/nfc/nci/core.c | 6 +++--- 1 file

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
On 11/16/2015 02:25 PM, Jiri Pirko wrote: > Mon, Nov 16, 2015 at 02:19:55PM CET, mkube...@suse.cz wrote: >> On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: >>> >>> on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) >>> I get errors like: >>> >>> [

Re: [PATCH v2] net: thunder: Fix crash upon shutdown after failed probe

2015-11-16 Thread David Miller
From: Pavel Fedin Date: Mon, 16 Nov 2015 16:22:26 +0300 > If device probe fails, driver remains bound to the PCI device. However, > driver data has been reset to NULL. This causes crash upon dereferencing > it in nicvf_remove() > > Signed-off-by: Pavel Fedin

[PATCH] via-velocity: unconditionally drop frames with bad l2 length

2015-11-16 Thread Timo Teräs
By default the driver allowed incorrect frames to be received. What is worse the code does not handle very short frames correctly. The FCS length is unconditionally subtracted, and the underflow can cause skb_put to be called with large number after implicit cast to unsigned. And indeed, an

[PATCH] ixp4xx_hss: Delete an unnecessary check before the function call "dma_pool_destroy"

2015-11-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Nov 2015 13:30:37 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Michal Kubecek
On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: > > on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) I > get errors like: > > [ 10.940523] Ebtables v2.0 registered > [ 11.685609] bridge: automatic filtering via arp/ip/ip6tables has been >

[PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Nov 2015 13:50:23 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH v2] net: thunder: Fix crash upon shutdown after failed probe

2015-11-16 Thread Pavel Fedin
If device probe fails, driver remains bound to the PCI device. However, driver data has been reset to NULL. This causes crash upon dereferencing it in nicvf_remove() Signed-off-by: Pavel Fedin --- v1 => v2: - Do the test in nicvf_remove(), this allows to cover more

4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
Jiri, on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) I get errors like: [ 10.940523] Ebtables v2.0 registered [ 11.685609] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
On 11/16/2015 02:19 PM, Michal Kubecek wrote: > On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: >> >> on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) >> I get errors like: >> >> [ 10.940523] Ebtables v2.0 registered >> [ 11.685609] bridge:

RE: [PATCH] net: thunder: Fix crash upon shutdown after failed probe

2015-11-16 Thread Pavel Fedin
Hello! > > If device probe fails, driver remains bound to the PCI device. However, > > driver data has been reset to NULL. This causes crash upon dereferencing > > it in nicvf_remove() > > > > Signed-off-by: Pavel Fedin > > Applied, thanks. Thank you very much, however

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Jiri Pirko
Mon, Nov 16, 2015 at 02:19:55PM CET, mkube...@suse.cz wrote: >On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: >> >> on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) >> I get errors like: >> >> [ 10.940523] Ebtables v2.0 registered >> [

Re: [PATCH] ieee802154-atusb: Delete an unnecessary check before the function call "kfree_skb"

2015-11-16 Thread Stefan Schmidt
Hello. On 16/11/15 13:57, SF Markus Elfring wrote: From: Markus Elfring Date: Mon, 16 Nov 2015 13:50:23 +0100 The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was

[PATCH 2/3] libceph: use list_next_entry instead of list_entry_next

2015-11-16 Thread Geliang Tang
list_next_entry has been defined in list.h, so I replace list_entry_next with it. Signed-off-by: Geliang Tang --- net/ceph/messenger.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index

Re: Kernel 4.1 hang, apparently in __inet_lookup_established

2015-11-16 Thread Eric Dumazet
On Sun, 2015-11-15 at 16:58 -0800, Grant Zhang wrote: > Hi Patrick, > > Have you tried the two patches Eric mentioned? One of my 4.1.11 server > just hanged with very similar stack trace and I am wondering whether the > aforementioned patches would help. > > Thanks, linux-4.1.12 definitely

Re: Kernel 4.1 hang, apparently in __inet_lookup_established

2015-11-16 Thread Grant Zhang
On 16/11/2015 07:07, Eric Dumazet wrote: On Sun, 2015-11-15 at 16:58 -0800, Grant Zhang wrote: Hi Patrick, Have you tried the two patches Eric mentioned? One of my 4.1.11 server just hanged with very similar stack trace and I am wondering whether the aforementioned patches would help. Thanks,

[PATCH] snmp: Remove duplicate OUTMCAST stat increment

2015-11-16 Thread Neil Horman
the OUTMCAST stat is double incremented, getting bumped once in the mcast code itself, and again in the common ip output path. Remove the mcast bump, as its not needed Validated by the reporter, with good results Signed-off-by: Neil Horman Reported-by: Claus Jensen

[PATCH v6] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-16 Thread Mans Rullgard
This adds a driver for the Aurora VLSI NB8800 Ethernet controller. It is an almost complete rewrite of a driver originally found in a Sigma Designs 2.6.22 tree. Signed-off-by: Mans Rullgard --- Changes: - Use napi_gro_receive() - Ignore xmit_more if using last tx descriptor -

Re: [PATCH] net: phy: vitesse: add support for VSC8601

2015-11-16 Thread David Miller
From: Mans Rullgard Date: Thu, 12 Nov 2015 18:41:12 + > This adds support for the Vitesse VSC8601 PHY. Generic functions are > used for everything except interrupt handling. > > Signed-off-by: Mans Rullgard Applied. -- To unsubscribe from this list: send

Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035

2015-11-16 Thread David Miller
From: Mans Rullgard Date: Thu, 12 Nov 2015 17:40:20 + > Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode" > added interrupt support for the 8031 PHY but left out the other two > chips supported by this driver. > > This patch sets the .ack_interrupt and

Re: [PATCH net-next] bpf, skb_do_redirect: clear sender_cpu before xmit

2015-11-16 Thread Eric Dumazet
On Fri, 2015-10-09 at 19:33 +0200, Daniel Borkmann wrote: > On 10/09/2015 04:35 AM, Alexei Starovoitov wrote: > > On 10/8/15 5:50 PM, Devon H. O'Dell wrote: > >>> with the amount of skb_sender_cpu_clear() all over the code base > >>> >I wonder whether there is a better solution to all of these. >

[PATCH] net/core: use netdev name in warning if no parent

2015-11-16 Thread Bjørn Mork
A recent flaw in the netdev feature setting resulted in warnings like this one from VLAN interfaces: WARNING: CPU: 1 PID: 4975 at net/core/dev.c:2419 skb_warn_bad_offload+0xbc/0xcb() : caps=(0x001b5820, 0x001b5829) len=2782 data_len=0 gso_size=1348 gso_type=16 ip_summed=3 The

Re: [PATCH 13/14] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-11-16 Thread Johannes Weiner
On Mon, Nov 16, 2015 at 04:59:25PM +0100, Michal Hocko wrote: > On Thu 12-11-15 18:41:32, Johannes Weiner wrote: > > Socket memory can be a significant share of overall memory consumed by > > common workloads. In order to provide reasonable resource isolation in > > the unified hierarchy, this

Re: [PATCH 14/14] mm: memcontrol: hook up vmpressure to socket pressure

2015-11-16 Thread Johannes Weiner
On Sun, Nov 15, 2015 at 04:54:57PM +0300, Vladimir Davydov wrote: > On Thu, Nov 12, 2015 at 06:41:33PM -0500, Johannes Weiner wrote: > > Let the networking stack know when a memcg is under reclaim pressure > > so that it can clamp its transmit windows accordingly. > > > > Whenever the reclaim

Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Thu, 12 Nov 2015 17:35:58 +0100 > Drivers like vxlan use the recently introduced > udp_tunnel_xmit_skb/udp_tunnel6_xmit_skb APIs. udp_tunnel6_xmit_skb > makes use of ip6tunnel_xmit, and ip6tunnel_xmit, after sending the > packet, updates the

mlx5 Coverity reported issues

2015-11-16 Thread Stephen Hemminger
** CID 1056375: Error handling issues (CHECKED_RETURN) /drivers/net/ethernet/mellanox/mlx5/core/cq.c: 133 in mlx5_core_create_cq() *** CID 1056375: Error handling issues (CHECKED_RETURN)

Re: [PATCH 05/14] net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label

2015-11-16 Thread Johannes Weiner
On Sat, Nov 14, 2015 at 07:33:10PM +0300, Vladimir Davydov wrote: > On Thu, Nov 12, 2015 at 06:41:24PM -0500, Johannes Weiner wrote: > > Move the jump-label from sock_update_memcg() and sock_release_memcg() > > to the callsite, and so eliminate those function calls when socket > > accounting is

Re: [PATCH stable <= 3.18] net: add length argument to skb_copy_and_csum_datagram_iovec

2015-11-16 Thread Sabrina Dubroca
Hello Eric 2015-11-12, 09:26:42 -0800, Eric Dumazet wrote: > Note that the following patch (and corresponding part for ipv6) might > also have solve the issue ? > > This would supposedly save some cycles when MSG_PEEK is used and user > provides short buffers. Your patch looks correct to me,

Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats

2015-11-16 Thread Jason A. Donenfeld
On Mon, Nov 16, 2015 at 8:17 PM, David Miller wrote: > So another fix could have been to do local_bh_disable() in the > udp_tunnel6_xmit_skb() helper. This would have fixed one problem, but everywhere udp_tunnel_xmit_skb() (4, not 6) is called, iptunnel_xmit_stats is called

Re: [PATCH 1/2] arm64: bpf: fix JIT frame pointer setup

2015-11-16 Thread David Miller
From: Yang Shi Date: Thu, 12 Nov 2015 13:57:00 -0800 > BPF fp should point to the top of the BPF prog stack. The original > implementation made it point to the bottom incorrectly. > Move A64_SP to fp before reserve BPF prog stack space. > > CC: Zi Shen Lim

Re: [PATCH net] ravb: Fix int mask value overwritten issue

2015-11-16 Thread David Miller
From: Yoshihiro Kaneko Date: Fri, 13 Nov 2015 19:24:49 +0900 > From: Masaru Nagai > > When RX/TX interrupt for Network Control queue and Best Effort queue > is issued at the same time, the interrupt mask of Network Control > queue will be

Re: What's the expected path to recover from a PHY_HALTED transition?

2015-11-16 Thread Florian Fainelli
On 16/11/15 11:29, Adrian Chadd wrote: > hi, > > I'm debugging an issue on the Broadcom parts (using unimac-mdio.c as > the mdio bus) where i occasionally see MDIO bus read failures, which > causes phy.c to transition the PHY to PHY_HALTED. It stays in this > state until the link is bounced.

Re: [PATCH V3 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/13/2015 6:39 PM, Z Lim wrote: Yang, I noticed another thing... On Fri, Nov 13, 2015 at 10:09 AM, Yang Shi wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used

Re: [PATCH 1/1] net: usb: cdc_ether: add Dell DW5580 as a mobile broadband adapter

2015-11-16 Thread David Miller
From: Daniele Palmas Date: Fri, 13 Nov 2015 18:01:21 +0100 > Since Dell DW5580 is a 3G modem, this patch adds the device as a > mobile broadband adapter > > Signed-off-by: Daniele Palmas Applied. -- To unsubscribe from this list: send the line "unsubscribe

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Mon, 16 Nov 2015 20:52:28 +0100 > This works fine with, say, iperf3 in TCP mode. The AVX performance > is great. However, when using iperf3 in UDP mode, irq_fpu_usable() > is mostly false! I added a dump_stack() call to see why, except > nothing

Re: [PATCH net] af_unix: don't append consumed skbs to sk_receive_queue

2015-11-16 Thread David Miller
From: Hannes Frederic Sowa Date: Mon, 16 Nov 2015 16:25:56 +0100 > In case multiple writes to a unix stream socket race we could end up in a > situation where we pre-allocate a new skb for use in unix_stream_sendpage > but have to free it again in the locked section

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Mon, 16 Nov 2015 22:28:52 +0100 > I'm making a simpler replacement for IPSec that operates as an > device driver on the interface level Someone already did a Linux implemenation of exactly that two decades ago, we rejected that design and did

Re: [PATCH net] macvlan: fix leak in macvlan_handle_frame

2015-11-16 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:54:20 +0100 > Reset pskb in macvlan_handle_frame in case skb_share_check returned a > clone. > > Fixes: 8a4eb5734e8d ("net: introduce rx_handler results and logic around > that") > Signed-off-by: Sabrina Dubroca

Re: [PATCH net] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-16 Thread Hannes Frederic Sowa
Hi, On Mon, Nov 16, 2015, at 21:38, David Miller wrote: > From: Hannes Frederic Sowa > Date: Mon, 16 Nov 2015 12:05:03 +0100 > > > By declaring the huge stack allocations as static. We can do so > > because we hold rtnl. > > Look across the tree, this is an idiom

[PATCH net-next] phy: marvell: Add support for 88E1540 PHY

2015-11-16 Thread Andrew Lunn
The 88E1540 can be found embedded in the Marvell 88E6352 switch. It is compatible with the 88E1510, so add support for it, using the 88E1510 specific functions. Signed-off-by: Andrew Lunn --- drivers/net/phy/marvell.c | 16 include/linux/marvell_phy.h | 1 +

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread Jason A. Donenfeld
On Mon, Nov 16, 2015 at 10:17 PM, David Miller wrote: > > Not without a complete redesign of the x86 fpu save/restore mechanism. Urg, okay. I still wonder why irq_fpu_usable() is true when using TCP but not when using UDP... Any ideas on this? > The driver is the wrong

[PATCH net] macvlan: fix leak in macvlan_handle_frame

2015-11-16 Thread Sabrina Dubroca
Reset pskb in macvlan_handle_frame in case skb_share_check returned a clone. Fixes: 8a4eb5734e8d ("net: introduce rx_handler results and logic around that") Signed-off-by: Sabrina Dubroca --- drivers/net/macvlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread Hannes Frederic Sowa
Hi Jason, On Mon, Nov 16, 2015, at 21:58, Jason A. Donenfeld wrote: > Hi David, > > On Mon, Nov 16, 2015 at 9:32 PM, David Miller > wrote: > > Network device driver transmit executes with software interrupts > > disabled. > > > > Therefore on x86, you cannot use the FPU. >

Re: [PATCH net] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-16 Thread Eric Dumazet
On Mon, 2015-11-16 at 14:30 -0800, Eric Dumazet wrote: > On Mon, 2015-11-16 at 23:18 +0100, Hannes Frederic Sowa wrote: > > > need something that handles all cases properly. > > > > I just wanted to shut up the gcc warning which is added if a function > > uses more than 2048 bytes of stack space.

Re: [PATCH] net: thunder: Check for driver data in nicvf_remove()

2015-11-16 Thread David Miller
From: Pavel Fedin Date: Mon, 16 Nov 2015 17:51:34 +0300 > In some cases the crash is caused by nicvf_remove() being called from > outside. For example, if we try to feed the device to vfio after the > probe has failed for some reason. So, move the check to better place. > >

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread Jason A. Donenfeld
On Mon, Nov 16, 2015 at 10:33 PM, David Miller wrote: > Someone already did a Linux implemenation of exactly that two decades > ago, we rejected that design and did what we did. It's not exactly IPSec though, so don't worry. It's a totally new thing that combines a lot of

Re: [PATCH] snmp: Remove duplicate OUTMCAST stat increment

2015-11-16 Thread David Miller
From: Neil Horman Date: Mon, 16 Nov 2015 13:09:10 -0500 > the OUTMCAST stat is double incremented, getting bumped once in the mcast code > itself, and again in the common ip output path. Remove the mcast bump, as its > not needed > > Validated by the reporter, with good

[PATCH net] ipvlan: fix use after free of skb

2015-11-16 Thread Sabrina Dubroca
ipvlan_handle_frame is a rx_handler, and when it returns a value other than RX_HANDLER_CONSUMED (here, NET_RX_DROP aka RX_HANDLER_ANOTHER), __netif_receive_skb_core expects that the skb still exists and will process it further, but we just freed it. Fixes: 2ad7bf363841 ("ipvlan: Initial check-in

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-16 Thread Rainer Weikusat
An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog datagrams. This implies that prospective writers might be forced to go to sleep despite

Re: Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Eric Dumazet
On Mon, 2015-11-16 at 21:55 +0100, Jason A. Donenfeld wrote: > Hi Sowmini, > > Neat. Though, in my case, I'm not actually just prepending a header. > I'm doing some more substantial transformations of a packet. And this > needs to work with v4 too. So I'm not sure implementing a v6 spec will >

Re: [PATCH net] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-16 Thread Eric Dumazet
On Mon, 2015-11-16 at 23:18 +0100, Hannes Frederic Sowa wrote: > > need something that handles all cases properly. > > I just wanted to shut up the gcc warning which is added if a function > uses more than 2048 bytes of stack space. We normally don't have the > problem and could also divide the

[PATCH net-next] net: phy: Use interrupts when available in NOLINK state

2015-11-16 Thread Andrew Lunn
The NOLINK state will poll the phy once a second to see if the link has come up. If the phy has an interrupt line, this polling can be skipped, since the phy should interrupt when the link returns. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy.c | 3 +++ 1 file changed, 3

[PATCH] dl2k: Implement suspend

2015-11-16 Thread Ondrej Zary
Add suspend/resume support to dl2k driver. Tested on Asus NX1101 (IP1000A) and D-Link DGE-550T (DL-2000). Signed-off-by: Ondrej Zary --- drivers/net/ethernet/dlink/dl2k.c | 189 + 1 file changed, 128 insertions(+), 61 deletions(-)

[PATCH net] ipvlan: fix leak in ipvlan_rcv_frame

2015-11-16 Thread Sabrina Dubroca
Pass a **skb to ipvlan_rcv_frame so that if skb_share_check returns a new skb, we actually use it during further processing. It's safe to ignore the new skb in the ipvlan_xmit_* functions, because they call ipvlan_rcv_frame with local == true, so that dev_forward_skb is called and always takes

Re: [PATCH 1/2 v2] dl2k: Add support for IP1000A-based cards

2015-11-16 Thread David Miller
From: Ondrej Zary Date: Sun, 15 Nov 2015 22:36:11 +0100 > Add support for IP1000A chips to dl2k driver. > IP1000A chip looks like a TC9020 with integrated PHY. > > This allows IP1000A chips to work reliably because the ipg driver is > buggy - it loses packets under

Re: [PATCH 2/2] ipg: Remove ipg driver

2015-11-16 Thread David Miller
From: Ondrej Zary Date: Sun, 15 Nov 2015 22:36:12 +0100 > Now that IP1000A chips are supported by dl2k driver, the buggy ipg > driver can be removed. > > Signed-off-by: Ondrej Zary Also applied, thanks again. -- To unsubscribe from this

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue

2015-11-16 Thread Rainer Weikusat
An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog datagrams. This implies that prospective writers might be forced to go to sleep despite

Re: Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Hannes Frederic Sowa
Hi Jason, On Mon, Nov 16, 2015, at 21:14, Jason A. Donenfeld wrote: > A few tunnel devices, like geneve or vxlan, are using > udp_tunnel_xmit_skb, or related functions for transmitting packets, > and are doing the usual FIB lookup to get the dst entry. I see a lot > of code like this: > >

[PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Yang Shi
Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to change during function call so it may cause the BPF prog stack base address change too. Use

What's the expected path to recover from a PHY_HALTED transition?

2015-11-16 Thread Adrian Chadd
hi, I'm debugging an issue on the Broadcom parts (using unimac-mdio.c as the mdio bus) where i occasionally see MDIO bus read failures, which causes phy.c to transition the PHY to PHY_HALTED. It stays in this state until the link is bounced. So, what's the expectation to handle this and recover

irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread Jason A. Donenfeld
Hi David & Folks, I have a virtual device driver that does some fancy processing of packets in ndo_start_xmit before forwarding them onward out of a tunnel elsewhere. In order to make that fancy processing fast, I have AVX and AVX2 implementations. This means I need to use the FPU. So, I do the

Re: [PATCH net] net: fix feature changes on devices without ndo_set_features

2015-11-16 Thread David Miller
From: Nikolay Aleksandrov Date: Fri, 13 Nov 2015 14:54:01 +0100 > From: Nikolay Aleksandrov > > When __netdev_update_features() was updated to ensure some features are > disabled on new lower devices, an error was introduced for devices which >

Re: [PATCH net] net: fix __netdev_update_features return on ndo_set_features failure

2015-11-16 Thread David Miller
From: Nikolay Aleksandrov Date: Fri, 13 Nov 2015 15:20:24 +0100 > From: Nikolay Aleksandrov > > If ndo_set_features fails __netdev_update_features() will return -1 but > this is wrong because it is expected to return 0 if no features were >

Re: [PATCH v2 net] raw: increment correct SNMP counters for ICMP messages

2015-11-16 Thread David Miller
From: Ben Cartwright-Cox Date: Sat, 14 Nov 2015 15:13:58 + > Sending ICMP packets with raw sockets ends up in the SNMP counters > logging the type as the first byte of the IPv4 header rather than > the ICMP header. This is fixed by adding the IP Header Length to > the

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Mon, 16 Nov 2015 21:58:49 +0100 > That is extremely problematic for me. Is there a way to make this > not so? Not without a complete redesign of the x86 fpu save/restore mechanism. The driver is the wrong place to do software cryptographic

Re: [PATCH net-next] Driver: Vmxnet3: Fix use of mfTableLen for big endian architectures

2015-11-16 Thread Shrikrishna Khare
On Mon, 16 Nov 2015, David Miller wrote: > From: Shrikrishna Khare > Date: Fri, 13 Nov 2015 15:42:10 -0800 > > > Signed-off-by: Shrikrishna Khare > > Reported-by: Masao Uebayashi > > Signed-off-by: Bhavesh Davda >

Re: [PATCH 5/9] sfc: constify pci_error_handlers structures

2015-11-16 Thread David Miller
From: Julia Lawall Date: Sat, 14 Nov 2015 11:06:57 +0100 > This pci_error_handlers structure is never modified, like all the other > pci_error_handlers structures, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall

Re: [PATCH 1/9] net: cavium: liquidio: constify pci_error_handlers structures

2015-11-16 Thread David Miller
From: Julia Lawall Date: Sat, 14 Nov 2015 11:06:53 +0100 > This pci_error_handlers structure is never modified, like all the other > pci_error_handlers structures, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall

Re: [PATCH net] bnx2x: Fix VLANs null-pointer for 57710, 57711

2015-11-16 Thread David Miller
From: Yuval Mintz Date: Sun, 15 Nov 2015 15:02:16 +0200 > Commit 05cc5a39ddb7 "bnx2x: add vlan filtering offload" introduced > a regression in regard for vlans for 57710, 57711 adapters - > Loading 8021q module on a machine with such an adapter would cause > a null

Re: Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Jason A. Donenfeld
Hi Sowmini, Neat. Though, in my case, I'm not actually just prepending a header. I'm doing some more substantial transformations of a packet. And this needs to work with v4 too. So I'm not sure implementing a v6 spec will help with things. I need to identify the right mechanism inside the kernel

Re: [PATCH net-next 2/2] be2net: replace hardcoded values with existing define

2015-11-16 Thread David Miller
From: Ivan Vecera Date: Fri, 13 Nov 2015 11:36:58 +0100 > Signed-off-by: Ivan Vecera Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH net-next 1/2] be2net: remove unused local rsstable array

2015-11-16 Thread David Miller
From: Ivan Vecera Date: Fri, 13 Nov 2015 11:36:57 +0100 > Remove rsstable array and its initialization from be_set_rss_hash_opts(). > The array became unused after "e255787 be2net: Support for configurable > RSS hash key". The initial RSS table is now filled and stored for

Re: [PATCH net] switchdev: bridge: Check return code is not EOPNOTSUPP

2015-11-16 Thread David Miller
From: Ido Schimmel Date: Fri, 13 Nov 2015 13:06:12 +0200 > When NET_SWITCHDEV=n, switchdev_port_attr_set simply returns EOPNOTSUPP. > In this case we should not emit errors and warnings to the kernel log. > > Reported-by: Sander Eikelenboom > Fixes:

Re: What's the expected path to recover from a PHY_HALTED transition?

2015-11-16 Thread Adrian Chadd
On 16 November 2015 at 11:48, Florian Fainelli wrote: > On 16/11/15 11:29, Adrian Chadd wrote: >> hi, >> >> I'm debugging an issue on the Broadcom parts (using unimac-mdio.c as >> the mdio bus) where i occasionally see MDIO bus read failures, which >> causes phy.c to

Re: [PATCH v6] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-16 Thread David Miller
From: Mans Rullgard Date: Mon, 16 Nov 2015 18:23:35 + > +static int nb8800_alloc_rx(struct net_device *dev, int i, bool napi) "i" is passed in as a signed int here, but: > +static void nb8800_receive(struct net_device *dev, unsigned i, unsigned len) ... > + err

Re: irq_fpu_usable() is false in ndo_start_xmit() for UDP packets

2015-11-16 Thread Jason A. Donenfeld
Hi David, On Mon, Nov 16, 2015 at 9:32 PM, David Miller wrote: > Network device driver transmit executes with software interrupts > disabled. > > Therefore on x86, you cannot use the FPU. That is extremely problematic for me. Is there a way to make this not so? A driver

Re: [PATCH RESEND] net: smsc911x: Reset PHY during initialization

2015-11-16 Thread David Miller
From: Pavel Fedin Date: Fri, 13 Nov 2015 09:46:59 +0300 > On certain hardware after software reboot the chip may get stuck and fail > to reinitialize during reset. This can be fixed by ensuring that PHY is > reset too. > > Old PHY resetting method required operational MDIO

Re: [PATCH] net: dsa: Delete an unnecessary check before the function call "put_device"

2015-11-16 Thread David Miller
I'm starting to grow quite weary of these "unnecessary check" changes. Sometimes it is better to have them, either because the path is a hot path or some atomic sequence is involved. But there is never harm in them being there. All of this is a matter of taste, of course. But one thing I know

Re: [PATCH net] ravb: remove unhandle int cause

2015-11-16 Thread David Miller
From: Yoshihiro Kaneko Date: Sun, 15 Nov 2015 21:34:42 +0900 > From: Masaru Nagai > > This driver does not handle the AVB-DMAC Receive FIFO Warning interrupt > now, so the interrupt should not be enabled. > > Signed-off-by: Masaru Nagai

Re: What's the expected path to recover from a PHY_HALTED transition?

2015-11-16 Thread Florian Fainelli
On 16/11/15 12:05, Adrian Chadd wrote: > On 16 November 2015 at 11:48, Florian Fainelli wrote: >> On 16/11/15 11:29, Adrian Chadd wrote: >>> hi, >>> >>> I'm debugging an issue on the Broadcom parts (using unimac-mdio.c as >>> the mdio bus) where i occasionally see MDIO bus

Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Jason A. Donenfeld
Hi folks, A few tunnel devices, like geneve or vxlan, are using udp_tunnel_xmit_skb, or related functions for transmitting packets, and are doing the usual FIB lookup to get the dst entry. I see a lot of code like this: if (rt->dst.dev == dev) {

Re: [PATCH] net: switchdev: fix return code of fdb_dump stub

2015-11-16 Thread David Miller
From: Dragos Tatulea Date: Mon, 16 Nov 2015 10:52:48 +0100 > rtnl_fdb_dump always expects an index to be returned by the ndo_fdb_dump op, > but when CONFIG_NET_SWITCHDEV is off, it returns an error. > > Fix that by returning the given unmodified idx. > > A similar fix was

Re: [PATCH net] qlcnic: Fix mailbox completion handling during spurious interrupt

2015-11-16 Thread David Miller
From: Rajesh Borundia Date: Mon, 16 Nov 2015 05:58:47 -0500 > + } else { > + if (atomic_read(>rsp_status) != rsp_status) > + qlcnic_83xx_notify_mbx_response(mbx); Here we go with more of some "We don't understand what atomic_t's

Re: Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Sowmini Varadhan
On (11/16/15 21:14), Jason A. Donenfeld wrote: > > But what about in devices for which self-routing might actually be > useful? For example, let's say that if an incoming skb is headed for > dst X, it gets encapsulated and sent to dst A, and for dst Y it gets > encapsulated and sent to dst B, and

Re: Routing loops & TTL tracking with tunnel devices

2015-11-16 Thread Sowmini Varadhan
> Neat. Though, in my case, I'm not actually just prepending a header. > I'm doing some more substantial transformations of a packet. And this > needs to work with v4 too. So I'm not sure implementing a v6 spec will Understood, that spec was just referenced to indicate that there are more issues

Re: [PATCH v6] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

2015-11-16 Thread Måns Rullgård
David Miller writes: > From: Måns Rullgård > Date: Mon, 16 Nov 2015 20:59:18 + > >> Anything else? > > Sorry, when I find one problem I give you the feedback for that > and move on to the 100s of other patches I have in my queue. Some people prefer to

Re: [PATCH net] bpf, arm: start flushing icache range from header

2015-11-16 Thread David Miller
From: Daniel Borkmann Date: Sat, 14 Nov 2015 01:26:53 +0100 > During review I noticed that the icache range we're flushing should > start at header already and not at ctx.image. > > Reason is that after 55309dd3d4cd ("net: bpf: arm: address randomize > and write protect

Re: [PATCH] bpf: samples: exclude asm/sysreg.h for arm64

2015-11-16 Thread David Miller
From: Yang Shi Date: Thu, 12 Nov 2015 14:07:46 -0800 > commit 338d4f49d6f7114a017d294ccf7374df4f998edc > ("arm64: kernel: Add support for Privileged Access Never") includes sysreg.h > into futex.h and uaccess.h. But, the inline assembly used by asm/sysreg.h is > incompatible

  1   2   >