Re: [PATCH 2/4] crypto: af_alg - Allow arbitrarily long algorithm names

2017-04-06 Thread Herbert Xu
On Thu, Apr 06, 2017 at 02:32:27PM +0200, Alexander Sverdlin wrote: > > > diff --git a/crypto/af_alg.c b/crypto/af_alg.c > > index 690deca..3556d8e 100644 > > --- a/crypto/af_alg.c > > +++ b/crypto/af_alg.c > > @@ -160,11 +160,11 @@ static int alg_bind(struct socket *sock, struct > > sockaddr

[PATCH 12/12] ftgmac100: Remove tx descriptor accessors

2017-04-06 Thread Benjamin Herrenschmidt
Directly access the fields when needed. The accessors add clutter not clarity and in some cases cause unnecessary read-modify-write type access on the slow (uncached) descriptor memory. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-06 Thread Mike Galbraith
On Thu, 2017-04-06 at 18:13 -0400, Stephen Hemminger wrote: > Why not replace yield with msleep(1) which gets rid of the inversion > issues? That's fine, just not super efficient, if that matters. -Mike

[PATCH 08/12] ftgmac100: Move the barrier out of ftgmac100_txdes_set_dma_own()

2017-04-06 Thread Benjamin Herrenschmidt
We'll use variants of this accessor without barriers when building series of descriptors for fragmented sends Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH 05/12] ftgmac100: Pad small frames properly

2017-04-06 Thread Benjamin Herrenschmidt
Rather than just transmitting garbage past the end of the small packet. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH 06/12] ftgmac100: Store tx skbs in a separate array

2017-04-06 Thread Benjamin Herrenschmidt
Rather than in the descriptor. The descriptor is mapped non-cachable and rather slow to access. Since to do that we need to keep track of the tx "pointer" we also have no use of all the accesors to manipulate it, just open code it, it's as clear and will help when adding fragmented sends.

[PATCH 04/12] ftgmac100: Factor tx packet dropping path

2017-04-06 Thread Benjamin Herrenschmidt
Use a simple goto to a drop path at the tail of the function, it will be used in a few more cases soon Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH 01/12] ftgmac100: Add a tx timeout handler

2017-04-06 Thread Benjamin Herrenschmidt
We have a reset task to reset our chip, use it. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH 09/12] ftgmac100: Split tx packet freeing from ftgmac100_tx_complete_packet()

2017-04-06 Thread Benjamin Herrenschmidt
This moves the packet freeing to a separate function which is also used by ftgmac100_free_buffers() and will be used more in the error path of fragmented sends. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 38

[PATCH 10/12] ftgmac100: Don't clear tx desc fields unnecessarily

2017-04-06 Thread Benjamin Herrenschmidt
Those are non-cachable stores, let's avoid those we don't need. Remove the helper, it's not particularly helpful and since it uses "priv" I can't move it to the header file. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 17

[PATCH 03/12] ftgmac100: Merge ftgmac100_xmit() into ftgmac100_hard_start_xmit()

2017-04-06 Thread Benjamin Herrenschmidt
This will make subsequent rework of the tx path simpler Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 58 ++-- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git

[PATCH 02/12] ftgmac100: Move ftgmac100_hard_start_xmit() around

2017-04-06 Thread Benjamin Herrenschmidt
Move it below ftgmac100_xmit() and the rest of the tx path No code change. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 59 1 file changed, 30 insertions(+), 29 deletions(-) diff --git

[PATCH 07/12] ftgmac100: Cleanup tx queue handling

2017-04-06 Thread Benjamin Herrenschmidt
We have a private lock which isn't terribly useful, and we maintain a "tx_pending" counter for information that's already available via a trivial arithmetic operation. Then we unconditionaly wake the queue even when not stopped. Finally our code in tx isn't really safe vs. a concurrent reclaim.

[PATCH 11/12] ftgmac100: Add support for fragmented tx

2017-04-06 Thread Benjamin Herrenschmidt
Add NETIF_F_SG and create multiple TX ring entries for skb fragments. On reclaim, the skb is only freed on the segment marked as "last". Signed-off-by: Benjamin Herrenschmidt # Conflicts: # drivers/net/ethernet/faraday/ftgmac100.c ---

[PATCH 00/12] ftgmac100: Rework batch 3 - TX path

