Re: [PATCHv3 net-next 5/7] net: add confirm_neigh method to dst_ops

2017-02-02 Thread Steffen Klassert
On Thu, Feb 02, 2017 at 01:04:34AM +0200, Julian Anastasov wrote: > > Hello, > > On Wed, 1 Feb 2017, Steffen Klassert wrote: > > > > > I think here it is better to go through the whole chain > > of transformations with > > > > child->ops->confirm_neigh(path, daddr); > > It may sou

Re: [patch net-next 19/19] mlxsw: spectrum: Implement TC flower offload

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 10:37:23PM CET, f.faine...@gmail.com wrote: >On 02/02/2017 07:12 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Extend the existing setup_tc ndo call and allow to offload cls_flower >> rules. Only limited set of dissector keys and actions are supported now. >> Use previously

[next-queu 11/19] i40e: Remove FPK HyperV VF device ID

2017-02-02 Thread Jeff Kirsher
From: Jayaprakash Shanmugam Requirement for VFs to use the VMBus has been removed that's why removing Hyper-V VF device ID. Change-ID: I84f0964f443ee0db3e5e444b5ace996eb71b8280 Signed-off-by: Jayaprakash Shanmugam Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/

[next-queu 12/19] i40e: remove unused function

2017-02-02 Thread Jeff Kirsher
From: Mitch Williams After refactoring the client open and close code, this is no longer needed. Remove it. Change-ID: If8e6e32baa354d857c2fd8b2f19404f1786011c4 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e.h

[next-net 00/19][pull request] Intel Wired LAN Driver Updates 2017-02-02

2017-02-02 Thread Jeff Kirsher
This series contains updates to i40e/i40evf only. Jake fixes up the driver to not call i40e_vsi_kill_vlan() or i40e_vsi_add_vlan() when the PVID is set or when the VID is less than 1. Cleaned up a check which really is not needed since there is no real reason why we cannot just call i40e_del_mac_a

[next-queu 10/19] i40e: Quick refactor to start moving data off stack and into Tx buffer info

2017-02-02 Thread Jeff Kirsher
From: Alexander Duyck This patch does some quick work to pull some of the data off of the stack and hopefully start storing it in the Tx buffer info section of the Tx ring. Ideally we should be moving away from having to store much of anything on the stack and can just maintain it all in the des

[next-queu 04/19] i40e: rename i40e_put_mac_in_vlan and i40e_del_mac_all_vlan

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller These functions purpose is to add a new MAC filter correctly, whether we're using VLANs or not. Their goal is to ensure that all active VLANs get the new MAC filter. Rename them so that their intent is clear. They function correctly regardless of whether we have any active VLAN

[next-queu 08/19] i40evf: remove unused device ID

2017-02-02 Thread Jeff Kirsher
From: Mitch Williams This device ID was intended for use when running Linux VF drivers under Hyper-V, but we have determined that it is not necessary. Since it is unused, and will never be used, remove it. Change-ID: I74998ab4237db043cd400547bb54a0a5e2a37ea5 Signed-off-by: Mitch Williams Tested

[next-queu 07/19] i40e: Deprecating unused macro

2017-02-02 Thread Jeff Kirsher
From: Bimmy Pujari I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710 was supposed to be for 40G. But function i40e_is_mac_710 sets I40E_MAC_XL710 for all device IDS, I40E_MAC_X710 is not used at all. As there is nothing to compare there is no need for this function. Thus deprecating thi

[next-queu 18/19] i40e/i40evf: Limit DMA sync of RX buffers to actual packet size

2017-02-02 Thread Jeff Kirsher
From: Scott Peterson On packet RX, we perform a DMA sync for CPU before passing the packet up. Here we limit that sync to the actual length of the incoming packet, rather than always syncing the entire buffer. Change-ID: I626aaf6c37275a8ce9e81efcaa773f327b331487 Signed-off-by: Scott Peterson T

[next-queu 05/19] i40e: avoid O(n^2) loop when deleting all filters

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller Use __i40e_del_filter instead of using i40e_del_filter() which will avoid doing an additional search to delete a filter we already have the pointer for. Change-ID: Iea5a7e3cafbf8c682ed9d3b6c69cf5ff53f44daf Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: J

[next-queu 17/19] i40evf: track outstanding client request

2017-02-02 Thread Jeff Kirsher
From: Mitch Williams The iWarp client cannot continue until this operation has been completed by the PF driver. Sleep (with timeout) until the reply from the PF driver has been received. Change-ID: I5dc41b857bba32d0218b7ce167b5da122dadf349 Signed-off-by: Mitch Williams Tested-by: Andrew Bowers

[next-queu 09/19] i40e: remove unnecessary __packed

2017-02-02 Thread Jeff Kirsher
From: Tushar Dave 'struct i40e_dma_mem' defined with 'packed' directive causing kernel unaligned errors on sparc. e.g. i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.6.16-k i40e: Copyright (c) 2013 - 2014 Intel Corporation. Kernel unaligned access at TPC[44894c] dma_4v_alloc

