Re: [PATCH v3 3/4] VSOCK: Introduce vhost-vsock.ko

2015-12-15 Thread Stefan Hajnoczi
On Fri, Dec 11, 2015 at 01:45:29PM +, Alex Bennée wrote: > > + if (head == vq->num) { > > + if (unlikely(vhost_enable_notify(&vsock->dev, vq))) { > > + vhost_disable_notify(&vsock->dev, vq); > > + continue; > > Why

Re: [PATCH v3 4/4] VSOCK: Add Makefile and Kconfig

2015-12-15 Thread Stefan Hajnoczi
On Fri, Dec 11, 2015 at 05:19:08PM +, Alex Bennée wrote: > > +config VHOST_VSOCK > > + tristate "vhost virtio-vsock driver" > > + depends on VSOCKETS && EVENTFD > > + select VIRTIO_VSOCKETS_COMMON > > + select VHOST > > + select VHOST_RING > > + default n > > + ---help--- > > +

Re: [PATCH] net/mlx4_core: fix handling return value of mlx4_slave_convert_port

2015-12-15 Thread Or Gerlitz
On 12/14/2015 12:05 PM, Andrzej Hajda wrote: The function can return negative values, so its result should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gm

[patch] mISDN: fix a loop count

2015-12-15 Thread Dan Carpenter
There are two issue here. 1) cnt starts as maxloop + 1 so all these loops iterate one more time than intended. 2) At the end of the loop we test for "if (maxloop && !cnt)" but for the first two loops, we end with cnt equal to -1. Changing this to a pre-op means we end with cnt set to

[patch -mainline] amd-xgbe: fix a couple timeout loops

2015-12-15 Thread Dan Carpenter
At the end of the loop we test "if (!count)" but because "count--" is a post-op then the loop will end with count set to -1. I have fixed this by changing it to --count. Fixes: c5aa9e3b8156 ('amd-xgbe: Initial AMD 10GbE platform driver') Signed-off-by: Dan Carpenter diff --git a/drivers/net/eth

RE: [PATCH] gianfar: Don't enable RX Filer if not supported

2015-12-15 Thread Manoil Claudiu
>-Original Message- >From: Hamish Martin [mailto:hamish.mar...@alliedtelesis.co.nz] >Sent: Tuesday, December 15, 2015 3:15 AM >To: Manoil Claudiu-B08782 >Cc: netdev@vger.kernel.org; Hamish Martin > >Subject: [PATCH] gianfar: Don't enable RX Filer if not supported > >After commit 15bf176db1

[patch] qlcnic: fix a timeout loop

2015-12-15 Thread Dan Carpenter
The problem here is that at the end of the loop we test for if idc->vnic_wait_limit is zero, but since idc->vnic_wait_limit-- is a post-op, it actually ends up set to (u8)-1. I have fixed this by changing it to a pre-op. I had to change the starting value from "QLCNIC_DEV_NPAR_OPER_TIMEO" (30) to

RE: [RFCv4 bluetooth-next 1/2] 6lowpan: iphc: add support for stateful compression

2015-12-15 Thread Duda, Lukasz
Hi Alex, > -Original Message- > From: Alexander Aring [mailto:alex.ar...@gmail.com] > Sent: Monday, December 14, 2015 15:01 > To: linux-w...@vger.kernel.org > Cc: linux-blueto...@vger.kernel.org; netdev@vger.kernel.org; > ker...@pengutronix.de; m...@sandelman.ca; Duda, Lukasz; > martin.ger

[PATCH v2 net-next] ravb: Add fixed-link support

2015-12-15 Thread Yoshihiro Kaneko
From: Kazuya Mizuguchi This patch adds support of the fixed PHY. This patch is based on commit 87009814cdbb ("ucc_geth: use the new fixed PHY helpers"). Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's next networki

Re: [PATCH net-next] ravb: Add fixed-link support

2015-12-15 Thread Yoshihiro Kaneko
Hi, 2015-12-14 6:00 GMT+09:00 Sergei Shtylyov : > Hello. > > On 12/13/2015 06:16 PM, Yoshihiro Kaneko wrote: > >> From: Kazuya Mizuguchi >> >> This patch adds support of the fixed PHY. >> This patch is based on commit 87009814cdbb ("ucc_geth: use the new fixed >> PHY helpers"). >> >> Signed-off-b

[patch -mainline] qlge: fix a timeout loop in ql_change_rx_buffers()

2015-12-15 Thread Dan Carpenter
The problem here is that after the loop we test for "if (!i) " but because "i--" is a post-op we exit with i set to -1. I have fixed this by changing it to a pre-op instead. I had to change the starting value from 3 to 4 so that we still iterate 3 times. Signed-off-by: Dan Carpenter diff --git

[patch -mainline] sfc: fix a timeout loop

