[PATCH net] openvswitch: update checksum in {push,pop}_mpls

2016-05-26 Thread Simon Horman
In the case of CHECKSUM_COMPLETE the skb checksum should be updated in {push,pop}_mpls() as they the type in the ethernet header. As suggested by Pravin Shelar. Cc: Pravin Shelar Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel") Signed-off-by: Simon Horman --- net/openvswit

Re: [PATCH 1/1] net: nps_enet: Disable interrupts before napi reschedule

2016-05-26 Thread Vineet Gupta
Hi Elad, Noam, On Thursday 26 May 2016 11:23 PM, Alexey Brodkin wrote: > > We just bumped into the same problem (data exchange hangs on the very first > "ping") > with released Linux v4.6 and linux-next on our nSIM OSCI virtual platform. > > I believe it was commit 05c00d82f4d1 ("net: nps_enet

Re: IPv6 extension header privileges

2016-05-26 Thread YOSHIFUJI Hideaki
Hi, Tom Herbert wrote: > Hi, > > In ipv6_sockglue.c I noticed: > > /* hop-by-hop / destination options are privileged option */ > retv = -EPERM; > if (optname != IPV6_RTHDR && !ns_capable(net->user_ns, CAP_NET_RAW)) >break; > > Can anyone provide that rationale as to why these are p

[PATCH] vxlan: Accept user specified MTU value when create new vxlan link

2016-05-26 Thread Chen Haiquan
When create a new vxlan link, example: ip link add vtap mtu 1440 type vxlan vni 1 dev eth0 The argument "mtu" has no effect, because it is not set to conf->mtu. The default value is used in vxlan_dev_configure function. This problem was introduced by commit 0dfbdf4102b9 (vxlan: Factor out devic

Re: BUG: net/netlink: KASAN: use-after-free in netlink_sock_destruct

2016-05-26 Thread Baozeng Ding
On 2016/5/26 23:06, Eric Dumazet wrote: > On Thu, 2016-05-26 at 22:48 +0800, Baozeng Ding wrote: >> Hi all, >> I've got the following report use-after-free in netlink_sock_destruct while >> running syzkaller. >> Unfortunately no reproducer.The kernel version is 4.6 (May 15, on commit >> 2dcd0af

RE: [Intel-wired-lan] [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off

2016-05-26 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Jeff Kirsher > Sent: Wednesday, May 18, 2016 2:40 PM > To: Jarod Wilson ; linux-ker...@vger.kernel.org; > Avargil, Raanan > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: Re: [Intel-wi

[RFC PATCH 13/16] net: dsa: mv88e6xxx: Refactor MDIO so driver registers mdio bus

2016-05-26 Thread Andrew Lunn
Have the switch driver register its own MDIO bus. This allows for an mdio property in the device tree, with child nodes for phys, which can be referenced via phandles, etc. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx.c | 204 ++-- drivers/net/

[RFC PATCH 14/16] net: dsa: Add new binding implementation

2016-05-26 Thread Andrew Lunn
The existing DSA binding has a number of limitations and problems. The main problem is that it cannot represent a switch as a linux device, hanging off some bus. It is limited to one CPU port. The DSA platform device is artificial, and does not really represent hardware. Implement a new binding wh

[RFC PATCH 12/16] dsa: Make mdio bus optional

2016-05-26 Thread Andrew Lunn
The switch may want to instantiate its own MDIO bus. Only do it centrally if the switch has not already created one, and the read op is implemented. Signed-off-by: Andrew Lunn --- net/dsa/dsa.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/net/dsa

[RFC PATCH 11/16] net: dsa: Refactor selection of tag ops into a function

2016-05-26 Thread Andrew Lunn
Replace the two switch statements with an array lookup, and store the result in the dsa tree structure. The drivers no longer need to know the selected tag protocol, so remove it from the dsa switch structure. Signed-off-by: Andrew Lunn --- include/net/dsa.h | 8 +- net/dsa/dsa.c | 71

[RFC PATCH 10/16] net: dsa: mv88e6xxx: Only support EDSA tagging

2016-05-26 Thread Andrew Lunn
The merged driver no longer offers the option to use DSA tagging. So remove the code to setup the switch to do DSA tagging and hard code the use of EDSA. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers

[RFC PATCH 15/16] arm: dt: vf610-zii-devel-b: Make use of new DSA binding

2016-05-26 Thread Andrew Lunn
Hang the three switches of the three MDIO busses using the new DSA binding. Also, make use of the mdio-bus and explicitly list the phys on one device. This is not required, but good for testing. Signed-off-by: Andrew Lunn --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 328 --

[RFC PATCH 16/16] dsa: Document new binding

2016-05-26 Thread Andrew Lunn
Add the new binding to the documentation of the existing binding. Mark the old binding as deprecated. Signed-off-by: Andrew Lunn Signed-off-by: Florian Fainelli --- Documentation/devicetree/bindings/net/dsa/dsa.txt | 278 +- 1 file changed, 276 insertions(+), 2 deletions(-)

[RFC PATCH 05/16] dsa: Add a ports structure and use it in the switch structure

2016-05-26 Thread Andrew Lunn
There are going to be more per-port members added to the switch structure. So add a port structure and move the netdev into it. Signed-off-by: Andrew Lunn --- drivers/net/dsa/bcm_sf2.c | 4 ++-- drivers/net/dsa/mv88e6xxx.c | 27 --- include/net/dsa.h | 8 +++

[RFC PATCH 09/16] dsa: dsa: Split up creating/destroying of DSA and CPU ports

2016-05-26 Thread Andrew Lunn
Refactor the code to setup a single DSA/CPU port into a function of its own, and export it, so it can be used by the new binding. Similarly, refactor the destroy code into a function. Signed-off-by: Andrew Lunn --- net/dsa/dsa.c | 86 --

[RFC PATCH 00/16] New DSA bind, switches as devices

2016-05-26 Thread Andrew Lunn
This is an RFC patchset and should not be accepted yet. The interesting patches here are the last three. They implement a new binding for DSA, which removes a few limitations of the current DSA binding. In particular, it allows switches to be true Linux devices. These devices can be on any type of

[RFC PATCH 01/16] dsa: slave: chip data is optional, don't dereference NULL

2016-05-26 Thread Andrew Lunn
The new binding does not make use of dsa_chip_data, a.k.a cd. When retrieving the size of the EEPROM attached to a switch, don't assume there is a cd attached to the switch structure. Signed-off-by: Andrew Lunn --- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[RFC PATCH 03/16] dsa: slave: Remove MDIO address from switch MDIO bus name

2016-05-26 Thread Andrew Lunn
The DSA layer should no longer assume the switch is connected to an MDIO bus. As a result, we cannot use the address on the MDIO bus when forming the name of the switches internal MDIO bus for its builtin and possibly external PHYs. The switch index is sufficient to make the name unique, so drop th

[RFC PATCH 07/16] dsa: Remove dynamic allocate of routing table

2016-05-26 Thread Andrew Lunn
With a maximum of four switches, the size of the routing table is the same as the pointer to it. Removing it makes the code simpler. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx.c | 3 +-- include/net/dsa.h | 10 +- net/dsa/dsa.c | 12 3

[RFC PATCH 06/16] dsa: Move port device node into port structure

2016-05-26 Thread Andrew Lunn
Move the port device node structure into the port structure, from the chip data. This information is needed in the next step of implementing the new binding. The chip data structure is used while parsing the whole old binding, before the individual switch structures exist. With the new bindings, t

[RFC PATCH 04/16] dsa: tag_{e}dsa.c: Remove dependency on platform data

2016-05-26 Thread Andrew Lunn
The platform data nr_chips is used when validating a received packet, to ensure it comes from a know switch chip. The number of possible switches is limited to DSA_MAX_SWITCHES, so use this as the first validation step. The new binding allows holes in the dst->ds[] array, so also ensure ensure ther

[RFC PATCH 08/16] dsa: Copy the routing table into the switch structure

2016-05-26 Thread Andrew Lunn
The new binding will not have a chip data structure, it will place the routing directly into the switch structure. To enable backwards compatibility, copy the routing from the chip data into the switch structure. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx.c | 4 ++-- include/net/d

[RFC PATCH 02/16] net: dsa: mv88e6xxx: fix circular lock in PPU work

2016-05-26 Thread Andrew Lunn
From: Vivien Didelot Lock debugging shows that there is a possible circular lock in the PPU work code. Switch the lock order of smi_mutex and ppu_mutex to fix this. Here's the full trace: [4.341325] == [4.347519] [ INFO: possib

[PATCH 2/2] net: pktgen: Call destroy_hrtimer_on_stack()

2016-05-26 Thread Guenter Roeck
If CONFIG_DEBUG_OBJECTS_TIMERS=y, hrtimer_init_on_stack() requires a matching call to destroy_hrtimer_on_stack() to clean up timer debug objects. Signed-off-by: Guenter Roeck --- net/core/pktgen.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/core/pktgen.c b/net

[PATCH 1/2] timer: Export destroy_hrtimer_on_stack()

2016-05-26 Thread Guenter Roeck
hrtimer_init_on_stack() needs a matching call to destroy_hrtimer_on_stack(), so both need to be exported. Signed-off-by: Guenter Roeck --- kernel/time/hrtimer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 8c7392c4fdbd..e99df0ff1d42 1006

[PATCH][RT] netpoll: Always take poll_lock when doing polling

2016-05-26 Thread Steven Rostedt
[ Alison, can you try this patch ] This uses netpoll_poll_lock()/unlock() to synchronize netpoll and napi poll operations. Without this method, the synchronization is done by looping on NAPI_STATE_SCHED 'bitset'. This method works fine on a non-rt kernel because a softirq can not be preempted, and

[PATCH,RFC] macvlan: Handle broadcasts inline if we have only a few macvlans.

2016-05-26 Thread Lennert Buytenhek
Commit 412ca1550cbecb2c ("macvlan: Move broadcasts into a work queue") moved processing of all macvlan multicasts into a work queue. This causes a noticable performance regression when there is heavy multicast traffic on the underlying interface for multicast groups that the macvlan subinterfaces

[PATCH V4] brcmfmac: print errors if creating interface fails

2016-05-26 Thread Rafał Miłecki
This is helpful for debugging. Without this all I was getting from "iw" command on failed creating of P2P interface was: > command failed: Too many open files in system (-23) Signed-off-by: Rafał Miłecki --- V2: s/in/if/ in commit message V3: Add one more error message as suggested by Arend V4: A

Re: How can I test ndo_tx_timeout()?

2016-05-26 Thread Timur Tabi
Florian Fainelli wrote: One way to do this could be to never reclaim the SKBs you just transmitted which could be achieved by disabling the TX completion interrupt permanently for instance. Thanks, that was the the trick. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc.

Re: How can I test ndo_tx_timeout()?

2016-05-26 Thread Florian Fainelli
On 05/26/2016 01:40 PM, Timur Tabi wrote: > Is there an easy way to test my driver's response to a > ndo_tx_timeout() call? That is, force dev_watchdog() to think that a > timeout has occurred? > One way to do this could be to never reclaim the SKBs you just transmitted which could be achieved b

Re: [PATCH percpu/for-4.7-fixes 1/2] percpu: fix synchronization between chunk->map_extend_work and chunk destruction

2016-05-26 Thread Vlastimil Babka
On 26.5.2016 21:21, Tejun Heo wrote: > Hello, > > On Thu, May 26, 2016 at 11:19:06AM +0200, Vlastimil Babka wrote: >>> if (is_atomic) { >>> margin = 3; >>> >>> if (chunk->map_alloc < >>> - chunk->map_used + PCPU_ATOMIC_MAP_MARGIN_LOW && >>> -

[PATCH net] sfc: use flow dissector helpers for aRFS

2016-05-26 Thread Edward Cree
Signed-off-by: Edward Cree --- This seems to work in my testing, but I first looked at the flow dissector API less than four hours ago, so I might be doing it wrong. I still think that this is too big a change for 'net' and that it's better to take the original fix now and then I'll respin this p

How can I test ndo_tx_timeout()?

2016-05-26 Thread Timur Tabi
Is there an easy way to test my driver's response to a ndo_tx_timeout() call? That is, force dev_watchdog() to think that a timeout has occurred? -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Projec

Re: [PATCH net 1/2] sfc: handle nonlinear SKBs in efx_filter_rfs()

2016-05-26 Thread David Miller
From: Eric Dumazet Date: Thu, 26 May 2016 09:56:36 -0700 > I truly believe that every time a driver has a private flow dissector, > it always have at least one bug. +1

Re: [PATCH net 0/4] net/mlx4_en: fix stats

2016-05-26 Thread David Miller
From: Or Gerlitz Date: Thu, 26 May 2016 18:19:34 +0300 > Eric, sure, we were on a transition period and Tariq was not fully > familiar with that practice, > I'd like to make sure the move is finalized internally and then we'll > send the patch.. > > On a somehow related note, Dave, Eric's patche

Re: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread David Miller
From: Eric Dumazet Date: Thu, 26 May 2016 05:54:10 -0700 > These stats being computed using deltas, this can not work as is. > > I believe the rule is to not clear the netdev stats at open() +1 Any driver clearing stats at open is broken and will break many, many, networking tools. And bondin

Re: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread David Miller
From: Tariq Toukan Date: Thu, 26 May 2016 12:38:58 +0300 > I am aware that clearing the stats structure might be redundant today, > as the function is called only within mlx4_en_open, but we might want > to call the function in other flows in the future. You really should not arbitrarily clear t

Re: [PATCH] Accept user specified MTU value when create new vxlan link

2016-05-26 Thread David Miller
From: Chen Haiquan Date: Thu, 26 May 2016 17:09:01 +0800 > Fixes: 0dfbdf4102b9303d3ddf2177c0220098ff99f6de > (vxlan: Factor out device configuration) which missed MTU value specified > by user when create new vxlan link. > > Signed-off-by: Chen Haiquan This is not a properly formatted patch s

Re: [PATCH v2] net: alx: use custom skb allocator

2016-05-26 Thread David Miller
From: Feng Tang Date: Thu, 26 May 2016 16:41:55 +0800 > Maybe the driver maintainer from Atheros could take a look, as they > can reach all the real HWs :) Don't hold your breath.

Re: [PATCH net 0/8] qed*: Bug fixes

2016-05-26 Thread David Miller
From: Yuval Mintz Date: Thu, 26 May 2016 11:01:16 +0300 > This series contain several small fixes, most of which deal with > either 100g support, sriov or bandwidth configurations. Series applied, but in future the GFP_KERNEL fix should be done differently. Instead of passing a boolean sleepabl

Re: [PATCH percpu/for-4.7-fixes 1/2] percpu: fix synchronization between chunk->map_extend_work and chunk destruction

2016-05-26 Thread Tejun Heo
Hello, On Thu, May 26, 2016 at 11:19:06AM +0200, Vlastimil Babka wrote: > > if (is_atomic) { > > margin = 3; > > > > if (chunk->map_alloc < > > - chunk->map_used + PCPU_ATOMIC_MAP_MARGIN_LOW && > > - pcpu_async_enabled) > > -

Re: [PATCH RFT 1/2] phylib: add device reset GPIO support

2016-05-26 Thread Uwe Kleine-König
On Thu, May 26, 2016 at 11:00:55AM +0200, Linus Walleij wrote: > On Thu, May 12, 2016 at 8:42 PM, Uwe Kleine-König > wrote: > > > [added Linus Walleij to Cc, there is a question for you/him below] > (...) > >> +void mdio_device_reset(struct mdio_device *mdiodev, int value) > >> +{ > >> + if (

Re: IPv6 extension header privileges

2016-05-26 Thread Tom Herbert
On Mon, May 23, 2016 at 11:11 AM, Tom Herbert wrote: > On Sun, May 22, 2016 at 4:56 AM, Sowmini Varadhan > wrote: >> >>> > Tom Herbert wrote: >>> > If you don't mind I'll change this to make specific options are >>> > privileged and not all hbh and destopt. There is talk in IETF about >>>

Re: usbnet: smsc95xx: fix link detection for disabled autonegotiation

2016-05-26 Thread Florian Fainelli
On 05/26/2016 04:01 AM, Christoph Fritz wrote: > On Thu, 2016-05-26 at 04:31 +0200, Andrew Lunn wrote: >> On Thu, May 26, 2016 at 04:06:47AM +0200, Christoph Fritz wrote: >>> To detect link status up/down for connections where autonegotiation is >>> explicitly disabled, we don't get an irq but need

Re: [PATCH 1/1] net: nps_enet: Disable interrupts before napi reschedule

2016-05-26 Thread Alexey Brodkin
Hi Elad, On Thu, 2016-05-26 at 15:00 +0300, Elad Kanfi wrote: > From: Elad Kanfi > > Since NAPI works by shutting down event interrupts when theres > work and turning them on when theres none, the net driver must > make sure that interrupts are disabled when it reschedules polling. > By calling

Re: [patch] ptp: oops in ptp_ioctl()

2016-05-26 Thread Richard Cochran
On Thu, May 26, 2016 at 09:46:22AM +0300, Dan Carpenter wrote: > If we pass ERR_PTR(-EFAULT) to kfree() then it's going to oops. Thanks for catching this. Acked-by: Richard Cochran

Re: [PATCH net 0/4] net/mlx4_en: fix stats

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 18:19 +0300, Or Gerlitz wrote: > On Thu, May 26, 2016 at 3:57 PM, Eric Dumazet wrote: > > On Thu, 2016-05-26 at 12:44 +0300, Tariq Toukan wrote: > >> Hi Eric, > >> > >> > mlx4 has various bugs in its ndo_get_stats() and related functions. > >> > This patch series address the

[PATCH] net: l2tp: Make l2tp_ip6 namespace aware

2016-05-26 Thread Shmulik Ladkani
l2tp_ip6 tunnel and session lookups were still using init_net, although the l2tp core infrastructure already supports lookups keyed by 'net'. As a result, l2tp_ip6_recv discarded packets for tunnels/sessions created in namespaces other than the init_net. Fix, by using dev_net(skb->dev) or sock_ne

Re: [PATCH net 1/2] sfc: handle nonlinear SKBs in efx_filter_rfs()

2016-05-26 Thread Edward Cree
On 26/05/16 17:56, Eric Dumazet wrote: > Lot of magic here. Yet another flow dissection. > > Seems to be a good place to use net/core/flow_dissector.c helpers. Fair point, but that doesn't really feel like 'net' material. I'll look into flow_dissector and see if I can get something ready for when

Re: [PATCH net 1/2] sfc: handle nonlinear SKBs in efx_filter_rfs()

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 17:01 +0100, Edward Cree wrote: > Previously efx_filter_rfs() assumed that the headers it needed (802.1Q, IP) > would be present in the linear data area of the SKB. > When running with debugging I found that this is not always the case and > that in fact the data may all be

[PATCH] Documentation: ip-sysctl.txt: clarify secure_redirects

2016-05-26 Thread Eric Garver
Clarify how secure_redirects works. Mention that RFC1122 always applies. Signed-off-by: Eric Garver --- Documentation/networking/ip-sysctl.txt | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.

[PATCH net 2/2] sfc: Track RPS flow IDs per channel instead of per function

2016-05-26 Thread Edward Cree
From: Jon Cooper Otherwise we get confused when two flows on different channels get the same flow ID. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c| 32 +++- drivers/net/ethernet/sfc/net_driver.h | 12 drivers/net/ethernet/sfc/r

[PATCH net 1/2] sfc: handle nonlinear SKBs in efx_filter_rfs()

2016-05-26 Thread Edward Cree
Previously efx_filter_rfs() assumed that the headers it needed (802.1Q, IP) would be present in the linear data area of the SKB. When running with debugging I found that this is not always the case and that in fact the data may all be paged. So now use skb_header_pointer() to extract the data. A

[PATCH net 0/2] sfc: aRFS fixes

2016-05-26 Thread Edward Cree
The issue fixed in patch #1 was found two years ago and might not still happen on current kernels, but (a) we didn't figure out what caused it, and (b) the fix should be harmless even if it's unnecessary. Edward Cree (1): sfc: handle nonlinear SKBs in efx_filter_rfs() Jon Cooper (1): sfc: T

Re: [RFC PATCH 0/7] tou: Transports over UDP - part I

2016-05-26 Thread Alex Elsayed
Tom Herbert herbertland.com> writes: > > Transports over UDP is intended to encapsulate TCP and other transport > protocols directly and securely in UDP. > > The goal of this work is twofold: > > 1) Allow applications to run their own transport layer stack (i.e.from >userspace). This elimi

Re: [PATCH net 0/4] net/mlx4_en: fix stats

2016-05-26 Thread Or Gerlitz
On Thu, May 26, 2016 at 3:57 PM, Eric Dumazet wrote: > On Thu, 2016-05-26 at 12:44 +0300, Tariq Toukan wrote: >> Hi Eric, >> >> > mlx4 has various bugs in its ndo_get_stats() and related functions. >> > This patch series address the obvious issues. >> > Remaining ones will be discussed later. >> >

Re: BUG: net/netlink: KASAN: use-after-free in netlink_sock_destruct

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 22:48 +0800, Baozeng Ding wrote: > Hi all, > I've got the following report use-after-free in netlink_sock_destruct while > running syzkaller. > Unfortunately no reproducer.The kernel version is 4.6 (May 15, on commit > 2dcd0af568b0cf583645c8a317dd12e344b1c72a). Thanks. > >

BUG: net/netlink: KASAN: use-after-free in netlink_sock_destruct

2016-05-26 Thread Baozeng Ding
Hi all, I've got the following report use-after-free in netlink_sock_destruct while running syzkaller. Unfortunately no reproducer.The kernel version is 4.6 (May 15, on commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a). Thanks. == BU

Re: [PATCH RESEND 7/8] pipe: account to kmemcg

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 16:59 +0300, Vladimir Davydov wrote: > On Thu, May 26, 2016 at 04:04:55PM +0900, Minchan Kim wrote: > > On Wed, May 25, 2016 at 01:30:11PM +0300, Vladimir Davydov wrote: > > > On Tue, May 24, 2016 at 01:04:33PM -0700, Eric Dumazet wrote: > > > > On Tue, 2016-05-24 at 19:13 +03

[RFC net-next 1/1] ethtool: Add support for set eeprom metadata.

2016-05-26 Thread Sudarsana Reddy Kalluru
Currently ethtool implementation does not have a way to pass the metadata for eeprom related operations. Some adapters have a complicated non-volatile memory implementation that requires additional information – there are drivers [bnx2x and bnxt] that use the ‘magic’ field in the {G,S}EEPROM for t

[PATCH] net: Fragment large datagrams even when IP_HDRINCL is set.

2016-05-26 Thread Alan Davey
One of the bugs documented in the raw(7) man page is as follows: When the IP_HDRINCL option is set, datagrams will not be fragmented and are limited to the interface MTU. This patch fixes the bug by removing the check for "length > rt->dst.dev->mtu" in raw_send_hdrinc() (net/ipv4/raw.c). Datagram

Re: [PATCH RESEND 7/8] pipe: account to kmemcg

2016-05-26 Thread Vladimir Davydov
On Thu, May 26, 2016 at 04:04:55PM +0900, Minchan Kim wrote: > On Wed, May 25, 2016 at 01:30:11PM +0300, Vladimir Davydov wrote: > > On Tue, May 24, 2016 at 01:04:33PM -0700, Eric Dumazet wrote: > > > On Tue, 2016-05-24 at 19:13 +0300, Vladimir Davydov wrote: > > > > On Tue, May 24, 2016 at 05:59:0

Re: [PATCH v2] net: alx: use custom skb allocator

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 16:41 +0800, Feng Tang wrote: > On Wed, May 25, 2016 at 07:53:41PM -0400, David Miller wrote: > > > > But now that we have at least two instances of this code we really > > need to put a common version somewhere. :-/ > > I agree, and furthermore I noticed there are some sim

[PATCH net] ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr

2016-05-26 Thread Baozeng Ding
Fix a logic error to avoid potential null pointer dereference. Signed-off-by: Baozeng Ding --- net/ieee802154/nl802154.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index ca207db..116187b 100644 --- a/net/ieee80215

[PATCH net] ieee802154: fix logic error in, ieee802154_llsec_parse_dev_addr

2016-05-26 Thread Baozeng Ding
Fix a logic error to avoid potential null pointer dereference. Signed-off-by: Baozeng Ding --- net/ieee802154/nl802154.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index ca207db..116187b 100644 --- a/net/ieee80215

RE: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread David Laight
From: Tariq Toukan > Sent: 26 May 2016 10:39 ... > I am aware that clearing the stats structure might be redundant today, > as the function is called only within mlx4_en_open, but we might want to > call the function in other flows in the future. My personal view is that stats should never be clea

Re: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 12:38 +0300, Tariq Toukan wrote: > Hi Eric, > > Thanks for the fix. > > > We do not need to clear fields that are already 0. > Why is it always true that dev->stats is already 0 at the point ndo_open > is called? netdev structs are zero allocated. (kzalloc)

Re: [PATCH net 0/4] net/mlx4_en: fix stats

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 12:44 +0300, Tariq Toukan wrote: > Hi Eric, > > > mlx4 has various bugs in its ndo_get_stats() and related functions. > > This patch series address the obvious issues. > > Remaining ones will be discussed later. > > > Thanks for the fixes. > I see they were already applied. >

Re: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread Eric Dumazet
On Thu, 2016-05-26 at 12:38 +0300, Tariq Toukan wrote: > Hi Eric, > > Thanks for the fix. > > > We do not need to clear fields that are already 0. > Why is it always true that dev->stats is already 0 at the point ndo_open > is called? > Is it true also in a flow of open -> stop -> open? I search

[PATCH 1/1] net: nps_enet: Disable interrupts before napi reschedule

2016-05-26 Thread Elad Kanfi
From: Elad Kanfi Since NAPI works by shutting down event interrupts when theres work and turning them on when theres none, the net driver must make sure that interrupts are disabled when it reschedules polling. By calling napi_reschedule, the driver switches to polling mode, therefor there should

[PATCH v1 1/1] net/lapb: tuse %*ph to dump buffers

2016-05-26 Thread Andy Shevchenko
Use %*ph specifier to dump small buffers in hex format instead doing this byte-by-byte. Signed-off-by: Andy Shevchenko --- net/lapb/lapb_in.c | 5 ++--- net/lapb/lapb_out.c | 4 +--- net/lapb/lapb_subr.c | 14 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/ne

Re: usbnet: smsc95xx: fix link detection for disabled autonegotiation

2016-05-26 Thread Christoph Fritz
On Thu, 2016-05-26 at 04:31 +0200, Andrew Lunn wrote: > On Thu, May 26, 2016 at 04:06:47AM +0200, Christoph Fritz wrote: > > To detect link status up/down for connections where autonegotiation is > > explicitly disabled, we don't get an irq but need to poll the status > > register for link up/down

Re: [PATCH percpu/for-4.7-fixes 2/2] percpu: fix synchronization between synchronous map extension and chunk destruction

2016-05-26 Thread Vlastimil Babka
On 05/25/2016 05:45 PM, Tejun Heo wrote: For non-atomic allocations, pcpu_alloc() can try to extend the area map synchronously after dropping pcpu_lock; however, the extension wasn't synchronized against chunk destruction and the chunk might get freed while extension is in progress. This patch f

Re: [PATCH net 0/4] net/mlx4_en: fix stats

2016-05-26 Thread Tariq Toukan
Hi Eric, mlx4 has various bugs in its ndo_get_stats() and related functions. This patch series address the obvious issues. Remaining ones will be discussed later. Thanks for the fixes. I see they were already applied. I reviewed them all and replied to patch 4/4, the rest look good to me. Plea

Re: [PATCH net 4/4] net/mlx4_en: get rid of private net_device_stats

2016-05-26 Thread Tariq Toukan
Hi Eric, Thanks for the fix. We do not need to clear fields that are already 0. Why is it always true that dev->stats is already 0 at the point ndo_open is called? Is it true also in a flow of open -> stop -> open? I searched the kernel stack for this but couldn't find. @@ -1877,7 +1877,6 @@

Re: [PATCH net v2] virtio_net: fix virtnet_open and virtnet_probe competing for try_fill_recv

2016-05-26 Thread Michael S. Tsirkin
On Thu, May 26, 2016 at 02:27:59PM +0800, wangyunjian wrote: > In function virtnet_open() and virtnet_probe(), func try_fill_recv() > will be executed at the same time. VQ in virtqueue_add() is not protected > well and BUG_ON will be triggered when virito_net.ko being removed. > > Signed-off-by: Y

Re: [PATCH net v2] virtio_net: fix virtnet_open and virtnet_probe competing for try_fill_recv

2016-05-26 Thread Jason Wang
On 2016年05月26日 14:27, wangyunjian wrote: In function virtnet_open() and virtnet_probe(), func try_fill_recv() will be executed at the same time. VQ in virtqueue_add() is not protected well and BUG_ON will be triggered when virito_net.ko being removed. Signed-off-by: Yunjian Wang --- drivers

Re: [PATCH percpu/for-4.7-fixes 1/2] percpu: fix synchronization between chunk->map_extend_work and chunk destruction

2016-05-26 Thread Vlastimil Babka
On 05/25/2016 05:44 PM, Tejun Heo wrote: Atomic allocations can trigger async map extensions which is serviced by chunk->map_extend_work. pcpu_balance_work which is responsible for destroying idle chunks wasn't synchronizing properly against chunk->map_extend_work and may end up freeing the chun

Re: [PATCH RFT 1/2] phylib: add device reset GPIO support

2016-05-26 Thread Linus Walleij
On Thu, May 12, 2016 at 8:42 PM, Uwe Kleine-König wrote: > [added Linus Walleij to Cc, there is a question for you/him below] (...) >> +void mdio_device_reset(struct mdio_device *mdiodev, int value) >> +{ >> + if (mdiodev->reset) >> + gpiod_set_value(mdiodev->reset, value); > > Be

Re: [PATCH v2] net: alx: use custom skb allocator

2016-05-26 Thread Feng Tang
On Wed, May 25, 2016 at 07:53:41PM -0400, David Miller wrote: > From: Feng Tang > Date: Wed, 25 May 2016 14:49:54 +0800 > > > This patch follows Eric Dumazet's commit 7b70176421 for Atheros > > atl1c driver to fix one exactly same bug in alx driver, that the > > network link will be lost in 1-5 m

Re: [PATCH V3] brcmfmac: print error if p2p_ifadd firmware command fails

2016-05-26 Thread Arend Van Spriel
On 26-5-2016 0:44, Rafał Miłecki wrote: > This is helpful for debugging, without this all I was getting from "iw" > command on device with BCM43602 was: >> command failed: Too many open files in system (-23) > > Signed-off-by: Rafał Miłecki > --- > V2: s/in/if/ in commit message > V3: Add one mor

[PATCH net 3/8] qede: Don't expose self-test for VFs

2016-05-26 Thread Yuval Mintz
PFs and VFs differ in their registered ethtool operations, but they're using a common function for get_sset_count(). As a result, `ethtool -i' for a VF would indicate it supports selftest, although that's not the case. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qede/qede_ethtool.

[PATCH net 6/8] qed: Add missing 100g init mode

2016-05-26 Thread Yuval Mintz
Some of the HW configurations are currently missing for 100g devices. This can cause various classification issues, as well as prevent device from fully reaching line-rate. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++ 1 file changed, 7 insertions(+) diff

[PATCH net 7/8] qed: Prevent 100g from working in MSI

2016-05-26 Thread Yuval Mintz
From: Sudarsana Reddy Kalluru Adapter can support 100g in both MSIx and INTa, but not in MSI. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 + drivers/net/ethernet/qlogic/qed/qed_main.c | 18 ++ 2 file

[PATCH net 4/8] qed: Fix allocation in interrupt context

2016-05-26 Thread Yuval Mintz
From: Sudarsana Reddy Kalluru Commit 39651abd2814 ("qed: add support for dcbx") is re-configuring the QM hw-block as part of its sequence. This is done in attention handling context which is non-sleepable, yet memory is allocated in this flow using GFP_KERNEL. Signed-off-by: Sudarsana Reddy Kall

[PATCH net 8/8] qed: Don't config min BW on 100g on link flap

2016-05-26 Thread Yuval Mintz
Currently 100g devices don't support minimum/maximum BW configurations, yet link flaps might cause the driver to attempt to do such a configuration. Prevent this just as we do for the maximum BW. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++ 1 file changed

[PATCH net 2/8] qede: Reload on GRO changes

2016-05-26 Thread Yuval Mintz
Since driver is using a FW-based GRO implementation, this has some effects on its ability to cope with GRO enablement/disablement. As a result, driver must perform an inner-reload as a result of a state change in the offload configuration of said feature. [Failure to do so means network stack woul

[PATCH net 5/8] qed: Save min/max accross dcbx-change

2016-05-26 Thread Yuval Mintz
When DCBx re-negotiation is occurring, the PF's configurations for maximum and minimum bandwidth guarantees are currently lost. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net 1/8] qede: Fix VF minimum BW setting

2016-05-26 Thread Yuval Mintz
VF is currently ignoring the minimum provided by the API, mistakenly using the maximum for minimum as well. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c

[PATCH net 0/8] qed*: Bug fixes

2016-05-26 Thread Yuval Mintz
This series contain several small fixes, most of which deal with either 100g support, sriov or bandwidth configurations. Dave, Please consider applying this to `net'. Thanks, Yuval Sudarsana Reddy Kalluru (2): qed: Fix allocation in interrupt context qed: Prevent 100g from working in MSI Y

Re: [v10, 7/7] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

2016-05-26 Thread Ulf Hansson
On 26 May 2016 at 06:05, Yangbo Lu wrote: > Hi Uffe, > > Could we merge this patchset? ... > It has been a long time to wait for Arnd's response... > > Thanks a lot. > > As we are still in the merge window I won't queue anything but fixes. Let's give Arnd another week or so to respond. Kind rega

Re: [PATCH RESEND 7/8] pipe: account to kmemcg

2016-05-26 Thread Minchan Kim
On Wed, May 25, 2016 at 01:30:11PM +0300, Vladimir Davydov wrote: > On Tue, May 24, 2016 at 01:04:33PM -0700, Eric Dumazet wrote: > > On Tue, 2016-05-24 at 19:13 +0300, Vladimir Davydov wrote: > > > On Tue, May 24, 2016 at 05:59:02AM -0700, Eric Dumazet wrote: > > > ... > > > > > +static int anon_p