Re: [PATCH] b43: fix memory leak

2016-02-18 Thread Kalle Valo
Michael Büsch writes: > On Thu, 18 Feb 2016 18:04:36 +0530 > Sudip Mukherjee wrote: > >> From: Sudip Mukherjee >> >> On error we jumped to the label bcma_out and returned the error code but >> we missed freeing dev. >> >>

Re: [PATCH] net: bcmgenet: Fix internal PHY link state

2016-02-18 Thread Florian Fainelli
Le 18/02/2016 20:48, Jaedon Shin a écrit : > The PHY link state is not chaged in GENETv2 caused by the previous > commit 49f7a471e4d1 ("net: bcmgenet: Properly configure PHY to ignore > interrupt") was set to PHY_IGNORE_INTERRUPT in bcmgenet_mii_probe(). > > The internal PHY should use

Re: [PATCH] net: bcmgenet: Add MDIO_INTR in GENETv2

2016-02-18 Thread Florian Fainelli
Hi Jaedon Le 15/02/2016 19:12, Jaedon Shin a écrit : > > As you said, the part in bcmgenet_irq_task() is a problem. > > The bcmgenet using internal PHY should use phy_mac_interrupt() cause it has > not > PHY_POLL, and it depends on Ethernet MAC ISR. > > UMAC_IRQ_LINK_EVENT(LINK_UP and

A net device refcnt leak problem

2016-02-18 Thread Yang Yingliang
Hi, I got a tap device refcnt leak message when I was detaching the device and it's deadloop for waiting the usage count decrease to 0. The log is: unregister_netdevice: waiting for pae_tap0 to become free. Usage count = 1 Unfortunately, it happened only once unit now, I cannot reproduce

[PATCH] net: bcmgenet: Fix internal PHY link state

2016-02-18 Thread Jaedon Shin
The PHY link state is not chaged in GENETv2 caused by the previous commit 49f7a471e4d1 ("net: bcmgenet: Properly configure PHY to ignore interrupt") was set to PHY_IGNORE_INTERRUPT in bcmgenet_mii_probe(). The internal PHY should use phy_mac_interrupt() when not in use PHY_POLL. The statement for

Re: [net-next 00/16][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-18

2016-02-18 Thread David Miller
From: Jeff Kirsher Date: Thu, 18 Feb 2016 16:31:05 -0800 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff. > Sorry, no witty patch descriptions this time around, Sad trombone...

Re: [PATCH net-next] bnx2x: Add missing HSI for big-endian machines

2016-02-18 Thread David Miller
From: Yuval Mintz Date: Wed, 17 Feb 2016 13:15:14 +0200 > Commit e5d3a51cefbb "bnx2x: extend DCBx support" was missing HSI changes > for big-endian machine, breaking compilation on such platforms. > > Reported-by: kbuild test robot >

Re: [RFC][PATCH 00/10] Add trace event support to eBPF

2016-02-18 Thread Alexei Starovoitov
On Thu, Feb 18, 2016 at 03:27:18PM -0600, Tom Zanussi wrote: > On Tue, 2016-02-16 at 20:51 -0800, Alexei Starovoitov wrote: > > On Tue, Feb 16, 2016 at 04:35:27PM -0600, Tom Zanussi wrote: > > > On Sun, 2016-02-14 at 01:02 +0100, Alexei Starovoitov wrote: > > > > On Fri, Feb 12, 2016 at 10:11:18AM

Re: [net-next PATCH v3 3/8] net: sched: add cls_u32 offload hooks for netdevs

2016-02-18 Thread Simon Horman
On Thu, Feb 18, 2016 at 11:23:35AM +0200, Amir Vadai" wrote: > On Wed, Feb 17, 2016 at 03:07:23PM -0800, John Fastabend wrote: > > [...] > > > > >> > > >>> +static void u32_replace_hw_hnode(struct tcf_proto *tp, struct > > >>> tc_u_hnode *h) > > >>> +{ > > >>> +struct net_device *dev =

Re: [PATCH] bpf: grab rcu read lock for bpf_percpu_hash_update

2016-02-18 Thread Alexei Starovoitov
On Thu, Feb 18, 2016 at 09:56:22PM -0500, Sasha Levin wrote: > bpf_percpu_hash_update() expects rcu lock to be held and warns if it's not, > which pointed out a missing rcu read lock. > > Fixes: 15a07b338 ("bpf: add lookup/update support for per-cpu hash and array > maps") > Signed-off-by: Sasha

[PATCH] bpf: grab rcu read lock for bpf_percpu_hash_update

2016-02-18 Thread Sasha Levin
bpf_percpu_hash_update() expects rcu lock to be held and warns if it's not, which pointed out a missing rcu read lock. Fixes: 15a07b338 ("bpf: add lookup/update support for per-cpu hash and array maps") Signed-off-by: Sasha Levin --- kernel/bpf/syscall.c |2 ++ 1

Re: [PATCH net-next V1 08/12] net/mlx5e: Move to checksum complete

2016-02-18 Thread Tom Herbert
On Thu, Feb 18, 2016 at 2:32 AM, Saeed Mahameed wrote: > From: Matthew Finlay > > Use checksum complete for all IP packets, unless they are HW LRO, > in which case, use checksum unnecessary. > Awesome! Thanks for this fix. > Signed-off-by: Matt Finlay

Re: [PATCH net-next] store complete hash type information in socket buffer...

2016-02-18 Thread Tom Herbert
On Wed, Feb 17, 2016 at 1:30 PM, Eric Dumazet wrote: > On mer., 2016-02-17 at 15:44 -0500, David Miller wrote: >> From: Paul Durrant >> Date: Mon, 15 Feb 2016 08:32:08 + >> >> > ...rather than a boolean merely indicating a canonical L4 hash.

Re: [PATCH net v2 2/3] geneve: Relax MTU constraints

2016-02-18 Thread Tom Herbert
On Thu, Feb 18, 2016 at 8:54 AM, David Wragg wrote: > Tom Herbert writes: >> Please implement like in ip_tunnel_change_mtu (or better yet call it), >> that is the precedent for tunnels. > > I've made geneve_change_mtu follow ip_tunnel_change_mtu in v2. >

Re: [PATCH] net: fix bridge multicast packet checksum validation

2016-02-18 Thread Stephen Hemminger
On Thu, 18 Feb 2016 15:35:42 -0500 (EST) David Miller wrote: > From: Linus Lüssing > Date: Mon, 15 Feb 2016 03:07:06 +0100 > > > @@ -4084,10 +4089,22 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff > > *skb, > > if

[PATCH] unix_diag: fix incorrect sign extension in unix_lookup_by_ino

2016-02-18 Thread Dmitry V. Levin
The value passed by unix_diag_get_exact to unix_lookup_by_ino has type __u32, but unix_lookup_by_ino's argument ino has type int, which is not a problem yet. However, when ino is compared with sock_i_ino return value of type unsigned long, ino is sign extended to signed long, and this results to

Re: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Ben Hutchings
On Fri, 2016-02-19 at 00:16 +, woojung@microchip.com wrote: > > > Ben, thanks for comments. > > > How about comment in include/uapi/linux/ethtool.h? > > > It says > > > ** struct ethtool_pauseparam - Ethernet pause (flow control) parameters > > > ... > > > * If @autoneg is non-zero, the

Re: [PATCH next v3 1/3] ipvlan: scrub skb before routing in L3 mode.

2016-02-18 Thread Mahesh Bandewar
On Thu, Feb 18, 2016 at 4:44 PM, Cong Wang wrote: > On Thu, Feb 18, 2016 at 4:39 PM, Mahesh Bandewar wrote: >> [snip] - skb_dst_drop(skb); + skb_scrub_packet(skb, true); >>> >>> At least this patch is still same with the

Re: [PATCH v7 8/8] net: e1000e: Adds hardware supported cross timestamp on e1000e nic

2016-02-18 Thread Jeff Kirsher
On Fri, 2016-02-12 at 12:25 -0800, Christopher S. Hall wrote: > Modern Intel systems supports cross timestamping of the network > device > clock and Always Running Timer (ART) in hardware.  This allows the > device time and system time to be precisely correlated. The timestamp > pair is returned

Re: [PATCH next v3 1/3] ipvlan: scrub skb before routing in L3 mode.

2016-02-18 Thread Cong Wang
On Thu, Feb 18, 2016 at 4:39 PM, Mahesh Bandewar wrote: > [snip] >>> - skb_dst_drop(skb); >>> + skb_scrub_packet(skb, true); >> >> At least this patch is still same with the previous version. Or am I >> missing anything? > > xnet param is now set to 'true'. Oh, I

Re: [PATCH next v3 1/3] ipvlan: scrub skb before routing in L3 mode.

2016-02-18 Thread Mahesh Bandewar
[snip] >> - skb_dst_drop(skb); >> + skb_scrub_packet(skb, true); > > At least this patch is still same with the previous version. Or am I > missing anything? xnet param is now set to 'true'.

[net-next 11/16] i40e/i40evf: Enable support for SKB_GSO_UDP_TUNNEL_CSUM

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck The XL722 has support for providing the outer UDP tunnel checksum on transmits. Make use of this feature to support segmenting UDP tunnels with outer checksums enabled. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers

[net-next 04/16] i40e/i40evf: Consolidate all header changes into TSO function

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch goes through and pulls all of the spots where we were updating either the TCP or IP checksums in the TSO and checksum path into the TSO function. The general idea here is that we should only be updating the header after we verify we have

[net-next 03/16] i40e/i40evf: Factor out L4 header and checksum from L3 bits in TSO path

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch makes it so that the L4 header offsets and such can be ignored when dealing with the L3 checksum and length update. This is done making use of two things. First we can just use the offset from the L4 header to the start of the packet to

[net-next 13/16] i40e: Do not drop support for IPv6 VXLAN or GENEVE tunnels

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck All of the documentation in the datasheets for the XL710 do not call out any reason to exclude support for IPv6 based tunnels. As such I am dropping the code that was excluding these tunnel types from having their port numbers recognized. This way we

[net-next 12/16] i40e: Fix ATR in relation to tunnels

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch contains a number of fixes to make certain that we are using the correct protocols when parsing both the inner and outer headers of a frame that is mixed between IPv4 and IPv6 for inner and outer. Signed-off-by: Alexander Duyck

[net-next 14/16] i40e: Update feature flags to reflect newly enabled features

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck Recent changes should have enabled support for IPv6 based tunnels and support for TSO with outer UDP checksums. As such we can update the feature flags to reflect that. In addition we can clean-up the flags that aren't needed such as SCTP and RXCSUM

[net-next 15/16] i40evf: Update feature flags to reflect newly enabled features

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck Recent changes should have enabled support for IPv6 based tunnels and support for TSO with outer UDP checksums. As such we can update the feature flags to reflect that. In addition we can clean-up the flags that aren't needed such as SCTP and RXCSUM

[net-next 05/16] i40e/i40evf: Replace header pointers with unions of pointers in Tx checksum path

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck The Tx checksum path was maintaining a set of 3 pointers and two lengths in order to prepare the packet for being checksummed. The thing is we only really needed 2 pointers, and the lengths that were being maintained can easily be computed. As such we

[net-next 02/16] i40e/i40evf: Use u64 values instead of casting them in TSO function

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck Instead of casing u32 values to u64 it makes more sense to just start out with u64 values in the first place. This way we don't need to create a mess with all of the casts needed to populate a 64b value. Signed-off-by: Alexander Duyck

[net-next 16/16] i40e: Add support for ATR w/ IPv6 extension headers

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch updates the code for determining the L4 protocol and L3 header length so that when IPv6 extension headers are being used we can determine the offset and type of the L4 protocol. Signed-off-by: Alexander Duyck Tested-by:

[net-next 07/16] i40e/i40evf: Handle IPv6 extension headers in checksum offload

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch adds support for IPv6 extension headers in setting up the Tx checksum. Without this patch extension headers would cause IPv6 traffic to fail as the transport protocol could not be identified. Signed-off-by: Alexander Duyck

[net-next 06/16] i40e/i40evf: Add support for IPv4 encapsulated in IPv6

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch fixes two issues. First was the fact that iphdr(skb)->protocl was being used to test for the outer transport protocol. This completely breaks IPv6 support. Second was the fact that we cleared the flag for v4 going to v6, but we didn't take

[net-next 01/16] i40e/i40evf: Drop outer checksum offload that was not requested

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck The i40e and i40evf drivers contained code for inserting an outer checksum on UDP tunnels. The issue however is that the upper levels of the stack never requested such an offload and it results in possible errors. In addition the same logic was being

[net-next 09/16] i40e/i40evf: Add exception handling for Tx checksum

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck Add exception handling to the Tx checksum path so that we can handle cases of TSO where the frame is bad, or Tx checksum where we didn't recognize a protocol Drop I40E_TX_FLAGS_CSUM as it is unused, move the CHECKSUM_PARTIAL check into the function

[net-next 08/16] i40e/i40evf: Do not write to descriptor unless we complete

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This patch defers writing to the Tx descriptor bits until we know we have successfully completed a given operation. So for example we defer updating the tunnelling portion of the context descriptor until we have fully identified the type. The

[net-next 10/16] i40e/i40evf: Clean-up Rx packet checksum handling

2016-02-18 Thread Jeff Kirsher
From: Alexander Duyck This is mostly a minor clean-up for the Rx checksum path in order to avoid some of the unnecessary conditional checks that were being applied. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers

[net-next 00/16][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-18

2016-02-18 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Alex Duyck provides all the patches in the series to update and fix the drivers. Fixed the driver to drop the outer checksum offload on UDP tunnels, since the issue is that the upper levels of the stack never requested such an offload and it

RE: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Woojung.Huh
> > Ben, thanks for comments. > > How about comment in include/uapi/linux/ethtool.h? > > It says > > ** struct ethtool_pauseparam - Ethernet pause (flow control) parameters > > ... > > * If @autoneg is non-zero, the MAC is configured to send and/or > > * receive pause frames according to the

Re: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Ben Hutchings
On Fri, 2016-02-19 at 00:03 +, woojung@microchip.com wrote: > > > Add ethtool operations of set_pauseram and get_pauseparm. > > [...] > > > +static void lan78xx_get_pause(struct net_device *net, > > > +   struct ethtool_pauseparam *pause) > > > +{ > > > + struct

RE: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Woojung.Huh
> > Add ethtool operations of set_pauseram and get_pauseparm. > [...] > > +static void lan78xx_get_pause(struct net_device *net, > > +   struct ethtool_pauseparam *pause) > > +{ > > + struct lan78xx_net *dev = netdev_priv(net); > > + struct phy_device *phydev =

Re: [PATCH 1/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Paul Bolle
Hi Greg, On do, 2016-02-18 at 15:46 -0800, Greg KH wrote: > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read Documentation/stable_kernel_rules.txt > for how to do this properly. > > What in my submission triggers this formletter?

Re: [PATCH] rose: correct integer overflow check

2016-02-18 Thread Ralf Baechle
On Thu, Feb 18, 2016 at 04:03:16PM -0500, Insu Yun wrote: > > Because of the types on the right hand side of the comparison > the expressions are all promoted to unsigned. > > Did you look at the compiler's assembler output?  I did when > reviewing your patch. > > > I checked

Re: [PATCH 1/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Greg KH
On Thu, Feb 18, 2016 at 09:29:08PM +0100, Paul Bolle wrote: > The purpose of gigaset_device_release() is to kfree() the struct > ser_cardstate that contains our struct device. This is done via a bit of > a detour. First we make our struct device's driver_data point to the > container of our struct

Re: [PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Ben Hutchings
On Thu, 2016-02-18 at 22:40 +, woojung@microchip.com wrote: > Add ethtool operations of set_pauseram and get_pauseparm. [...] > +static void lan78xx_get_pause(struct net_device *net, > +   struct ethtool_pauseparam *pause) > +{ > + struct lan78xx_net *dev =

linux-next: manual merge of the net-next tree with the net tree

2016-02-18 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/phy/marvell.c between commit: 79be1a1c9090 ("phy: marvell: Fix and unify reg-init behavior") from the net tree and commit: 930b37ee8d84 ("net: phy: Add SGMII support for Marvell

Re: [RFC][PATCH 00/10] Add trace event support to eBPF

2016-02-18 Thread Daniel Borkmann
On 02/18/2016 10:27 PM, Tom Zanussi wrote: On Tue, 2016-02-16 at 20:51 -0800, Alexei Starovoitov wrote: On Tue, Feb 16, 2016 at 04:35:27PM -0600, Tom Zanussi wrote: On Sun, 2016-02-14 at 01:02 +0100, Alexei Starovoitov wrote: [...] Take a look at all the tools written on top of it:

[PATCH V2 net-next 3/3] MAINTAINERS: Add LAN78XX entry

2016-02-18 Thread Woojung.Huh
Add maintainers for Microchip LAN78XX. unglinuxdri...@microchip.com is alias email which goes to current developer(s) work for Microchip Network related products. Signed-off-by: Woojung Huh --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH V2 net-next 2/3] lan78xx: add ethtool set & get pause functions

2016-02-18 Thread Woojung.Huh
Add ethtool operations of set_pauseram and get_pauseparm. Signed-off-by: Woojung Huh --- drivers/net/usb/lan78xx.c | 84 +-- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/lan78xx.c

[PATCH V2 net-next 1/3] lan78xx: replace devid to chipid & chiprev

2016-02-18 Thread Woojung.Huh
Replace devid to chipid & chiprev for easy access. Signed-off-by: Woojung Huh --- drivers/net/usb/lan78xx.c | 20 +++- drivers/net/usb/lan78xx.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/lan78xx.c

[PATCH V2 net-next 0/3] lan78xx: driver update

2016-02-18 Thread Woojung.Huh
This patch series add new ethtool functions of set_pauseparam & get_pauseparam and MAINTAINERS entry. Woojung Huh (3): lan78xx: replace devid to chipid & chiprev lan78xx: add ethtool set & get pause functions MAINTAINERS: Add LAN78XX entry MAINTAINERS | 7

RE: linux-next: build failure after merge of the net-next tree

2016-02-18 Thread Yuval Mintz
> > After merging the net-next tree, today's linux-next build (powerpc > > ppc64_defconfig) failed like this: > > > > In file included from drivers/net/ethernet/broadcom/bnx2x/bnx2x.h:56:0, > > from drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:30: > >

Re: [PATCH v7 5/8] time: Add history to cross timestamp interface supporting slower devices

2016-02-18 Thread Richard Cochran
On Fri, Feb 12, 2016 at 12:25:26PM -0800, Christopher S. Hall wrote: > /** > * get_device_system_crosststamp - Synchronously capture system/device > timestamp > - * @sync_devicetime: Callback to get simultaneous device time and > + * @get_time_fn: Callback to get simultaneous device time

Re: [PATCH 1/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Paul Bolle
On do, 2016-02-18 at 22:42 +0100, Tilman Schmidt wrote: > Acked-by: Tilman Schmidt > > Thanks for cleaning up the mess I left behind. That's not how I look at it. Commit 4c5e354a9742 ("ser_gigaset: fix deallocation of platform device structure") provided a plausible fix for the

Re: [PATCH 1/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Tilman Schmidt
Am 18.02.2016 um 21:29 schrieb Paul Bolle: > The purpose of gigaset_device_release() is to kfree() the struct > ser_cardstate that contains our struct device. This is done via a bit of > a detour. First we make our struct device's driver_data point to the > container of our struct ser_cardstate

Re: [RFC][PATCH 00/10] Add trace event support to eBPF

2016-02-18 Thread Tom Zanussi
On Tue, 2016-02-16 at 20:51 -0800, Alexei Starovoitov wrote: > On Tue, Feb 16, 2016 at 04:35:27PM -0600, Tom Zanussi wrote: > > On Sun, 2016-02-14 at 01:02 +0100, Alexei Starovoitov wrote: > > > On Fri, Feb 12, 2016 at 10:11:18AM -0600, Tom Zanussi wrote: > > > > this hist triggers belong in the

Re: [PATCH v7 6/8] x86: tsc: Always Running Timer (ART) correlated clocksource

2016-02-18 Thread Andy Lutomirski
On 02/12/2016 12:25 PM, Christopher S. Hall wrote: On modern Intel systems TSC is derived from the new Always Running Timer (ART). ART can be captured simultaneous to the capture of audio and network device clocks, allowing a correlation between timebases to be constructed. Upon capture, the

[PATCHv2] sctp: Fix port hash table size computation

2016-02-18 Thread Neil Horman
Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in its size computation, observing that the current method never guaranteed that the hashsize (measured in number of entries) would be a power of two, which the input hash function for that table requires. The root cause of

Re: [PATCH net-next 0/2] qed{,e}: Add vlan filtering offload

2016-02-18 Thread David Miller
From: Yuval Mintz Date: Thu, 18 Feb 2016 17:00:38 +0200 > This series adds vlan filtering offload to qede. > First patch introduces small additional infrastructure needed in > qed to support it, while second contains the main bulk of driver changes. Series applied to

Re: [PATCH] USB: cdc_subset: only build when one driver is enabled

2016-02-18 Thread David Miller
From: Arnd Bergmann Date: Wed, 17 Feb 2016 23:25:11 +0100 > This avoids a harmless randconfig warning I get when USB_NET_CDC_SUBSET > is enabled, but all of the more specific drivers are not: > > drivers/net/usb/cdc_subset.c:241:2: #warning You need to configure some > hardware

Re: [PATCH] net: phy: dp83848: Fix sysfs naming collision warning

2016-02-18 Thread David Miller
From: "Andrew F. Davis" Date: Wed, 17 Feb 2016 18:10:00 -0600 > Files in sysfs are created using the name from the phy_driver struct, > when two names are the same we may get a duplicate filename warning, > fix this. > > Reported-by: kernel test robot >

Re: [PATCH net-next 0/2] bridge: mdb: add support for extended attributes

2016-02-18 Thread Nikolay Aleksandrov
On 02/18/2016 09:37 PM, David Miller wrote: > From: Nikolay Aleksandrov > Date: Tue, 16 Feb 2016 12:46:52 +0100 > >> Note that the reason we can't simply add an attribute after >> MDBA_MDB_ENTRY_INFO is that current users (e.g. iproute2) walk over >> the attribute list

[PATCHv3 net-next 07/14] nfp: preallocate RX buffers early in .ndo_open

2016-02-18 Thread Jakub Kicinski
We want the .ndo_open() to have following structure: - allocate resources; - configure HW/FW; - enable the device from stack perspective. Therefore filling RX rings needs to be moved to the beginning of .ndo_open(). Signed-off-by: Jakub Kicinski ---

[PATCHv3 net-next 11/14] nfp: propagate list buffer size in struct rx_ring

2016-02-18 Thread Jakub Kicinski
Free list buffer size needs to be propagated to few functions as a parameter and added to struct nfp_net_rx_ring since soon some of the functions will be reused to manage rings with buffers of size different than nn->fl_bufsz. Signed-off-by: Jakub Kicinski ---

[PATCHv3 net-next 05/14] nfp: cleanup tx ring flush and rename to reset

2016-02-18 Thread Jakub Kicinski
Since we never used flush without freeing the ring later the functionality of the two operations is mixed. Rename flush to ring reset and move there all the things which have to be done after FW ring state is cleared. While at it do some clean-ups. Signed-off-by: Jakub Kicinski

[PATCHv3 net-next 12/14] nfp: convert .ndo_change_mtu() to prepare/commit paradigm

2016-02-18 Thread Jakub Kicinski
When changing MTU on running device first allocate new rings and buffers and once it succeeds proceed with changing MTU. Allocation of new rings is not really necessary for this operation - it's done to keep the code simple and because size of the extra ring memory is quite small compared to the

[PATCHv3 net-next 10/14] nfp: sync ring state during FW reconfiguration

2016-02-18 Thread Jakub Kicinski
FW reconfiguration in .ndo_open()/.ndo_stop() should reset/ restore queue state. Since we need IRQs to be disabled when filling rings on RX path we have to move disable_irq() from .ndo_open() all the way up to IRQ allocation. Since nfp_net_start_vec() becomes trivial now it can be inlined.

[PATCHv3 net-next 08/14] nfp: move filling ring information to FW config

2016-02-18 Thread Jakub Kicinski
nfp_net_[rt]x_ring_{alloc,free} should only allocate or free ring resources without touching the device. Move setting parameters in the BAR to separate functions. This will make it possible to reuse alloc/free functions to allocate new rings while the device is running. Signed-off-by: Jakub

[PATCHv3 net-next 14/14] nfp: allow ring size reconfiguration at runtime

2016-02-18 Thread Jakub Kicinski
Since much of the required changes have already been made for changing MTU at runtime let's use it for ring size changes as well. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 +

[PATCHv3 net-next 13/14] nfp: pass ring count as function parameter

2016-02-18 Thread Jakub Kicinski
Soon ring resize will call this functions with values different than the current configuration we need to explicitly pass the ring count as parameter. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 23 +-

[PATCHv3 net-next 04/14] nfp: allocate ring SW structs dynamically

2016-02-18 Thread Jakub Kicinski
To be able to switch rings more easly on config changes allocate them dynamically, separately from nfp_net structure. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 ++--- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCHv3 net-next 00/14] nfp: MTU fixes for net

2016-02-18 Thread Jakub Kicinski
Hi Dave! This is the second part of MTU reconfiguration fixes, targeted at net-next. Patches 1-8 refactor open/stop paths to look like this: - alloc; - dev/FW init; - stack init/start. stop: - stack quiescence/stop; - dev/FW down; - free. That's a quite a bit of code churn I did my best to

Re: [PATCH] sctp: Fix port hash table size computation

2016-02-18 Thread David Miller
From: Neil Horman Date: Thu, 18 Feb 2016 10:02:04 -0500 > Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in > its size computation, observing that the current method never guaranteed > that the hashsize (measured in number of entries) would be a

[PATCHv3 net-next 02/14] nfp: break up nfp_net_{alloc|free}_rings

2016-02-18 Thread Jakub Kicinski
nfp_net_{alloc|free}_rings contained strange mix of allocations and vector initialization. Remove it, declare vector init as a separate function and handle allocations explicitly. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c

[PATCHv3 net-next 06/14] nfp: reorganize initial filling of RX rings

2016-02-18 Thread Jakub Kicinski
Separate allocation of buffers from giving them to FW, thanks to this it will be possible to move allocation earlier on .ndo_open() path and reuse buffers during runtime reconfiguration. Similar to TX side clean up the spill of functionality from flush to freeing the ring. Unlike on TX side, RX

[PATCHv3 net-next 03/14] nfp: make *x_ring_init do all the init

2016-02-18 Thread Jakub Kicinski
nfp_net_[rt]x_ring_init functions used to be called from probe path only and some of their functionality was spilled to the call site. In order to reuse them for ring reconfiguration we need them to do all the init. Signed-off-by: Jakub Kicinski ---

Re: [PATCH net-next 0/2] Add support for PHY packet generators

2016-02-18 Thread David Miller
From: Andrew Lunn Date: Wed, 17 Feb 2016 21:32:05 +0100 > Some Ethernet PHYs contain a simple packet generator. This can be > useful for bringing up new devices, trying to determine if a problem > lies in the MAC-PHY connection or PHY-Socket. Also, the PHY generators > can

[PATCHv3 net-next 09/14] nfp: slice .ndo_open() and .ndo_stop() up

2016-02-18 Thread Jakub Kicinski
Divide .ndo_open() and .ndo_stop() into logical, callable chunks. No functional changes. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 213 + 1 file changed, 131 insertions(+), 82 deletions(-) diff

[PATCHv3 net-next 01/14] nfp: move link state interrupt request/free calls

2016-02-18 Thread Jakub Kicinski
We need to be able to disable the link state interrupt when the device is brought down. We used to just free the IRQ at the beginning of .ndo_stop(). As we now move towards more ordered .ndo_open()/.ndo_stop() paths LSC allocation should be placed in the "allocate resource" section. Since the

[PATCHv3 net 1/5] nfp: return error if MTU change fails

2016-02-18 Thread Jakub Kicinski
When reopening device fails after MTU change, let the userspace know. MTU remains changed even though error is returned, this is what all ethernet devices are doing. Signed-off-by: Jakub Kicinski Reviewed-by: Rolf Neugebauer ---

[PATCHv3 net 2/5] nfp: free buffers before changing MTU

2016-02-18 Thread Jakub Kicinski
For freeing DMA buffers we depend on nfp_net.fl_bufsz having the same value as during allocation therefore in .ndo_change_mtu we must first free the buffers and then change the setting. Signed-off-by: Jakub Kicinski Reviewed-by: Rolf Neugebauer

[PATCHv3 net 4/5] nfp: fix RX buffer length validation

2016-02-18 Thread Jakub Kicinski
Meaning of data_len and meta_len RX WB descriptor fields depend slightly on whether rx_offset is dynamic or not. For dynamic offsets data_len includes meta_len. This makes the code harder to follow, in fact our RX buffer length check is incorrect - we are comparing allocation length to data_len

[PATCHv3 net 5/5] nfp: don't trust netif_running() in debug code

2016-02-18 Thread Jakub Kicinski
Since change_mtu() can fail and leave us with netif_running() returning true even though all rings were freed - we should look at NFP_NET_CFG_CTRL_ENABLE flag to determine if device is really opened. Signed-off-by: Jakub Kicinski ---

[PATCHv3 net 0/5] nfp: MTU fixes for net

2016-02-18 Thread Jakub Kicinski
Hi Dave! This is the first part of MTU reconfiguration fixes. These are the patches which I would like to get into -net. The requested overhaul of the way MTU configuration is done is posted as a separate series targeted at net-next. Thanks! Jakub Kicinski (5): nfp: return error if MTU

[PATCHv3 net 3/5] nfp: correct RX buffer length calculation

2016-02-18 Thread Jakub Kicinski
When calculating the RX buffer length we need to account for up to 2 VLAN tags and up to 8 MPLS labels. Rounding up to 1k is an relic of a distant past and can be removed. While at it also remove trivial print statement. Signed-off-by: Jakub Kicinski ---

Re: [PATCH net-next 0/2] bridge: mdb: add support for extended attributes

2016-02-18 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 16 Feb 2016 12:46:52 +0100 > Note that the reason we can't simply add an attribute after > MDBA_MDB_ENTRY_INFO is that current users (e.g. iproute2) walk over > the attribute list directly without checking for the attribute type.

Re: [PATCH] net: fix bridge multicast packet checksum validation

2016-02-18 Thread David Miller
From: Linus Lüssing Date: Mon, 15 Feb 2016 03:07:06 +0100 > @@ -4084,10 +4089,22 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff > *skb, > if (!pskb_may_pull(skb_chk, offset)) > goto err; > > - __skb_pull(skb_chk, offset); > +

Re: [PATCH net] r8169:fix "rtl_counters_cond == 1 (loop: 1000, delay: 10)" log spam.

2016-02-18 Thread Francois Romieu
Chunhao Lin : [...] > I add checking driver's pm runtime status in rtl8169_get_stats64() to fix > this issue. Would you consider taking the device out of suspended mode during rtl8169_get_stats64 to prevent outdated stats ? -- Ueimor

Re: [PATCH] rose: correct integer overflow check

2016-02-18 Thread David Miller
From: Insu Yun Date: Wed, 17 Feb 2016 15:25:13 -0500 > Since rose_ndevs is signed integer type, > it can be overflowed when it is negative. > > Signed-off-by: Insu Yun That's not how the expression is evaluated. Because of the types on the right hand

[PATCH 1/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Paul Bolle
The purpose of gigaset_device_release() is to kfree() the struct ser_cardstate that contains our struct device. This is done via a bit of a detour. First we make our struct device's driver_data point to the container of our struct ser_cardstate (which is a struct cardstate). In

[PATCH 0/1] ser_gigaset: use container_of() instead of detour

2016-02-18 Thread Paul Bolle
Dmitry Vyukov reported that the syzkaller fuzzer uncovered a leak in ser_gigaset (see https://lkml.kernel.org/g/cact4y+y+p7-pm0d4htz4zf6i+rya22eokpdnrv_omdcmb7e...@mail.gmail.com). This small patch fixes that. The commit explanation contains all the details to understand how this leak made its way

Re: [net-next PATCH] net: Optimize local checksum offload

2016-02-18 Thread David Miller
From: Alexander Duyck Date: Wed, 17 Feb 2016 11:23:55 -0800 > This patch takes advantage of several assumptions we can make about the > headers of the frame in order to reduce overall processing overhead for > computing the outer header checksum. > > First we can assume the

Re: linux-next: build failure after merge of the net-next tree

2016-02-18 Thread David Miller
From: Stephen Rothwell Date: Thu, 18 Feb 2016 12:28:55 +1100 > After merging the net-next tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > In file included from drivers/net/ethernet/broadcom/bnx2x/bnx2x.h:56:0, > from

Re: [PATCH] ipv6: Annotate change of locking mechanism for np->opt

2016-02-18 Thread David Miller
From: Benjamin Poirier Date: Wed, 17 Feb 2016 16:20:33 -0800 > follows up commit 45f6fad84cc3 ("ipv6: add complete rcu protection around > np->opt") which added mixed rcu/refcount protection to np->opt. > > Given the current implementation of rcu_pointer_handoff(), this has

Re: [PATCH v2 net] bonding: don't use stale speed and duplex information

2016-02-18 Thread David Miller
From: Jay Vosburgh Date: Thu, 18 Feb 2016 12:25:52 -0800 > David Miller wrote: > [...] >>> This was done historically in bonding, but the call to >>> bond_update_speed_duplex was removed in commit 876254ae2758 ("bonding: >>> don't call

Re: [PATCH v2 net] bonding: don't use stale speed and duplex information

2016-02-18 Thread Jay Vosburgh
David Miller wrote: [...] >> This was done historically in bonding, but the call to >> bond_update_speed_duplex was removed in commit 876254ae2758 ("bonding: >> don't call update_speed_duplex() under spinlocks"), as it might sleep >> under lock. Later, the locking was

Re: [PATCH 8/9] rfkill: Userspace control for airplane mode

2016-02-18 Thread Johannes Berg
Hi, Sorry for the delay reviewing this. On Mon, 2016-02-08 at 10:41 -0500, João Paulo Rechi Vita wrote: > Provide an interface for the airplane-mode indicator be controlled > from > userspace. User has to first acquire the control through > RFKILL_OP_AIRPLANE_MODE_ACQUIRE and keep the fd open

Re: [PATCH 7/9] rfkill: Create "rfkill-airplane_mode" LED trigger

2016-02-18 Thread Johannes Berg
On Mon, 2016-02-08 at 10:41 -0500, João Paulo Rechi Vita wrote: > This creates a new LED trigger to be used by platform drivers as a > default trigger for airplane-mode indicator LEDs. > > By default this trigger will fire when RFKILL_OP_CHANGE_ALL is called > for all types (RFKILL_TYPE_ALL),

Re: [PATCH] net: ti: netcp: restore get/set_pad_info() functionality

2016-02-18 Thread David Miller
From: Murali Karicheri Date: Thu, 18 Feb 2016 12:13:10 -0500 > On 02/16/2016 03:24 PM, David Miller wrote: >> >> I would like some of the feedback to be taken into consideration and >> integrated into this patch. >> >> Part of the reason this regression was introduced was

Re: [PATCH net v2 2/3] geneve: Relax MTU constraints

2016-02-18 Thread David Miller
From: David Wragg Date: Thu, 18 Feb 2016 16:54:14 + > Tom Herbert writes: >> Please implement like in ip_tunnel_change_mtu (or better yet call it), >> that is the precedent for tunnels. > > I've made geneve_change_mtu follow ip_tunnel_change_mtu in

  1   2   3   >