[next-queu 03/19] i40e: no need to check is_vsi_in_vlan before calling i40e_del_mac_all_vlan

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller This function won't be appreciably slower when in VLAN mode, so there is no real reason to not just call it directly. In either case, we still must search the full table for a MAC/VLAN pair. We do get to stop searching a tiny bit early in the case of knowing we are not in VLAN

[next-queu 13/19] i40e: refactor macro INTRL_USEC_TO_REG

2017-02-02 Thread Jeff Kirsher
From: Alan Brady This patch refactors the macro INTRL_USEC_TO_REG into a static inline function and fixes a couple subtle bugs caused by the macro. This patch fixes a bug which was caused by passing a bad register value to the firmware. If enabling interrupt rate limiting, a non-zero value for

[next-queu 19/19] i40e/i40evf: Moves skb from i40e_rx_buffer to i40e_ring

2017-02-02 Thread Jeff Kirsher
From: Scott Peterson This patch reduces the size of struct i40e_rx_buffer by one pointer, and makes the i40e driver a little more consistent with the igb driver in terms of packets that span buffers. We do this by moving the skb field from struct i40e_rx_buffer to struct i40e_ring. We pass the s

[next-queu 02/19] i40e: fold the i40e_is_vsi_in_vlan check into i40e_put_mac_in_vlan

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller Fold the check for determining when to call i40e_put_mac_in_vlan directly into the function so that we don't need to decide which function to use ahead of time. This allows us to just call i40e_put_mac_in_vlan directly without having to check ahead of time. Change-ID: Ifff5269

[next-queu 01/19] i40e: don't allow i40e_vsi_(add|kill)_vlan to operate when VID<1

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller Now that we have the separate i40e_(add|rm)_vlan_all_mac functions, we should not be using the i40e_vsi_kill_vlan or i40e_vsi_add_vlan functions when PVID is set or when VID is less than 1. This allows us to remove some checks in i40e_vsi_add_vlan and ensures that callers which

[next-queu 16/19] i40evf: fix client warnings

2017-02-02 Thread Jeff Kirsher
From: Faisal Latif The function prototype in i40evf_client.h are giving warnings while compiling i40iwvf module. Move these function prototypes to i40evf.h. Change-Id: Ie3757f844993aabc27654aaf02ec14fb985ad2c4 Signed-off-by: Faisal Latif Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --

[next-queu 14/19] i40e: add interrupt rate limit verbosity

2017-02-02 Thread Jeff Kirsher
From: Alan Brady Due to the resolution of the register controlling interrupt rate limiting, setting certain values for the interrupt rate limit make it appear as though the limiting is not completely accurate. The problem is that the interrupt rate limit is getting rounded down to the nearest mu

[next-queu 15/19] i40e: don't check params until after checking for client instance

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller We can avoid the minor bit of work by calling check params after we check for the client instance, since we're about to return early in cases where we do not have a client. Change-ID: I56f8ea2ba48d4f571fa331c9ace50819a022fa1c Signed-off-by: Jacob Keller Tested-by: Andrew Bowe

[next-queu 06/19] i40e: when adding or removing MAC filters, correctly handle VLANs

2017-02-02 Thread Jeff Kirsher
From: Jacob Keller Instead of using i40e_add_filter or i40e_del_filter directly, when adding a MAC address, we should normally be using i40e_add_mac_filter or i40e_del_mac_filter. These functions correctly handle the various cases of VLAN mode or PVID settings. This ensures consistency and avoids

[PATCH net] ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches

2017-02-02 Thread Linus Lüssing
When for instance a mobile Linux device roams from one access point to another with both APs sharing the same broadcast domain and a multicast snooping switch in between: 1)(c) <~~~> (AP1) <--[SSW]--> (AP2) 2) (AP1) <--[SSW]--> (AP2) <~~~> (c) Then currently IPv6 multicast packe

Re: [patch net-next 16/19] lib: Introduce priority array area manager

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 10:58:15PM CET, t...@herbertland.com wrote: >I have no idea what a "priority array area manager" is. Googling it >comes up with nothing and there are no comments in this whole patch >that either describe what it is or how any of the functions should be >used. Am I missing somet

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-02-02 Thread Shubham Bansal
Hi Nick, On Thu, Feb 2, 2017 at 12:59 PM, nick viljoen wrote: > Hey Shubham, > > I have been doing some similar work-might be worth pooling > resource if there is interest? Sure. That sounds great. > > We made a presentation at the previous netdev conference about > what we are doing-you can ch

Re: [patch net-next 16/19] lib: Introduce priority array area manager

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 11:51:10PM CET, j...@perches.com wrote: >On Thu, 2017-02-02 at 16:12 +0100, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This introduces a infrastructure for management of linear priority >> areas. Priority order in an array matters, however order of items inside >> a priority

