Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread Jakub Kicinski
On Fri, 18 Nov 2016 19:20:58 -0800, Eric Dumazet wrote: > On Fri, 2016-11-18 at 18:57 -0800, Jakub Kicinski wrote: > > On Fri, 18 Nov 2016 18:43:55 -0800, John Fastabend wrote: > > > On 16-11-18 06:10 PM, Jakub Kicinski wrote: > [...] > > > > > > Seem like a valid concerns to me how about n

Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 18:57 -0800, Jakub Kicinski wrote: > On Fri, 18 Nov 2016 18:43:55 -0800, John Fastabend wrote: > > On 16-11-18 06:10 PM, Jakub Kicinski wrote: > > > On Fri, 18 Nov 2016 13:09:53 -0800, Jakub Kicinski wrote: > > >> Looks very cool! :) > > >> > > >> On Fri, 18 Nov 2016 11:00:4

Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread Jakub Kicinski
On Fri, 18 Nov 2016 18:43:55 -0800, John Fastabend wrote: > On 16-11-18 06:10 PM, Jakub Kicinski wrote: > > On Fri, 18 Nov 2016 13:09:53 -0800, Jakub Kicinski wrote: > >> Looks very cool! :) > >> > >> On Fri, 18 Nov 2016 11:00:41 -0800, John Fastabend wrote: > [...] > >> > >> Is num_online_c

Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread John Fastabend
On 16-11-18 06:10 PM, Jakub Kicinski wrote: > On Fri, 18 Nov 2016 13:09:53 -0800, Jakub Kicinski wrote: >> Looks very cool! :) >> >> On Fri, 18 Nov 2016 11:00:41 -0800, John Fastabend wrote: >>> @@ -1542,12 +1546,34 @@ static int virtnet_xdp_set(struct net_device *dev, >>> struct bpf_prog *prog) >

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread John Fastabend
On 16-11-18 03:21 PM, Eric Dumazet wrote: > On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > > >> static void free_receive_bufs(struct virtnet_info *vi) >> { >> +struct bpf_prog *old_prog; >> int i; >> >> for (i = 0; i < vi->max_queue_pairs; i++) { >> whil

[PATCH net-next v2 1/4] geneve: Unify LWT and netdev handling.

2016-11-18 Thread Pravin B Shelar
Current geneve implementation has two separate cases to handle. 1. netdev xmit 2. LWT xmit. In case of netdev, geneve configuration is stored in various struct geneve_dev members. For example geneve_addr, ttl, tos, label, flags, dst_cache, etc. For LWT ip_tunnel_info is passed to the device in ip_

[PATCH net-next v2 0/4] geneve: Use LWT more effectively.

2016-11-18 Thread Pravin B Shelar
Following patch series make use of geneve LWT code path for geneve netdev type of device. This allows us to simplify geneve module. v1-v2: Fix warning reported by kbuild test robot. Pravin B Shelar (4): geneve: Unify LWT and netdev handling. geneve: Merge ipv4 and ipv6 geneve_build_skb() ge

[PATCH net-next v2 2/4] geneve: Merge ipv4 and ipv6 geneve_build_skb()

2016-11-18 Thread Pravin B Shelar
There are minimal difference in building Geneve header between ipv4 and ipv6 geneve tunnels. Following patch refactors code to unify it. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 100 ++- 1 file changed, 26 insertions(+), 74 deletio

Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread Jakub Kicinski
On Fri, 18 Nov 2016 13:09:53 -0800, Jakub Kicinski wrote: > Looks very cool! :) > > On Fri, 18 Nov 2016 11:00:41 -0800, John Fastabend wrote: > > @@ -1542,12 +1546,34 @@ static int virtnet_xdp_set(struct net_device *dev, > > struct bpf_prog *prog) > > return -EINVAL; > > } > > >

[PATCH net-next v2 3/4] geneve: Remove redundant socket checks.

2016-11-18 Thread Pravin B Shelar
Geneve already has check for device socket in route lookup function. So no need to check it in xmit function. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index d

[PATCH net-next v2 4/4] geneve: Optimize geneve device lookup.

2016-11-18 Thread Pravin B Shelar
Rather than comparing 64-bit tunnel-id, compare tunnel vni which is 24-bit id. This also save conversion from vni to tunnel id on each tunnel packet receive. Signed-off-by: Pravin B Shelar --- drivers/net/geneve.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --g

[PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-18 Thread Eric Dumazet
From: Eric Dumazet UDP_SKB_CB(skb)->partial_cov is located at offset 66 in skb, requesting a cold cache line being read in cpu cache. We can avoid this cache line miss for UDP sockets, as partial_cov has a meaning only for UDPLite. Signed-off-by: Eric Dumazet --- net/ipv4/udp.c |3 ++- ne

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread John Fastabend
On 16-11-18 03:23 PM, Eric Dumazet wrote: > On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: >> From: Shrijeet Mukherjee > > >> #include >> @@ -81,6 +82,8 @@ struct receive_queue { >> >> struct napi_struct napi; >> >> +struct bpf_prog *xdp_prog; > > Please add proper spar

[PATCH net-next v3 3/4] bpf, mlx5: drop priv->xdp_prog reference on netdev cleanup

2016-11-18 Thread Daniel Borkmann
mlx5e_xdp_set() is currently the only place where we drop reference on the prog sitting in priv->xdp_prog when it's exchanged by a new one. We also need to make sure that we eventually release that reference, for example, in case the netdev is dismantled, otherwise we leak the program. Fixes: 8699

[PATCH net-next v3 4/4] bpf: add __must_check attributes to refcount manipulating helpers

2016-11-18 Thread Daniel Borkmann
Helpers like bpf_prog_add(), bpf_prog_inc(), bpf_map_inc() can fail with an error, so make sure the caller properly checks their return value and not just ignores it, which could worst-case lead to use after free. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- include/linux/bpf

[PATCH net-next v3 2/4] bpf, mlx5: fix various refcount issues in mlx5e_xdp_set

2016-11-18 Thread Daniel Borkmann
There are multiple issues in mlx5e_xdp_set(): 1) The batched bpf_prog_add() is currently not checked for errors. When doing so, it should be done at an earlier point in time to makes sure that we cannot fail anymore at the time we want to set the program for each channel. The batched refs

[PATCH net-next v3 0/4] Couple of BPF refcount fixes for mlx5

2016-11-18 Thread Daniel Borkmann
Various mlx5 bugs on eBPF refcount handling found during review. Last patch in series adds a __must_check to BPF helpers to make sure we won't run into it again w/o compiler complaining first. v2 -> v3: - Just reworked patch 2/4 so we don't need bpf_prog_sub(). - Rebased, rest as is. v1 -> v2:

[PATCH net-next v3 1/4] bpf, mlx5: fix mlx5e_create_rq taking reference on prog

2016-11-18 Thread Daniel Borkmann
In mlx5e_create_rq(), when creating a new queue, we call bpf_prog_add() but without checking the return value. bpf_prog_add() can fail since 92117d8443bc ("bpf: fix refcnt overflow"), so we really must check it. Take the reference right when we assign it to the rq from priv->xdp_prog, and just drop

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 16:38 -0800, Jarno Rajahalme wrote: > This fixes the problem for me, so for whatever it’s worth: > > Tested-by: Jarno Rajahalme > Thanks for testing ! https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=e88a2766143a27bfe6704b4493b214de4094cf29

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-18 Thread Jarno Rajahalme
> On Nov 14, 2016, at 3:09 PM, Eric Dumazet wrote: > > On Mon, 2016-11-14 at 14:46 -0800, Eric Dumazet wrote: >> On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote: >> >>> synchronize_rcu_expidited is not enough if you have multiple network >>> devices in play. >>> >>> Looking at the c

[PATCH net-next v2 3/5] virtio_net: Do not clear memory for struct virtio_net_hdr twice.

2016-11-18 Thread Jarno Rajahalme
virtio_net_hdr_from_skb() clears the memory for the header, so there is no point for the callers to do the same. Signed-off-by: Jarno Rajahalme --- drivers/net/tun.c | 3 +-- include/linux/virtio_net.h | 2 +- net/packet/af_packet.c | 2 -- 3 files changed, 2 insertions(+), 5 deleti

[PATCH net-next v2 4/5] af_packet: Use virtio_net_hdr_to_skb().

2016-11-18 Thread Jarno Rajahalme
Use the common virtio_net_hdr_to_skb() instead of open coding it. Other call sites were changed by commit fd2a0437dc, but this one was missed, maybe because it is split in two parts of the source code. Interim comparisons of 'vnet_hdr->gso_type' still work as both the vnet_hdr and skb notion of gs

[PATCH net-next v2 2/5] virtio_net.h: Fix comment.

2016-11-18 Thread Jarno Rajahalme
Fix incorrent comment after the final #endif. Signed-off-by: Jarno Rajahalme --- include/linux/virtio_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1c912f8..74f1e33 100644 --- a/include/linux/virtio_net.h +

[PATCH net-next v2 5/5] af_packet: Use virtio_net_hdr_from_skb() directly.

2016-11-18 Thread Jarno Rajahalme
Remove static function __packet_rcv_vnet(), which only called virtio_net_hdr_from_skb() and BUG()ged out if an error code was returned. Instead, call virtio_net_hdr_from_skb() from the former call sites of __packet_rcv_vnet() and actually use the error handling code that is already there. Signed-

[PATCH net-next v2 1/5] virtio_net: Simplify call sites for virtio_net_hdr_{from,to}_skb().

2016-11-18 Thread Jarno Rajahalme
No point storing the return value of virtio_net_hdr_to_skb() or virtio_net_hdr_from_skb() to a variable when the value is used only once as a boolean in an immediately following if statement. Signed-off-by: Jarno Rajahalme --- drivers/net/macvtap.c | 5 ++--- drivers/net/tun.c | 8 +++-

Re: [mm PATCH v3 21/23] mm: Add support for releasing multiple instances of a page