2017-04-06 Thread Benjamin Herrenschmidt
This is the third batch of updates to the ftgmac100 driver. This one tackles the TX path of the driver. This provides the bulk of the performance improvements by adding support for fragmented sends along with a bunch of cleanups. Subsequent batches will add various features (ethtool functions,

[net-next 0/4][pull request] 40GbE Intel Wired LAN Driver Updates 2017-04-06

2017-04-06 Thread Jeff Kirsher
This series contains updates to i40e and i40evf. Preethi adds support for the outer checksum and TSO offloads for encapsulated packets for the VF. Mitch fixes a possible memory leak, where we need to remove the client instance when the driver unloads. Also we need to check to see if the client

[net-next 1/4] i40e/i40evf: Add capability exchange for outer checksum

2017-04-06 Thread Jeff Kirsher
From: Preethi Banala This patch adds a capability negotiation between VF and PF using ENCAP/ ENCAP_CSUM offload flags in order for the VF to support outer checksum and TSO offloads for encapsulated packets. These capabilities were assumed by default and enabled in

[net-next 4/4] i40e: close client on remove and shutdown

2017-04-06 Thread Jeff Kirsher
From: Mitch Williams When the driver is removed or shut down, close any attached clients (i.e. i40iw). This prevents a panic seen sometimes on forced driver removal or system shutdown when iWarp is running. Change-ID: I4f6161e5a73ffbb2fd5883567b007310302bfcb5

[net-next 2/4] i40e: remove client instance on driver unload

2017-04-06 Thread Jeff Kirsher
From: Mitch Williams When the driver is unloaded, we need to remove the client instance, otherwise we leak memory. Change-ID: If1e7882ac1f6ce15d004722fafbe31afbe0adc9a Signed-off-by: Mitch Williams Tested-by: Andrew Bowers

[net-next 3/4] i40e: register existing client on probe

2017-04-06 Thread Jeff Kirsher
From: Mitch Williams In some cases, a client (i40iw) may already be present when probe is called. Check for this, and add a client instance if necessary. Change-ID: I2009312694b7ad81f1023919e4c6c86181f21689 Signed-off-by: Mitch Williams

Re: [PATCH] ath9k: Add cast to u8 to FREQ2FBIN macro

2017-04-06 Thread Joe Perches
On Thu, 2017-04-06 at 16:54 -0700, Matthias Kaehlcke wrote: > Hi Joe, > > El Thu, Apr 06, 2017 at 02:29:20PM -0700 Joe Perches ha dit: > > > On Thu, 2017-04-06 at 14:21 -0700, Matthias Kaehlcke wrote: > > > The macro results are assigned to u8 variables/fields. Adding the cast > > > fixes plenty

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

2017-04-06 Thread Felix Manlunas
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 always indicates (via return 0) that the operation is successful--even for the times when it

Documentation error for checksum offload check ?

2017-04-06 Thread Benjamin Herrenschmidt
I noticed in both Documentation/networking/checksum-offload.txt and include/linux/skbuff.h reference to helpers skb_csum_off_chk* Now, I can't find anything like that with grep ... :-) Am I missing something ? Cheers, Ben.

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

2017-04-06 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/ethernet/ibm/ibmvnic.c between commit: 98998345a579 ("ibmvnic: fix kstrtoul, copy_from_user and copy_to_user misuse") from the vfs tree and commit: e704f0434ea6 ("ibmvnic: Remove debugfs support")

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

2017-04-06 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: net/sched/sch_generic.c between commit: 92f9170621a1 ("net_sched: check noop_qdisc before qdisc_hash_add()") from the net tree and commit: 49b499718fa1 ("net: sched: make default fifo qdiscs appear in the dump")

Re: [PATCH] ath9k: Add cast to u8 to FREQ2FBIN macro

2017-04-06 Thread Matthias Kaehlcke
Hi Joe, El Thu, Apr 06, 2017 at 02:29:20PM -0700 Joe Perches ha dit: > On Thu, 2017-04-06 at 14:21 -0700, Matthias Kaehlcke wrote: > > The macro results are assigned to u8 variables/fields. Adding the cast > > fixes plenty of clang warnings about "implicit conversion from 'int' to > > 'u8'". > >

[PATCH v2] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Matthias Kaehlcke
When clang detects a non-boolean constant in a logical operation it generates a 'constant-logical-operand' warning. In ieee80211_try_rate_control_ops_get() the result of strlen() is used in a logical operation, clang resolves the expression to an (integer) constant at compile time when clang's

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

2017-04-06 Thread Jakub Kicinski
On Thu, 6 Apr 2017 13:54:35 +0100, Colin King wrote: > 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 when printing the > warning

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Matthias Kaehlcke
El Fri, Apr 07, 2017 at 12:51:57AM +0200 Johannes Berg ha dit: > On Thu, 2017-04-06 at 15:42 -0700, Matthias Kaehlcke wrote: > > > > Thanks, it would also require to move the initialization of > > ieee80211_default_rc_algo into an ifdef. If you can live with such a > > solution I'm happy to

Re: [PATCH] net: ipv4: netfilter: Remove unused function nf_nat_need_gre()

2017-04-06 Thread Pablo Neira Ayuso
On Sat, Apr 01, 2017 at 07:06:33PM +0530, simran singhal wrote: > The function nf_nat_need_gre() on being called, simply returns > back. The function doesn't have FIXME code around. > Hence, nf_nat_need_gre() and its calls have been removed. > > Signed-off-by: simran singhal

Re: [Outreachy kernel] [PATCH] net: netfilter: Remove typedef from "typedef struct bitstr_t".

2017-04-06 Thread Pablo Neira Ayuso
On Tue, Mar 28, 2017 at 11:54:13PM +0530, Arushi Singhal wrote: > This patch removes typedefs from struct and renames it from "typedef struct > bitstr_t" to "struct bitstr" as per kernel coding standards." > > Signed-off-by: Arushi Singhal > --- >

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Johannes Berg
On Thu, 2017-04-06 at 15:42 -0700, Matthias Kaehlcke wrote: > > Thanks, it would also require to move the initialization of > ieee80211_default_rc_algo into an ifdef. If you can live with such a > solution I'm happy to change it. I think that'd be something I can live with, yeah. > > git

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Matthias Kaehlcke
El Thu, Apr 06, 2017 at 11:12:25PM +0200 Johannes Berg ha dit: > On Thu, 2017-04-06 at 12:24 -0700, Matthias Kaehlcke wrote: > > > I agree that the code looks worse :( I hoped to find a fix using a > > preprocessor condition but wasn't successful. > > It's actually easy - just remove the

Re: [PATCH 00/10] ftgmac: Rework batch 2 - RX path

2017-04-06 Thread David Miller
From: Benjamin Herrenschmidt Date: Thu, 6 Apr 2017 11:02:42 +1000 > This is the second batch of updates to the ftgmac100 driver. > > This one tackles the RX path of the driver, simplifying > it greatly to match common practice while significantly > increasing the

Re: tcpprobe display format for snd_nxt and snd_una

2017-04-06 Thread hiren panchasara
On 04/06/17 at 05:45P, Stephen Hemminger wrote: > On Wed, 5 Apr 2017 12:40:09 -0700 > hiren panchasara wrote: > > > (New to linux and first-time poster so please guide me if needed.) > > > > Upon using tcpprobe I realized that it prints snd_nxt and snd_una as hex >

Re: [Patch net] net_sched: replace yield() with cond_resched()

2017-04-06 Thread Stephen Hemminger
On Thu, 06 Apr 2017 03:54:19 +0200 Mike Galbraith wrote: > On Wed, 2017-04-05 at 16:42 -0700, Cong Wang wrote: > > On Tue, Apr 4, 2017 at 10:56 PM, Mike Galbraith wrote: > > > On Tue, 2017-04-04 at 22:19 -0700, Cong Wang wrote: > > > > On Tue, Apr 4, 2017 at

Re: [Outreachy kernel] [PATCH v3] net: netfilter: Add nfnl_msg_type() helper function

2017-04-06 Thread Pablo Neira Ayuso
Hi, On Tue, Mar 28, 2017 at 10:27:32PM +0530, Arushi Singhal wrote: > To remove complexity of code the function is added in nfnetlink.h > to make code more clear and readable. > This is opencoded in a way that makes it error prone for future > netfilter netlink subsystems. > > Signed-off-by:

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

2017-04-06 Thread kys
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 interrupt path. Signed-off-by: K. Y. Srinivasan ---

Re: [PATCH 00/19] pull request for net-next: batman-adv 2017-04-06

2017-04-06 Thread David Miller
From: Simon Wunderlich Date: Thu, 6 Apr 2017 16:07:22 +0200 > here is our feature/cleanup pull request of batman-adv to go into net-next. > > Please pull or let me know of any problem! Pulled, thanks Simon.

Re: [PATCH v2 00/13] ftgmac100: Rework batch 1 - Link & Interrupts

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 12:46 -0700, Florian Fainelli wrote: > > I thought a while ago we could add some dev flag to prevent the link > > watch from doing that, but never got to look into it myself and > > apparently neither did Gavin. > > It sounds like a similar situation to e.g: 802.1x, you want

Re: tcpprobe display format for snd_nxt and snd_una

2017-04-06 Thread Stephen Hemminger
On Wed, 5 Apr 2017 12:40:09 -0700 hiren panchasara wrote: > (New to linux and first-time poster so please guide me if needed.) > > Upon using tcpprobe I realized that it prints snd_nxt and snd_una as hex > which makes it harder to read and compare with tcpdump for

Re: [PATCH 4/4] PCI: remove pci_enable_msix

2017-04-06 Thread Bjorn Helgaas
On Thu, Apr 06, 2017 at 02:24:48PM +0200, Christoph Hellwig wrote: > Unused now that all callers switched to pci_alloc_irq_vectors. > > Signed-off-by: Christoph Hellwig I already acked this, but I can do it again :)

Re: [PATCH] ath9k: Add cast to u8 to FREQ2FBIN macro

2017-04-06 Thread Joe Perches
On Thu, 2017-04-06 at 14:21 -0700, Matthias Kaehlcke wrote: > The macro results are assigned to u8 variables/fields. Adding the cast > fixes plenty of clang warnings about "implicit conversion from 'int' to > 'u8'". > > Signed-off-by: Matthias Kaehlcke > --- >

Re: [PATCH net-next 0/8] qed: Misc cleanups and fixes

2017-04-06 Thread David Miller
From: Yuval Mintz Date: Thu, 6 Apr 2017 15:58:27 +0300 > Patches #1 and #2 revolve around register access performed by driver; > The first merely adds some debug, while the second does some fixing > of incorrect PTT usage as well as preventing issues similar to those >

Re: [PATCH net-next 0/7] rxrpc: Miscellany

2017-04-06 Thread David Miller
From: David Howells <dhowe...@redhat.com> Date: Thu, 06 Apr 2017 11:22:14 +0100 > Here's a set of patches that make some minor changes to AF_RXRPC: ... > Tagged thusly: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-rewrite-201

[PATCH] ath9k: Add cast to u8 to FREQ2FBIN macro

2017-04-06 Thread Matthias Kaehlcke
The macro results are assigned to u8 variables/fields. Adding the cast fixes plenty of clang warnings about "implicit conversion from 'int' to 'u8'". Signed-off-by: Matthias Kaehlcke --- drivers/net/wireless/ath/ath9k/eeprom.h | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 3/4] xfrm: Prepare for CRYPTO_MAX_ALG_NAME expansion

