[PATCH 04/22] staging: rtl8723bs: Fix indenting warning in os_dep/os_intfs.c

2017-04-08 Thread Larry Finger
Smatch logs the following warning: CHECK drivers/staging/rtl8723bs/os_dep/os_intfs.c drivers/staging/rtl8723bs/os_dep/os_intfs.c:1082 ips_netdrv_open() warn: inconsistent indenting A simple change in the white space handles this warning. Signed-off-by: Larry Finger

[PATCH 00/22] staging: rtl87232bs: Fix errors and warnings detected by Smatch

2017-04-08 Thread Larry Finger
A number of routines have indenting, off by one, and possible usage while null warnings or errors listed by Smatch. This set of patches fix all but one of these, and it is in code that will be removed in a subsequent patch. Signed-off-by: Larry Finger Larry Finger

[PATCH net-next v2 3/3] net: dsa: Factor bottom tag receive functions

2017-04-08 Thread Florian Fainelli
All DSA tag receive functions do strictly the same thing after they have located the originating source port from their tag specific protocol: - push ETH_HLEN bytes - set pkt_type to PACKET_HOST - call eth_type_trans() - bump up counters - call netif_receive_skb() Factor all of that into

[PATCH net-next v2 2/3] net: dsa: Move skb_unshare() to dsa_switch_rcv()

2017-04-08 Thread Florian Fainelli
All DSA tag receive functions need to unshare the skb before mangling it, move this to the generic dsa_switch_rcv() function which will allow us to make the tag receive function return their mangled skb without caring about freeing a NULL skb. Signed-off-by: Florian Fainelli

[PATCH net-next v2 1/3] net: dsa: Do not check for NULL dst in tag parsers

2017-04-08 Thread Florian Fainelli
dsa_switch_rcv() already tests for dst == NULL, so there is no need to duplicate the same check within the tag receive functions. Signed-off-by: Florian Fainelli --- net/dsa/tag_brcm.c| 3 --- net/dsa/tag_dsa.c | 3 --- net/dsa/tag_edsa.c| 3 ---

[PATCH net-next v2 0/3] net: dsa: Receive path simplifications

2017-04-08 Thread Florian Fainelli
Hi all, This patch series does factor the common code found in all tag implementations into dsa_switch_rcv(). The original motivation was to add GRO support, but this may be a lot of work with unclear benefits at this point. Changes in v2: - take care of tag_mtk.c in the process Florian

[PATCH net-next] net: dsa: mt7530: Include gpio/consumer.h for GPIO functions

2017-04-08 Thread Florian Fainelli
Fixes build errors seen with CONFIG_GPIOLIB disabled and warnings enabled: drivers/net/dsa/mt7530.c: In function 'mt7530_setup': drivers/net/dsa/mt7530.c:948:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]

Re: [RFC] netlink: send exterr cookie on success

2017-04-08 Thread Johannes Berg
On Sat, 2017-04-08 at 11:28 -0400, Jiri Benc wrote: > Perhaps the structure should be named just "netlink_ext" or so? It > seems it'll pick up some non-error related usage, such as the cookies > here or, in the future, flags indicating how the message should be > parsed. Fair point, I'll call it

[PATCH] net: ipv6: Remove unneccessary comments

2017-04-08 Thread Arushi Singhal
This comments are obsolete and should go, as there are no set of rules per CPU anymore. Signed-off-by: Arushi Singhal --- net/ipv6/netfilter/ip6_tables.c | 9 - 1 file changed, 9 deletions(-) diff --git a/net/ipv6/netfilter/ip6_tables.c

Re: [PATCH net-next] liquidio: fix VF incorrectly indicating that it successfully set its VLAN

2017-04-08 Thread David Miller
From: Felix Manlunas Date: Thu, 6 Apr 2017 19:22:22 -0700 > For security reasons, NIC firmware does not allow VF to set its VLAN if PF > set it already. Firmware allows VF to set its VLAN if PF did not set it. > After the VF instructs the firmware to set the VLAN, VF

Re: [PATCH net-next 1/1] netvsc: Initialize all channel related state prior to opening the channel

2017-04-08 Thread David Miller
From: k...@exchange.microsoft.com Date: Thu, 6 Apr 2017 14:59:21 -0700 > From: K. Y. Srinivasan > > Prior to opening the channel we should have all the state setup to handle > interrupts. The current code does not do that; fix the bug. This bug > can result in faults in the

Re: [PATCH net-next v2] net: dsa: mv88e6xxx: Make SMI c22/c45 read/write functions static

