Re: [PATCH] net-next: treewide use is_vlan_dev() helper function.

2017-02-03 Thread Joe Perches
On Fri, 2017-02-03 at 22:26 -0600, Parav Pandit wrote: > This patch makes use of is_vlan_dev() function instead of flag > comparison which is exactly done by is_vlan_dev() helper function. Thanks. btw: after applying this patch, there is one left $ git grep -E -n "&\s*IFF_802_1Q_VLAN\b" --

[PATCH] net-next: treewide use is_vlan_dev() helper function.

2017-02-03 Thread Parav Pandit
This patch makes use of is_vlan_dev() function instead of flag comparison which is exactly done by is_vlan_dev() helper function. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens --- drivers/infiniband/core/cma.c| 6

[PATCH v3 net] bpf: add bpf_sk_netns_id() helper

2017-02-03 Thread Alexei Starovoitov
in cases where bpf programs are looking at sockets and packets that belong to different netns, it could be useful to get an id that uniquely identify a netns within the whole system. Therefore introduce 'u64 bpf_sk_netns_id(sk);' helper. It returns unique value that identifies netns of given

Re: Understanding mutual exclusion between rtnl_lock and rcu_read_lock

2017-02-03 Thread Joel Cunningham
> On Feb 3, 2017, at 3:40 PM, Cong Wang wrote: > > On Thu, Feb 2, 2017 at 6:05 PM, Joel Cunningham > wrote: >> >> In the case of SIOCSIFHWADDR, we get a pointer to the net_device through >> __dev_get_by_name() and then pass it to

Re: [RFC PATCH 1/2] af_packet: direct dma for packet ineterface

2017-02-03 Thread Jason Wang
On 2017年01月28日 05:33, John Fastabend wrote: This adds ndo ops for upper layer objects to request direct DMA from the network interface into memory "slots". The slots must be DMA'able memory given by a page/offset/size vector in a packet_ring_buffer structure. The PF_PACKET socket interface

[net-next v2 08/14] i40evf: remove unused device ID

2017-02-03 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

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

2017-02-03 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

[net-next v2 07/14] i40e: Deprecating unused macro

2017-02-03 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

[net-next v2 03/14] i40e: no need to check is_vsi_in_vlan before calling i40e_del_mac_all_vlan

2017-02-03 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

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

2017-02-03 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

[net-next v2 02/14] i40e: fold the i40e_is_vsi_in_vlan check into i40e_put_mac_in_vlan

2017-02-03 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

[net-next v2 12/14] i40e: remove unused function

2017-02-03 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

[net-next v2 14/14] i40e: add interrupt rate limit verbosity

2017-02-03 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

[net-next v2 13/14] i40e: refactor macro INTRL_USEC_TO_REG

2017-02-03 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

[net-next v2 06/14] i40e: when adding or removing MAC filters, correctly handle VLANs

2017-02-03 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

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

2017-02-03 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

[net-next v2 09/14] i40e: remove unnecessary __packed

2017-02-03 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

[net-next v2 04/14] i40e: rename i40e_put_mac_in_vlan and i40e_del_mac_all_vlan

2017-02-03 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

[net-next v2 11/14] i40e: Remove FPK HyperV VF device ID

2017-02-03 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:

