Re: [PATCH 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-06 Thread Juergen Borleis
Hi Andrew, On Thursday 06 April 2017 13:59:00 Andrew Lunn wrote: > [...] > > > Does the MDIO bus go to the outside world? Could there be external > > > PHYs? > > > > This device includes two phys (at port 1 and 2) and these > > functions are called to detect their state. > > Some switches

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

2017-04-06 Thread Johannes Berg
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 with hex constants as well. Signed-off-by: Johannes Berg ---

[PATCH v2] mlxsw: convert to pci_alloc_irq_vectors

2017-04-06 Thread Christoph Hellwig
Trivial conversion as only one vector is supported, but at least we lose the useless msix_entry member in the per-device structure. Signed-off-by: Christoph Hellwig --- Changes since V1: - rebase due to a trivial conflict in net-next drivers/net/ethernet/mellanox/mlxsw/pci.c |

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-04-06 Thread Daniel Borkmann
On 04/06/2017 01:05 PM, Shubham Bansal wrote: Gentle Reminder. Sorry for late reply. Anybody can tell me how to test the JIT compiler ? There's lib/test_bpf.c, see Documentation/networking/filter.txt +1349 for some more information. It basically contains various test cases that have the

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

2017-04-06 Thread Alexei Starovoitov
On Wed, Apr 05, 2017 at 07:00:54PM -0700, Chenbo Feng wrote: > From: Chenbo Feng > > > 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

remove pci_enable_msix() V2

2017-04-06 Thread Christoph Hellwig
Hi all, this series removes the remaining callers of the pci_enable_msix() function and then the function itself. All remaining users in in network drivers, so if Bjorn is fine with it I'd like to handle it entirely through the netdev tree. Changes since V1: - replace the two previous thunderx

[PATCH 3/4] net: thunderx: Switch to pci_alloc_irq_vectors

2017-04-06 Thread Christoph Hellwig
From: Thanneeru Srinivasulu Remove deprecated pci_enable_msix API in favour of it's successor pci_alloc_irq_vectors. Signed-off-by: Thanneeru Srinivasulu Signed-off-by: Sunil Goutham Reviewed-by: Christoph Hellwig

[PATCH 1/4] net: alx: switch to pci_alloc_irq_vectors

2017-04-06 Thread Christoph Hellwig
Remove the deprecated pci_enable_msix API in favour of it's successor, and make sure to handle errors during IRQ setup properly. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/atheros/alx/alx.h | 6 -- drivers/net/ethernet/atheros/alx/main.c | 128

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

2017-04-06 Thread Alexander Sverdlin
Hi! On 06/04/17 10:16, Herbert Xu wrote: > This patch removes the hard-coded 64-byte limit on the length > of the algorithm name through bind(2). The address length can > now exceed that. The user-space structure remains unchanged. > In order to use a longer name simply extend the salg_name

Re: [PATCH 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format

2017-04-06 Thread Juergen Borleis
Hi Andrew, On Wednesday 05 April 2017 19:10:01 Andrew Lunn wrote: > [...] > > +static int lan9303_rcv(struct sk_buff *skb, struct net_device *dev, > > + struct packet_type *pt, struct net_device *orig_dev) > > +{ > > + u16 *lan9303_tag; > > + struct dsa_switch_tree *dst =

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

2017-04-06 Thread gfree . wind
From: Gao Feng When fail to transmit RST, don't increase TCP_MIB_OUTRSTS in func tcp_send_active_reset like the case that it only increases LINUX_MIB_TCPABORTFAILED when fail to alloc skb. Signed-off-by: Gao Feng --- net/ipv4/tcp_output.c | 4 ++-- 1 file

Re: [PATCH 3/4] net: dsa: LAN9303: add I2C managed mode support

2017-04-06 Thread Florian Fainelli
On 04/06/2017 06:46 AM, Juergen Borleis wrote: >>> + phy-reset-gpios = < 6 GPIO_ACTIVE_LOW>; >>> + phy-reset-duration = <200>; >>> + >>> + dsa,member = <0 0>; >>> + >>> + ports { >>> + #address-cells = <1>; >>> +

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Fix warning with CONFIG_OF=n

2017-04-06 Thread Andrew Lunn
On Thu, Apr 06, 2017 at 06:47:35AM -0700, Florian Fainelli wrote: > When CONFIG_OF=n, we will see the following warning: > > drivers/net/dsa/mv88e6xxx/chip.c:2834:34: warning: > 'mv88e6xxx_mdio_external_match' defined but not used > [-Wunused-const-variable=] > static const struct of_device_id

Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors

2017-04-06 Thread Ido Schimmel
On Thu, Apr 06, 2017 at 02:23:03PM +0200, Christoph Hellwig wrote: > Trivial conversion as only one vector is supported, but at least we > lose the useless msix_entry member in the per-device structure. > > Signed-off-by: Christoph Hellwig For net-next: Reviewed-by: Ido Schimmel

[PATCH net-next 2/2] net: dsa: mv88e6xxx: Provide prototypes for SMI read/write functions

2017-04-06 Thread Florian Fainelli
Fixes the following warnings: drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c45' [-Wmissing-prototypes] int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr, ^

[PATCH net-next 1/2] net: dsa: mv88e6xxx: Fix warning with CONFIG_OF=n

2017-04-06 Thread Florian Fainelli
When CONFIG_OF=n, we will see the following warning: drivers/net/dsa/mv88e6xxx/chip.c:2834:34: warning: 'mv88e6xxx_mdio_external_match' defined but not used [-Wunused-const-variable=] static const struct of_device_id mv88e6xxx_mdio_external_match[] = {

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

2017-04-06 Thread Neal Cardwell
On Thu, Apr 6, 2017 at 9:35 AM, wrote: > From: Gao Feng > > When fail to transmit RST, don't increase TCP_MIB_OUTRSTS in func > tcp_send_active_reset like the case that it only increases > LINUX_MIB_TCPABORTFAILED when fail to alloc skb. > >

Re: [PATCH 2/4 v3 net-next] net: stmmac: adding multiple buffers for rx

2017-04-06 Thread Thierry Reding
On Thu, Apr 06, 2017 at 09:49:09AM +0100, Joao Pinto wrote: [...] > err_init_rx_buffers: > - while (--i >= 0) > - stmmac_free_rx_buffer(priv, i); > + while (queue >= 0) { I /think/ this could simply be: while (queue--) { ... } That evaluates

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

2017-04-06 Thread Colin King
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 message. Detected by CoverityScan, CID#1426198 ("Dereference after

Re: [PATCH] ebpf: verify the output of the JIT

2017-04-06 Thread Alexei Starovoitov
On Tue, Apr 04, 2017 at 09:45:36PM -0600, Tycho Andersen wrote: > Hi Kees, > > On Tue, Apr 04, 2017 at 03:17:57PM -0700, Kees Cook wrote: > > On Tue, Apr 4, 2017 at 3:08 PM, Tycho Andersen wrote: > > > The goal of this patch is to protect the JIT against an attacker with a > >

[PATCH net-next 8/8] qed: Make OOO archipelagos into an array

2017-04-06 Thread Yuval Mintz
From: Michal Kalderon No need to maintain the various open archipelagos as a list - The maximal number of them is known, and we can use the CID as key for random-access into the array. Signed-off-by: Michal Kalderon Signed-off-by: Yuval

[PATCH net-next 7/8] qed: Provide iSCSI statistics to management

2017-04-06 Thread Yuval Mintz
Management firmware can query for some basic iSCSI-related statistics. Provide those just as we do for other protocols. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 20 drivers/net/ethernet/qlogic/qed/qed_iscsi.h | 14

[PATCH net-next 6/8] qed: Inform qedi the number of possible CQs

2017-04-06 Thread Yuval Mintz
Now that management firmware is capable of telling us the number of CQs available for a given PF, qed needs to communicate the number to qedi so it would know have many to use. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 3 ++-

Re: [PATCH net] team: call netdev_change_features out of team lock

2017-04-06 Thread Jiri Pirko
Thu, Apr 06, 2017 at 07:41:28AM CEST, lucien@gmail.com wrote: >Commit f6988cb63a4e ("team: don't call netdev_change_features under >team->lock") fixed the issue calling netdev_change_features under >team->lock for team_compute_features. > >But there are still two places where it calls

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- > From: Neal Cardwell [mailto:ncardw...@google.com] > Sent: Thursday, April 6, 2017 10:01 PM > To: Gao Feng > Cc: David Miller ; Alexey Kuznetsov > ; James Morris ; Patrick

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Fix warning with CONFIG_OF=n

2017-04-06 Thread Florian Fainelli
On 04/06/2017 07:04 AM, Andrew Lunn wrote: > On Thu, Apr 06, 2017 at 06:47:35AM -0700, Florian Fainelli wrote: >> When CONFIG_OF=n, we will see the following warning: >> >> drivers/net/dsa/mv88e6xxx/chip.c:2834:34: warning: >> 'mv88e6xxx_mdio_external_match' defined but not used >>

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

2017-04-06 Thread Yuval Mintz
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 fixed by 6f437d431930 ("qed: Don't use attention PTT for configuring BW"). Patch #3 better

[PATCH net-next 1/8] qed: Warn PTT usage by wrong hw-function

2017-04-06 Thread Yuval Mintz
PTT entries are per-hwfn; If some errneous flow is trying to use a PTT belonging to a differnet hwfn warn user, as this can break every register accessing flow later and is very hard to root-cause. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_hw.c |

[PATCH net-next 2/8] qed: Don't use main-ptt in unrelated flows

2017-04-06 Thread Yuval Mintz
From: Rahul Verma In order to access HW registers driver needs to acquire a PTT entry [mapping between bar memory and internal chip address]. Since acquiring PTT entries could fail [at least in theory] as their number is finite and other flows can hold them, we reserve

[PATCH net-next 3/8] qed: Configure cacheline size in HW

2017-04-06 Thread Yuval Mintz
From: Tomer Tayar Default HW configuration is optimal for an architecture where cache line size is 64B. During chip initialization, properly initialize the cache line size in HW to avoid possible redundant PCI transactions. Signed-off-by: Tomer Tayar

[PATCH net-next 5/8] qed: Add missing stat for new isles

2017-04-06 Thread Yuval Mintz
Firmware provides a statistic for the number of out-of-order isles it used - fill it in the iscsi-related statistics. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH net-next 4/8] qed: Don't close the OUT_EN during init

2017-04-06 Thread Yuval Mintz
Before initializing the chip's engine, driver currently closes a set of registers on the HW's ingress flow to prevent packets from slipping in while they're not supposed to. This configuration is insufficient, as there are some scenarios where packets would still arrive even when said registers

Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors

2017-04-06 Thread Jiri Pirko
Thu, Apr 06, 2017 at 02:23:03PM CEST, h...@lst.de wrote: >Trivial conversion as only one vector is supported, but at least we >lose the useless msix_entry member in the per-device structure. > >Signed-off-by: Christoph Hellwig Acked-by: Jiri Pirko

Re: [RFC net-next] bpf: taint loading !is_gpl programs

2017-04-06 Thread Alexei Starovoitov
On Wed, Apr 05, 2017 at 10:59:49PM -0400, Aaron Conole wrote: > Hi Daniel, > > Daniel Borkmann writes: > > > On 04/04/2017 08:33 PM, Aaron Conole wrote: > >> The eBPF framework is used for more than just socket level filtering. It > >> can also provide tracing, and even

Re: [PATCH 20/24] bpf: Restrict kernel image access functions when the kernel is locked down

2017-04-06 Thread Ard Biesheuvel
On 6 April 2017 at 13:29, Alexei Starovoitov wrote: > On Wed, Apr 05, 2017 at 09:17:25PM +0100, David Howells wrote: >> From: Chun-Yi Lee >> >> There are some bpf functions can be used to read kernel memory: >> bpf_probe_read, bpf_probe_write_user and

Re: [PATCH 3/4] net: dsa: LAN9303: add I2C managed mode support

2017-04-06 Thread Juergen Borleis
Hi Andrew, On Wednesday 05 April 2017 20:21:55 Andrew Lunn wrote: > [...] > > +SMSC/MicroChip LAN9303 three port ethernet switch > > +- > > + > > +Required properties: > > + > > +- compatible: should be "smsc,lan9303" > > +- #size-cells: must be 0 >

[PATCH net-next 0/2] net: dsa: mv88e6xxx: Fix a few build warnings

2017-04-06 Thread Florian Fainelli
Hi all, This fixes a bunch of warnings exposed by a make W=1, no functional changes Florian Fainelli (2): net: dsa: mv88e6xxx: Fix warning with CONFIG_OF=n net: dsa: mv88e6xxx: Provide prototypes for SMI read/write functions drivers/net/dsa/mv88e6xxx/chip.c| 2 ++

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

2017-04-06 Thread Simon Wunderlich
in the git repository at: git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20170406 for you to fetch changes up to ab044f8e3eaf84c4cc95d7606fadfdfa006dc8ec: batman-adv: Use net_device_stats from struct net_device (2017-04-05 15:41:24 +0200

[PATCH 02/19] batman-adv: Reduce preprocessor checks in multicast.c

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann It is not necessary to disable these code sections in case other kernel features are disabled. Instead the IS_ENABLED tests can be added directly in the code and the compiler can remove the unnecessary code parts during its optimization run.

Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Provide prototypes for SMI read/write functions

2017-04-06 Thread Andrew Lunn
On Thu, Apr 06, 2017 at 06:47:36AM -0700, Florian Fainelli wrote: > Fixes the following warnings: > > drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for > 'mv88e6xxx_g2_smi_phy_read_c45' [-Wmissing-prototypes] > int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip

[PATCH 08/19] batman-adv: prevent multiple ARP replies sent by gateways if dat enabled

2017-04-06 Thread Simon Wunderlich
From: Andreas Pape If dat is enabled it must be made sure that only the backbone gw which has claimed the remote destination for the ARP request answers the ARP request directly if the MAC address is known due to the local dat table. This prevents multiple ARP replies

[PATCH 06/19] batman-adv: Use __func__ to add function names to messages

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann The name of the function might change in which these messages are printed. It is therefore better to let the compiler handle the insertion of the correct function name. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich

[PATCH 04/19] batman-adv: Fix possible side-effects in _batadv_dbg

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann An argument of a macro should not be evaluated multiple times. Otherwise embedded operations in these arguments will be executed multiple times. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich

[PATCH 16/19] batman-adv: Remove ethtool msglevel functions

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann batadv devices don't support msglevel. The ethtool stubs therefore returned that it isn't supported. But instead, the complete function can be dropped to avoid that bogus values are shown in ethtool. Signed-off-by: Sven Eckelmann

[PATCH 10/19] batman-adv: drop unicast packets from other backbone gw

2017-04-06 Thread Simon Wunderlich
From: Andreas Pape Additional dropping of unicast packets received from another backbone gw if the same backbone network before being forwarded to the same backbone again is necessary. It was observed in a test setup that in rare cases these frames lead to looping

[PATCH 15/19] batman-adv: Use ethtool helper to get link status

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann The ethtool_ops of batman-adv never contained more than a stub for the get_link function pointer. It was always returning that a link exists even when the devices was not yet up and therefore nothing resampling a link could have been available. Instead

[PATCH 07/19] batman-adv: Omit unnecessary memset of netdev private data

2017-04-06 Thread Simon Wunderlich
From: Tobias Klauser The memory for netdev_priv is allocated using kzalloc in alloc_netdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser Signed-off-by: Sven Eckelmann

[PATCH 09/19] batman-adv: prevent duplication of ARP replies when DAT is used

2017-04-06 Thread Simon Wunderlich
From: Andreas Pape If none of the backbone gateways in a bla setup has already knowledge of the mac address searched for in an incoming ARP request from the backbone an address resolution via the DHT of DAT is started. The gateway can send several ARP requests to

[PATCH 05/19] batman-adv: Convert BATADV_PRINT_VID macro to function

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann The BATADV_PRINT_VID is not free of of possible side-effects. This can be avoided when the the macro is converted to a simple inline function. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich

[PATCH 01/19] batman-adv: Start new development cycle

2017-04-06 Thread Simon Wunderlich
Signed-off-by: Simon Wunderlich --- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 57a8103dbce7..f87b17c613a6 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@

[PATCH 18/19] batman-adv: Group ethtool related code together

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann The ethtool code was spread in soft-interface.c. This makes reading the code and working on it unnecessary complicated. Having everything in a common place next to the other code which references it, makes it slightly easier. Signed-off-by: Sven

[PATCH 13/19] batman-adv: privatize forw_packet skb assignment

2017-04-06 Thread Simon Wunderlich
From: Linus Lüssing An skb is assigned to a forw_packet only once, shortly after the forw_packet allocation. With this patch the assignment is moved into the this allocation function. Signed-off-by: Linus Lüssing Signed-off-by: Sven

[PATCH 03/19] batman-adv: Fix unbalanced braces around else statement

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/translation-table.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 14/19] batman-adv: restructure rebroadcast counter into forw_packet API

2017-04-06 Thread Simon Wunderlich
From: Linus Lüssing This patch refactors the num_packets counter of a forw_packet in the following three ways: 1) Removed dual-use of forw_packet::num_packets: -> now for aggregation purposes only 2) Using forw_packet::skb::cb::num_bcasts instead: -> for easier

[PATCH 19/19] batman-adv: Use net_device_stats from struct net_device

2017-04-06 Thread Simon Wunderlich
From: Tobias Klauser Instead of using a private copy of struct net_device_stats in struct batadv_priv, use stats from struct net_device. Signed-off-by: Tobias Klauser Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich

[PATCH 17/19] batman-adv: Remove ethtool .get_settings stub

2017-04-06 Thread Simon Wunderlich
From: Sven Eckelmann The .get_settings function pointer and the related API was deprecated. Fortunately, batman-adv is a virtual interface and never provided any useful information via .get_settings. The stub can therefore be removed. This also avoids that incorrect

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

2017-04-06 Thread Neal Cardwell
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 increment of TCP_MIB_OUTRSTS to the top of

[PATCH 12/19] batman-adv: handle race condition for claims between gateways

2017-04-06 Thread Simon Wunderlich
From: Andreas Pape Consider the following situation which has been found in a test setup: Gateway B has claimed client C and gateway A has the same backbone network as B. C sends a broad- or multicast to B and directly after this packet decides to send another packet to

[PATCH 11/19] batman-adv: changed debug messages for easier bla debugging

2017-04-06 Thread Simon Wunderlich
From: Andreas Pape Some of the bla debug messages are extended and additional messages are added for easier bla debugging. Some debug messages introduced with the dat changes in prior patches of this patch series have been changed to be more compliant to other existing

Re: [PATCH 20/24] bpf: Restrict kernel image access functions when the kernel is locked down

2017-04-06 Thread Alexei Starovoitov
On Wed, Apr 05, 2017 at 09:17:25PM +0100, David Howells wrote: > From: Chun-Yi Lee > > There are some bpf functions can be used to read kernel memory: > bpf_probe_read, bpf_probe_write_user and bpf_trace_printk. These allow > private keys in kernel memory (e.g. the hibernation

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

2017-04-06 Thread Marcelo Ricardo Leitner
On Thu, Apr 06, 2017 at 01:10:52PM +0800, Xin Long wrote: > 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 in sctp_listen, so

Re: [PATCH 4/4] net: dsa: LAN9303: add MDIO managed mode support

2017-04-06 Thread Florian Fainelli
On 04/05/2017 12:32 PM, Andrew Lunn wrote: >> +static const struct of_device_id lan9303_mdio_of_match[] = { >> +{ .compatible = "smsc,lan9303" }, >> +{ /* sentinel */ }, >> +}; >> +MODULE_DEVICE_TABLE(of, lan9303_mdio_of_match); > > If i'm reading this right, i think you have the same

Re: [PATCH 4/4] net: dsa: LAN9303: add MDIO managed mode support

2017-04-06 Thread Andrew Lunn
On Thu, Apr 06, 2017 at 06:53:10AM -0700, Florian Fainelli wrote: > > > On 04/05/2017 12:32 PM, Andrew Lunn wrote: > >> +static const struct of_device_id lan9303_mdio_of_match[] = { > >> + { .compatible = "smsc,lan9303" }, > >> + { /* sentinel */ }, > >> +}; > >> +MODULE_DEVICE_TABLE(of,

[PATCH 2/4] net/ena: switch to pci_alloc_irq_vectors

2017-04-06 Thread Christoph Hellwig
Remove the deprecated pci_enable_msix API in favour of it's successor. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 55 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 - 2 files changed, 12 insertions(+), 45

[PATCH 4/4] PCI: remove pci_enable_msix

2017-04-06 Thread Christoph Hellwig
Unused now that all callers switched to pci_alloc_irq_vectors. Signed-off-by: Christoph Hellwig --- drivers/pci/msi.c | 21 - include/linux/pci.h | 4 2 files changed, 25 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index

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 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 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 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

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 > --- >

[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] 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,

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 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 >

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

2017-04-06 Thread gfree . wind
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 tcp_send_active_reset to make sure it is increased always even though fail to alloc skb.

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. > >

[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

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,

[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: [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.

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 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/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: [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: [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: [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: [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] 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 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] 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 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

[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

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 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 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] 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] 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

  1   2   3   >