2016-11-18 Thread Andrew Morton
On Thu, 10 Nov 2016 06:36:06 -0500 Alexander Duyck wrote: > This patch adds a function that allows us to batch free a page that has > multiple references outstanding. Specifically this function can be used to > drop a page being used in the page frag alloc cache. With this drivers can > make u

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > From: Shrijeet Mukherjee > #include > @@ -81,6 +82,8 @@ struct receive_queue { > > struct napi_struct napi; > > + struct bpf_prog *xdp_prog; Please add proper sparse annotation, as in struct bpf_prog __rcu *xdp

Re: [PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 11:00 -0800, John Fastabend wrote: > static void free_receive_bufs(struct virtnet_info *vi) > { > + struct bpf_prog *old_prog; > int i; > > for (i = 0; i < vi->max_queue_pairs; i++) { > while (vi->rq[i].pages) > __free_

[PATCH] net: fix bogus cast in skb_pagelen() and use unsigned variables

2016-11-18 Thread Alexey Dobriyan
1) cast to "int" is unnecessary: u8 will be promoted to int before decrementing, small positive numbers fit into "int", so their values won't be changed during promotion. Once everything is int including loop counters, signedness doesn't matter: 32-bit operations will stay 32-bit op

[PATCH] netlink: smaller nla_attr_minlen table

2016-11-18 Thread Alexey Dobriyan
Length of a netlink attribute may be u16 but lengths of basic attributes are much smaller, so small we can save 16 bytes of .rodata and pocket change inside .text. 16-bit is worse on x86-64 than 8-bit because of operand size override prefix. add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-19

Re: [net-next] af_packet: Use virtio_net_hdr_to_skb().

2016-11-18 Thread Jarno Rajahalme
Sorry for my transgressions and wasting your time. I’ll send a v2 in a moment. Jarno > On Nov 18, 2016, at 8:35 AM, David Miller wrote: > > From: Jarno Rajahalme > Date: Wed, 16 Nov 2016 18:06:42 -0800 > >> Use the common virtio_net_hdr_to_skb() instead of open coding it. >> Other call sit

[PATCH] netlink: use "unsigned int" in nla_next()

2016-11-18 Thread Alexey Dobriyan
->nla_len is unsigned entity (it's length after all) and u16, thus it can't overflow when being aligned into int/unsigned int. (nlmsg_next has the same code, but I didn't yet convince myself it is correct to do so). There is pointer arithmetic in this function and offset being unsigned is better:

[PATCH] net: make struct napi_alloc_cache::skb_count unsigned int

2016-11-18 Thread Alexey Dobriyan
size_t is way too much for an integer not exceeding 64. Space savings: 10 bytes! add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-10 (-10) function old new delta napi_consume_skb 165 163 -2

[RFC 10/10] IB/hfi1: VNIC SDMA support

2016-11-18 Thread Vishwanathapura, Niranjana
HFI1 VNIC SDMA support enables transmission of VNIC packets over SDMA. Map VNIC queues to SDMA engines and support halting and wakeup of the VNIC queues. Change-Id: I2d2d23bda9fb8a7194d9722e23bc69b110cdcf86 Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura --- drivers/inf

[RFC 08/10] IB/hfi-vnic: VNIC Ethernet Management Agent (VEMA) driver

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VEMA driver interfaces with the Infiniband MAD stack to exchange the management information packets with the Ethernet Manager (EM). It interfaces with the HFI VNIC netdev driver to SET/GET the management information. The information exchanged with the EM includes class port details, encapsulati

[RFC 09/10] IB/hfi1: Virtual Network Interface Controller (VNIC) support

2016-11-18 Thread Vishwanathapura, Niranjana
HFI1 HW specific support for VNIC functionality. Add support to create VNIC devices on HFI VNIC Bus. Also implement the bus operations to allocate resources, transmit and receive of Omni-Path encapsulated Ethernet packets. Dynamically allocate a set of contexts for VNIC when the first vnic port is

[RFC 07/10] IB/hfi-vnic: VNIC Ethernet Management Agent (VEMA) interface

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VNIC EMA interface functions are the management interfaces to the HFI VNIC netdev driver. Implement the required GET/SET management interface functions and processing of new management information. Add support to send trap notifications upon various events like interface status change, unicast/

[RFC 03/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) netdev driver

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VNIC netdev driver supports Ethernet functionality over Omni-Path fabric by encapsulating Ethernet packets inside Omni-Path packet header. It interfaces with the network stack to provide standard Ethernet network interfaces to the user. It binds with the HFI VNIC device and invokes the bus oper

[RFC 05/10] IB/hfi-vnic: VNIC statistics support

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VNIC driver statistics support maintains various counters including standard netdev counters and the Ethernet manager defined counters. Add the Ethtool hook to read the counters. Change-Id: I6d828c2ce5eeae73d611174a985ff41f83480562 Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vish

[RFC 06/10] IB/hfi-vnic: VNIC MAC table support

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VNIC MAC table contains the MAC address to DLID mappings provided by the Ethernet manager. During transmission, the MAC table provides the MAC address to DLID translation. Implement MAC table using simple hash list. Also provide support to update/query the MAC table by Ethernet manager. Change

[RFC 02/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) Bus driver

2016-11-18 Thread Vishwanathapura, Niranjana
HFI VNIC bus driver interfaces between hardware independent VNIC functionality and the hardware dependent VNIC functionality. Support creation of Intel HFI VNIC devices and binding with Intel HFI VNIC drivers. Define the bus operations the HFI VNIC device should support. Change-Id: I91f65d0957d486

[RFC 01/10] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) documentation

2016-11-18 Thread Vishwanathapura, Niranjana
Add HFI VNIC design document explaining the VNIC architecture and the driver design. Change-Id: I7baa39444579dc582fe1e49b86e9cfc71f0a41a4 Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura --- Documentation/infiniband/hfi_vnic.txt | 97 +++

[RFC 04/10] IB/hfi-vnic: VNIC Ethernet Management (EM) structure definitions

2016-11-18 Thread Vishwanathapura, Niranjana
Define VNIC EM MAD structures and the associated macros. These structures are used for information exchange between VNIC EM agent on the HFI host and the Ethernet manager. Change-Id: If4837ec74e5b0eecc81774a52ab92fffea4b6338 Reviewed-by: Dennis Dalessandro Signed-off-by: Niranjana Vishwanathapura

[RFC 00/10] HFI Virtual Network Interface Controller (VNIC)

2016-11-18 Thread Vishwanathapura, Niranjana
Intel Omni-Path Host Fabric Interface (HFI) Virtual Network Interface Controller (VNIC) feature supports Ethernet functionality over Omni-Path fabric by encapsulating the Ethernet packets between HFI nodes. The patterns of exchanges of Omni-Path encapsulated Ethernet packets involves one or more v

[PATCH] net: macb: add check for dma mapping error in start_xmit()

2016-11-18 Thread Alexey Khoroshilov
at91ether_start_xmit() does not check for dma mapping errors. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/ethernet/cadence/macb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb.c b

Potential deadlock BUG in drivers/net/wireless/st/cw1200/sta.c (Linux 4.9)

2016-11-18 Thread Iago Abal
Hi, With the help of a static bug finder (EBA - https://github.com/models-team/eba) I have found a potential deadlock in drivers/net/wireless/st/cw1200/ sta.c. This happens due to a recursive mutex_lock on `priv->conf_mutex'. If this is indeed a bug, I will be happy to help with a patch. A quick

[PATCH net] l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()

2016-11-18 Thread Guillaume Nault
Lock socket before checking the SOCK_ZAPPED flag in l2tp_ip6_bind(). Without lock, a concurrent call could modify the socket flags between the sock_flag(sk, SOCK_ZAPPED) test and the lock_sock() call. This way, a socket could be inserted twice in l2tp_ip6_bind_table. Releasing it would then leave a

Re: [PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread Jakub Kicinski
Looks very cool! :) On Fri, 18 Nov 2016 11:00:41 -0800, John Fastabend wrote: > @@ -1542,12 +1546,34 @@ static int virtnet_xdp_set(struct net_device *dev, > struct bpf_prog *prog) > return -EINVAL; > } > > + curr_qp = vi->curr_queue_pairs - vi->xdp_queue_pairs; > + i

Re: [PATCH -next] tcp: make undo_cwnd mandatory for congestion modules

2016-11-18 Thread Neal Cardwell
On Fri, Nov 18, 2016 at 1:54 PM, Florian Westphal wrote: > David Miller wrote: >> If you really suspect that highspeed et al. need to implement their own >> undo_cwnd instead of using the default reno fallback, I would really >> rather that this gets either fixed or explicitly marked as likely wr

[PATCH net-next] mlx4: avoid unnecessary dirtying of critical fields

2016-11-18 Thread Eric Dumazet
From: Eric Dumazet While stressing a 40Gbit mlx4 NIC with busy polling, I found false sharing in mlx4 driver that can be easily avoided. This patch brings an additional 7 % performance improvement in UDP_RR workload. 1) If we received no frame during one mlx4_en_process_rx_cq() invocation, n

Re: [PATCH] mlxsw: switchib: add MLXSW_PCI dependency

2016-11-18 Thread David Miller
From: Arnd Bergmann Date: Fri, 18 Nov 2016 17:01:14 +0100 > The newly added switchib driver fails to link if MLXSW_PCI=m: > > drivers/net/ethernet/mellanox/mlxsw/mlxsw_switchib.o: In > function^Cmlxsw_sib_module_exit': > switchib.c:(.exit.text+0x8): undefined reference to > `mlxsw_pci_driver_u

Re: [PATCH net] rtnetlink: fix FDB size computation

2016-11-18 Thread David Miller
From: Sabrina Dubroca Date: Fri, 18 Nov 2016 15:50:39 +0100 > Add missing NDA_VLAN attribute's size. > > Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.") > Signed-off-by: Sabrina Dubroca Applied and queued up for -stable, thanks.

Re: [PATCH 0/5] XDP for virtio_net

2016-11-18 Thread John Fastabend
On 16-11-18 10:59 AM, John Fastabend wrote: > This implements virtio_net for the mergeable buffers and big_packet > modes. I tested this with vhost_net running on qemu and did not see > any issues. > > There are some restrictions for XDP to be enabled (see patch 3) for > more details. > > 1. LR

Re: [PATCH net-next] cxgb4: Allocate Tx queues dynamically

2016-11-18 Thread David Miller
From: Atul Gupta Date: Fri, 18 Nov 2016 16:37:40 +0530 > From: Hariprasad Shenai > > Allocate resources dynamically for Upper layer driver's (ULD) like > cxgbit, iw_cxgb4, cxgb4i and chcr. The resources allocated include Tx > queues which are allocated when ULD register with cxgb4 driver and fr

Re: [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and

2016-11-18 Thread David Miller
From: Colin King Date: Fri, 18 Nov 2016 18:45:32 + > From: Colin Ian King > > the mbox state should be bitwise anded rather than logically anded > with OCTEON_MBOX_STATE_RESPONSE_PENDING. Fix this by using the > correct & operator instead of &&. > > Signed-off-by: Colin Ian King Dan Carp

Re: [patch net-next] liquidio CN23XX: bitwise vs logical AND typo

2016-11-18 Thread David Miller
From: Dan Carpenter Date: Fri, 18 Nov 2016 14:47:35 +0300 > We obviously intended a bitwise AND here, not a logical one. > > Fixes: 8c978d059224 ("liquidio CN23XX: Mailbox support") > Signed-off-by: Dan Carpenter Applied.

Re: pull-request: mac80211 2016-11-18

2016-11-18 Thread David Miller
From: Johannes Berg Date: Fri, 18 Nov 2016 08:52:00 +0100 > Due to travel/vacation, this is a bit late, but there aren't > that many fixes either. Most interesting/important are the > fixes from Felix and perhaps the scan entry limit. > > Please pull and let me know if there's any problem. Pull

[PATCH 4/5] virtio_net: add dedicated XDP transmit queues

2016-11-18 Thread John Fastabend
XDP requires using isolated transmit queues to avoid interference with normal networking stack (BQL, NETDEV_TX_BUSY, etc). This patch adds a XDP queue per cpu when a XDP program is loaded and does not expose the queues to the OS via the normal API call to netif_set_real_num_tx_queues(). This way th

[PATCH 5/5] virtio_net: add XDP_TX support

2016-11-18 Thread John Fastabend
This adds support for the XDP_TX action to virtio_net. When an XDP program is run and returns the XDP_TX action the virtio_net XDP implementation will transmit the packet on a TX queue that aligns with the current CPU that the XDP packet was processed on. Before sending the packet the header is ze

Re: [PATCH] netns: fix get_net_ns_by_fd(int pid) typo

2016-11-18 Thread David Miller
From: Stefan Hajnoczi Date: Fri, 18 Nov 2016 09:41:46 + > The argument to get_net_ns_by_fd() is a /proc/$PID/ns/net file > descriptor not a pid. Fix the typo. > > Signed-off-by: Stefan Hajnoczi Applied.

[PATCH 1/5] net: virtio dynamically disable/enable LRO

2016-11-18 Thread John Fastabend
This adds support for dynamically setting the LRO feature flag. The message to control guest features in the backend uses the CTRL_GUEST_OFFLOADS msg type. Signed-off-by: John Fastabend --- drivers/net/virtio_net.c | 43 +++ 1 file changed, 43 insertions

[PATCH 2/5] net: xdp: add invalid buffer warning

2016-11-18 Thread John Fastabend
This adds a warning for drivers to use when encountering an invalid buffer for XDP. For normal cases this should not happen but to catch this in virtual/qemu setups that I may not have expected from the emulation layer having a standard warning is useful. Signed-off-by: John Fastabend --- includ

Re: [Patch net v2] af_unix: conditionally use freezable blocking calls in read

2016-11-18 Thread David Miller
From: Cong Wang Date: Thu, 17 Nov 2016 15:55:26 -0800 > Commit 2b15af6f95 ("af_unix: use freezable blocking calls in read") > converts schedule_timeout() to its freezable version, it was probably > correct at that time, but later, commit 2b514574f7e8 > ("net: af_unix: implement splice for stream

[PATCH 3/5] virtio_net: Add XDP support

2016-11-18 Thread John Fastabend
From: Shrijeet Mukherjee This adds XDP support to virtio_net. Some requirements must be met for XDP to be enabled depending on the mode. First it will only be supported with LRO disabled so that data is not pushed across multiple buffers. The MTU must be less than a page size to avoid having to h

[PATCH 0/5] XDP for virtio_net

2016-11-18 Thread John Fastabend
This implements virtio_net for the mergeable buffers and big_packet modes. I tested this with vhost_net running on qemu and did not see any issues. There are some restrictions for XDP to be enabled (see patch 3) for more details. 1. LRO must be off 2. MTU must be less than PAGE_SIZE 3. queu

Re: [PATCH v2 net-next] lan78xx: relocate mdix setting to phy driver

2016-11-18 Thread David Miller
From: Date: Thu, 17 Nov 2016 22:10:02 + > From: Woojung Huh > > Relocate mdix code to phy driver to be called at config_init(). > > Signed-off-by: Woojung Huh Applied, thank you.

Re: [PATCH -next] tcp: make undo_cwnd mandatory for congestion modules

2016-11-18 Thread Florian Westphal
David Miller wrote: > From: Florian Westphal > Date: Thu, 17 Nov 2016 13:56:51 +0100 > > > The undo_cwnd fallback in the stack doubles cwnd based on ssthresh, > > which un-does reno halving behaviour. > > > > It seems more appropriate to let congctl algorithms pair .ssthresh > > and .undo_cwnd

Re: [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers

2016-11-18 Thread David Miller
From: Florian Fainelli Date: Thu, 17 Nov 2016 11:19:09 -0800 > This patch series allows building the Freescale and Marvell Ethernet > network drivers with COMPILE_TEST. Thanks for doing this work, this kind of thing helps me a lot. Series applied, thanks.

Re: [PATCH net v2 0/7] net: cpsw: fix leaks and probe deferral

2016-11-18 Thread David Miller
From: Johan Hovold Date: Thu, 17 Nov 2016 17:39:57 +0100 > This series fixes as number of leaks and issues in the cpsw probe-error > and driver-unbind paths, some which specifically prevented deferred > probing. ... > v2 > - Keep platform device runtime-resumed throughout probe instead of >

Re: [PATCH net v2 7/7] net: ethernet: ti: cpsw: fix fixed-link phy probe deferral

2016-11-18 Thread David Miller
From: Johan Hovold Date: Thu, 17 Nov 2016 18:19:20 +0100 > On Thu, Nov 17, 2016 at 12:04:16PM -0500, David Miller wrote: >> From: Johan Hovold >> Date: Thu, 17 Nov 2016 17:40:04 +0100 >> >> > Make sure to propagate errors from of_phy_register_fixed_link() which >> > can fail with -EPROBE_DEFER.

Re: [PATCH net 0/3] mlx4 fix for shutdown flow

2016-11-18 Thread David Miller
From: Tariq Toukan Date: Thu, 17 Nov 2016 17:40:48 +0200 > This patchset fixes an invalid reference to mdev in mlx4 shutdown flow. > > In patch 1, we make sure netif_device_detach() is called from shutdown flow > only, > since we want to keep it present during a simple configuration change. >

[PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and

2016-11-18 Thread Colin King
From: Colin Ian King the mbox state should be bitwise anded rather than logically anded with OCTEON_MBOX_STATE_RESPONSE_PENDING. Fix this by using the correct & operator instead of &&. Signed-off-by: Colin Ian King --- drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 2 +- 1 file change

Re: [PATCH -next] tcp: make undo_cwnd mandatory for congestion modules

2016-11-18 Thread David Miller
From: Florian Westphal Date: Thu, 17 Nov 2016 13:56:51 +0100 > The undo_cwnd fallback in the stack doubles cwnd based on ssthresh, > which un-does reno halving behaviour. > > It seems more appropriate to let congctl algorithms pair .ssthresh > and .undo_cwnd properly. Add a 'tcp_reno_undo_cwnd'

Re: [PATCH] net: sky2: Fix shutdown crash

2016-11-18 Thread David Miller
From: Jeremy Linton Date: Thu, 17 Nov 2016 09:14:25 -0600 > The sky2 frequently crashes during machine shutdown with: > > sky2_get_stats+0x60/0x3d8 [sky2] > dev_get_stats+0x68/0xd8 > rtnl_fill_stats+0x54/0x140 > rtnl_fill_ifinfo+0x46c/0xc68 > rtmsg_ifinfo_build_skb+0x7c/0xf0 > rtmsg_ifinfo.part.

Re: [v5,1/5] soc: qcom: smem_state: Fix include for ERR_PTR()

2016-11-18 Thread Bjorn Andersson
On Wed 16 Nov 10:49 PST 2016, Kalle Valo wrote: > Bjorn Andersson wrote: > > The correct include file for getting errno constants and ERR_PTR() is > > linux/err.h, rather than linux/errno.h, so fix the include. > > > > Fixes: e8b123e60084 ("soc: qcom: smem_state: Add stubs for disabled > > smem

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Eric Dumazet
On Fri, 2016-11-18 at 16:40 +, Joao Pinto wrote: > help a lot, thank you! > lets start working then :) Please read this very useful document first, so that you can avoid common mistakes ;) https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt Thanks

Re: [PATCH v8 5/6] net: ipv4, ipv6: run cgroup eBPF egress programs

2016-11-18 Thread Pablo Neira Ayuso
On Fri, Nov 18, 2016 at 09:17:18AM -0800, Alexei Starovoitov wrote: > On Fri, Nov 18, 2016 at 01:37:32PM +0100, Pablo Neira Ayuso wrote: > > On Thu, Nov 17, 2016 at 07:27:08PM +0100, Daniel Mack wrote: > > [...] > > > @@ -312,6 +314,12 @@ int ip_mc_output(struct net *net, struct sock *sk, > > > st

Re: [PATCH] netns: fix get_net_ns_by_fd(int pid) typo

2016-11-18 Thread Rami Rosen
On 18 November 2016 at 11:41, Stefan Hajnoczi wrote: > The argument to get_net_ns_by_fd() is a /proc/$PID/ns/net file > descriptor not a pid. Fix the typo. > Acked-by: Rami Rosen

Re: [PATCH net-next] amd-xgbe: Update connection validation for backplane mode

2016-11-18 Thread David Miller
From: Tom Lendacky Date: Thu, 17 Nov 2016 08:43:37 -0600 > Update the connection type enumeration for backplane mode and return > an error when there is a mismatch between the mode and the connection > type. > > Signed-off-by: Tom Lendacky Applied, thanks.

Re: [PATCH v8 5/6] net: ipv4, ipv6: run cgroup eBPF egress programs

2016-11-18 Thread Alexei Starovoitov
On Fri, Nov 18, 2016 at 01:37:32PM +0100, Pablo Neira Ayuso wrote: > On Thu, Nov 17, 2016 at 07:27:08PM +0100, Daniel Mack wrote: > [...] > > @@ -312,6 +314,12 @@ int ip_mc_output(struct net *net, struct sock *sk, > > struct sk_buff *skb) > > skb->dev = dev; > > skb->protocol = htons(ETH_P

Re: [PATCH net-next v3 0/5] Adding PHY-Tunables and downshift support

2016-11-18 Thread David Miller
From: "Allan W. Nielsen" Date: Thu, 17 Nov 2016 13:07:19 +0100 > This series add support for PHY tunables, and uses this facility to > configure downshifting. The downshifting mechanism is implemented for MSCC > phys. Series applied, thanks.

Re: Netperf UDP issue with connected sockets

2016-11-18 Thread Jesper Dangaard Brouer
On Thu, 17 Nov 2016 13:44:02 -0800 Eric Dumazet wrote: > On Thu, 2016-11-17 at 22:19 +0100, Jesper Dangaard Brouer wrote: > > > > > Maybe you can share your udp flood "udpsnd" program source? > > Very ugly. This is based on what I wrote when tracking the UDP v6 > checksum bug (4f2e4ad56a65f3

Re: [PATCH net-next V2 0/8] Mellanox 100G mlx5 update 2016-11-15

2016-11-18 Thread David Miller
From: Saeed Mahameed Date: Thu, 17 Nov 2016 13:45:54 +0200 > This series contains four humble mlx5 features. > > From Gal, > - Add the support for PCIe statistics and expose them in ethtool > > From Huy, > - Add the support for port module events reporting and statistics > - Add the support

Re: [PATCH net-next 0/5] sfc: Firmware-Assisted TSO version 2

2016-11-18 Thread David Miller
From: Edward Cree Date: Thu, 17 Nov 2016 10:49:42 + > The firmware on 8000 series SFC NICs supports a new TSO API ("FATSOv2"), and > 7000 series NICs will also support this in an imminent release. This series > adds driver support for this TSO implementation. > The series also removes SWTS

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Joao Pinto
On 18-11-2016 16:35, Florian Fainelli wrote: > > > On 11/18/2016 08:31 AM, Joao Pinto wrote: >> Hi Florian, >> >> On 18-11-2016 14:53, Florian Fainelli wrote: >>> On November 18, 2016 4:28:30 AM PST, Joao Pinto >>> wrote: snip (...) I would also gladly be available to be its mainta

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Florian Fainelli
On 11/18/2016 08:31 AM, Joao Pinto wrote: > Hi Florian, > > On 18-11-2016 14:53, Florian Fainelli wrote: >> On November 18, 2016 4:28:30 AM PST, Joao Pinto >> wrote: >>> >>> Dear all, >>> >>> My name is Joao Pinto and I work at Synopsys. >>> I am a kernel developer with special focus in mainl

Re: [net-next] af_packet: Use virtio_net_hdr_to_skb().

2016-11-18 Thread David Miller
From: Jarno Rajahalme Date: Wed, 16 Nov 2016 18:06:42 -0800 > Use the common virtio_net_hdr_to_skb() instead of open coding it. > Other call sites were changed by commit fd2a0437dc, but this one was > missed, maybe because it is split in two parts of the source code. > > Also fix other call site

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Joao Pinto
Hi Florian, On 18-11-2016 14:53, Florian Fainelli wrote: > On November 18, 2016 4:28:30 AM PST, Joao Pinto > wrote: >> >> Dear all, >> >> My name is Joao Pinto and I work at Synopsys. >> I am a kernel developer with special focus in mainline collaboration, >> both Linux >> and Buildroot. I was

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Florian Fainelli
On November 18, 2016 4:28:30 AM PST, Joao Pinto wrote: > >Dear all, > >My name is Joao Pinto and I work at Synopsys. >I am a kernel developer with special focus in mainline collaboration, >both Linux >and Buildroot. I was recently named one of the maintainers of the PCIe >Designware core driver an

Re: [mm PATCH v3 00/23] Add support for DMA writable pages being writable by the network stack

2016-11-18 Thread Alexander Duyck
On Thu, Nov 10, 2016 at 3:34 AM, Alexander Duyck wrote: > The first 19 patches in the set add support for the DMA attribute > DMA_ATTR_SKIP_CPU_SYNC on multiple platforms/architectures. This is needed > so that we can flag the calls to dma_map/unmap_page so that we do not > invalidate cache lines

Re: [PATCH] netns: make struct pernet_operations::id unsigned int

2016-11-18 Thread David Miller
From: Alexey Dobriyan Date: Thu, 17 Nov 2016 04:58:21 +0300 > Make struct pernet_operations::id unsigned. ... > Signed-off-by: Alexey Dobriyan Applied, thank you.

[PATCH] mlxsw: switchib: add MLXSW_PCI dependency

2016-11-18 Thread Arnd Bergmann
The newly added switchib driver fails to link if MLXSW_PCI=m: drivers/net/ethernet/mellanox/mlxsw/mlxsw_switchib.o: In function^Cmlxsw_sib_module_exit': switchib.c:(.exit.text+0x8): undefined reference to `mlxsw_pci_driver_unregister' switchib.c:(.exit.text+0x10): undefined reference to `mlxsw_

Re: [net-next PATCH v2] net: dummy: Introduce dummy virtual functions

2016-11-18 Thread Phil Sutter
Hi, On Fri, Nov 18, 2016 at 12:04:14AM +0200, Or Gerlitz wrote: > On Mon, Nov 14, 2016 at 3:02 PM, Phil Sutter wrote: > > > Due to the assumption that all PFs are PCI devices, this implementation > > is not completely straightforward: In order to allow for > > rtnl_fill_ifinfo() to see the dummy

Re: [PATCH net-next] udp: enable busy polling for all sockets

2016-11-18 Thread David Miller
From: Eric Dumazet Date: Wed, 16 Nov 2016 09:10:42 -0800 > From: Eric Dumazet > > UDP busy polling is restricted to connected UDP sockets. > > This is because sk_busy_loop() only takes care of one NAPI context. > > There are cases where it could be extended. > > 1) Some hosts receive traffic

Re: [PATCH v3 3/5] net: asix: Fix AX88772x resume failures

2016-11-18 Thread Jon Hunter
Hi Allan, On 14/11/16 09:45, ASIX_Allan [Office] wrote: > Hi Jon, > > Please help to double check if the USB host controller of your Terga > platform had been powered OFF while running the ax88772_suspend() routine or > not? Sorry for the delay. Today I set up a local board to reproduce this on

[PATCH net] rtnetlink: fix FDB size computation

2016-11-18 Thread Sabrina Dubroca
Add missing NDA_VLAN attribute's size. Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.") Signed-off-by: Sabrina Dubroca --- net/core/rtnetlink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 2a75127f0e9e..92e

Re: [PATCH] net: fec: Detect and recover receive queue hangs

2016-11-18 Thread Chris Lesiak
On 11/18/2016 12:44 AM, Andy Duan wrote: > From: Chris Lesiak Sent: Friday, November 18, 2016 > 5:15 AM > >To: Andy Duan > >Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Jaccon > >Bastiaansen ; chris.les...@licor.com > >Subject: [PATCH] net: fec: Detect and recover receive queue

[RFC PATCH v2 1/2] macb: Add 1588 support in Cadence GEM.

2016-11-18 Thread Andrei Pistirica
Cadence GEM provides a 102 bit time counter with 48 bits for seconds, 30 bits for nsecs and 24 bits for sub-nsecs to control 1588 timestamping. This patch does the following: - Registers to ptp clock framework - Timer initialization is done by writing time of day to the timer counter. - ns increme

[RFC PATCH v2 2/2] macb: Enable 1588 support in SAMA5D2 platform.

2016-11-18 Thread Andrei Pistirica
Hardware time stamp on the PTP Ethernet packets are received using the SO_TIMESTAMPING API. Where timers are obtained from the PTP event/peer registers. Signed-off-by: Andrei Pistirica --- Version 2 patch for: https://patchwork.kernel.org/patch/9310991/ Modificaions: - add PTP caps for SAMA5D2/3/

Re: Synopsys Ethernet QoS Driver

2016-11-18 Thread Joao Pinto
Hello Ozgur, Thanks for your feedback. On 18-11-2016 13:09, mued dib wrote: > Dear Joao; > > thanks for support and this project is good. I have some questions, Linux > already support to QoS with "tc". right? > > Can you send us a list of driver files you are interested? For now we are intere

  1   2   >