2017-04-08 Thread David Miller
From: Florian Fainelli Date: Thu, 6 Apr 2017 12:42:16 -0700 > The SMI clause 22 & 45 read/write operations are local to the global2.c file, > so make them static. This eliminates the following warning: ... > Suggested-by: Andrew Lunn > Signed-off-by:

Re: [PATCH net v2 1/1] net: tcp: Increase TCP_MIB_OUTRSTS even though fail to alloc skb

2017-04-08 Thread David Miller
From: gfree.w...@foxmail.com Date: Thu, 6 Apr 2017 23:05:49 +0800 > From: Gao Feng > > Because TCP_MIB_OUTRSTS is an important count, so always increase it > whatever send it successfully or not. > > Now move the increment of TCP_MIB_OUTRSTS to the top of >

Re: [PATCH net 0/2] l2tp: fix error handling of PPPoL2TP socket options

2017-04-08 Thread David Miller
From: Guillaume Nault Date: Thu, 6 Apr 2017 18:31:18 +0200 > Fix pppol2tp_[gs]etsockopt() so that they don't ignore errors returned > by their helper functions. Series applied, thanks.

Re: [RFC] netlink: send exterr cookie on success

2017-04-08 Thread Jiri Benc
On Fri, 7 Apr 2017 21:44:02 +0200, Johannes Berg wrote: > @@ -67,6 +67,8 @@ struct netlink_ext_err { > u32 ext_code; > u32 msg_offset; > u16 attr; > + const u8 *cookie; > + u8 cookie_len; > }; Perhaps the structure should be named just "netlink_ext" or so? It seems

Re: [PATCH] netlink: uapi: use hex numbers for NLM_F_* flags

2017-04-08 Thread David Miller
From: Johannes Berg Date: Thu, 6 Apr 2017 16:10:42 +0200 > From: Johannes Berg > > It's rather confusing that the netlink message flags are > numbered 1, 2, 4, 8, 16, 32, , 0x100. Make that > more understandable by numbering the lower ones

Re: [PATCH] net: davinci_mdio: add GPIO reset logic

2017-04-08 Thread Florian Fainelli
On 04/08/2017 08:10 AM, Andrew Lunn wrote: > On Sat, Apr 08, 2017 at 06:55:45AM -0700, David Miller wrote: >> From: Roger Quadros >> Date: Wed, 5 Apr 2017 11:33:57 +0300 >> >>> Some boards [1] leave the PHYs at an invalid state >>> during system power-up or reset thus causing

Re: [PATCH][-next] nfp: don't dereference a null nn->eth_port to print a warning

2017-04-08 Thread David Miller
From: Colin King Date: Thu, 6 Apr 2017 13:54:35 +0100 > From: Colin Ian King > > On the case where nn->eth_port is null the warning message > is printing the port by dereferencing this null pointer. > Remove the deference to avoid a crash

Re: [PATCH] net: davinci_mdio: add GPIO reset logic

2017-04-08 Thread Andrew Lunn
On Sat, Apr 08, 2017 at 06:55:45AM -0700, David Miller wrote: > From: Roger Quadros > Date: Wed, 5 Apr 2017 11:33:57 +0300 > > > Some boards [1] leave the PHYs at an invalid state > > during system power-up or reset thus causing unreliability > > issues with the PHY like not being

Re: [PATCH net-next 0/2] New getsockopt option to retrieve socket cookie

2017-04-08 Thread David Miller
From: Chenbo Feng Date: Wed, 5 Apr 2017 19:00:54 -0700 > In the current kernel socket cookie implementation, there is no simple > and direct way to retrieve the socket cookie based on file descriptor. A > process mat need to get it from sock fd if it want to

[PATCH net] tcp: clear saved_syn in tcp_disconnect()