[net-next v2 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2017-02-03

2017-02-03 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

Re: [PATCH net-next 2/6] net: dsa: simplify netdevice events handling

2017-02-03 Thread Florian Fainelli
On 02/03/2017 10:20 AM, Vivien Didelot wrote: > Simplify the code handling the slave netdevice notifier call by > providing a dsa_slave_changeupper helper for NETDEV_CHANGEUPPER, and so > on (only this event is supported at the moment.) > > Return NOTIFY_DONE when we did not care about an

Re: [PATCH 3/3] net: ethernet: bgmac: driver power manangement

2017-02-03 Thread Florian Fainelli
On 02/03/2017 01:39 PM, Jon Mason wrote: > From: Joey Zhong > > Implements suspend/resume, external phy 54810 is assumed > to remain powered up during deep-sleep for wake-on-lane. s/wake-on-lane/Wake-on-LAN, are you positive phy_stop() is not suspending the PHY and issuing

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

2017-02-03 Thread Jakub Kicinski
On Fri, 3 Feb 2017 17:32:16 -0800, Michael Chan wrote: > On Fri, Feb 3, 2017 at 4:33 PM, Jakub Kicinski wrote: > > On Fri, 03 Feb 2017 16:50:54 -0500 (EST), David Miller wrote: > >> We don't set precedence by one driver saying "hey it's better to do > >> things this way, forget

RE: [PATCH net-next 2/2] add one config to select relax order mode in intel NIC's Kconfig

2017-02-03 Thread maowenan
> -Original Message- > From: Alexander Duyck [mailto:alexander.du...@gmail.com] > Sent: Saturday, February 04, 2017 12:43 AM > To: maowenan > Cc: Netdev; Jeff Kirsher > Subject: Re: [PATCH net-next 2/2] add one config to select relax order mode in > intel NIC's Kconfig > > On Fri, Feb

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

2017-02-03 Thread Michael Chan
On Fri, Feb 3, 2017 at 4:33 PM, Jakub Kicinski wrote: > On Fri, 03 Feb 2017 16:50:54 -0500 (EST), David Miller wrote: >> We don't set precedence by one driver saying "hey it's better to do >> things this way, forget what all the other drivers are doing." Rather >> we have a

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

2017-02-03 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 12:42:31AM +0100, Daniel Borkmann wrote: > On 02/04/2017 12:06 AM, Alexei Starovoitov wrote: > >On Fri, Feb 03, 2017 at 10:56:43PM +0100, Daniel Borkmann wrote: > >>On 01/26/2017 04:27 AM, Alexei Starovoitov wrote: > >>>in cases where bpf programs are looking at sockets and

[PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-03 Thread Alexei Starovoitov
in cases where bpf programs are looking at sockets and packets that belong to different netns, it could be useful to get an id that uniquely identify a netns within the whole system. Therefore introduce 'u64 bpf_sk_netns_id(sk);' helper. It returns unique value that identifies netns of given

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

2017-02-03 Thread Jakub Kicinski
On Fri, 03 Feb 2017 16:50:54 -0500 (EST), David Miller wrote: > We don't set precedence by one driver saying "hey it's better to do > things this way, forget what all the other drivers are doing." Rather > we have a "discussion" about what the appropriate thing is to do and > convert all the

Re: [PATCH 2/3] net: ethernet: bgmac: unify code of the same family

2017-02-03 Thread Rafał Miłecki
On 2017-02-03 22:39, Jon Mason wrote: BCM471X and BCM535X are of the same family (from what I can derive from internal documents). Group them into the case statement together, which results in more code reuse. Also, use existing helper variables to make the code a little more readable too.

Re: [PATCH v2 2/2] net: ethernet: bgmac: mac address change bug

2017-02-03 Thread Rafał Miłecki
On 02/03/2017 10:08 PM, Jon Mason wrote: From: Hari Vyas ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to bgmac_set_mac_address() but code assumed u8 *. This caused two bytes chopping and the wrong mac address was configured. Signed-off-by: Hari Vyas

Fw: [Bug 193911] New: net_prio.ifpriomap is not aware of the network namespace, and discloses all network interface

2017-02-03 Thread Stephen Hemminger
Begin forwarded message: Date: Fri, 03 Feb 2017 21:14:28 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 193911] New: net_prio.ifpriomap is not aware of the network namespace, and discloses all network interface

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

2017-02-03 Thread Daniel Borkmann
On 02/04/2017 12:06 AM, Alexei Starovoitov wrote: On Fri, Feb 03, 2017 at 10:56:43PM +0100, Daniel Borkmann wrote: On 01/26/2017 04:27 AM, Alexei Starovoitov wrote: in cases where bpf programs are looking at sockets and packets that belong to different netns, it could be useful to read netns

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread William Tu
Thanks. I got it. I will resubmit v3 patch! On Fri, Feb 3, 2017 at 2:53 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 11:29:19PM +0100, Daniel Borkmann wrote: >> On 02/03/2017 10:10 PM, William Tu wrote: >> >Hi Alexei, >> > >> >why it is bogus? on my

Re: [PATCH net 2/2] macvtap: read vnet_hdr_size once

2017-02-03 Thread Eric Dumazet
On Fri, 2017-02-03 at 18:20 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > When IFF_VNET_HDR is enabled, a virtio_net header must precede data. > Data length is verified to be greater than or equal to expected header > length tun->vnet_hdr_sz before copying. > >

Re: [PATCH net 1/2] tun: read vnet_hdr_sz once

2017-02-03 Thread Eric Dumazet
On Fri, 2017-02-03 at 18:20 -0500, Willem de Bruijn wrote: > From: Willem de Bruijn > > When IFF_VNET_HDR is enabled, a virtio_net header must precede data. > Data length is verified to be greater than or equal to expected header > length tun->vnet_hdr_sz before copying. > >

Re: [PATCH net] netlabel: out of bound access in cipso_v4_validate()

2017-02-03 Thread Paul Moore
On Fri, Feb 3, 2017 at 3:03 AM, Eric Dumazet wrote: > From: Eric Dumazet > > syzkaller found another out of bound access in ip_options_compile(), > or more exactly in cipso_v4_validate() > > Fixes: 20e2a8648596 ("cipso: handle CIPSO options correctly

Re: Potential issues (security and otherwise) with the current cgroup-bpf API

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 01:07:39PM -0800, Andy Lutomirski wrote: > > Is there any plan to address this? If not, I'll try to write that > patch this weekend. yes. I'm working on 'disallow program override' flag. It got stalled, because netns discussion got stalled. Later today will send a patch

[PATCH net 0/2] read vnet_hdr_sz once

2017-02-03 Thread Willem de Bruijn
From: Willem de Bruijn Tuntap devices allow concurrent use and update of field vnet_hdr_sz. Read the field once to avoid TOCTOU. Willem de Bruijn (2): tun: read vnet_hdr_sz once macvtap: read vnet_hdr_size once drivers/net/macvtap.c | 4 ++-- drivers/net/tun.c |

[PATCH net 1/2] tun: read vnet_hdr_sz once

2017-02-03 Thread Willem de Bruijn
From: Willem de Bruijn When IFF_VNET_HDR is enabled, a virtio_net header must precede data. Data length is verified to be greater than or equal to expected header length tun->vnet_hdr_sz before copying. Read this value once and cache locally, as it can be updated between the

[PATCH net 2/2] macvtap: read vnet_hdr_size once

2017-02-03 Thread Willem de Bruijn
From: Willem de Bruijn When IFF_VNET_HDR is enabled, a virtio_net header must precede data. Data length is verified to be greater than or equal to expected header length tun->vnet_hdr_sz before copying. Macvtap functions read the value once, but unless READ_ONCE is used, the

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

2017-02-03 Thread Jeff Kirsher
On Fri, 2017-02-03 at 16:28 -0500, David Miller wrote: > Pretty sloppy submission Jeff. > > First of all, things are getting backlogged way too much.  19 patches > is too large, you need to keep it closer down to 10 and the very very > low teens.  You need to send me pull requests more often so

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

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 01:00:47PM -0800, Andy Lutomirski wrote: > > ISTM any ability to migrate namespaces and to migrate eBPF programs > that know about namespaces needs to have the eBPF program firmly > rooted in some namespace (or perhaps cgroup in this case) so that it programs are already

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

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 10:56:43PM +0100, Daniel Borkmann wrote: > On 01/26/2017 04:27 AM, Alexei Starovoitov wrote: > >in cases where bpf programs are looking at sockets and packets > >that belong to different netns, it could be useful to read netns inode, > >so that programs can make intelligent

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

2017-02-03 Thread Eric Dumazet
On Fri, 2017-02-03 at 17:28 -0500, David Miller wrote: > Actually, one more driver needs converting, "enic". > > I did a quick and dirty conversion: > > > From 7a655c6324a8968ea2f027bf3660c87c42ac3de4 Mon Sep 17 00:00:00 2001 > From: "David S. Miller"

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

2017-02-03 Thread Eric Dumazet
On Fri, 2017-02-03 at 17:18 -0500, David Miller wrote: > From: Eric Dumazet > Date: Thu, 02 Feb 2017 18:43:28 -0800 > > > From: Eric Dumazet > > > > We added generic support for busy polling in NAPI layer in linux-4.5 > > > > No network driver uses

[PATCH net] tcp: avoid infinite loop in tcp_splice_read()

2017-02-03 Thread Eric Dumazet
From: Eric Dumazet Splicing from TCP socket is vulnerable when a packet with URG flag is received and stored into receive queue. __tcp_splice_read() returns 0, and sk_wait_data() immediately returns since there is the problematic skb in queue. This is a nice way to burn

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Alexei Starovoitov
On Fri, Feb 03, 2017 at 11:29:19PM +0100, Daniel Borkmann wrote: > On 02/03/2017 10:10 PM, William Tu wrote: > >Hi Alexei, > > > >why it is bogus? on my system, it fails without the patch applied. > > > >--William > > > >On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov >

Re: [PATCH v2 1/2] net: ethernet: bgmac: init sequence bug

2017-02-03 Thread Jon Mason
On Fri, Feb 3, 2017 at 4:41 PM, Rafał Miłecki wrote: > On 02/03/2017 10:08 PM, Jon Mason wrote: >> >> @@ -61,15 +60,20 @@ static bool platform_bgmac_clk_enabled(struct bgmac >> *bgmac) >> >> static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags) >> { >> -

Re: [PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Fri, 03 Feb 2017 14:29:42 -0800 > From: Eric Dumazet > > My recent change missed fact that UFO would perform a complete > UDP checksum before segmenting in frags. > > In this case skb->ip_summed is set to CHECKSUM_NONE. >

Re: [PATCH 2/3] net: ethernet: bgmac: unify code of the same family

2017-02-03 Thread Jon Mason
On Fri, Feb 3, 2017 at 4:48 PM, Rafał Miłecki wrote: > On 2017-02-03 22:39, Jon Mason wrote: >> >> BCM471X and BCM535X are of the same family (from what I can derive from >> internal documents). Group them into the case statement together, which >> results in more code reuse.

[PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx

2017-02-03 Thread Eric Dumazet
From: Eric Dumazet My recent change missed fact that UFO would perform a complete UDP checksum before segmenting in frags. In this case skb->ip_summed is set to CHECKSUM_NONE. We need to add this valid case to skb_needs_check() Fixes: b2504a5dbef3 ("net: reduce

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread Daniel Borkmann
On 02/03/2017 10:10 PM, William Tu wrote: Hi Alexei, why it is bogus? on my system, it fails without the patch applied. --William On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov wrote: On Fri, Feb 03, 2017 at 09:22:45AM -0800, William Tu wrote: The patch

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

2017-02-03 Thread David Miller
From: Tom Herbert Date: Fri, 3 Feb 2017 14:25:00 -0800 > On Fri, Feb 3, 2017 at 2:02 PM, David Miller wrote: >> From: Tom Herbert >> Date: Fri, 3 Feb 2017 13:58:56 -0800 >> >>> On Fri, Feb 3, 2017 at 1:50 PM, David Miller

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

2017-02-03 Thread David Miller
From: David Miller Date: Fri, 03 Feb 2017 17:18:20 -0500 (EST) > From: Eric Dumazet > Date: Thu, 02 Feb 2017 18:43:28 -0800 > >> From: Eric Dumazet >> >> We added generic support for busy polling in NAPI layer in linux-4.5 >>

Re: [RFC PATCH net-next 1/2] bpf: Save original ebpf instructions

2017-02-03 Thread David Ahern
On 2/3/17 2:09 PM, Daniel Borkmann wrote: > On 02/03/2017 09:38 PM, David Ahern wrote: >> Similar to classic bpf, support saving original ebpf instructions >> >> Signed-off-by: David Ahern > > Not convinced that this is in the right direction, this not only >

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

2017-02-03 Thread Nikolay Aleksandrov
On 03/02/17 23:24, Stephen Hemminger wrote: > On Fri, 3 Feb 2017 19:34:19 +0100 > Nikolay Aleksandrov wrote: > >> On 03/02/17 19:28, Stephen Hemminger wrote: >>> On Fri, 3 Feb 2017 09:30:37 +0100 >>> Nikolay Aleksandrov wrote: >>>

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

2017-02-03 Thread Tom Herbert
On Fri, Feb 3, 2017 at 2:02 PM, David Miller wrote: > From: Tom Herbert > Date: Fri, 3 Feb 2017 13:58:56 -0800 > >> On Fri, Feb 3, 2017 at 1:50 PM, David Miller wrote: >>> From: Michael Chan >>> Date:

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

2017-02-03 Thread Stephen Hemminger
On Fri, 3 Feb 2017 19:34:19 +0100 Nikolay Aleksandrov wrote: > On 03/02/17 19:28, Stephen Hemminger wrote: > > On Fri, 3 Feb 2017 09:30:37 +0100 > > Nikolay Aleksandrov wrote: > > > >> On 03/02/17 03:47, David Miller wrote: > >>>

Re: [PATCH v2 1/2] net: ethernet: bgmac: init sequence bug

2017-02-03 Thread Rafał Miłecki
On 02/03/2017 10:08 PM, Jon Mason wrote: @@ -61,15 +60,20 @@ static bool platform_bgmac_clk_enabled(struct bgmac *bgmac) static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags) { - bgmac_idm_write(bgmac, BCMA_IOCTL, - (BCMA_IOCTL_CLK | BCMA_IOCTL_FGC

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

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 16:59:18 -0800 > 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

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

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 18:43:28 -0800 > 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

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

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 16:26:39 -0800 > 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

Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable

2017-02-03 Thread Eric Dumazet
On Fri, 2017-02-03 at 13:20 -0800, Shannon Nelson wrote: > On 2/3/2017 9:56 AM, Eric Dumazet wrote: > > On Fri, 2017-02-03 at 09:42 -0800, Shannon Nelson wrote: > >> In order to allow the underlying LDC and outstanding memory operations > >> to potentially catch up with the driver's Tx requests,

Re: [PATCH 00/27] Netfilter updates for net-next

2017-02-03 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 3 Feb 2017 13:25:11 +0100 > The following patchset contains Netfilter updates for your net-next > tree, they are: ... > You can pull these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git Pulled,

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

2017-02-03 Thread David Miller
From: Tom Herbert Date: Fri, 3 Feb 2017 13:58:56 -0800 > On Fri, Feb 3, 2017 at 1:50 PM, David Miller wrote: >> From: Michael Chan >> Date: Fri, 3 Feb 2017 13:13:47 -0800 >> >>> On Fri, Feb 3, 2017 at 12:49 PM, David Miller

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

2017-02-03 Thread Tom Herbert
On Fri, Feb 3, 2017 at 1:50 PM, David Miller wrote: > From: Michael Chan > Date: Fri, 3 Feb 2017 13:13:47 -0800 > >> On Fri, Feb 3, 2017 at 12:49 PM, David Miller wrote: >>> >>> Please _DO NOT_ guard XDP support with an ifdef

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

2017-02-03 Thread Daniel Borkmann
On 01/26/2017 04:27 AM, Alexei Starovoitov wrote: in cases where bpf programs are looking at sockets and packets that belong to different netns, it could be useful to read netns inode, so that programs can make intelligent decisions. For example to disallow raw sockets in all non-init netns the

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

2017-02-03 Thread David Miller
From: Jiri Pirko Date: Fri, 3 Feb 2017 10:28:50 +0100 > This patchset introduces support for offloading TC cls_flower and actions > to Spectrum TCAM-base policy engine. > > The patchset contains patches to allow work with flexible keys and actions > which are used in Spectrum

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-03 Thread Ard Biesheuvel
On 3 February 2017 at 21:47, Malinen, Jouni wrote: > On Fri, Feb 03, 2017 at 07:25:53PM +, Ard Biesheuvel wrote: >> The mac80211 aes_cmac code reimplements the CMAC algorithm based on the >> core AES cipher, which is rather restrictive in how platforms can satisfy >>

Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable

2017-02-03 Thread David Miller
From: Shannon Nelson Date: Fri, 3 Feb 2017 13:20:43 -0800 > On 2/3/2017 9:56 AM, Eric Dumazet wrote: >> On Fri, 2017-02-03 at 09:42 -0800, Shannon Nelson wrote: >>> In order to allow the underlying LDC and outstanding memory operations >>> to potentially catch up with

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

2017-02-03 Thread David Miller
From: Michael Chan Date: Fri, 3 Feb 2017 13:13:47 -0800 > On Fri, Feb 3, 2017 at 12:49 PM, David Miller wrote: >> >> Please _DO NOT_ guard XDP support with an ifdef the user >> can modify. >> >> Treat it like any other common netdev feature a

Re: [PATCH v2 2/2] net: ethernet: bgmac: mac address change bug

2017-02-03 Thread Florian Fainelli
On 02/03/2017 01:44 PM, Rafał Miłecki wrote: > On 02/03/2017 10:08 PM, Jon Mason wrote: >> From: Hari Vyas >> >> ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to >> bgmac_set_mac_address() but code assumed u8 *. This caused two bytes >> chopping and the

Re: [RFC PATCH 0/2] mac80211: use crypto shash for AES cmac

2017-02-03 Thread Malinen, Jouni
On Fri, Feb 03, 2017 at 07:25:53PM +, Ard Biesheuvel wrote: > The mac80211 aes_cmac code reimplements the CMAC algorithm based on the > core AES cipher, which is rather restrictive in how platforms can satisfy > the dependency on this algorithm. For instance, SIMD implementations may > have a

[PULL] vhost: cleanups and fixes

2017-02-03 Thread Michael S. Tsirkin
The following changes since commit 566cf877a1fcb6d6dc0126b076aad062054c2637: Linux 4.10-rc6 (2017-01-29 14:25:17 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to

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

2017-02-03 Thread Alexander Duyck
On Thu, Feb 2, 2017 at 4:26 PM, Eric Dumazet wrote: > 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,

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

2017-02-03 Thread Alexander Duyck
On Thu, Feb 2, 2017 at 4:59 PM, Eric Dumazet wrote: > 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,

[PATCH net-next 0/3] net: ethernet: bgmac: PM support and clean-ups

2017-02-03 Thread Jon Mason
Add code to support Power Management (only tested on NS2), and add some code clean-ups Joey Zhong (1): net: ethernet: bgmac: driver power manangement Jon Mason (2): net: ethernet: bgmac: use #defines for MAX size net: ethernet: bgmac: unify code of the same family

Re: Understanding mutual exclusion between rtnl_lock and rcu_read_lock

2017-02-03 Thread Cong Wang
On Thu, Feb 2, 2017 at 6:05 PM, Joel Cunningham wrote: > > In the case of SIOCSIFHWADDR, we get a pointer to the net_device through > __dev_get_by_name() and then pass it to dev_set_mac_address() to modify > through ndo_set_mac_address(). I didn’t see any uses of RCU

[PATCH 2/3] net: ethernet: bgmac: unify code of the same family

2017-02-03 Thread Jon Mason
BCM471X and BCM535X are of the same family (from what I can derive from internal documents). Group them into the case statement together, which results in more code reuse. Also, use existing helper variables to make the code a little more readable too. Signed-off-by: Jon Mason

[PATCH 1/3] net: ethernet: bgmac: use #defines for MAX size

2017-02-03 Thread Jon Mason
The maximum frame size is really just the standard ethernet frame size and FCS. So use those existing defines to make the code a little more beautiful. Signed-off-by: Jon Mason --- drivers/net/ethernet/broadcom/bgmac.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/3] net: ethernet: bgmac: driver power manangement

2017-02-03 Thread Jon Mason
From: Joey Zhong Implements suspend/resume, external phy 54810 is assumed to remain powered up during deep-sleep for wake-on-lane. Signed-off-by: Joey Zhong Signed-off-by: Jon Mason ---

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

2017-02-03 Thread David Miller
Pretty sloppy submission Jeff. First of all, things are getting backlogged way too much. 19 patches is too large, you need to keep it closer down to 10 and the very very low teens. You need to send me pull requests more often so that this does not happen. Second of all, all of your Subjects

[PATCH net-next][v2] bpf: test for AND edge cases

2017-02-03 Thread Josef Bacik
These two tests are based on the work done for f23cc643f9ba. The first test is just a basic one to make sure we don't allow AND'ing negative values, even if it would result in a valid index for the array. The second is a cleaned up version of the original testcase provided by Jann Horn that

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

2017-02-03 Thread David Miller
From: Zhu Yanjun Date: Thu, 2 Feb 2017 23:46:21 -0500 > 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.

Re: [PATCH net-next 5/8] net: ethernet: annapurna: add statistics helper

2017-02-03 Thread kbuild test robot
Hi Antoine, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Antoine-Tenart/ARM-Alpine-Ethernet-support/20170204-022156 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

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

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 20:40:08 -0800 > 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

Re: [PATCH net-next] bpf: test for AND edge cases

2017-02-03 Thread Josef Bacik
On Fri, 2017-02-03 at 16:03 -0500, David Miller wrote: > From: Josef Bacik > Date: Thu, 2 Feb 2017 12:00:38 -0500 > > > > > These two tests are based on the work done for f23cc643f9ba.  The > > first test is > > just a basic one to make sure we don't allow AND'ing negative > >

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

2017-02-03 Thread David Miller
Intel folks please review these two patches, as I need to apply them in order to add Eric's final patch which removes the busy polling NDO op altogether. http://patchwork.ozlabs.org/patch/723356/ Thank you.

Re: [PATCH] r8152: Allocate interrupt buffer as part of struct r8152

2017-02-03 Thread Guenter Roeck
On Tue, Jan 31, 2017 at 02:53:47PM -0500, Alan Stern wrote: > On Tue, 31 Jan 2017, Guenter Roeck wrote: > > > When unloading the r8152 driver using the 'unbind' sysfs attribute > > in a system with KASAN enabled, the following error message is seen > > on a regular basis. > > ... > > > The

Re: [PATCH net-next 9/9] ldmvsw: disable tso and gso for bridge operations

2017-02-03 Thread Shannon Nelson
On 2/3/2017 9:59 AM, Eric Dumazet wrote: On Fri, 2017-02-03 at 09:42 -0800, Shannon Nelson wrote: The ldmvsw driver is specifically for supporting the ldom virtual networking by running in the primary ldom and using the LDC to connect the remaining ldoms to the outside world via a bridge. With

[RFC] igmp: address pmc kmemleak from on igmpv3_del_delrec()

2017-02-03 Thread Luis R. Rodriguez
When we igmpv3_add_delrec() we kzalloc the pmc, but when users calligmpv3_del_delrec() we never free the pmc. This was caught by the following kmemleak splat: unreferenced object 0x99666ff43b40 (size 192): comm "systemd-resolve", pid 1258, jiffies 4309905600 (age 2138.352s) hex dump

Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable

2017-02-03 Thread Shannon Nelson
On 2/3/2017 9:56 AM, Eric Dumazet wrote: On Fri, 2017-02-03 at 09:42 -0800, Shannon Nelson wrote: In order to allow the underlying LDC and outstanding memory operations to potentially catch up with the driver's Tx requests, add a memory barrier before checking again for available tx

Re: [PATCH net-next] cxgb4: get rid of custom busy poll code

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 11:44:27 -0800 > 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 of

Re: [PATCH net-next] myri10ge: get rid of custom busy poll code

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 10:50:48 -0800 > From: Eric Dumazet > > Compared to custom busy_poll, the generic NAPI one is simpler and > removes a lot of code. It removes one atomic in the fast path (when > busy poll is not in action)

Re: [PATCH net] net: use a work queue to defer net_disable_timestamp() work

2017-02-03 Thread David Miller
From: Eric Dumazet Date: Thu, 02 Feb 2017 10:31:35 -0800 > From: Eric Dumazet > > Dmitry reported a warning [1] showing that we were calling > net_disable_timestamp() -> static_key_slow_dec() from a non > process context. > > Grabbing a mutex

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

2017-02-03 Thread Michael Chan
On Fri, Feb 3, 2017 at 12:49 PM, David Miller wrote: > > Please _DO NOT_ guard XDP support with an ifdef the user > can modify. > > Treat it like any other common netdev feature a driver might > support such as checksum offloading or GRO. > David, I want to make sure I

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

2017-02-03 Thread Eric W. Biederman
Andy Lutomirski writes: > On Thu, Feb 2, 2017 at 8:33 PM, Eric W. Biederman > wrote: >> Alexei Starovoitov writes: >> >>> On 1/26/17 11:07 AM, Andy Lutomirski wrote: On Thu, Jan 26, 2017 at 10:32 AM, Alexei Starovoitov

Re: [PATCH v2 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-03 Thread William Tu
Hi Alexei, why it is bogus? on my system, it fails without the patch applied. --William On Fri, Feb 3, 2017 at 12:55 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 09:22:45AM -0800, William Tu wrote: >> The patch fixes the case when adding a zero value to

Re: [RFC PATCH net-next 1/2] bpf: Save original ebpf instructions

2017-02-03 Thread Daniel Borkmann
On 02/03/2017 09:38 PM, David Ahern wrote: Similar to classic bpf, support saving original ebpf instructions Signed-off-by: David Ahern Not convinced that this is in the right direction, this not only *significantly* increases mem footprint for each and every

[PATCH v2 1/2] net: ethernet: bgmac: init sequence bug

2017-02-03 Thread Jon Mason
From: Zac Schroff Fix a bug in the 'bgmac' driver init sequence that blind writes for init sequence where it should preserve most bits other than the ones it is deliberately manipulating. Signed-off-by: Zac Schroff Signed-off-by: Jon Mason

  1   2   3   >