[PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It's somewhat like TCP over VMBus, but the transportation layer (VMBus) is much simpler than IP. With Hyper-V Sockets, applications between the host and the guest can talk to each other d

Re: [PATCH net-next] sock: make lockdep_sock_is_held static inline

2016-04-07 Thread David Miller
From: Hannes Frederic Sowa Date: Thu, 7 Apr 2016 23:53:35 +0200 > I forgot to add inline to lockdep_sock_is_held, so it generated all > kinds of build warnings if not build with lockdep support. > > Reported-by: kbuild test robot > Signed-off-by: Hannes Frederic Sowa Applied, thanks.

Re: [PATCH net-next v2] sock: make lockdep_sock_is_held inline and conditional on LOCKDEP

2016-04-07 Thread David Miller
From: Hannes Frederic Sowa Date: Fri, 8 Apr 2016 01:35:18 +0200 > lockdep_is_held is only specified if CONFIG_LOCKDEP is defined, so make > it depending on it. > > Also add the missing inline keyword, so no warnings about unused functions > show up during complilation. > > Cc: Eric Dumazet >

Re: [PATCH V3] net: emac: emac gigabit ethernet controller driver

2016-04-07 Thread Andrew Lunn
On Thu, Apr 07, 2016 at 04:43:47PM -0500, Timur Tabi wrote: > On my platform, firmware (UEFI) configures all of the GPIOs. I need > to get confirmation, but it appears that we don't actually make any > GPIO calls at all. I see code that looks like this: > > for (i = 0; (!adpt->no_mdio_gpio

Re: [PATCH net-next v2] macvlan: Support interface operstate properly

2016-04-07 Thread Banerjee, Debabrata
On 4/7/16, 7:05 AM, "Nikolay Aleksandrov" wrote: >On 04/07/2016 12:36 AM, Debabrata Banerjee wrote: >> Set appropriate macvlan interface status based on lower device and our >> status. Can be up, down, or lowerlayerdown. >What about dormant ? > >That being said I understand the need to switch t

Re: [PATCH v2 net-next 00/10] allow bpf attach to tracepoints

2016-04-07 Thread David Miller
Series applied, thanks Alexei.

[PATCH net-next] macvlan: Set nocarrier when lowerdev admin down

2016-04-07 Thread Debabrata Banerjee
When the lowerdev is set administratively down disable carrier on the macvlan interface. This means operstate gets set properly instead of still being "up". Signed-off-by: Debabrata Banerjee --- drivers/net/macvlan.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/driver

Re: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Joe Perches
On Thu, 2016-04-07 at 18:36 -0700, Dexuan Cui wrote: > Hyper-V Sockets (hv_sock) supplies a byte-stream based communication > mechanism between the host and the guest. It's somewhat like TCP over > VMBus, but the transportation layer (VMBus) is much simpler than IP. [] > diff --git a/include/net/af

Re: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel()

2016-04-07 Thread Julian Calaby
Hi Kalle, On Sat, Jan 2, 2016 at 5:25 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 1 Jan 2016 19:09:32 +0100 > > Replace an explicit initialisation for one local variable at the beginning > by a conditional assignment. > > Signed-off-by: Markus Elfring This looks sane to me

mpls's find_outdev()

2016-04-07 Thread David Miller
While auditing something unrelated, I noticed that this function seems to potentially dev_put() on an error pointer. I guess the problem comes from the fact that there are two methods by which the device pointer is obtained. First, inet{,6}_fib_lookup_dev() which uses error pointers. Second, de

Re: [PATCH V2 1/2] net: socket: return EADDRNOTAVAIL when source address becomes nonlocal

2016-04-07 Thread David Miller
From: Liping Zhang Date: Tue, 5 Apr 2016 22:19:45 +0800 > From: Liping Zhang > > A socket can use bind(directly) or connect(indirectly) to bind to a local > ip address, and later if the network becomes down, that cause the source > address becomes nonlocal, then send() call will fail and retur

RE: [PATCH v8 net-next 1/1] hv_sock: introduce Hyper-V Sockets

2016-04-07 Thread Dexuan Cui
> From: Joe Perches [mailto:j...@perches.com] > Sent: Friday, April 8, 2016 9:15 > On Thu, 2016-04-07 at 18:36 -0700, Dexuan Cui wrote: > > diff --git a/include/net/af_hvsock.h b/include/net/af_hvsock.h > [] > > +#define VMBUS_RINGBUFFER_SIZE_HVSOCK_RECV (5 * PAGE_SIZE) > > +#define VMBUS_RINGBUFFE

Re: [PATCH net] ipv6: Count in extension headers in skb->network_header

2016-04-07 Thread David Miller
From: Jakub Sitnicki Date: Tue, 5 Apr 2016 18:41:08 +0200 > When sending a UDPv6 message longer than MTU, account for the length > of fragmentable IPv6 extension headers in skb->network_header offset. > Same as we do in alloc_new_skb path in __ip6_append_data(). > > This ensures that later on _

Re: mpls's find_outdev()

2016-04-07 Thread roopa
On 4/7/16, 6:41 PM, David Miller wrote: > While auditing something unrelated, I noticed that this function seems > to potentially dev_put() on an error pointer. > > I guess the problem comes from the fact that there are two methods > by which the device pointer is obtained. > > First, inet{,6}_fib_

Re: [PATCH 0/3] crypto: af_alg - add TLS type encryption

2016-04-07 Thread Herbert Xu
On Wed, Apr 06, 2016 at 10:56:12AM -0700, Tadeusz Struk wrote: > > The intend is to enable HW acceleration of the TLS protocol. > The way it will work is that the user space will send a packet of data > via AF_ALG and HW will authenticate and encrypt it in one go. There have been suggestions to i

Re: [PATCH 0/3] crypto: af_alg - add TLS type encryption

2016-04-07 Thread Tom Herbert
On Thu, Apr 7, 2016 at 11:52 PM, Herbert Xu wrote: > On Wed, Apr 06, 2016 at 10:56:12AM -0700, Tadeusz Struk wrote: >> >> The intend is to enable HW acceleration of the TLS protocol. >> The way it will work is that the user space will send a packet of data >> via AF_ALG and HW will authenticate an

[net-next 11/18] ixgbe: Use new methods for PHY access

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Now x550em_a devices will use a new method for PHY access that will get the firmware token for each access. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 67 +-- 1

[net-next 02/18] ixgbe: Change the lan_id and func fields to a u8 to avoid casts

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Since the lan_id and func fields only ever hold small values, make them u8 to avoid casts used to silence warnings. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- drivers/net/ethern

[net-next 06/18] ixgbe/ixgbevf: Add support for bulk free in Tx cleanup & cleanup boolean logic

2016-04-07 Thread Jeff Kirsher
From: Alexander Duyck This patch enables bulk free in Tx cleanup for ixgbevf and cleans up the boolean logic in the polling routines for ixgbe and ixgbevf in the hopes of avoiding any mix-ups similar to what occurred with i40e and i40evf. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers

[net-next 00/18][pull request] 10GbE Intel Wired LAN Driver Updates 2016-04-07

2016-04-07 Thread Jeff Kirsher
This series contains updates to ixgbe and ixgbevf. This entire series (except for one patch from Alex) comes from Mark and is mainly to add support for our new MAC (x550em_a). So let's get Alex's patch out of the way first before we cover Mark's many changes. Alex does his enable bulk free in tr

[net-next 09/18] ixgbe: Use method pointer to access IOSF devices

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Provide method pointers and use them to access IOSF-attached devices. A new MAC will introduce a new access method. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++ drivers/net/etherne

[net-next 05/18] ixgbe: Take manageability semaphore for firmware commands

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad We need to take the manageability semaphore when issuing firmware commands to avoid problems. With this in place, the semaphore is no longer taken in the ixgbe_set_fw_drv_ver_generic function, since it will now always be taken by the ixgbe_host_interface_command function. Signe

[net-next 04/18] ixgbe: Clean up interface for firmware commands

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Clean up the interface for issuing firmware commands to use a void * instead of a u32 *. This eliminates a number of casts. Also clean up ixgbe_host_interface_command in a few other ways, eliminating comparisons with 0, redundant parens and minor formatting issues. Signed-off-b

[net-next 14/18] ixgbe: Introduce function to control MDIO speed

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Move code that controls MDIO speed into a new function because there will be more MACs that need the control. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 27 +--

[net-next 15/18] ixgbe: Add support for SFPs with retimer

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add support for SFPs with an external retimer. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 6 +- drivers/net/ethernet/intel/ixgbe

[net-next 18/18] ixgbe: Bump version number

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Update ixgbe version number. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

[net-next 01/18] ixgbe: Delete some unused register definitions

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad I noticed the SRAMREL registers are not referenced for any device, so delete the definitions. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 8 1 file changed, 8 deletions(-) diff

[net-next 07/18] ixgbe: Add support for single-port X550 device

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add support for a single-port X550 device. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ drivers/net/ethernet/intel/ixgbe/ixg

[net-next 16/18] ixgbe: Add support for SGMII backplane interface

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add support for an SGMII backplane interface. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 + drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 9 + drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 58 +++

[net-next 08/18] ixgbe: Add definitions for x550em_a 10G MAC

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add definitions for a x550em_a 10G MAC device with a native SFP interface. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 22 ++ 1 file changed, 18 insertions(+), 4 dele

[net-next 17/18] ixgbe: Add KR backplane support for x550em_a

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add support for x550em_a-based KR backplane devices. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 18 ++

[net-next 12/18] ixgbe: Read and set instance id

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Read the instance number from EEPROM and save it for later use. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 8 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 5 + 2 fil

[net-next 10/18] ixgbe: Add support for x550em_a 10G MAC type

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Add support for x550em_a 10G MAC type to the ixgbe driver. The new MAC includes new firmware commands that need to be used to control PHY and IOSF access, so that support is also added. The interface supported is a native SFP+ interface. Signed-off-by: Mark Rustad Tested-by: A

[net-next 13/18] ixgbe: Read and parse NW_MNG_IF_SEL register

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad Read the IXGBE_NW_MNG_IF_SEL register and use it to set interface attributes. Signed-off-by: Mark Rustad Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 5 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 37

[net-next 03/18] ixgbe: Correct length check for round up

2016-04-07 Thread Jeff Kirsher
From: Mark Rustad The function ixgbe_host_interface_command actually uses a multiple of word sized buffer to do its business, but only checks against the actual length passed in. This means that on read operations it could be possible to modify locations beyond the length passed in. Change the ch

[PATCH net] mpls: find_outdev: check for err ptr in addition to NULL check

2016-04-07 Thread Roopa Prabhu
From: Roopa Prabhu find_outdev calls inet{,6}_fib_lookup_dev() or dev_get_by_index() to find the output device. In case of an error, inet{,6}_fib_lookup_dev() returns error pointer and dev_get_by_index() returns NULL. But the function only checks for NULL and thus can end up calling dev_put on an

[RFC PATCH v2 0/5] Add driver bpf hook for early packet drop

2016-04-07 Thread Brenden Blanco
This patch set introduces new infrastructure for programmatically processing packets in the earliest stages of rx, as part of an effort others are calling Express Data Path (XDP) [1]. Start this effort by introducing a new bpf program type for early packet filtering, before even an skb has been all

[RFC PATCH v2 1/5] bpf: add PHYS_DEV prog type for early driver filter

2016-04-07 Thread Brenden Blanco
Add a new bpf prog type that is intended to run in early stages of the packet rx path. Only minimal packet metadata will be available, hence a new context type, struct bpf_phys_dev_md, is exposed to userspace. So far only expose the readable packet length, and only in read mode. The PHYS_DEV name

[RFC PATCH v2 5/5] Add sample for adding simple drop program to link

2016-04-07 Thread Brenden Blanco
Add a sample program that only drops packets at the BPF_PROG_TYPE_PHYS_DEV hook of a link. With the drop-only program, observed single core rate is ~19.5Mpps. Other tests were run, for instance without the dropcnt increment or without reading from the packet header, the packet rate was mostly unch

[RFC PATCH v2 3/5] rtnl: add option for setting link bpf prog

2016-04-07 Thread Brenden Blanco
Sets the bpf program represented by fd as an early filter in the rx path of the netdev. The fd must have been created as BPF_PROG_TYPE_PHYS_DEV. Providing a negative value as fd clears the program. Getting the fd back via rtnl is not possible, therefore reading of this value merely provides a bool

[RFC PATCH v2 4/5] mlx4: add support for fast rx drop bpf program

2016-04-07 Thread Brenden Blanco
Add support for the BPF_PROG_TYPE_PHYS_DEV hook in mlx4 driver. Since bpf programs require a skb context to navigate the packet, build a percpu fake skb with the minimal fields. This avoids the costly allocation for packets that end up being dropped. Since mlx4 is so far the only user of bpf_phys_

[RFC PATCH v2 2/5] net: add ndo to set bpf prog in adapter rx

2016-04-07 Thread Brenden Blanco
Add two new set/get netdev ops for drivers implementing the BPF_PROG_TYPE_PHYS_DEV filter. Signed-off-by: Brenden Blanco --- include/linux/netdevice.h | 13 + net/core/dev.c| 38 ++ 2 files changed, 51 insertions(+) diff --git a/includ

[PATCH net] tuntap: restore default qdisc

2016-04-07 Thread Jason Wang
After commit f84bb1eac027 ("net: fix IFF_NO_QUEUE for drivers using alloc_netdev"), default qdisc was changed to noqueue because tuntap does not set tx_queue_len during .setup(). This patch restores default qdisc by setting tx_queue_len in tun_setup(). Fixes: f84bb1eac027 ("net: fix IFF_NO_QUEUE f

<    1   2   3