2017-04-08 Thread Eric Dumazet
From: Eric Dumazet In the (very unlikely) case a passive socket becomes a listener, we do not want to duplicate its saved SYN headers. This would lead to double frees, use after free, and please hackers and various fuzzers Tested: 0 socket(..., SOCK_STREAM,

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Ivan Vecera
2017-04-08 16:14 GMT+02:00 Stephen Hemminger : > On Sat, 8 Apr 2017 17:05:48 +0300 > Nikolay Aleksandrov wrote: > >> On 08/04/17 16:49, Ido Schimmel wrote: >> > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: >> >> On

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Stephen Hemminger
On Sat, 8 Apr 2017 17:05:48 +0300 Nikolay Aleksandrov wrote: > On 08/04/17 16:49, Ido Schimmel wrote: > > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: > >> On Sat, 8 Apr 2017 14:41:58 +0300 > >> wrote: > >> > >>>

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Nikolay Aleksandrov
On 08/04/17 16:49, Ido Schimmel wrote: > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: >> On Sat, 8 Apr 2017 14:41:58 +0300 >> wrote: >> >>> static void br_dev_free(struct net_device *dev) >>> { >>> - struct net_bridge *br = netdev_priv(dev); >>> -

Re: [PATCH] net: davinci_mdio: add GPIO reset logic

2017-04-08 Thread David Miller
From: Roger Quadros Date: Wed, 5 Apr 2017 11:33:57 +0300 > Some boards [1] leave the PHYs at an invalid state > during system power-up or reset thus causing unreliability > issues with the PHY like not being detected by the mdio bus > or link not functional. To work around these

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Ido Schimmel
On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: > On Sat, 8 Apr 2017 14:41:58 +0300 > wrote: > > > static void br_dev_free(struct net_device *dev) > > { > > - struct net_bridge *br = netdev_priv(dev); > > - > > - free_percpu(br->stats); > >

Re: [PATCH net v2 2/2] bridge: netlink: register netdevice before executing changelink

2017-04-08 Thread Stephen Hemminger
On Sat, 8 Apr 2017 14:41:59 +0300 wrote: > + err = br_changelink(dev, tb, data); > + if (err) > + goto unregister; > + > + return 0; > + > +unregister: > + unregister_netdevice(dev); > + return err; > } Why use a goto? just do: err =

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Stephen Hemminger
On Sat, 8 Apr 2017 14:41:58 +0300 wrote: > static void br_dev_free(struct net_device *dev) > { > - struct net_bridge *br = netdev_priv(dev); > - > - free_percpu(br->stats); > free_netdev(dev); > } > Since the only thing left is free_netdev, you can now

Re: [pull request][net-next 0/7] Mellanox mlx5 updates 2017-04-16

2017-04-08 Thread David Miller
From: Saeed Mahameed Date: Fri, 7 Apr 2017 21:26:49 +0300 > The following changes provide some small features and updates to the mlx5 > driver. > > For more information please see below. > > Please pull and let me know if there's any problem. Pulled, thanks.

Re: [PATCH] net: mvpp2: sleeping function called from invalid context

2017-04-08 Thread Thomas Petazzoni
Hello, Thanks for your patch! However, it is badly line wrapped, you should consider sending your patch with "git send-email". On Sat, 8 Apr 2017 15:07:14 +0200, Gerald Guillaume wrote: > --- linux-3.18/drivers/net/ethernet/marvell/mvpp2.c 2017-04-03 > 10:29:31.863264347 +0200 > +++

Re: [PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-08 Thread Paul Moore
On Fri, Apr 7, 2017 at 8:57 PM, Deepa Dinamani wrote: > struct timespec is not y2038 safe. > Audit timestamps are recorded in string format into > an audit buffer for a given context. > These mark the entry timestamps for the syscalls. > Use y2038 safe struct timespec64 to

[PATCH net v2 2/2] bridge: netlink: register netdevice before executing changelink

2017-04-08 Thread idosch
From: Ido Schimmel Peter reported a kernel oops when executing the following command: $ ip link add name test type bridge vlan_default_pvid 1 [13634.939408] BUG: unable to handle kernel NULL pointer dereference at 0190 [13634.939436] IP: __vlan_add+0x73/0x5f0

[PATCH net v2 0/2] bridge: Fix kernel oops during bridge creation

2017-04-08 Thread idosch
From: Ido Schimmel First patch adds a missing ndo_uninit() in the bridge driver, which is a prerequisite for the second patch that actually fixes the oops. First version was rejected for being "half baked", but given the amount of changes in this version and that three

[PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread idosch
From: Ido Schimmel While the bridge driver implements an ndo_init(), it was missing a symmetric ndo_uninit(), causing the different de-initialization operations to be scattered around its dellink() and destructor(). Implement a symmetric ndo_uninit() and remove the

Re: [regression v4.11] 617f01211baf ("8139too: use napi_complete_done()")

2017-04-08 Thread Francois Romieu
David Miller : [...] > One theory is that the interrupt masking isn't working properly > and interrupts are still arriving and hitting the NAPI state even > when we are actively polling NAPI. > > And this problem was masked by the locking done here. Yes. Ville, can you

[net-next 12/12] i40e/i40evf: Use build_skb to build frames

2017-04-08 Thread Jeff Kirsher
From: Alexander Duyck This patch is meant to improve the performance of the Rx path. Specifically by using build_skb we have several distinct advantages. In the case of small frames we were previously using a copy-break approach. This means that we were allocating a

[net-next 10/12] i40e/i40evf: Add support for using order 1 pages with a 3K buffer

2017-04-08 Thread Jeff Kirsher
From: Alexander Duyck There are situations where adding padding to the front and back of an Rx buffer will require that we add additional padding. Specifically if NET_IP_ALIGN is non-zero, or the MTU size is larger than 7.5K we would need to use 2K buffers which

[net-next 11/12] i40e/i40evf: Add support for padding start of frames

2017-04-08 Thread Jeff Kirsher
From: Alexander Duyck This patch adds padding to the start of frames to make room for headroom for us to eventually start using build_skb. Right now we guarantee at least NET_SKB_PAD + NET_IP_ALIGN, however we allocate more space if more is available. For example

[net-next 08/12] i40e: remove I40E_FLAG_NEED_LINK_UPDATE

2017-04-08 Thread Jeff Kirsher
From: Alice Michael The I40E_FLAG_NEED_LINK_UPDATE was never used. Remove the flag definitions. Change-ID: If59d0c6b4af85ca27281f3183c54b055adb439a4 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by:

[net-next 09/12] i40e: clean up historic deprecated flag definitions

2017-04-08 Thread Jeff Kirsher
From: Jacob Keller Since an early commit a few flags have no longer been used. Remove these definitions to reduce code clutter. Change-ID: I3589be4622574e747013cd4dc403e18b039f4965 Signed-off-by: Jacob Keller Tested-by: Andrew Bowers

[net-next 05/12] i40e: Simplify i40e_detect_recover_hung_queue logic

2017-04-08 Thread Jeff Kirsher
From: Alan Brady This patch greatly reduces the unneeded complexity in the i40e_detect_recover_hung_queue code path. The previous implementation set a 'hung bit' which would then get cleared while polling. If the detection routine was called a second time with the bit

[net-next 04/12] i40e: Decrease the scope of rtnl lock

2017-04-08 Thread Jeff Kirsher
From: Maciej Sosin Previously rtnl lock was held during whole reset procedure that was stopping other PFs running their reset procedures. In the result reset was not handled properly and host reset was the only way to recover. Change-ID:

[net-next 01/12] i40e: only register client on iWarp-capable devices

2017-04-08 Thread Jeff Kirsher
From: Mitch Williams The client interface is only intended for use on devices that support iWarp. Only register with the client if this is the case. This fixes a panic when loading i40iw on X710 devices. Signed-off-by: Mitch Williams

[net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-08

2017-04-08 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Mitch fixes an issue where the client driver (i40iw) was attempting to load on x710 devices (which do not support iWARP), so only register with the client if iWARP is supported. Jake fixes up error messages to better clarify to the user when

[net-next 07/12] i40e: remove extraneous loop in i40e_vsi_wait_queues_disabled

2017-04-08 Thread Jeff Kirsher
From: Jacob Keller We can simply check both Tx and Rx queues in a single loop, rather than repeating the loop twice. Change-ID: Ic06f26b0e3c2620e0e33c1a2999edda488e647ad Signed-off-by: Jacob Keller Tested-by: Andrew Bowers

[net-next 06/12] i40e: allow look-up of MAC address from Open Firmware or IDPROM

2017-04-08 Thread Jeff Kirsher
From: Jacob Keller Look up the MAC address from the eth_get_platform_mac_address() function first before checking what the firmware provides. We already handle the case of re-writing the MAC-VLAN filter, so there is no need to add extra code for this. However, update

[net-next 02/12] i40e: update error message when trying to add invalid filters

2017-04-08 Thread Jeff Kirsher
From: Jacob Keller Re-word the error message displayed when adding a filter with an invalid flow type. Additionally, report a distinct error message when the IPv4 protocol is at fault. Change-ID: Iba3d85b87f8d383c97c8bdd180df34a6adf3ee67 Signed-off-by: Jacob Keller

[net-next 03/12] i40e: Swap use of pf->flags and pf->hw_disabled_flags for ATR Eviction

2017-04-08 Thread Jeff Kirsher
From: Alexander Duyck This is a minor cleanup so that we are always updating pf->flags when we make a change to the private flags instead of updating a mix of either pf->flags and/or pf->hw_disabled_flags. In addition I went through and cleaned out all the spots

<    1   2