2015-12-15 Thread Dan Carpenter
We test for if "tries" is zero at the end but "tries--" is a post-op so it will end with "tries" set to -1. I have changed it to a pre-op instead. Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/sfc/txc43128_phy.c b/drivers/net/ethernet/sfc/txc43128_phy.c index 3d5ee32..194f67d

Re: [RFCv4 bluetooth-next 1/2] 6lowpan: iphc: add support for stateful compression

2015-12-15 Thread Alexander Aring
On Tue, Dec 15, 2015 at 10:29:51AM +, Duda, Lukasz wrote: > First of all great work for your series of patches on 6lowpan improvements and > stateful compression! > > I have just done some testing of this patch (without RADVD modifications), and > I can share my experiments using 6LoWPAN over

[PATCH iproute2] lwtunnel: fix argument parsing

2015-12-15 Thread Paolo Abeni
Currently parse_encap_ip() does not update correctly argv/argc; if multiple lwtunnel arguments are provided, the parsing fails after the first one, i.e. ip route add 172.16.101.0/24 dev vxlan1 encap ip id 42 dst 192.168.255.1 fails with: Error: either "to" is duplicate, or "dst" is a garbage.

[PATCH 6/6] bpf: hash: reorganize 'struct htab_elem'

2015-12-15 Thread Ming Lei
Lifetime for hash fields and liftime for kfree_rcu fields can't be overlapped, so re-organizing them for better readabilty. Also one sizeof(void *) should be saved with this change, and cache footprint can got improved too. Signed-off-by: Ming Lei --- kernel/bpf/hashtab.c | 19 -

[PATCH 2/6] hlist: prepare for supporting bit spinlock

2015-12-15 Thread Ming Lei
hlist_head is often used for implementing bucket header of hash table, and one lock is often needed for adding/deleting node in the bucket list. It can consume lots of memory if per-bucket spinlock is used, so this patch trys to use the 1st bit of hlist_head->first as bit lock for this purpose. bi

[PATCH 0/6] bpf: hash: optimization

2015-12-15 Thread Ming Lei
Hi, This patchset tries to optimize ebpf hash map, and follows the ideas: 1) Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, so it isn't efficient to use a per-hashtable lock in this two helpers, so this patch converts th

[PATCH 3/6] bpf: hash: move select_bucket() out of htab's spinlock

2015-12-15 Thread Ming Lei
The spinlock is just used for protecting the per-bucket hlist, so it isn't needed for selecting bucket. Signed-off-by: Ming Lei --- kernel/bpf/hashtab.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index 2615388..d857fcb 10

[PATCH 1/6] bpf: hash: use atomic count

2015-12-15 Thread Ming Lei
Preparing for removing global per-hashtable lock, so the counter need to be defined as aotmic_t first. Signed-off-by: Ming Lei --- kernel/bpf/hashtab.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c index 34777b3..2615

[PATCH 5/6] bpf: hash: avoid to call kmalloc() in eBPF prog

2015-12-15 Thread Ming Lei
kmalloc() is often a bit time-consuming, also one atomic counter has to be used to track the total allocated elements, which is also not good. This patch pre-allocates element pool in htab_map_alloc(), then use percpu_ida to allocate one slot from the pool, then the runtime allocation/freeing cost

[PATCH 4/6] bpf: hash: convert per-hashtable lock into per-bucket bit spinlock

2015-12-15 Thread Ming Lei
Both htab_map_update_elem() and htab_map_delete_elem() can be called from eBPF program, and they may be in kernel hot path, so it isn't efficient to use a per-hashtable lock in this two helpers. The per-hashtable spinlock is used just for protecting bucket's hlist, and per-bucket lock should be en

[PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name

2015-12-15 Thread Alexander Aring
This patches moves the debugfs interface related register after netdevice register. The function lowpan_dev_debugfs_init will use "dev->name" which can be before register_netdevice a format string. The function register_netdevice will evaluate the format string if necessary and replace "dev->name"

Re: [PATCH] sh_eth: fix descriptor access endianness

2015-12-15 Thread Sergei Shtylyov
Hello. On 12/15/2015 8:25 AM, David Miller wrote: The driver never calls cpu_to_edmac() when writing the descriptor address and edmac_to_cpu() when reading it, although it should -- fix this. Note that the frame/buffer length descriptor field accesses also need fixing but since they are both

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-15 Thread Oliver Neukum
On Tue, 2015-12-08 at 15:33 +0100, Peter Wu wrote: > Can you have a look? I guess that reset_resume needs different > treatment, but don't know how to do it properly as suspend is not > called > before system reset (because the device is apparently already in > suspended state). > > I think that t

Re: [PATCH net] ravb: Add disable 10base

2015-12-15 Thread Sergei Shtylyov
Hello. On 12/14/2015 9:49 PM, Florian Fainelli wrote: From: Kazuya Mizuguchi Ethernet AVB does not support 10 Mbps transfer speed. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko --- This patch is based on the master branch of David Miller's networking tree. drivers/ne

RE: [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name

2015-12-15 Thread Duda, Lukasz
Hi Alex, > -Original Message- > From: Alexander Aring [mailto:alex.ar...@gmail.com] > Sent: Tuesday, December 15, 2015 12:26 > To: linux-w...@vger.kernel.org > Cc: linux-blueto...@vger.kernel.org; netdev@vger.kernel.org; > ker...@pengutronix.de; Duda, Lukasz; Alexander Aring > Subject: [PA

RE: [v9, 6/6] fsl/fman: Add FMan MAC driver

2015-12-15 Thread Liberman Igal
Hello Andy, Thank you for your feedback. Some inline answers. Regards, Igal Liberman > -Original Message- > From: Andy Fleming [mailto:aflem...@gmail.com] > Sent: Tuesday, December 08, 2015 10:18 PM > To: Liberman Igal-B31950 > Cc: netdev@vger.kernel.org; linuxppc-...@lists.ozlabs.org; l

[PATCH/RFC net-next] ravb: Add dma queue interrupt support

2015-12-15 Thread Yoshihiro Kaneko
From: Kazuya Mizuguchi This patch supports the following interrupts. - One interrupt for multiple (descriptor, error, management) - One interrupt for emac - Four interrupts for dma queue (best effort rx/tx, network control rx/tx) Signed-off-by: Kazuya Mizuguchi Signed-off-by: Yoshihiro Kaneko

pull-request: mac80211 2015-12-15

2015-12-15 Thread Johannes Berg
Hi Dave, After going through my patch queue, I have another set of fixes that I think is still appropriate for the current cycle. Two of my own restart changes there are fairly big but for the most part just move code around so it can be called in a slightly different order. Let me know if there

Load Balancing for AF_INET Raw Sockets

2015-12-15 Thread Prashant Upadhyaya
Hi, I open a raw socket for listening to all the UDP packets in a raw fashion -- socket(AF_INET, SOCK_RAW, IPPROTO_UDP); Then I use recvfrom to read the packets over the socket. The above works mighty fine. I want to find out if it is possible to 'load balance' the UDP flows by opening up multi

[PATCH net-next] net: Pass ndm_state to route netlink FDB notifications.

2015-12-15 Thread Sokolowski, Hubert
Before this change applications monitoring FDB notifications were not able to determine whether a new FDB entry is permament or not: bridge fdb add f1:f2:f3:f4:f5:f8 dev sw0p1 temp self bridge fdb add f1:f2:f3:f4:f5:f9 dev sw0p1 self bridge monitor fdb f1:f2:f3:f4:f5:f8 dev sw0p1 self permanent f

[patch v2] qlcnic: fix a timeout loop

2015-12-15 Thread Dan Carpenter
The problem here is that at the end of the loop we test for if idc->vnic_wait_limit is zero, but since idc->vnic_wait_limit-- is a post-op, it actually ends up set to (u8)-1. I have fixed this by moving the decrement inside the loop. Fixes: 486a5bc77a4a ('qlcnic: Add support for 83xx suspend and

RE: [patch] qlcnic: fix a timeout loop

2015-12-15 Thread Manish Chopra
> -Original Message- > From: dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com > [mailto:dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com] On Behalf > Of Dan Carpenter > Sent: Tuesday, December 15, 2015 3:46 PM > To: Dept-GE Linux NIC Dev ; Rajesh > Borundia > Cc: netdev ; ker

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

2015-12-15 Thread Christopher Covington
Hi Florian, Thanks for taking the time to review this code. We'll probably take additional time to review and implement most of your suggestions but I was confused by your two comments below. On 12/14/2015 08:39 PM, Florian Fainelli wrote: > On 14/12/15 16:19, Gilad Avidov wrote: >> +static void

Re: Load Balancing for AF_INET Raw Sockets

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 18:26 +0530, Prashant Upadhyaya wrote: > Hi, > > I open a raw socket for listening to all the UDP packets in a raw fashion -- > > socket(AF_INET, SOCK_RAW, IPPROTO_UDP); > > Then I use recvfrom to read the packets over the socket. > > The above works mighty fine. > I want

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

2015-12-15 Thread Arnd Bergmann
On Tuesday 15 December 2015 09:30:16 Christopher Covington wrote: > > On 12/14/2015 08:39 PM, Florian Fainelli wrote: > > On 14/12/15 16:19, Gilad Avidov wrote: > > >> +static void emac_mac_irq_enable(struct emac_adapter *adpt) > >> +{ > >> +int i; > >> + > >> +for (i = 0; i < EMAC_NUM_CO

Re: [PATCH net] skbuff: Fix offset error in skb_reorder_vlan_header

2015-12-15 Thread Nicolas Dichtel
Le 14/12/2015 23:44, Vladislav Yasevich a écrit : skb_reorder_vlan_header is called after the vlan header has been pulled. As a result the offset of the begining of the mac header has been incrased by 4 bytes (VLAN_HLEN). When moving the mac addresses, include this incrase in the offset calcuala

[patch net-next 10/14] mlxsw: spectrum: Handle VLAN devices linking / unlinking

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel When a VLAN interface is configured on top of a physical port we should associate the VLAN device with the matching vPort. Likewise, when it's removed, we should revert back to the underlying port netdev. While not a must, this is consistent with port netdevs and also provides

[patch net-next 13/14] mlxsw: spectrum: Enable FDB records for VLAN devices on top of LAG

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel When adding or removing FDB records of VLAN devices on top of LAG we should set the lag_vid parameter to the VLAN ID of the VLAN device. It is reserved otherwise. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c|

[patch net-next 09/14] mlxsw: spectrum: Adjust FDB notifications for VLAN devices

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel FDB notifications contain the FID and port (or LAG ID) on which the MAC was learned. In the case of the 802.1Q bridge one can easily derive the matching VID - as FID equals VID - and generate the appropriate notification for the software bridge. With VLAN devices this is no lon

[patch net-next 07/14] mlxsw: spectrum: Use FID instead of VID when accessing FDB

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel In the Spectrum ASIC - unlike SwitchX-2 - FDB access is done by specifying FID as parameter and not VID. Change the relevant variables and parameters names to reflect that. Note that this was OK up until now, since FID was always equal to VID, but with the introduction of VLA

[patch net-next 00/14] mlxws: update driver to support offload of bridged vlan devices

2015-12-15 Thread Jiri Pirko
From: Jiri Pirko Ido Schimmel says: This patchset introduces support for the offloading of 802.1D bridges between VLAN devices. These can either be VLAN devices configured on top of the physical ports or on top of LAG devices. Patches 1-2 deal with the necessary inf

[patch net-next 02/14] switchdev: Pass original device to port netdev driver

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel switchdev drivers need to know the netdev on which the switchdev op was invoked. For example, the STP state of a VLAN interface configured on top of a port can change while being member in a bridge. In this case, the underlying driver should only change the STP state of that pa

[patch net-next 01/14] switchdev: vlan: Use switchdev_port* in vlan_netdev_ops

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel We need to be able to propagate static FDB entries and certain bridge port attributes (e.g. learning, flooding) down to the port netdev driver when bridge port is a VLAN interface. Achieve that by setting ndo_bridge* and ndo_fdb* in vlan_netdev_ops to the corresponding switchd

[patch net-next 14/14] mlxsw: spectrum: Add support for VLAN devices on top of LAG

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel When creating a VLAN device on top of LAG, we are basically creating a vPort on top of each of the port netdevs member in the LAG. Therefore, these vPorts should inherit both the LAG status and LAG ID from the underlying port netdevs. In addition, when the VLAN device joins or

[patch net-next 08/14] mlxsw: spectrum: Adjust switchdev ops for VLAN devices

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel switchdev ops can now be called for VLAN devices and we need to be prepared for it. Until now they were only called for the port netdev. Use the newly propagated orig_dev passed as part of the switchdev attr/obj and determine whether the original device is a VLAN device. If so

[patch net-next 06/14] mlxsw: spectrum: Add another flood table for vFIDs

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel We previously used only one flood table for packets classified to vFIDs. However, since we are going to add support for bridges between VLAN interfaces (mapped to vFIDs) we need to add one more flood table. That way we can separate the flooding domain of unknown unicast traffi

[patch net-next 12/14] mlxsw: reg: Add lag_vid field to SFD register

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel Unicast LAG records in the Switch Filtering Database (SFD) register have a lag_vid field indicating the VLAN ID in case of vFIDs. This field is no longer reserved since we are going to add support for VLAN devices on top of LAG. Add the lag_vid field to be used by VLAN devies

[patch net-next 05/14] mlxsw: spectrum: Use appropriate parameter name

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel The __mlxsw_sp_port_flood_set function is now used to configure flooding for both FIDs and vFIDs, so change the parameter name to 'idx' instead of 'fid'. This is also consistent with hardware documentation. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/n

[patch net-next 04/14] mlxsw: spectrum: Split vFID range in two

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel Up until now we used a 1:1 mapping - based on VID - to map a VLAN interface to a vFID. However, a different scheme is needed in order to support bridges between VLAN interfaces, as all the member interfaces - which can have different VIDs - need to share the same vFID. Solve t

[patch net-next 11/14] mlxsw: spectrum: Add support for VLAN devices bridging

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel All the member VLAN devices in a bridge need to share the same vFID. To achieve that, expand the vFID struct to include the associated bridge device (or lack of) and allow one to lookup a vFID based on a bridge device. When joining a bridge, lookup the relevant vFID or create

[patch net-next 03/14] mlxsw: spectrum: Allocate active VLANs only for port netdevs

2015-12-15 Thread Jiri Pirko
From: Ido Schimmel When adding support for bridges between VLAN interfaces, we'll introduce a new entity called a vPort, which is a represntation of the VLAN interface in the hardware. The main difference between a vPort and a physical port is that several FIDs can be bound to the latter, wherea

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

2015-12-15 Thread Timur Tabi
Arnd Bergmann wrote: We generally want to use readl/writel rather than the relaxed versions, unless it is in performance-critical code. What about if we have 20+ writes in a row, for example, when initializing a part? I've seen code like this: writel_relaxed(...); writel_rel

[PATCH net-next] sched/cls_flow.c make nfct-* keys working on ingress with NAT

2015-12-15 Thread Igor Gavrilov
From: Igor Gavrilov Improved CTTUPLE macro with code from sched/act_connmark.c, so it be able to get unNATed addresses from nf_conntrack on ingress interface. Signed-off-by: Igor Gavrilov Acked-by: Jamal Hadi Salim --- cls_flow.patch Description: Binary data

[PATCH iproute2 1/3] vxlan: add support for collect metadata flag

2015-12-15 Thread Paolo Abeni
This patch add support for IFLA_VXLAN_COLLECT_METADATA via the 'collectmetadata' keyword to the vxlan link. Signed-off-by: Paolo Abeni --- ip/iplink_vxlan.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c index db29bf0..a943e

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

2015-12-15 Thread Arnd Bergmann
On Tuesday 15 December 2015 09:17:00 Timur Tabi wrote: > Arnd Bergmann wrote: > > We generally want to use readl/writel rather than the relaxed versions, > > unless it is in performance-critical code. > > What about if we have 20+ writes in a row, for example, when > initializing a part? I've se

[PATCH iproute2 2/3] gre: add support for collect metadata flag

2015-12-15 Thread Paolo Abeni
This patch add support for IFLA_GRE_COLLECT_METADATA via the 'collectmetadata' keyword to the gre link. Signed-off-by: Paolo Abeni --- ip/link_gre.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/ip/link_gre.c b/ip/link_gre.c index 58f416c..8be157f 100644 --- a/ip/link_gre.c ++

[PATCH iproute2 3/3] lwtunnel: implement support for ip6 encap

2015-12-15 Thread Paolo Abeni
Currently ip6 encap support for lwtunnel is missing. This patch implement it, mostly duplicating the ipv4 parts. Also be sure to insert a space after the encap type, when showing lwtunnel, to avoid the tunnel type and the following argument being merged into a single word. Signed-off-by: Paolo Ab

[PATCH iproute2 0/3] improve lwtunnel route support

2015-12-15 Thread Paolo Abeni
This patch series try to improve the current route based lwtunnel support in iproute2, namely adding support for the COLLECT_METADATA flag in vxlan and gre link, and for ip6 encap type in lwtunnel. Tunnel devices need to have the COLLECT_METADATA flag set in order to be used for route based lwtunn

[PATCH net-next] pppoe: optional deactivation of PADT packet handling

2015-12-15 Thread Guillaume Nault
Kernel space shouldn't handle PADT packets since PADT belongs to PPPoE's control plane. With "handle_padt" module option, user space can now decide to avoid kernel interpretation of PADT packets and be responsible for session disconnection. Signed-off-by: Guillaume Nault --- The two open-source P

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Willy Tarreau
Hi Eric, On Wed, Nov 11, 2015 at 05:09:01PM -0800, Eric Dumazet wrote: > On Wed, 2015-11-11 at 10:43 -0800, Eric Dumazet wrote: > > On Wed, 2015-11-11 at 10:23 -0800, Tom Herbert wrote: > > > > > How about doing this in shutdown called for a listener? > > > > Seems a good idea, I will try it, th

Re: [patch] qlcnic: fix a timeout loop

2015-12-15 Thread walter harms
Am 15.12.2015 14:46, schrieb Manish Chopra: >> -Original Message- >> From: dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com >> [mailto:dept_hsg_linux_nic_dev-boun...@qlclistserver.qlogic.com] On Behalf >> Of Dan Carpenter >> Sent: Tuesday, December 15, 2015 3:46 PM >> To: Dept-GE L

Re: [PATCH net-next] pppoe: optional deactivation of PADT packet handling

2015-12-15 Thread Dan Williams
On Tue, 2015-12-15 at 17:06 +0100, Guillaume Nault wrote: > Kernel space shouldn't handle PADT packets since PADT belongs to > PPPoE's control plane. > With "handle_padt" module option, user space can now decide to avoid > kernel interpretation of PADT packets and be responsible for session > disco

Re: [net-next 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2015-12-14

2015-12-15 Thread David Miller
From: Jeff Kirsher Date: Mon, 14 Dec 2015 21:38:35 -0800 > This series contains updates to e1000e and igb. Pulled, thanks Jeff. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [patch net-next 00/14] mlxws: update driver to support offload of bridged vlan devices

2015-12-15 Thread David Miller
From: Jiri Pirko Date: Tue, 15 Dec 2015 16:03:33 +0100 > From: Jiri Pirko > > Ido Schimmel says: > > > This patchset introduces support for the offloading of 802.1D bridges > between VLAN devices. These can either be VLAN devices configured on top > of the physical

Re: [PATCH] net/mlx4_core: fix handling return value of mlx4_slave_convert_port

2015-12-15 Thread David Miller
From: Or Gerlitz Date: Tue, 15 Dec 2015 11:09:40 +0200 > On 12/14/2015 12:05 PM, Andrzej Hajda wrote: >> The function can return negative values, so its result should >> be assigned to signed variable. >> >> The problem has been detected using proposed semantic patch >> scripts/coccinelle/tests/a

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 17:14 +0100, Willy Tarreau wrote: > Hi Eric, > > On Wed, Nov 11, 2015 at 05:09:01PM -0800, Eric Dumazet wrote: > > On Wed, 2015-11-11 at 10:43 -0800, Eric Dumazet wrote: > > > On Wed, 2015-11-11 at 10:23 -0800, Tom Herbert wrote: > > > > > > > How about doing this in shutdow

[PATCH 4/4] ser_gigaset: remove unnecessary kfree() calls from release method

2015-12-15 Thread Paul Bolle
From: Tilman Schmidt device->platform_data and platform_device->resource are never used and remain NULL through their entire life. Drops the kfree() calls for them from the device release method. Signed-off-by: Tilman Schmidt Signed-off-by: Paul Bolle --- drivers/isdn/gigaset/ser-gigaset.c |

[PATCH 0/4] ser_gigaset: fic deallocation of platform device structure

2015-12-15 Thread Paul Bolle
Sascha Levin reported that the syzkaller fuzzer triggered a WARNING in ser_gigaset (see https://lkml.kernel.org/g/56587467.8050...@oracle.com ). It turned out that ser_gigaset has always deallocated its platform device structure incorrectly. Tilman submitted the patch that fixes that (3/4) and a re

[PATCH 3/4] ser_gigaset: fix deallocation of platform device structure

2015-12-15 Thread Paul Bolle
From: Tilman Schmidt When shutting down the device, the struct ser_cardstate must not be kfree()d immediately after the call to platform_device_unregister() since the embedded struct platform_device is still in use. Move the kfree() call to the release method instead. Signed-off-by: Tilman Schmi

[PATCH 2/4] ser_gigaset: turn nonsense checks into WARN_ON

2015-12-15 Thread Paul Bolle
From: Alan Cox These checks do nothing useful to protect the code from races. On the other hand if the old code has been masking a real bug we would like to know about it. The check for tiocmset is kept because it is valid for a tty driver to have a NULL tiocmset method. That in itself is probab

[PATCH 1/4] ser_gigaset: fix up NULL checks

2015-12-15 Thread Paul Bolle
From: Tilman Schmidt Commit f34d7a5b7010 ("tty: The big operations rework") changed tty->driver to tty->ops but left NULL checks for tty->driver untouched. Fix. Signed-off-by: Tilman Schmidt [pebolle: removed Fixes tag] Signed-off-by: Paul Bolle --- drivers/isdn/gigaset/ser-gigaset.c | 6 +++-

[PATCH v6 4/4] net: diag: Support destroying TCP sockets.

2015-12-15 Thread Lorenzo Colitti
This implements SOCK_DESTROY for TCP sockets. It causes all blocking calls on the socket to fail fast with ECONNABORTED and causes a protocol close of the socket. It informs the other end of the connection by sending a RST, i.e., initiating a TCP ABORT as per RFC 793. ECONNABORTED was chosen for co

[PATCH v6 1/4] net: diag: split inet_diag_dump_one_icsk into two

2015-12-15 Thread Lorenzo Colitti
Currently, inet_diag_dump_one_icsk finds a socket and then dumps its information to userspace. Split it into a part that finds the socket and a part that dumps the information. Signed-off-by: Lorenzo Colitti --- include/linux/inet_diag.h | 5 + net/ipv4/inet_diag.c | 42 +++

[PATCH net-next v2 0/2] net: Allow accepted sockets to be bound to l3mdev domain

2015-12-15 Thread David Ahern
Allow accepted sockets to derive their sk_bound_dev_if setting from the l3mdev domain in which the packets originated. This version adds a sysctl to control whether the setting is inherited, making the functionality similar to sk_mark and its sysctl_tcp_fwmark_accept setting. This effectively allo

[PATCH v6 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-12-15 Thread Lorenzo Colitti
This passes the SOCK_DESTROY operation to the underlying protocol diag handler, or returns -EOPNOTSUPP if that handler does not define a destroy operation. Most of this patch is just renaming functions. This is not strictly necessary, but it would be fairly counterintuitive to have the code to des

[PATCH net-next 1/2] net: l3mdev: Add master device lookup by index

2015-12-15 Thread David Ahern
Add helper to lookup l3mdev master index given a device index. Signed-off-by: David Ahern --- include/net/l3mdev.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index 774d85b2d5d9..786226f8e77b 100644 --- a/include/net/l3

Re: [PATCH v5 4/4] net: diag: Support destroying TCP socketsr

2015-12-15 Thread Lorenzo Colitti
Thanks for the reviews. This version fixes a few issues and addresses Tom's comments on v5. Specifically: 1. As requested by Tom, tcp_abort is no longer behind a config option, and now allows the caller to specify the error with which to interrupt blocking operations. (The SOCK_DIAG codep

[PATCH net-next v2 2/2] net: Allow accepted sockets to be bound to l3mdev domain

2015-12-15 Thread David Ahern
Allow accepted sockets to derive their sk_bound_dev_if setting from the l3mdev domain in which the packets originated. A sysctl setting is added to control the behavior which is similar to sk_mark and sysctl_tcp_fwmark_accept. This effectively allow a process to have a "VRF-global" listen socket,

Re: [patch] mISDN: fix a loop count

2015-12-15 Thread David Miller
From: Dan Carpenter Date: Tue, 15 Dec 2015 13:07:52 +0300 > There are two issue here. > 1) cnt starts as maxloop + 1 so all these loops iterate one more time > than intended. > 2) At the end of the loop we test for "if (maxloop && !cnt)" but for > the first two loops, we end with cnt eq

Re: [patch -mainline] amd-xgbe: fix a couple timeout loops

2015-12-15 Thread David Miller
From: Dan Carpenter Date: Tue, 15 Dec 2015 13:12:29 +0300 > At the end of the loop we test "if (!count)" but because "count--" is > a post-op then the loop will end with count set to -1. I have fixed > this by changing it to --count. > > Fixes: c5aa9e3b8156 ('amd-xgbe: Initial AMD 10GbE platfor

Re: [PATCH] sh_eth: fix descriptor access endianness

2015-12-15 Thread Sergei Shtylyov
On 12/15/2015 08:53 PM, David Miller wrote: The driver never calls cpu_to_edmac() when writing the descriptor address and edmac_to_cpu() when reading it, although it should -- fix this. Note that the frame/buffer length descriptor field accesses also need fixing but since they are both 16-bit w

Re: [PATCH 1/2] net: udp: local checksum offload for encapsulation

2015-12-15 Thread Edward Cree
On 14/12/15 17:16, Tom Herbert wrote: > It's clever, but I'm not sure this saves much. The outer checksum > could still be offloaded to the device without the extra work. The main thing it saves you is having to fit a second csum_start/offset pair into (a) the SKB and (b) the TX descriptor. Also,

Re: [patch v2] qlcnic: fix a timeout loop

2015-12-15 Thread David Miller
From: Dan Carpenter Date: Tue, 15 Dec 2015 16:56:16 +0300 > The problem here is that at the end of the loop we test for if > idc->vnic_wait_limit is zero, but since idc->vnic_wait_limit-- is a > post-op, it actually ends up set to (u8)-1. I have fixed this by > moving the decrement inside the lo

Re: [PATCH net-next] pppoe: optional deactivation of PADT packet handling

2015-12-15 Thread David Miller
From: Guillaume Nault Date: Tue, 15 Dec 2015 17:06:39 +0100 > @@ -109,6 +109,18 @@ struct pppoe_net { > rwlock_t hash_lock; > }; > > +/* PADT packets belong to PPPoE's discovery stage (i.e. control plane) > + * and should be handled by user space. Unfortunately, some programs > + * don't

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Eric Dumazet
On Tue, 2015-12-15 at 18:43 +0100, Willy Tarreau wrote: > Ah ? but what does it bring in this case ? I'm not seeing it used > anywhere on a listening socket. The code took care of not breaking > them though (ie they still accept if no other socket shows up with > a higher score). Otherwise we'll h

Re: [PATCH] sh_eth: fix descriptor access endianness

2015-12-15 Thread David Miller
From: Sergei Shtylyov Date: Tue, 15 Dec 2015 21:06:16 +0300 > On 12/15/2015 08:53 PM, David Miller wrote: > > The driver never calls cpu_to_edmac() when writing the descriptor > address > and edmac_to_cpu() when reading it, although it should -- fix this. > > Note that the fr

Re: [PATCH v5 4/4] net: diag: Support destroying TCP socketsr

2015-12-15 Thread Maciej Żenczykowski
I'd tend to agree that reset or abort would be preferable to destroy. After all... the socket doesn't actually go away. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v5 4/4] net: diag: Support destroying TCP socketsr

2015-12-15 Thread David Miller
Please submit this with a proper "[PATCH vX 0/4] xxx" cover-letter. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 0/4] ser_gigaset: fic deallocation of platform device structure

2015-12-15 Thread David Miller
From: Paul Bolle Date: Tue, 15 Dec 2015 18:11:27 +0100 > Sascha Levin reported that the syzkaller fuzzer triggered a WARNING in > ser_gigaset (see https://lkml.kernel.org/g/56587467.8050...@oracle.com ). It > turned out that ser_gigaset has always deallocated its platform device > structure incor

Re: [PATCH net] net_sched: make qdisc_tree_decrease_qlen() work for non mq

2015-12-15 Thread David Miller
From: Eric Dumazet Date: Tue, 15 Dec 2015 09:43:12 -0800 > From: Eric Dumazet > > Stas Nichiporovich reported a regression in his HFSC qdisc setup > on a non multi queue device. > > It turns out I mistakenly added a TCQ_F_NOPARENT flag on all qdisc > allocated in qdisc_create() for non multi q

Re: [PATCH v5 4/4] net: diag: Support destroying TCP socketsr

2015-12-15 Thread Rustad, Mark D
Maciej Żenczykowski wrote: > I'd tend to agree that reset or abort would be preferable to destroy. > After all... the socket doesn't actually go away. Or maybe terminate? Reset kind of implies to me that it may resume operation. Abort could be ok. I think terminate is somewhat more neutral, if

[PATCH v6 2/4] net: diag: Add the ability to destroy a socket.

2015-12-15 Thread Lorenzo Colitti
This adds a diag_destroy pointer to struct proto that allows a socket to be administratively closed without any action from the process owning the socket or the socket protocol. This allows a privileged userspace process, such as a connection manager or system administration tool, to close sockets

Re: [PATCH v6 1/4] net: diag: split inet_diag_dump_one_icsk into two

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > Currently, inet_diag_dump_one_icsk finds a socket and then dumps > its information to userspace. Split it into a part that finds the > socket and a part that dumps the information. > > Signed-off-by: Lorenzo Colitti > --- > include/linu

[PATCH net] net_sched: make qdisc_tree_decrease_qlen() work for non mq

2015-12-15 Thread Eric Dumazet
From: Eric Dumazet Stas Nichiporovich reported a regression in his HFSC qdisc setup on a non multi queue device. It turns out I mistakenly added a TCQ_F_NOPARENT flag on all qdisc allocated in qdisc_create() for non multi queue devices, which was rather buggy. I was clearly mislead by the TCQ_F_

Re: [PATCH v6 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This passes the SOCK_DESTROY operation to the underlying protocol > diag handler, or returns -EOPNOTSUPP if that handler does not > define a destroy operation. > > Most of this patch is just renaming functions. This is not > strictly nece

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

2015-12-15 Thread Willy Tarreau
On Tue, Dec 15, 2015 at 09:10:24AM -0800, Eric Dumazet wrote: > On Tue, 2015-12-15 at 17:14 +0100, Willy Tarreau wrote: > > Hi Eric, > > > > On Wed, Nov 11, 2015 at 05:09:01PM -0800, Eric Dumazet wrote: > > > On Wed, 2015-11-11 at 10:43 -0800, Eric Dumazet wrote: > > > > On Wed, 2015-11-11 at 10:2

Re: [PATCH v6 2/4] net: diag: Add the ability to destroy a socket.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This adds a diag_destroy pointer to struct proto that allows a > socket to be administratively closed without any action from the > process owning the socket or the socket protocol. > > Signed-off-by: Lorenzo Colitti Acked-by: Eric Dum

[PATCH] net: fix uninitialized variable issue

2015-12-15 Thread Tadeusz Struk
msg_iocb needs to be initialized on the recv/recvfrom path. Otherwise afalg will wrongly interpret it as an async call. Cc: sta...@vger.kernel.org Reported-by: Harald Freudenberger Signed-off-by: Tadeusz Struk --- net/socket.c |1 + 1 file changed, 1 insertion(+) diff --git a/net/socket.c

Re: [PATCH v6 4/4] net: diag: Support destroying TCP sockets.

2015-12-15 Thread Eric Dumazet
On Wed, 2015-12-16 at 02:17 +0900, Lorenzo Colitti wrote: > This implements SOCK_DESTROY for TCP sockets. It causes all > blocking calls on the socket to fail fast with ECONNABORTED and > causes a protocol close of the socket. It informs the other end > of the connection by sending a RST, i.e., ini

  1   2   >