Re: [patch net-next 00/19] mlxsw: Introduce TC Flower offload using TCAM

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 10:40:42PM CET, f.faine...@gmail.com wrote: >On 02/02/2017 07:12 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This patchset introduces support for offloading TC cls_flower and actions >> to Spectrum TCAM-base policy engine. >> >> The patchset contains patches to allow wor

Re: [patch net-next 17/19] mlxsw: spectrum: Introduce ACL core with simple TCAM implementation

2017-02-02 Thread Jiri Pirko
Thu, Feb 02, 2017 at 11:34:48PM CET, da...@davemloft.net wrote: >From: Jiri Pirko >Date: Thu, 2 Feb 2017 16:12:57 +0100 > >> +static int mlxsw_sp_acl_tcam_region_id_get(struct mlxsw_sp_acl_tcam *tcam, >> + u16 *p_id) >> +{ >> +u16 id; >> + >> +id = fi

[PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-02 Thread Ben Serebrin
From: Benjamin Serebrin If the number of virtio queue pairs is not equal to the number of VCPUs, the virtio guest driver doesn't assign any CPU affinity for the queue interrupts or the xps aggregation interrupt. Google Compute Engine currently provides 1 queue pair for every VCPU, but limits tha

Re: [PATCH net-next] bpf: fix verifier issue at check_packet_ptr_add

2017-02-02 Thread Alexei Starovoitov
On Thu, Feb 02, 2017 at 09:31:06PM -0800, William Tu wrote: > > Yes, this is auto-generated. We want to use P4 2016 as front end to > generate ebpf for XDP. P4 2016 front-end ? is it public? Is there a 2017 version? ;) just curious. > > > > The line 272 is r4 += r2 > > where R4=imm4 and R2=pkt_e

Re: [PATCH net-next v2 0/5] bridge: per vlan dst_metadata support

2017-02-02 Thread Roopa Prabhu
On 2/2/17, 5:50 PM, David Miller wrote: > I see a lot of "complexity of bridging layer" pushback on these > changes, and I understand where that is coming from. > > But really this isn't even, at a high level, really a bridging change. > > What it's doing is making lwtunnel objects more useful. > >

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-02 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 05:33:45PM +1300, Eric W. Biederman wrote: > > The point is that we can make the inode number stable across migration > and the user space API for namespaces has been designed with that > possibility in mind. > > What you have proposed is the equivalent of reporting a file

Pseudo-Interface is returning wrong mac address

2017-02-02 Thread Shaaa
Hi, I am trying to setup macvlans on a centos7 box. The plan is to have 10.1.1.1/24 on the *main* interface, and then a 10.1.1.10/32 on a macvlan interface. Output below: 2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 01:0d:26:9d:cd:16 brd ff:ff:ff:ff:ff:ff inet 10.1.1

Re: [PATCH net-next] bpf: fix verifier issue at check_packet_ptr_add

2017-02-02 Thread William Tu
On Thu, Feb 2, 2017 at 7:46 PM, Alexei Starovoitov wrote: > On Thu, Feb 02, 2017 at 07:26:44PM -0800, William Tu wrote: >> Thanks. below is my program. The verifier fails at line 272, when >> writing to ICMP header. >> - >> ; ebpf_packetEnd = ((void*)(long)skb->data_end); >> 206: r2

Re: Understanding mutual exclusion between rtnl_lock and rcu_read_lock

2017-02-02 Thread Eric Dumazet
On Thu, 2017-02-02 at 15:52 -0800, Alexander Duyck wrote: > On Thu, Feb 2, 2017 at 3:47 PM, Joel Cunningham > wrote: > > Hi, > > > > I’m studying the synchronization used on different parts of struct > > net_device and I’m struggling to understand how structure member > > modifications in dev_i

[PATCH 1/1] bonding: Remove unnecessary returned value check

2017-02-02 Thread Zhu Yanjun
The function bond_info_query alwarys returns 0. As such, in the function bond_do_ioctl, it is not necessary to check the returned value. So the interface type of the function bond_info_query is changed to void. The redundant check is removed. Signed-off-by: Zhu Yanjun --- drivers/net/bonding/bon

Re: [PATCH net-next] net: add LINUX_MIB_PFMEMALLOCDROP counter

2017-02-02 Thread David Miller
From: Eric Dumazet Date: Wed, 01 Feb 2017 20:47:59 -0800 > From: Eric Dumazet > > Debugging issues caused by pfmemalloc is often tedious. > > Add a new SNMP counter to more easily diagnose these problems. > > Signed-off-by: Eric Dumazet > Cc: Josef Bacik Applied.

[PATCH net-next] tcp: clear pfmemalloc on outgoing skb

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet Josef Bacik diagnosed following problem : I was seeing random disconnects while testing NBD over loopback. This turned out to be because NBD sets pfmemalloc on it's socket, however the receiving side is a user space application so does not have pfmemalloc set on it

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-02 Thread Eric W. Biederman
Alexei Starovoitov writes: > On 1/26/17 11:07 AM, Andy Lutomirski wrote: >> On Thu, Jan 26, 2017 at 10:32 AM, Alexei Starovoitov wrote: >>> On 1/26/17 10:12 AM, Andy Lutomirski wrote: On Thu, Jan 26, 2017 at 9:46 AM, Alexei Starovoitov wrote: > > On 1/26/17 8:37 AM, Andy Lutom

Re: [net-next PATCH 3/5] virtio_net: remove duplicate queue pair binding in XDP

2017-02-02 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 03:21:14PM -0800, John Fastabend wrote: > Factor out qp assignment. > > Signed-off-by: John Fastabend Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c | 18 +++--- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/drivers/n

Re: [net-next PATCH 2/5] virtio_net: factor out xdp handler for readability

2017-02-02 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 03:20:52PM -0800, John Fastabend wrote: > At this point the do_xdp_prog is mostly if/else branches handling > the different modes of virtio_net. So remove it and handle running > the program in the per mode handlers. > > Signed-off-by: John Fastabend This can go in except

Re: [net-next PATCH 5/5] virtio_net: XDP support for adjust_head

2017-02-02 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 08:02:55PM -0800, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 05:42:54AM +0200, Michael S. Tsirkin wrote: > > On Thu, Feb 02, 2017 at 03:21:57PM -0800, John Fastabend wrote: > > > Add support for XDP adjust head by allocating a 256B header region > > > that XDP progr

Re: [PATCH net-next] net: ipv4: remove fib_lookup.h from devinet.c include list

2017-02-02 Thread David Miller
From: David Ahern Date: Wed, 1 Feb 2017 18:41:25 -0800 > nothing in devinet.c relies on fib_lookup.h; remove it from the includes > > Signed-off-by: David Ahern Applied.

Re: [net-next PATCH v2 5/5] virtio_net: XDP support for adjust_head

2017-02-02 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 07:16:29PM -0800, John Fastabend wrote: > Add support for XDP adjust head by allocating a 256B header region > that XDP programs can grow into. This is only enabled when a XDP > program is loaded. > > In order to ensure that we do not have to unwind queue headroom push > qu

Re: [PATCH net-next] net: remove useless pfmemalloc setting

2017-02-02 Thread David Miller
From: Eric Dumazet Date: Wed, 01 Feb 2017 18:13:23 -0800 > From: Eric Dumazet > > When __alloc_skb() allocates an skb from fast clone cache, > setting pfmemalloc on the clone is not needed. > > Clone will be properly initialized later at skb_clone() time, > including pfmemalloc field, as it is

Re: [net-next PATCH 5/5] virtio_net: XDP support for adjust_head

2017-02-02 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 05:42:54AM +0200, Michael S. Tsirkin wrote: > On Thu, Feb 02, 2017 at 03:21:57PM -0800, John Fastabend wrote: > > Add support for XDP adjust head by allocating a 256B header region > > that XDP programs can grow into. This is only enabled when a XDP > > program is loaded. >

Re: [PATCH net-next] mpls: allow TTL propagation to/from IP packets to be configured

2017-02-02 Thread David Ahern
On 2/2/17 8:21 PM, Eric W. Biederman wrote: > > My brain is mostly elswhere right now so I don't have an implementation > on how it should be implemented. However Linux fundamentally gets used > interesting ways, and if we don't implement the option as per mpls exit > now someone will come along

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread David Miller
From: Florian Fainelli Date: Thu, 2 Feb 2017 19:47:43 -0800 > Le 02/02/17 à 18:54, David Miller a écrit : >> From: Florian Fainelli >> Date: Tue, 31 Jan 2017 18:46:43 -0800 >> >>> From: Mao Wenan >>> >>> There is currently no reference count being held on the PHY driver, >>> which makes it pos

Re: [net-next PATCH v2 0/5] XDP adjust head support for virtio

2017-02-02 Thread Jakub Kicinski
On Thu, 02 Feb 2017 19:14:05 -0800, John Fastabend wrote: > This series adds adjust head support for virtio. ... XDP bits look good to me too!

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread Florian Fainelli
Le 02/02/17 à 18:54, David Miller a écrit : > From: Florian Fainelli > Date: Tue, 31 Jan 2017 18:46:43 -0800 > >> From: Mao Wenan >> >> There is currently no reference count being held on the PHY driver, >> which makes it possible to remove the PHY driver module while the PHY >> state machine is

Re: [PATCH net-next] bpf: fix verifier issue at check_packet_ptr_add

2017-02-02 Thread Alexei Starovoitov
On Thu, Feb 02, 2017 at 07:26:44PM -0800, William Tu wrote: > Thanks. below is my program. The verifier fails at line 272, when > writing to ICMP header. > - > ; ebpf_packetEnd = ((void*)(long)skb->data_end); > 206: r2 = *(u32 *)(r6 + 4) > ; ebpf_packetStart = ((void*)(long)skb->data

Re: [net-next PATCH 5/5] virtio_net: XDP support for adjust_head

2017-02-02 Thread Michael S. Tsirkin
On Thu, Feb 02, 2017 at 03:21:57PM -0800, John Fastabend wrote: > Add support for XDP adjust head by allocating a 256B header region > that XDP programs can grow into. This is only enabled when a XDP > program is loaded. > > In order to ensure that we do not have to unwind queue headroom push > qu

[PATCH 0/4] Updates for Marvell Switch SoCs

2017-02-02 Thread Chris Packham
Shortly after I posted my last series I got access to a more recent Marvell SDK which had some device tree support for the switch SoCs I'd been wanting. It was still based on an older kernel but it was a huge improvement over what came before. Patch 1/4 is a bit of a cleanup. I did initially strug

[PATCH 1/4] ARM: dts: armada-xp-98dx3236: combine dfx server nodes

2017-02-02 Thread Chris Packham
Rather than having a separate node for the dfx server add a reg property to the parent node. This give somes compatibility with the Marvell supplied SDK. Signed-off-by: Chris Packham --- Documentation/devicetree/bindings/net/marvell,prestera.txt | 13 + arch/arm/boot/dts/armada-xp-98

Re: [net-next PATCH v2 0/5] XDP adjust head support for virtio

2017-02-02 Thread Alexei Starovoitov
On 2/2/17 7:14 PM, John Fastabend wrote: This series adds adjust head support for virtio. The following is my test setup. I use qemu + virtio as follows, ./x86_64-softmmu/qemu-system-x86_64 \ -hda /var/lib/libvirt/images/Fedora-test0.img \ -m 4096 -enable-kvm -smp 2 -netdev tap,id=hn0,que

Re: [PATCH net-next] bpf: fix verifier issue at check_packet_ptr_add

2017-02-02 Thread William Tu
Thanks. below is my program. The verifier fails at line 272, when writing to ICMP header. - ; ebpf_packetEnd = ((void*)(long)skb->data_end); 206: r2 = *(u32 *)(r6 + 4) ; ebpf_packetStart = ((void*)(long)skb->data); 207: r1 = *(u32 *)(r6 + 0) ... r10 is "struct hd" at local

Re: [PATCH net-next] mpls: allow TTL propagation to/from IP packets to be configured

2017-02-02 Thread Eric W. Biederman
Robert Shearman writes: > On 31/01/17 00:17, Eric W. Biederman wrote: >> Robert Shearman writes: >> >>> It is sometimes desirable to present an MPLS transport network as a >>> single hop to traffic transiting it because it prevents confusion when >>> diagnosing failures. An example of where conf

[net-next PATCH v2 5/5] virtio_net: XDP support for adjust_head

2017-02-02 Thread John Fastabend
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs ano

Re: [PATCH net-next] net: remove support for per driver ndo_busy_poll()

2017-02-02 Thread kbuild test robot
Hi Eric, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-remove-support-for-per-driver-ndo_busy_poll/20170203-104846 config: x86_64-rhel (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save th

[net-next PATCH v2 4/5] virtio_net: refactor freeze/restore logic into virtnet reset logic

2017-02-02 Thread John Fastabend
For XDP we will need to reset the queues to allow for buffer headroom to be configured. In order to do this we need to essentially run the freeze()/restore() code path. Unfortunately the locking requirements between the freeze/restore and reset paths are different however so we can not simply reuse

[net-next PATCH v2 2/5] virtio_net: factor out xdp handler for readability

2017-02-02 Thread John Fastabend
At this point the do_xdp_prog is mostly if/else branches handling the different modes of virtio_net. So remove it and handle running the program in the per mode handlers. Signed-off-by: John Fastabend --- drivers/net/virtio_net.c | 86 +++--- 1 file chan

[net-next PATCH v2 3/5] virtio_net: remove duplicate queue pair binding in XDP

2017-02-02 Thread John Fastabend
Factor out qp assignment. Signed-off-by: John Fastabend --- drivers/net/virtio_net.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3b49363..dba5afb 100644 --- a/drivers/net/virtio_net.c +++ b/

[net-next PATCH v2 1/5] virtio_net: wrap rtnl_lock in test for calling with lock already held

2017-02-02 Thread John Fastabend
For XDP use case and to allow ethtool reset tests it is useful to be able to use reset paths from contexts where rtnl lock is already held. This requries updating virtnet_set_queues and free_receive_bufs the two places where rtnl_lock is taken in virtio_net. To do this we use the following pattern

[net-next PATCH v2 0/5] XDP adjust head support for virtio

2017-02-02 Thread John Fastabend
This series adds adjust head support for virtio. The following is my test setup. I use qemu + virtio as follows, ./x86_64-softmmu/qemu-system-x86_64 \ -hda /var/lib/libvirt/images/Fedora-test0.img \ -m 4096 -enable-kvm -smp 2 -netdev tap,id=hn0,queues=4,vhost=on \ -device virtio-net-pci,ne

Re: [PATCHv2 net-next 0/2] MV88E6390 fixes

2017-02-02 Thread David Miller
From: Andrew Lunn Date: Thu, 2 Feb 2017 00:46:14 +0100 > Two patches, which have been posted before. Fix simple issues in the > mv88e6390 support. These don't need to go to stable, since the > mv88e6390 support in stable is insufficient to be usable. > > To apply cleanly, these patches rely on

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

2017-02-02 Thread David Miller
From: Andrew Lunn Date: Thu, 2 Feb 2017 00:35:03 +0100 > The 88e1545 PHYs are discrete Marvell PHYs, found in a quad package on > the zii-devel-b board. Add support for it to the Marvell PHY driver. > > Signed-off-by: Andrew Lunn Applied.

Re: [PATCH v2] net: stmmac: Fix wrong message in stmmac_probe_config_dt

2017-02-02 Thread David Miller
From: Heiner Kallweit Date: Thu, 2 Feb 2017 08:20:12 +0100 > Most likely a copy & paste error in referenced commit. > Restore the debug message to what it was before. > > Fixes: f573c0b9c4e0 ("stmmac: move stmmac_clk, pclk, clk_ptp_ref and > stmmac_rst to platform structure") > Signed-off-by: H

Re: [PATCH] net: stmmac: add separate warning for PTP not being supported by HW

2017-02-02 Thread David Miller
From: Heiner Kallweit Date: Wed, 1 Feb 2017 22:02:02 +0100 > Chips like Amlogic S905GXBB are supported by this driver but don't > have support for PTP. Add a separate warning for missing HW support > to differentiate it from other actual failures. > > Signed-off-by: Heiner Kallweit Applied to

Re: [PATCH] net: stmmac: don't set tx delay in RGMII_ID and RGMII_TXID mode

2017-02-02 Thread David Miller
From: Heiner Kallweit Date: Wed, 1 Feb 2017 20:19:25 +0100 > As documented in Documentation/devicetree/bindings/net/ethernet.txt, > in RGMII_ID and RGMII_TXID mode the MAC should not add a tx delay. > > Signed-off-by: Heiner Kallweit Applied to net-next, thank you.

Re: [PATCH net-next] unix: add ioctl to open a unix socket file with O_PATH

2017-02-02 Thread David Miller
From: Andrei Vagin Date: Wed, 1 Feb 2017 11:00:45 -0800 > This ioctl opens a file to which a socket is bound and > returns a file descriptor. The caller has to have CAP_NET_ADMIN > in the socket network namespace. > > Currently it is impossible to get a path and a mount point > for a socket fil

Re: [PATCH net] net: phy: Fix lack of reference count on PHY driver

2017-02-02 Thread David Miller
From: Florian Fainelli Date: Tue, 31 Jan 2017 18:46:43 -0800 > From: Mao Wenan > > There is currently no reference count being held on the PHY driver, > which makes it possible to remove the PHY driver module while the PHY > state machine is running and polling the PHY. This could cause crashes

Re: [net-next PATCH 2/5] virtio_net: factor out xdp handler for readability

2017-02-02 Thread John Fastabend
On 17-02-02 05:05 PM, Jakub Kicinski wrote: > On Thu, 02 Feb 2017 15:20:52 -0800, John Fastabend wrote: >> At this point the do_xdp_prog is mostly if/else branches handling >> the different modes of virtio_net. So remove it and handle running >> the program in the per mode handlers. >> >> Signed-of

Re: [PATCHv2 net-next 0/2] Work around missing PHY prodcut ID in mv88e6390

2017-02-02 Thread David Miller
From: Andrew Lunn Date: Wed, 1 Feb 2017 03:40:04 +0100 > The internal PHYs of the MV88E6390 have a Marvell OUI, but the product > ID is zero. Work around this by trapping reads to the ID, and if it is > zero, return the MV88E6390 family ID. > > v2: Move the workaround into the central mdio read

Re: [PATCH RFC net-next 4/4] bridge: add ability to turn off fdb used updates

2017-02-02 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 31 Jan 2017 16:31:58 +0100 > @@ -197,7 +197,8 @@ int br_handle_frame_finish(struct net *net, struct sock > *sk, struct sk_buff *skb > if (dst->is_local) > return br_pass_frame_up(skb); > > - dst->used = jiffie

[PATCH net-next] net: remove support for per driver ndo_busy_poll()

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet We added generic support for busy polling in NAPI layer in linux-4.5 No network driver uses ndo_busy_poll() anymore, we can get rid of the pointer in struct net_device_ops, and its use in sk_busy_loop() Saves NETIF_F_BUSY_POLL features bit. Signed-off-by: Eric Dumazet ---

Re: [PATCH net v2 0/2] mlx4: Misc bug fixes after reinitializing queues

2017-02-02 Thread David Miller
From: Martin KaFai Lau Date: Tue, 31 Jan 2017 22:35:31 -0800 > This patchset fixes misc bugs after reinitializing > queues (e.g. by ethtool -L). > > v2: > * Add another fix to mem leak in tx_ring[t] and tx_cq[t] > * In mlx4_en_try_alloc_resources(), > move all xdp_prog logic after calling mlx4

[PATCH net-next] sfc-falcon: get rid of custom busy polling code

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of tricky code, we also remove one lock operation in fast path. Signed-off-by: Eric Dumazet Cc: Edward Cree Cc: Bert K

Re: Understanding mutual exclusion between rtnl_lock and rcu_read_lock

2017-02-02 Thread Joel Cunningham
> On Feb 2, 2017, at 5:52 PM, Alexander Duyck wrote: > > On Thu, Feb 2, 2017 at 3:47 PM, Joel Cunningham > wrote: >> Hi, >> >> I’m studying the synchronization used on different parts of struct >> net_device and I’m struggling to understand how structure member >> modifications in dev_ioctl

Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket uid

2017-02-02 Thread Eric Dumazet
On Fri, 2017-02-03 at 10:18 +0900, Lorenzo Colitti wrote: > On Fri, Feb 3, 2017 at 9:31 AM, Eric Dumazet wrote: > >> It should be safe to call sock_net_uid on any type of socket > >> (including NULL). sk_uid was added to struct sock in 86741ec25462 > >> ("net: core: Add a UID field to struct sock.

Re: [PATCHv3 net-next 0/7] net: dst_confirm replacement

2017-02-02 Thread David Miller
Julian, it looks some tweaks are still needed for the IPSEC cases. And thus there will be at least one more repsin. Thanks.

Re: [PATCH net-next v2 0/5] bridge: per vlan dst_metadata support

2017-02-02 Thread David Miller
I see a lot of "complexity of bridging layer" pushback on these changes, and I understand where that is coming from. But really this isn't even, at a high level, really a bridging change. What it's doing is making lwtunnel objects more useful. Now that we have lightweight tunnels and netdevs, w

Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket uid

2017-02-02 Thread Lorenzo Colitti
On Fri, Feb 3, 2017 at 9:31 AM, Eric Dumazet wrote: >> It should be safe to call sock_net_uid on any type of socket >> (including NULL). sk_uid was added to struct sock in 86741ec25462 >> ("net: core: Add a UID field to struct sock.") > > But a request socket or a timewait socket do not have this

[PATCH net-next] sfc: get rid of custom busy polling code

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of tricky code, we also remove one lock operation in fast path. Signed-off-by: Eric Dumazet Cc: Edward Cree Cc: Bert K

[PATCH net-next 3/7] openvswitch: Do not trigger events for unconfirmed connection.

2017-02-02 Thread Jarno Rajahalme
Avoid triggering change events for setting conntrack mark or labels before the conntrack entry has been confirmed. Refactoring on this patch also makes chenges in later patches easier to review. Fixes: 182e3042e15d ("openvswitch: Allow matching on conntrack mark") Fixes: c2ac66735870 ("openvswitc

[PATCH net-next 5/7] openvswitch: Add original direction conntrack tuple to sw_flow_key.

2017-02-02 Thread Jarno Rajahalme
Add the fields of the conntrack original direction 5-tuple to struct sw_flow_key. The new fields are initially zeroed, and are populated whenever a conntrack action is executed and either finds or generates a conntrack entry. This means that these fields exist for all packets were not rejected by

[PATCH net-next 2/7] openvswitch: Unionize ovs_key_ct_label with a u32 array.

2017-02-02 Thread Jarno Rajahalme
Make the array of labels in struct ovs_key_ct_label an union, adding a u32 array of the same byte size as the existing u8 array. It is faster to loop through the labels 32 bits at the time, which is also the alignment of netlink attributes. Signed-off-by: Jarno Rajahalme --- include/uapi/linux/

[PATCH net-next 6/7] openvswitch: Add force commit.

2017-02-02 Thread Jarno Rajahalme
Stateful network admission policy may allow connections to one direction and reject connections initiated in the other direction. After policy change it is possible that for a new connection an overlapping conntrack entry already exist, where the connection original direction is opposed to the new

[PATCH net-next 4/7] openvswitch: Inherit master's labels.

2017-02-02 Thread Jarno Rajahalme
We avoid calling into nf_conntrack_in() for expected connections, as that would remove the expectation that we want to stick around until we are ready to commit the connection. Instead, we do a lookup in the expectation table directly. However, after a successful expectation lookup we have set th

[PATCH net-next 1/7] openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.

2017-02-02 Thread Jarno Rajahalme
When looking for an existing conntrack entry, the packet 5-tuple must be inverted if NAT has already been applied, as the current packet headers do not match any conntrack tuple. For example, if a packet from private address X to a public address B is source-NATted to A, the conntrack entry will h

[PATCH net-next 7/7] openvswitch: Pack struct sw_flow_key.

2017-02-02 Thread Jarno Rajahalme
struct sw_flow_key has two 16-bit holes. Move the most matched conntrack match fields there. In some typical cases this reduces the size of the key that needs to be hashed into half and into one cache line. Signed-off-by: Jarno Rajahalme --- net/openvswitch/conntrack.c| 42 +

Re: [net-next PATCH 2/5] virtio_net: factor out xdp handler for readability

2017-02-02 Thread Jakub Kicinski
On Thu, 02 Feb 2017 15:20:52 -0800, John Fastabend wrote: > At this point the do_xdp_prog is mostly if/else branches handling > the different modes of virtio_net. So remove it and handle running > the program in the per mode handlers. > > Signed-off-by: John Fastabend I think you rebased away Da

[PATCH net-next] ixgbevf: get rid of custom busy polling code

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of code, we also remove one lock operation in fast path, and allow GRO to do its job. Signed-off-by: Eric Dumazet Cc: J

Re: [PATCH net-next v2 01/12] bnxt_en: Refactor rx SKB function.

2017-02-02 Thread Michael Chan
On Thu, Feb 2, 2017 at 4:22 PM, Jakub Kicinski wrote: > On Thu, 2 Feb 2017 15:40:19 -0800, Michael Chan wrote: >> On Thu, Feb 2, 2017 at 2:56 PM, Jakub Kicinski wrote: >> > (b) why >> > do you encode the two parameters in a single u32? It's the seventh >> > parameter so it's going on the stack a

Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket uid

2017-02-02 Thread Eric Dumazet
On Fri, 2017-02-03 at 09:00 +0900, Lorenzo Colitti wrote: > On Fri, Feb 3, 2017 at 6:32 AM, Daniel Borkmann wrote: > >> + sk = skb->sk; > >> + kuid = sock_net_uid(dev_net(skb->dev), sk); > > > > > > Don't you need to test for fullsock? Do you mean something like below? > > It should b

Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket uid

2017-02-02 Thread Daniel Borkmann
On 02/03/2017 01:00 AM, Lorenzo Colitti wrote: On Fri, Feb 3, 2017 at 6:32 AM, Daniel Borkmann wrote: + sk = skb->sk; + kuid = sock_net_uid(dev_net(skb->dev), sk); Don't you need to test for fullsock? Do you mean something like below? It should be safe to call sock_net_uid on an

[PATCH net-next] ixgbe: get rid of custom busy polling code

2017-02-02 Thread Eric Dumazet
From: Eric Dumazet In linux-4.5, busy polling was implemented in core NAPI stack, meaning that all custom implementation can be removed from drivers. Not only we remove lot's of code, we also remove one lock operation in fast path, and allow GRO to do its job. Signed-off-by: Eric Dumazet Cc: J

Re: [PATCH net-next v2 01/12] bnxt_en: Refactor rx SKB function.

2017-02-02 Thread Jakub Kicinski
On Thu, 2 Feb 2017 15:40:19 -0800, Michael Chan wrote: > On Thu, Feb 2, 2017 at 2:56 PM, Jakub Kicinski wrote: > > On Thu, 2 Feb 2017 11:55:29 -0500, Michael Chan wrote: > >> @@ -755,8 +757,8 @@ static void bnxt_reuse_rx_agg_bufs(struct bnxt_napi > >> *bnapi, u16 cp_cons, > >> > >> static str

Re: [PATCH net-next 0/2] net: core: Two Helper function about socket information

2017-02-02 Thread Alexei Starovoitov
On Thu, Feb 02, 2017 at 12:59:48PM -0800, Chenbo Feng wrote: > Introduce two eBpf helper function to get the socket cookie and > socket uid for each packet. The helper function is useful when > the *sk field inside sk_buff is not empty. Looks nice. I'd like to see a sample code/test for it though.

Re: [PATCH net-next 2/2] Add a eBPF helper function to retrieve socket uid

2017-02-02 Thread Lorenzo Colitti
On Fri, Feb 3, 2017 at 6:32 AM, Daniel Borkmann wrote: >> + sk = skb->sk; >> + kuid = sock_net_uid(dev_net(skb->dev), sk); > > > Don't you need to test for fullsock? Do you mean something like below? It should be safe to call sock_net_uid on any type of socket (including NULL). sk_uid

Re: [PATCH net-next v2 11/12] bnxt_en: Add basic XDP support.

2017-02-02 Thread Alexei Starovoitov
On Thu, Feb 02, 2017 at 03:08:27PM -0800, Jakub Kicinski wrote: > > + rcu_read_lock(); > > + act = bpf_prog_run_xdp(xdp_prog, &xdp); > > + rcu_read_unlock(); > > + > > + if (orig_data != xdp.data) { > > + offset = xdp.data - xdp.data_hard_start; > > + len = xdp.data_end

  1   2   3   4   >