2017-04-06 Thread Steffen Klassert
On Thu, Apr 06, 2017 at 04:16:10PM +0800, Herbert Xu wrote: > This patch fixes the xfrm_user code to use the actual array size > rather than the hard-coded CRYPTO_MAX_ALG_NAME length. This is > because the array size is fixed at 64 bytes while we want to increase > the in-kernel

Re: [PATCH 0/4] crypto: CRYPTO_MAX_ALG_NAME is too low

2017-04-06 Thread Steffen Klassert
On Thu, Apr 06, 2017 at 01:58:32PM -0700, David Miller wrote: > From: Herbert Xu > Date: Thu, 6 Apr 2017 16:15:09 +0800 > > > As the final patch depends on all three it would be easiest if > > we pushed the xfrm patch through the crypto tree. Steffen/David? > > No

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Johannes Berg
On Thu, 2017-04-06 at 12:24 -0700, Matthias Kaehlcke wrote: > I agree that the code looks worse :( I hoped to find a fix using a > preprocessor condition but wasn't successful. It's actually easy - just remove the 'default ""' from Kconfig, and then the symbol won't be defined at all if it

Re: [PATCH 0/4] crypto: CRYPTO_MAX_ALG_NAME is too low

2017-04-06 Thread David Miller
From: Herbert Xu Date: Thu, 6 Apr 2017 16:15:09 +0800 > As the final patch depends on all three it would be easiest if > we pushed the xfrm patch through the crypto tree. Steffen/David? No objections from me for this going through the crypto tree.

Re: [PATCH net] sctp: listen on the sock only when it's state is listening or closed

2017-04-06 Thread David Miller
From: Xin Long Date: Thu, 6 Apr 2017 13:10:52 +0800 > Now sctp doesn't check sock's state before listening on it. It could > even cause changing a sock with any state to become a listening sock > when doing sctp_listen. > > This patch is to fix it by checking sock's state

Re: [net-next 0/7][pull request] 100GbE Intel Wired LAN Driver Updates 2017-04-05

2017-04-06 Thread David Miller
From: Jeff Kirsher Date: Thu, 6 Apr 2017 00:54:49 -0700 > This series contains updates to fm10k only. > > Phil Turnbull from Oracle fixes an issue where the argument provided to > FM10K_REMOVED macro was not what was expecting. > > Jake modifies the driver to

Re: [BUG] kernel oops during bridge creation

2017-04-06 Thread Ido Schimmel
On Thu, Apr 06, 2017 at 11:26:06PM +0300, Nikolay Aleksandrov wrote: > Actually making br_vlan_init() idempotent might work, keep the code as-is > just init the > the vlans before the changelink() in newlink(), then the second vlan_init() > inside would > be a no-op, but it will work for the old

Re: [PATCH net-next v5 0/2] L2TP:Adjust intf MTU, add underlay L3, L2 hdrs.

2017-04-06 Thread David Miller
From: "R. Parameswaran" Date: Wed, 5 Apr 2017 17:05:49 -0700 (PDT) > > Existing L2TP kernel code does not derive the optimal MTU for Ethernet > pseudowires and instead leaves this to a userspace L2TP daemon or > operator. If an MTU is not specified, the existing

Re: [PATCH] net: ethernet: wiznet: avoid format string exposure

2017-04-06 Thread David Miller
From: Kees Cook Date: Wed, 5 Apr 2017 14:39:35 -0700 > While unlikely, this makes sure any format strings in the device name > can't exposure information via the resulting workqueue name. > > Signed-off-by: Kees Cook Applied.

Re: [PATCH] qlge: avoid format string exposure in workqueue

2017-04-06 Thread David Miller
From: Kees Cook Date: Wed, 5 Apr 2017 14:39:03 -0700 > While unlikely, this makes sure the workqueue name won't be processed > as a format string. > > Signed-off-by: Kees Cook Applied.

Re: [PATCH net] qed: Correct MSI-x for storage

2017-04-06 Thread David Miller
From: Yuval Mintz Date: Wed, 5 Apr 2017 21:20:11 +0300 > When qedr is enabled, qed would try dividing the msi-x vectors between > L2 and RoCE, starting with L2 and providing it with sufficient vectors > for its queues. > > Problem is qed would also do that for storage

Re: [PATCH net-next 0/2] net: dsa: Mock-up driver couple fixes

2017-04-06 Thread David Miller
From: Florian Fainelli Date: Wed, 5 Apr 2017 11:19:29 -0700 > Thanks to Dan's static checker, a bunch of small issues were found in the > code. Series applied, thanks Florian.

Re: [PATCH net-next] net/sched: Removed unused vlan actions definition

2017-04-06 Thread David Miller
From: Or Gerlitz Date: Wed, 5 Apr 2017 19:09:25 +0300 > Commit c7e2b9689ef "sched: introduce vlan action" added both the > UAPI values for the vlan actions (TCA_VLAN_ACT_) and these two > in-kernel ones which are not used, remove them. > > Signed-off-by: Or Gerlitz

Re: [PATCH net-next] mlx4: trust shinfo->gso_segs

2017-04-06 Thread David Miller
From: Eric Dumazet Date: Wed, 05 Apr 2017 08:49:02 -0700 > From: Eric Dumazet > > mlx4 is the only driver in the tree making a point to recompute > shinfo->gso_segs. > > Lets remove superfluous code. > > Signed-off-by: Eric Dumazet

Re: [BUG] kernel oops during bridge creation

2017-04-06 Thread Nikolay Aleksandrov
On 06/04/17 21:58, Ido Schimmel wrote: > +Nik > Thanks! > On Thu, Apr 06, 2017 at 08:19:35PM +0200, Peter V. Saveliev wrote: >> Operation: >> >> # ip link add name test type bridge vlan_default_pvid 1 >> >> Result: >> >> Kernel oops. Minimal required netlink packet structure: >> >> ifinfmsg: >>

Re: [PATCH net] l2tp: define SOL_PPPOL2TP in uapi

2017-04-06 Thread David Miller
From: Guillaume Nault Date: Wed, 5 Apr 2017 16:52:35 +0200 > Userspace needs SOL_PPPOL2TP to be defined for using PPPOL2TP_SO_* > socket options. > > Signed-off-by: Guillaume Nault We really can't do this, there is no precedence for defining the

Re: [PATCH] qed: fix missing break in OOO_LB_TC case

2017-04-06 Thread David Miller
From: Colin King Date: Wed, 5 Apr 2017 13:35:44 +0100 > From: Colin Ian King > > There seems to be a missing break on the OOO_LB_TC case, pq_id > is being assigned and then re-assigned on the fall through default > case and that seems

Re: [PATCH] usbnet: make sure no NULL pointer is passed through

2017-04-06 Thread David Miller
From: Oliver Neukum Date: Wed, 5 Apr 2017 14:14:39 +0200 > Coverity reports: ... > It is valid to offer commands without a buffer, but then you need a size > of zero. This should actually be checked. > > Signed-off-by: Oliver Neukum Applied, thanks

Re: [PATCH net-next] net/mlx5e: fix build error without CONFIG_SYSFS

2017-04-06 Thread David Miller
From: Tobias Regnery Date: Wed, 5 Apr 2017 11:11:10 +0200 > Commit 9008ae074885 ("net/mlx5e: Minimize mlx5e_{open/close}_locked") > copied the calls to netif_set_real_num_{tx,rx}_queues from > mlx5e_open_locked to mlx5e_activate_priv_channels and wraps them in an > if

Re: [PATCH net-next 0/7] s390 patches for net-next

2017-04-06 Thread David Miller
From: Ursula Braun Date: Wed, 5 Apr 2017 10:40:08 +0200 > here are some cleanup patches for drivers/s390/net. This doesn't apply cleanly to net-next, please respin.

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

2017-04-06 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > The SMI clause 22 & 45 read/write operations are local to the global2.c file, > so make them static. This eliminates the following warning: > > drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for >

Re: [PATCH v2 00/13] ftgmac100: Rework batch 1 - Link & Interrupts

2017-04-06 Thread Florian Fainelli
On 04/04/2017 11:31 PM, Benjamin Herrenschmidt wrote: > On Tue, 2017-04-04 at 23:02 -0700, Florian Fainelli wrote: > >> We don't necessarily have a phydev attached when using NC-SI, so it was >>> easier to have the core code path not have to go fishing for those >>> settings in different places

Re: [PATCH] af_unix: Use designated initializers

2017-04-06 Thread David Miller
From: Kees Cook Date: Tue, 4 Apr 2017 22:12:09 -0700 > Prepare to mark sensitive kernel structures for randomization by making > sure they're using designated initializers. These were identified during > allyesconfig builds of x86, arm, and arm64, and the initializer fixes

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

2017-04-06 Thread Florian Fainelli
The SMI clause 22 & 45 read/write operations are local to the global2.c file, so make them static. This eliminates the following warning: drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c45' [-Wmissing-prototypes] int

Re: [PATCH v2 00/13] ftgmac100: Rework batch 1 - Link & Interrupts

2017-04-06 Thread David Miller
From: Benjamin Herrenschmidt Date: Wed, 5 Apr 2017 12:28:40 +1000 > This is version 2 of the first batch of updates to the > ftgmac100 driver. > > Essentially: > > - A few misc cleanups > - Fixing link speed & duplex handling (including dealing with >an Aspeed

Re: [PATCH v2] net: netfilter: Remove multiple assignment.

2017-04-06 Thread Pablo Neira Ayuso
Hi Arushi, On Tue, Mar 28, 2017 at 04:03:27AM +0530, Arushi Singhal wrote: > This patch removes multiple assignments to follow the kernel coding > style as also reported by checkpatch.pl. > Done using coccinelle. > @@ > identifier i1,i2; > constant c; > @@ > - i1=i2=c; > + i1=c; > + i2=i1; I see

Re: [PATCH net-next] liquidio: fix Octeon core watchdog timeout false alarm

2017-04-06 Thread David Miller
From: Felix Manlunas Date: Tue, 4 Apr 2017 19:26:57 -0700 > Detection of watchdog timeout of Octeon cores is flawed and susceptible to > false alarms. Refactor by removing the detection code, and in its place, > leverage existing code that monitors for an indication

Re: [Patch net] net_sched: check noop_qdisc before qdisc_hash_add()

2017-04-06 Thread David Miller
From: Cong Wang Date: Tue, 4 Apr 2017 18:51:30 -0700 > Dmitry reported a crash when injecting faults in > attach_one_default_qdisc() and dev->qdisc is still > a noop_disc, the check before qdisc_hash_add() fails > to catch it because it tests NULL. We should test >

Re: [PATCH net-next] net: usbnet: Remove unused driver_name variable

2017-04-06 Thread David Miller
From: Florian Fainelli Date: Tue, 4 Apr 2017 18:16:57 -0700 > With GCC 6.3, we can get the following warning: > > drivers/net/usb/usbnet.c:85:19: warning: 'driver_name' defined but not > used [-Wunused-const-variable=] > static const char driver_name [] = "usbnet"; >

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Matthias Kaehlcke
Hi Johannes, thanks for your comments El Thu, Apr 06, 2017 at 09:11:18PM +0200 Johannes Berg ha dit: > On Thu, 2017-04-06 at 11:56 -0700, Matthias Kaehlcke wrote: > > Clang raises a warning about the expression 'strlen(CONFIG_XXX)' > > being > > used in a logical operation. Clangs' builtin

Re: [PATCH net-next] selftests/bpf: fix merge conflict

2017-04-06 Thread David Miller
From: Alexei Starovoitov Date: Thu, 6 Apr 2017 12:20:26 -0700 > fix artifact of merge resolution > > Signed-off-by: Alexei Starovoitov > Acked-by: Daniel Borkmann Sorry about that, applied, thanks!

[PATCH net-next] selftests/bpf: fix merge conflict

2017-04-06 Thread Alexei Starovoitov
fix artifact of merge resolution Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- tools/testing/selftests/bpf/test_verifier.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c

Re: [PATCH] net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given

2017-04-06 Thread David Miller
From: Florian Larysch Date: Mon, 3 Apr 2017 16:46:09 +0200 > inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to > ip_route_input when iif is given. If a multipath route is present for > the designated destination, ip_multipath_icmp_hash ends up being called, >

Re: [PATCH] netpoll: Check for skb->queue_mapping

2017-04-06 Thread Eric Dumazet
On Thu, 2017-04-06 at 12:07 -0700, tndave wrote: > > + q_index = q_index % dev->real_num_tx_queues; > cpu interrupted here and dev->real_num_tx_queues has reduced! > > + skb_set_queue_mapping(skb, q_index); > > + } > > + txq =

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Johannes Berg
On Thu, 2017-04-06 at 11:56 -0700, Matthias Kaehlcke wrote: > Clang raises a warning about the expression 'strlen(CONFIG_XXX)' > being > used in a logical operation. Clangs' builtin strlen function resolves > the > expression to a constant at compile time, which causes clang to > generate > a

Re: [PATCH] netpoll: Check for skb->queue_mapping

2017-04-06 Thread tndave
On 04/06/2017 03:26 AM, Eric Dumazet wrote: On Wed, 2017-04-05 at 19:06 -0700, Tushar Dave wrote: Reducing real_num_tx_queues needs to be in sync with skb queue_mapping otherwise skbs with queue_mapping greater than real_num_tx_queues can be sent to the underlying driver and can result in

Re: [BUG] kernel oops during bridge creation

2017-04-06 Thread Ido Schimmel
+Nik On Thu, Apr 06, 2017 at 08:19:35PM +0200, Peter V. Saveliev wrote: > Operation: > > # ip link add name test type bridge vlan_default_pvid 1 > > Result: > > Kernel oops. Minimal required netlink packet structure: > > ifinfmsg: > - IFLA_IFNAME: "test" > - IFLA_LINKINFO: >

Re: [git pull] skb_copy_{,and_csum_}datagram_msg() fixes

2017-04-06 Thread David Miller
From: Al Viro Date: Sun, 2 Apr 2017 17:23:28 +0100 > Fixes rsync et.al. regression since 3.19... Pulled, thanks Al.

[PATCH] mac80211: Fix clang warning about constant operand in logical operation

2017-04-06 Thread Matthias Kaehlcke
Clang raises a warning about the expression 'strlen(CONFIG_XXX)' being used in a logical operation. Clangs' builtin strlen function resolves the expression to a constant at compile time, which causes clang to generate a 'constant-logical-operand' warning. Split the if statement in two to avoid

[BUG] kernel oops during bridge creation

2017-04-06 Thread Peter V. Saveliev
Operation: # ip link add name test type bridge vlan_default_pvid 1 Result: Kernel oops. Minimal required netlink packet structure: ifinfmsg: - IFLA_IFNAME: "test" - IFLA_LINKINFO: = IFLA_INFO_KIND: "bridge" = IFLA_INFO_DATA:

Re: [PATCH net-next] bonding: attempt to better support longer hw addresses

2017-04-06 Thread Jarod Wilson
On 2017-04-05 9:45 PM, David Miller wrote: From: Jarod Wilson Date: Tue, 4 Apr 2017 17:32:42 -0400 ... Applied, but: +static inline void bond_hw_addr_copy(u8 *dst, const u8 *src, unsigned int len) +{ + if (len == ETH_ALEN) { + ether_addr_copy(dst,

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

2017-04-06 Thread Roger Quadros
On 06/04/17 15:05, Andrew Lunn wrote: >>> Do you really need more than one GPIO? A single gpio would make all >>> this code a lot simpler. >>> >> >> Yes we need. Some of our boards have separate GPIO RESET lines for >> different PHYs on the same MDIO bus. > > If you have a one-to-one mapping of

Re: [PATCH] mwifiex: MAC randomization should not be persistent

2017-04-06 Thread Brian Norris
On Thu, Apr 06, 2017 at 07:02:15AM +0300, Kalle Valo wrote: > Brian Norris writes: > > > nl80211 provides the NL80211_SCAN_FLAG_RANDOM_ADDR for every scan > > request that should be randomized; the absence of such a flag means we > > should not randomize. However,

[PATCH net 1/2] l2tp: don't mask errors in pppol2tp_setsockopt()

2017-04-06 Thread Guillaume Nault
pppol2tp_setsockopt() unconditionally overwrites the error value returned by pppol2tp_tunnel_setsockopt() or pppol2tp_session_setsockopt(), thus hiding errors from userspace. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: Guillaume Nault

[PATCH net 2/2] l2tp: don't mask errors in pppol2tp_getsockopt()

2017-04-06 Thread Guillaume Nault
pppol2tp_getsockopt() doesn't take into account the error code returned by pppol2tp_tunnel_getsockopt() or pppol2tp_session_getsockopt(). If error occurs there, pppol2tp_getsockopt() continues unconditionally and reports erroneous values. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into

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

2017-04-06 Thread Guillaume Nault
Fix pppol2tp_[gs]etsockopt() so that they don't ignore errors returned by their helper functions. Guillaume Nault (2): l2tp: don't mask errors in pppol2tp_setsockopt() l2tp: don't mask errors in pppol2tp_getsockopt() net/l2tp/l2tp_ppp.c | 9 ++--- 1 file changed, 6 insertions(+), 3

Re: [PATCH 1/2] net: netfilter: Remove typedef from "typedef struct field_t"

2017-04-06 Thread Pablo Neira Ayuso
On Sat, Mar 25, 2017 at 05:57:55PM +0530, Arushi Singhal wrote: > This patch removes typedefs from struct and renames it from "typedef struct > field_t" to "struct field" as per kernel coding standards." > > Signed-off-by: Arushi Singhal > --- >

Re: [PATCH net-next] net/sched: Removed unused vlan actions definition

2017-04-06 Thread Simon Horman
On Wed, Apr 05, 2017 at 07:09:25PM +0300, Or Gerlitz wrote: > Commit c7e2b9689ef "sched: introduce vlan action" added both the > UAPI values for the vlan actions (TCA_VLAN_ACT_) and these two > in-kernel ones which are not used, remove them. > > Signed-off-by: Or Gerlitz >

Re: [PATCH net 1/1] net: tcp: Don't increase the TCP_MIB_OUTRSTS when fail to transmit RST

2017-04-06 Thread Eric Dumazet
On Thu, 2017-04-06 at 10:08 -0400, Neal Cardwell wrote: > On Thu, Apr 6, 2017 at 10:05 AM, Gao Feng wrote: > > If so, we should increase the TCP_MIB_OUTRSTS too when fail to alloc skb. > > When machine is overloaded and mem is exhausted, it may fail to alloc skb. > >

Re: [PATCH 3/4] xfrm: Prepare for CRYPTO_MAX_ALG_NAME expansion

2017-04-06 Thread Alexander Sverdlin
On 06/04/17 10:16, Herbert Xu wrote: > This patch fixes the xfrm_user code to use the actual array size > rather than the hard-coded CRYPTO_MAX_ALG_NAME length. This is > because the array size is fixed at 64 bytes while we want to increase > the in-kernel CRYPTO_MAX_ALG_NAME value. > >

Re: [PATCH 4/4] crypto: api - Extend algorithm name limit to 128 bytes

2017-04-06 Thread Alexander Sverdlin
On 06/04/17 10:16, Herbert Xu wrote: > With the new explicit IV generators, we may now exceed the 64-byte > length limit on the algorithm name, e.g., with > > echainiv(authencesn(hmac(sha256-generic),cbc(des3_ede-generic))) > > This patch extends the length limit to 128 bytes. > >

Re: [PATCH 1/4] crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion

2017-04-06 Thread Alexander Sverdlin
On 06/04/17 10:16, Herbert Xu wrote: > This patch hard-codes CRYPTO_MAX_NAME in the user-space API to > 64, which is the current value of CRYPTO_MAX_ALG_NAME. This patch > also replaces all remaining occurences of CRYPTO_MAX_ALG_NAME > in the user-space API with CRYPTO_MAX_NAME. > > This way the

RE: [PATCH net 1/1] net: tcp: Don't increase the TCP_MIB_OUTRSTS when fail to transmit RST

2017-04-06 Thread Gao Feng
Hi Neal > -Original Message- > > On Thu, Apr 6, 2017 at 10:05 AM, Gao Feng wrote: > > If so, we should increase the TCP_MIB_OUTRSTS too when fail to alloc skb. > > When machine is overloaded and mem is exhausted, it may fail to alloc skb. > > Moving the

Re: [PATCH 0/4] crypto: CRYPTO_MAX_ALG_NAME is too low

2017-04-06 Thread Alexander Sverdlin
Hi! On 06/04/17 10:15, Herbert Xu wrote: > On Thu, Mar 16, 2017 at 03:16:29PM +0100, Alexander Sverdlin wrote: >> This is a regression caused by 856e3f4092 >> ("crypto: seqiv - Add support for new AEAD interface") >> >> As I've said above, I can offer one of the two solutions, which patch should

  1   2   3   >