Re: [PATCH net-next 0/2] qed*: Fix inifinite spinning of PTP poll thread.

2019-05-29 Thread David Miller
From: Sudarsana Reddy Kalluru Date: Mon, 27 May 2019 20:21:31 -0700 > The patch series addresses an error scenario in the PTP Tx implementation. > > Please consider applying it to net-next. Series applied.

Re: [PATCH net-next] macvlan: Replace strncpy() by strscpy()

2019-05-29 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 27 May 2019 13:38:55 -0500 > The strncpy() function is being deprecated. Replace it by the safer > strscpy() and fix the following Coverity warning: > > "Calling strncpy with a maximum size argument of 16 bytes on destination > array ifrr.ifr_ifrn.ifrn_name

Re: [PATCH 1/8] net: ethernet: ixp4xx: Standard module init

2019-05-29 Thread Linus Walleij
On Fri, May 24, 2019 at 9:46 PM Andrew Lunn wrote: > What is the address space like? Could the mdio driver be pull out into > a standalone driver? The IXP4xx actually has a peculiar structure. Both the MDIO and ethernet goes out through the NPE (network processing engine) and MDIO in particular

Re: [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings

2019-05-29 Thread Linus Walleij
On Fri, May 24, 2019 at 10:06 PM Andrew Lunn wrote: > > +description: | > > + The Intel IXP4xx ethernet makes use of the IXP4xx NPE (Network > > + Processing Engine) and the IXP4xx Queue Mangager to process > > + the ethernet frames. It can optionally contain an MDIO bus to > > + talk to PHYs

Re: [PATCH v2 net-next 06/11] net: phylink: Add struct phylink_config to PHYLINK API

2019-05-29 Thread Maxime Chevallier
Hello Ioana, On Tue, 28 May 2019 20:38:12 +0300 Ioana Ciornei wrote: >The phylink_config structure will encapsulate a pointer to a struct >device and the operation type requested for this instance of PHYLINK. >This patch does not make any functional changes, it just transitions the >PHYLINK inte

[PATCH net 2/2] mlxsw: spectrum: Prevent force of 56G

2019-05-29 Thread Ido Schimmel
From: Amit Cohen Force of 56G is not supported by hardware in Ethernet devices. This configuration fails with a bad parameter error from firmware. Add check of this case. Instead of trying to set 56G with autoneg off, return a meaningful error. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial

[PATCH net 1/2] mlxsw: spectrum_acl: Avoid warning after identical rules insertion

2019-05-29 Thread Ido Schimmel
From: Jiri Pirko When identical rules are inserted, the latter one goes to C-TCAM. For that, a second eRP with the same mask is created. These 2 eRPs by the nature cannot be merged and also one cannot be parent of another. Teach mlxsw_sp_acl_erp_delta_fill() about this possibility and handle it g

[PATCH net 0/2] mlxsw: Two small fixes

2019-05-29 Thread Ido Schimmel
From: Ido Schimmel Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the insertion of two identical flower filters with different priorities would trigger a warning. Patch #2 from Amit prevents the driver from trying to configure a port with a speed of 56Gb/s and autoneg off as this

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-29 Thread Jiri Pirko
Tue, May 28, 2019 at 10:01:15PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> v1->v2: >> - added debugfs toggle to enable/disable flash status notifications > >Could you please add a

[PATCH net-next 1/8] mlxsw: i2c: Extend initialization with querying firmware info

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Extend initialization flow with query request for firmware info in order to obtain firmware version info. This info is to be provided to minimal driver to support ethtool get_drvinfo() interface. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schim

[PATCH net-next 4/8] mlxsw: reg: Extend sensor index field size of Management Temperature Register

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Extend the size of sensor_index field of MTMP (Management Temperature Register), from 8 to 12 bits due to hardware change. Add define for sensor index for Gear Box (inter-connects) temperature reading. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido

[PATCH net-next 3/8] mlxsw: core: Re-order initialization sequence

2019-05-29 Thread Ido Schimmel
From: Ido Schimmel The driver core first registers with the hwmon and thermal subsystems and only then proceeds to initialize the switch driver (e.g., mlxsw_spectrum). It is only during the last stage that the current firmware version is validated and a newer one flashed, if necessary. The above

[PATCH net-next 0/8] mlxsw: Hardware monitoring enhancements

2019-05-29 Thread Ido Schimmel
From: Ido Schimmel This patchset from Vadim provides various hardware monitoring related improvements for mlxsw. Patch #1 allows querying firmware version from the switch driver when the underlying bus is I2C. This is useful for baseboard management controller (BMC) systems that communicate with

[PATCH net-next 6/8] mlxsw: core: Extend hwmon interface with inter-connect temperature attributes

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Add new attributes to hwmon object for exposing inter-connects temperature input, highest, reset_history temperatures and label. Temperatures are read from Management Temperature Register. The number of inter-connect devices is read from Management General Peripheral Informa

[PATCH net-next 7/8] mlxsw: core: Extend the index size for temperature sensors readout

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Extend sensor index size for Management Temperature Bulk Register (MTBR) and Management Temperature Register (MTMP) upto 12 bits in order to align registers description with new version of PRM document. Add define for base sensor index for SFP modules temperature reading for

[PATCH net-next 2/8] mlxsw: i2c: Allow flexible setting of I2C transactions size

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Current implementation uses fixed size of I2C data transaction buffer. Allow to set size of I2C transactions according to I2C physical adapter capability. For that purpose adapter read and write size is obtained from the I2C physical adapter and buffer size is set according

[PATCH net-next 5/8] mlxsw: reg: Add Management General Peripheral Information Register

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Add MGPIR - Management General Peripheral Information Register, which allows software to query the hardware and firmware general information of peripheral entities as Gearboxes etc. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- driv

[PATCH net-next 8/8] mlxsw: core: Reduce buffer size in transactions for SFP modules temperature readout

2019-05-29 Thread Ido Schimmel
From: Vadim Pasternak Obtain SFP modules temperatures through MTMP register instead of MTBR register, because the first one utilizes shorter transaction buffer size for request. It improves performance in case low frequency interface (I2C) is used for communication with a chip. Signed-off-by: Va

[PATCH] isdn: hisax: isac: fix a possible concurrency use-after-free bug in ISAC_l1hw()

2019-05-29 Thread Young Xiao
In drivers/isdn/hisax/isac.c, the function isac_interrupt() and ISAC_l1hw() may be concurrently executed. ISAC_l1hw() line 499: if (!cs->tx_skb) isac_interrupt() line 250: dev_kfree_skb_irq(cs->tx_skb); Thus, a possible concurrency use-after-free bug may occur in ISAC_l1hw(). To fix the

Re: [PATCH bpf-next v3 2/3] libbpf: add bpf_object__load_xattr() API function to pass log_level

2019-05-29 Thread Quentin Monnet
2019-05-28 17:35 UTC-0700 ~ Alexei Starovoitov > On Fri, May 24, 2019 at 3:36 AM Quentin Monnet > wrote: >> >> libbpf was recently made aware of the log_level attribute for programs, >> used to specify the level of information expected to be dumped by the >> verifier. Function bpf_prog_load_xattr

[PATCH bpf-next] libbpf: prevent overwriting of log_level in bpf_object__load_progs()

2019-05-29 Thread Quentin Monnet
There are two functions in libbpf that support passing a log_level parameter for the verifier for loading programs: bpf_object__load_xattr() and bpf_load_program_xattr(). Both accept an attribute object containing the log_level, and apply it to the programs to load. It turns out that to effectivel

[PATCH bpf-next] selftests/bpf: fix compilation error for flow_dissector.c

2019-05-29 Thread Alan Maguire
When building the tools/testing/selftest/bpf subdirectory, (running both a local directory "make" and a "make -C tools/testing/selftests/bpf") I keep hitting the following compilation error: prog_tests/flow_dissector.c: In function ‘create_tap’: prog_tests/flow_dissector.c:150:38: error: ‘IFF_NAPI

[PATCH V1 net-next 01/11] net: ena: add handling of llq max tx burst size

2019-05-29 Thread sameehj
From: Sameeh Jubran There is a maximum TX burst size that the ENA device can handle. It is exposed by the device to the driver and the driver needs to comply with it to avoid bugs. In this commit we: 1. Add ena_com_is_doorbell_needed(), which calculates the number of llq entries that will be

[PATCH V1 net-next 00/11] Extending the ena driver to support new features and enhance performance

2019-05-29 Thread sameehj
From: Sameeh Jubran This patchset introduces the following: * add support for changing the inline header size (max_header_size) for applications with overlay and nested headers * enable automatic fallback to polling mode for admin queue when interrupt is not available or missed * add good check

[PATCH V1 net-next 10/11] net: ena: add good checksum counter

2019-05-29 Thread sameehj
From: Sameeh Jubran Add a new statistics to ETHTOOL to specify if the device calculated and validated the Rx csum. Signed-off-by: Evgeny Shmeilin Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 3 ++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++ driv

[PATCH V1 net-next 08/11] net: ena: add support for changing max_header_size in LLQ mode

2019-05-29 Thread sameehj
From: Sameeh Jubran Up until now the driver always used a single setting for the sizes of the different parts of the llq entry - 128 for entry size, 2 for descriptors before header and 96 for maximum header size. The current code makes sure that the parts of the llq entry are compatible with eac

[PATCH V1 net-next 09/11] net: ena: optimise calculations for CQ doorbell

2019-05-29 Thread sameehj
From: Sameeh Jubran This patch initially checks if CQ doorbell is needed before proceeding with the calculations. Signed-off-by: Igor Chauskin Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_eth_com.h | 20 ++- 1 file changed, 11 insertions(+), 9 deletions

[PATCH V1 net-next 06/11] net: ena: documentation: update ena.txt

2019-05-29 Thread sameehj
From: Sameeh Jubran Small cosmetic changes to ena.txt Signed-off-by: Sameeh Jubran --- Documentation/networking/device_drivers/amazon/ena.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/device_drivers/amazon/ena.txt b/Documentation/networki

[PATCH V1 net-next 02/11] net: ena: ethtool: add extra properties retrieval via get_priv_flags

2019-05-29 Thread sameehj
From: Arthur Kiyanovski This commit adds a mechanism for exposing different driver properties via ethtool's priv_flags. In this commit we: Add commands, structs and defines necessary for handling extra properties Add functions for: Allocation/destruction of a buffer for extra properties string

[PATCH V1 net-next 03/11] net: ena: replace free_tx/rx_ids union with single free_ids field in ena_ring

2019-05-29 Thread sameehj
From: Sameeh Jubran struct ena_ring holds a union of free_rx_ids and free_tx_ids. Both of the above fields mean the exact same thing and are used exactly the same way. Furthermore, these fields are always used with a prefix of the type of ring. So for tx it will be tx_ring->free_tx_ids, and for r

[PATCH V1 net-next 04/11] net: ena: arrange ena_probe() function variables in reverse christmas tree

2019-05-29 Thread sameehj
From: Sameeh Jubran Reverse christmas tree arrangement is when variables are written from longer to shorter with each line. Most of our functions are abiding this arrangement but this function does not. In this commit we arrange the variables of ena_probe() in reverse christmas tree. Signed-off

[PATCH V1 net-next 11/11] net: ena: use dev_info_once instead of static variable

2019-05-29 Thread sameehj
From: Sameeh Jubran Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index cff297e19..68bed2417 100644

Re: [net-next,v4 2/2] net: phy: sfp: enable i2c-bus detection on ACPI based systems

2019-05-29 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 04:02:33PM -0700, Ruslan Babayev wrote: > Lookup I2C adapter using the "i2c-bus" device property on ACPI based > systems similar to how it's done with DT. > > An example DSD describing an SFP on an ACPI based system: > > Device (SFP0) > { > Name (_HID, "PRP0001") >

[PATCH V1 net-next 05/11] net: ena: add newline at the end of pr_err prints

2019-05-29 Thread sameehj
From: Sameeh Jubran Some pr_err prints lacked '\n' in the end. Added where missing. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethe

[PATCH V1 net-next 07/11] net: ena: allow automatic fallback to polling mode

2019-05-29 Thread sameehj
From: Sameeh Jubran Enable fallback to polling mode for Admin queue when identified a command response arrival without an accompanying MSI-X interrupt Signed-off-by: Igor Chauskin Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 34 +-- drivers/

[PATCH bpf 1/2] selftests: bpf: move sub-register zero extension checks into subreg.c

2019-05-29 Thread Jiong Wang
It is better to centralize all sub-register zero extension checks into an independent file. This patch takes the first step to move existing sub-register zero extension checks into subreg.c. Acked-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Jiong Wang --- tools/testing/selft

[PATCH bpf 0/2] selftests: bpf: more sub-register zero extension unit tests

2019-05-29 Thread Jiong Wang
JIT back-ends need to guarantee high 32-bit cleared whenever one eBPF insn write low 32-bit sub-register only. It is possible that some JIT back-ends have failed doing this and are silently generating wrong image. This set completes the unit tests, so bug on this could be exposed. Jiong Wang (2):

[PATCH bpf 2/2] selftests: bpf: complete sub-register zero extension checks

2019-05-29 Thread Jiong Wang
eBPF ISA specification requires high 32-bit cleared when only low 32-bit sub-register is written. JIT back-ends must guarantee this semantics when doing code-gen. This patch complete unit tests for all of those insns that could be visible to JIT back-ends and defining sub-registers, if JIT back-en

Re: [PATCH net 2/2] net: dsa: tag_8021q: Create a stable binary format

2019-05-29 Thread Vladimir Oltean
On Wed, 29 May 2019 at 04:08, Florian Fainelli wrote: > > > > On 5/28/2019 3:50 PM, Vladimir Oltean wrote: > > Tools like tcpdump need to be able to decode the significance of fake > > VLAN headers that DSA uses to separate switch ports. > > > > But currently these have no global significance - th

Re: [PATCH rdma-next v2 05/17] RDMA/counter: Add set/clear per-port auto mode support

2019-05-29 Thread Leon Romanovsky
On Wed, May 22, 2019 at 01:56:08PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 29, 2019 at 11:34:41AM +0300, Leon Romanovsky wrote: > > From: Mark Zhang > > > > Add an API to support set/clear per-port auto mode. > > > > Signed-off-by: Mark Zhang > > Reviewed-by: Majd Dibbiny > > Signed-off-by:

Re: [PATCH net-next v5] net: sched: Introduce act_ctinfo action

2019-05-29 Thread Kevin 'ldir' Darbyshire-Bryant
In fairness to everyone the below deserves a public answer: > On 27 May 2019, at 21:56, Toke Høiland-Jørgensen wrote: > > Kevin 'ldir' Darbyshire-Bryant writes: > >> I have to call it a day. I have no idea why the patches are becoming >> corrupt and hence how to fix it, it’s probably something

Re: [PATCH rdma-next v2 05/17] RDMA/counter: Add set/clear per-port auto mode support

2019-05-29 Thread Leon Romanovsky
On Wed, May 29, 2019 at 01:12:18PM +0300, Leon Romanovsky wrote: > On Wed, May 22, 2019 at 01:56:08PM -0300, Jason Gunthorpe wrote: > > On Mon, Apr 29, 2019 at 11:34:41AM +0300, Leon Romanovsky wrote: > > > From: Mark Zhang > > > > > > Add an API to support set/clear per-port auto mode. > > > > >

Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot firmware

2019-05-29 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 05:23:56PM +0100, Russell King - ARM Linux admin wrote: > On Tue, May 28, 2019 at 06:11:39PM +0200, Andrew Lunn wrote: > > > One question: are we happy with failing the probe like this, or would it > > > be better to allow the probe to suceed? > > > > > > As has been pointe

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Leon Romanovsky
On Wed, May 22, 2019 at 02:26:36PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > > diff --git a/drivers/infiniband/core/device.c > > b/drivers/infiniband/core/device.c > > index c56ffc61ab1e..8ae4906a60e7 100644 > > +++ b/drivers/infiniband/core

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Leon Romanovsky
On Wed, May 22, 2019 at 02:10:42PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > > From: Mark Zhang > > > > Since a QP can only be bound to one counter, then if it is bound to a > > separate counter, for backward compatibility purpose, the stati

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Leon Romanovsky
On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > From: Mark Zhang > > Since a QP can only be bound to one counter, then if it is bound to a > separate counter, for backward compatibility purpose, the statistic > value must be: > * stat of default counter > + stat of all running a

[PATCH net-next,v3 1/9] net: ipv4: add skbuff fraglist splitter

2019-05-29 Thread Pablo Neira Ayuso
This patch adds the skbuff fraglist splitter. This API provides an iterator to transform the fraglist into single skbuff objects, it consists of: * ip_fraglist_init(), that initializes the internal state of the fraglist splitter. * ip_fraglist_prepare(), that restores the IPv4 header on the fr

[PATCH net-next,v3 2/9] net: ipv6: add skbuff fraglist splitter

2019-05-29 Thread Pablo Neira Ayuso
This patch adds the skbuff fraglist split iterator. This API provides an iterator to transform the fraglist into single skbuff objects, it consists of: * ip6_fraglist_init(), that initializes the internal state of the fraglist iterator. * ip6_fraglist_prepare(), that restores the IPv6 header on

[PATCH net-next,v3 6/9] netfilter: nf_conntrack: allow to register bridge support

2019-05-29 Thread Pablo Neira Ayuso
This patch adds infrastructure to register and to unregister bridge support for the conntrack module via nf_ct_bridge_register() and nf_ct_bridge_unregister(). Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_conntrack.h| 1 + include/net/netfilter/nf_conntrack_bridge.h | 1

[PATCH net-next,v3 7/9] netfilter: bridge: add connection tracking system

2019-05-29 Thread Pablo Neira Ayuso
This patch adds basic connection tracking support for the bridge, including initial IPv4 support. This patch register two hooks to deal with the bridge forwarding path, one from the bridge prerouting hook to call nf_conntrack_in(); and another from the bridge postrouting hook to confirm the entry.

[PATCH net-next,v3 4/9] net: ipv6: split skbuff into fragments transformer

2019-05-29 Thread Pablo Neira Ayuso
This patch exposes a new API to refragment a skbuff. This allows you to split either a linear skbuff or to force the refragmentation of an existing fraglist using a different mtu. The API consists of: * ip6_frag_init(), that initializes the internal state of the transformer. * ip6_frag_next(), tha

[PATCH net-next,v3 5/9] net: ipv4: place control buffer handling away from fragmentation iterators

2019-05-29 Thread Pablo Neira Ayuso
Deal with the IPCB() area away from the iterators. The bridge codebase has its own control buffer layout, move specific IP control buffer handling into the IPv4 codepath. Signed-off-by: Pablo Neira Ayuso --- net/ipv4/ip_output.c | 55 +++- 1 file

[PATCH net-next,v3 3/9] net: ipv4: split skbuff into fragments transformer

2019-05-29 Thread Pablo Neira Ayuso
This patch exposes a new API to refragment a skbuff. This allows you to split either a linear skbuff or to force the refragmentation of an existing fraglist using a different mtu. The API consists of: * ip_frag_init(), that initializes the internal state of the transformer. * ip_frag_next(), that

[PATCH net-next,v3 8/9] netfilter: nf_conntrack_bridge: add support for IPv6

2019-05-29 Thread Pablo Neira Ayuso
br_defrag() and br_fragment() indirections are added in case that IPv6 support comes as a module, to avoid pulling innecessary dependencies in. The new fraglist iterator and fragment transformer APIs are used to implement the refragmentation code. Signed-off-by: Pablo Neira Ayuso --- include/li

[PATCH net-next,v3 9/9] netfilter: nf_conntrack_bridge: register inet conntrack for bridge

2019-05-29 Thread Pablo Neira Ayuso
This patch enables IPv4 and IPv6 conntrack from the bridge to deal with local traffic. Hence, packets that are passed up to the local input path are confirmed later on from the {ipv4,ipv6}_confirm() hooks. For packets leaving the IP stack (ie. output path), fragmentation occurs after the inet post

[PATCH net-next,v3 0/9] connection tracking support for bridge

2019-05-29 Thread Pablo Neira Ayuso
Hi, This patchset adds native connection tracking support for the bridge. Patch #1 and #2 extract code from IPv4/IPv6 fragmentation core and introduce the fraglist splitter. That splits a skbuff fraglist into independent fragments. Patch #3 and #4 also extract code from IPv4/IPv6 fragmentation c

Re: [PATCH rdma-next v2 11/17] RDMA/netlink: Implement counter dumpit calback

2019-05-29 Thread Leon Romanovsky
On Wed, May 22, 2019 at 02:21:37PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 29, 2019 at 11:34:47AM +0300, Leon Romanovsky wrote: > > From: Mark Zhang > > > > This patch adds the ability to return all available counters > > together with their properties and hwstats. > > > > Signed-off-by: Mark

[PATCH net-next 1/7] net: inetdevice: provide replacement iterators for in_ifaddr walk

2019-05-29 Thread Florian Westphal
The ifa_list is protected either by rcu or rtnl lock, but the current iterators do not account for this. This adds two iterators as replacement, a later patch in the series will update them with the needed rcu/rtnl_dereference calls. Its not done in this patch yet to avoid sparse warnings -- the

[PATCH net-next 2/7] devinet: use in_dev_for_each_ifa_rcu in more places

2019-05-29 Thread Florian Westphal
This also replaces spots that used for_primary_ifa(). for_primary_ifa() aborts the loop on the first secondary address seen. Replace it with either the rcu or rtnl variant of in_dev_for_each_ifa(), but two places will now also consider secondary addresses too: inet_addr_onlink() and inet_ifa_bypr

[PATCH net-next 7/7] net: ipv4: provide __rcu annotation for ifa_list

2019-05-29 Thread Florian Westphal
ifa_list is protected by rcu, yet code doesn't reflect this. Add the __rcu annotations and fix up all places that are now reported by sparse. I've done this in the same commit to not add intermediate patches that result in new warnings. Reported-by: Eric Dumazet Signed-off-by: Florian Westphal

[PATCH net-next 3/7] afs: switch to in_dev_for_each_ifa_rcu

2019-05-29 Thread Florian Westphal
The in_dev_for_each_ifa_rcu helper gets used so sparse won't complain when we add the proper __rcu annotation to the ifa_list member in struct in_device later. While doing this I realized the helper only has one call site, so move it to where its needed. This then revealed that we allocate a temp

[PATCH net-next 0/7] net: add rcu annotations for ifa_list

2019-05-29 Thread Florian Westphal
Eric Dumazet reported follwing problem: It looks that unless RTNL is held, accessing ifa_list needs proper RCU protection. indev->ifa_list can be changed under us by another cpu (which owns RTNL) [..] A proper rcu_dereference() with an happy sparse support would require adding __rcu at

[PATCH net-next 4/7] netfilter: use in_dev_for_each_ifa_rcu

2019-05-29 Thread Florian Westphal
Netfilter hooks are always running under rcu read lock, use the new iterator macro so sparse won't complain once we add proper __rcu annotations. Signed-off-by: Florian Westphal --- net/ipv4/netfilter/nf_tproxy_ipv4.c| 9 +++-- net/netfilter/nf_conntrack_broadcast.c | 9 +++-- net/ne

[PATCH net-next 5/7] net: use new in_dev_ifa iterators

2019-05-29 Thread Florian Westphal
Use in_dev_for_each_ifa_rcu/rtnl instead. This prevents sparse warnings once proper __rcu annotations are added. Signed-off-by: Florian Westphal t di# Last commands done (6 commands done): --- net/ipv4/fib_frontend.c | 24 +--- net/ipv4/igmp.c | 5 +++-- net/ipv6/ad

[PATCH net-next 6/7] drivers: use in_dev_for_each_ifa_rtnl/rcu

2019-05-29 Thread Florian Westphal
Like previous patches, use the new iterator macros to avoid sparse warnings once proper __rcu annotations are added. Compile tested only. Signed-off-by: Florian Westphal --- drivers/infiniband/core/roce_gid_mgmt.c | 5 +++-- drivers/infiniband/hw/cxgb4/cm.c |

Re: [PATCH rdma-next v2 17/17] RDMA/nldev: Allow get default counter statistics through RDMA netlink

2019-05-29 Thread Leon Romanovsky
On Wed, May 22, 2019 at 02:30:11PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 29, 2019 at 11:34:53AM +0300, Leon Romanovsky wrote: > > From: Mark Zhang > > > > This patch adds the ability to return the hwstats of per-port default > > counters (which can also be queried through sysfs nodes). > > >

Re: PROBLEM: [1/2] Marvell 88E8040 (sky2) stopped working

2019-05-29 Thread Octavio Alvarez
On 5/28/19 11:57 PM, Petr Štetiar wrote: I just pulled from master and I don't see any updates for sky2.c. it was fixed in commit 6a0a923dfa14 ("of_net: fix of_get_mac_address retval if compiled without CONFIG_OF"). Oh! I see it now. I appreciate the quick help. Thanks! Octavio.

Re: [PATCH bpf 0/2] selftests: bpf: more sub-register zero extension unit tests

2019-05-29 Thread Daniel Borkmann
On 05/29/2019 11:57 AM, Jiong Wang wrote: > JIT back-ends need to guarantee high 32-bit cleared whenever one eBPF insn > write low 32-bit sub-register only. It is possible that some JIT back-ends > have failed doing this and are silently generating wrong image. > > This set completes the unit test

Re: [PATCH net-next v2] udp: Avoid post-GRO UDP checksum recalculation

2019-05-29 Thread Paolo Abeni
On Tue, 2019-05-28 at 12:22 -0600, Sean Tranchetti wrote: > Currently, when resegmenting an unexpected UDP GRO packet, the full UDP > checksum will be calculated for every new SKB created by skb_segment() > because the netdev features passed in by udp_rcv_segment() lack any > information about chec

Re: [PATCH net-next 3/7] afs: switch to in_dev_for_each_ifa_rcu

2019-05-29 Thread David Howells
Florian Westphal wrote: > The in_dev_for_each_ifa_rcu helper gets used so sparse won't > complain when we add the proper __rcu annotation to the ifa_list > member in struct in_device later. > > While doing this I realized the helper only has one call site, > so move it to where its needed. > >

[net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-05-29 Thread Phil Sutter
Unlike with bridges, one can't add an interface to a bond and set it up at the same time: | # ip link set dummy0 down | # ip link set dummy0 master bond0 up | Error: Device can not be enslaved while up. Of all drivers with ndo_add_slave callback, bond and team decline if IFF_UP flag is set, vrf c

[patch net-next RFC v1] mlxsw: core: Add the hottest thermal zone detection

2019-05-29 Thread Vadim Pasternak
When multiple sensors are mapped to the same cooling device, the cooling device should be set according the worst sensor from the sensors associated with this cooling device. Provide the hottest thermal zone detection and enforce cooling device to follow the temperature trends the hottest zone onl

Re: [PATCH net-next 3/7] afs: switch to in_dev_for_each_ifa_rcu

2019-05-29 Thread Florian Westphal
David Howells wrote: > Actually, whilst thanks are due for doing the work - it looks nicer now - I'm > told that there's not really any point populating the list. Current OpenAFS > ignores it, as does AuriStor - and IBM AFS 3.6 will do the right thing. [..] > On that basis, feel free to make it

Re: [PATCH bpf-next] libbpf: prevent overwriting of log_level in bpf_object__load_progs()

2019-05-29 Thread Daniel Borkmann
On 05/29/2019 11:23 AM, Quentin Monnet wrote: > There are two functions in libbpf that support passing a log_level > parameter for the verifier for loading programs: > bpf_object__load_xattr() and bpf_load_program_xattr(). Both accept an > attribute object containing the log_level, and apply it to

Re: [PATCH bpf-next] selftests/bpf: fix compilation error for flow_dissector.c

2019-05-29 Thread Daniel Borkmann
On 05/29/2019 11:48 AM, Alan Maguire wrote: > When building the tools/testing/selftest/bpf subdirectory, > (running both a local directory "make" and a > "make -C tools/testing/selftests/bpf") I keep hitting the > following compilation error: > > prog_tests/flow_dissector.c: In function ‘create_ta

Re: [PATCH ghak90 V6 00/10] audit: implement container identifier

2019-05-29 Thread Daniel Walsh
On 5/29/19 9:17 AM, Paul Moore wrote: > On Wed, May 29, 2019 at 8:03 AM Daniel Walsh wrote: >> On 5/28/19 8:43 PM, Richard Guy Briggs wrote: >>> On 2019-05-28 19:00, Steve Grubb wrote: On Tuesday, May 28, 2019 6:26:47 PM EDT Paul Moore wrote: > On Tue, May 28, 2019 at 5:54 PM Daniel Walsh

Re: [PATCH bpf v2] selftests: bpf: fix compiler warning

2019-05-29 Thread Daniel Borkmann
On 05/28/2019 09:02 PM, Alakesh Haloi wrote: > Add missing header file following compiler warning > > prog_tests/flow_dissector.c: In function ‘tx_tap’: > prog_tests/flow_dissector.c:175:9: warning: implicit declaration of function > ‘writev’; did you mean ‘write’? [-Wimplicit-function-declaratio

Re: [PATCH bpf-next v4 1/4] bpf: remove __rcu annotations from bpf_prog_array

2019-05-29 Thread Daniel Borkmann
On 05/28/2019 11:14 PM, Stanislav Fomichev wrote: > Drop __rcu annotations and rcu read sections from bpf_prog_array > helper functions. They are not needed since all existing callers > call those helpers from the rcu update side while holding a mutex. > This guarantees that use-after-free could no

Re: [oss-drivers] Re: [PATCH bpf-next] libbpf: prevent overwriting of log_level in bpf_object__load_progs()

2019-05-29 Thread Quentin Monnet
2019-05-29 16:03 UTC+0200 ~ Daniel Borkmann > On 05/29/2019 11:23 AM, Quentin Monnet wrote: >> There are two functions in libbpf that support passing a log_level >> parameter for the verifier for loading programs: >> bpf_object__load_xattr() and bpf_load_program_xattr(). Both accept an >> attribut

[PATCH bpf-next v2] libbpf: prevent overwriting of log_level in bpf_object__load_progs()

2019-05-29 Thread Quentin Monnet
There are two functions in libbpf that support passing a log_level parameter for the verifier for loading programs: bpf_object__load_xattr() and bpf_prog_load_xattr(). Both accept an attribute object containing the log_level, and apply it to the programs to load. It turns out that to effectively l

[PATCH iproute2] iplink: don't try to get ll addr len when creating an iface

2019-05-29 Thread Nicolas Dichtel
It will obviously fail. This is a follow up of the commit 757837230a65 ("lib: suppress error msg when filling the cache"). Suggested-by: David Ahern Signed-off-by: Nicolas Dichtel --- ip/iplink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/iplink.c b/ip/iplink.c ind

[RFC PATCH bpf-next] selftests/bpf: measure RTT from xdp using xdping

2019-05-29 Thread Alan Maguire
xdping allows us to get latency estimates from XDP. Output looks like this: ./xdping -I eth4 192.168.55.8 Setting up XDP for eth4, please wait... XDP setup disrupts network connectivity, hit Ctrl+C to quit Normal ping RTT data [Ignore final RTT; it is distorted by XDP using the reply] PING 192.1

Re: [net-next PATCH] net: rtnetlink: Enslave device before bringing it up

2019-05-29 Thread David Ahern
On 5/29/19 7:51 AM, Phil Sutter wrote: > Unlike with bridges, one can't add an interface to a bond and set it up > at the same time: > > | # ip link set dummy0 down > | # ip link set dummy0 master bond0 up > | Error: Device can not be enslaved while up. > > Of all drivers with ndo_add_slave callb

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Jason Gunthorpe
On Wed, May 29, 2019 at 02:15:44PM +0300, Leon Romanovsky wrote: > On Wed, May 22, 2019 at 02:10:42PM -0300, Jason Gunthorpe wrote: > > On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > > > From: Mark Zhang > > > > > > Since a QP can only be bound to one counter, then if it is bou

Re: [PATCH rdma-next v2 13/17] RDMA/core: Get sum value of all counters when perform a sysfs stat read

2019-05-29 Thread Jason Gunthorpe
On Wed, May 29, 2019 at 02:05:24PM +0300, Leon Romanovsky wrote: > On Wed, May 22, 2019 at 02:26:36PM -0300, Jason Gunthorpe wrote: > > On Mon, Apr 29, 2019 at 11:34:49AM +0300, Leon Romanovsky wrote: > > > diff --git a/drivers/infiniband/core/device.c > > > b/drivers/infiniband/core/device.c > >

RE: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c

2019-05-29 Thread Ioana Ciornei
> Subject: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c > > FYI, we noticed the following commit (built with gcc-6): > > commit: 9dd6d07682b10a55d1f49d495b85f7b945ff75ca ("[PATCH 10/11] net: > dsa: Use PHYLINK for the CPU/DSA ports") > url: > > > in testcase: boot > > on test mac

Re: [PATCH iproute2-next 1/4] rdma: Add an option to query,set net namespace sharing sys parameter

2019-05-29 Thread David Ahern
On 5/21/19 8:22 AM, Parav Pandit wrote: > diff --git a/rdma/sys.c b/rdma/sys.c > new file mode 100644 > index ..78e5198f > --- /dev/null > +++ b/rdma/sys.c > @@ -0,0 +1,143 @@ > +/* > + * sys.c RDMA tool > + * > + * This program is free software; you can redistribute it and

RE: [PATCH v2 net-next 06/11] net: phylink: Add struct phylink_config to PHYLINK API

2019-05-29 Thread Ioana Ciornei
> Subject: Re: [PATCH v2 net-next 06/11] net: phylink: Add struct > phylink_config to > PHYLINK API > > Hello Ioana, > > On Tue, 28 May 2019 20:38:12 +0300 > Ioana Ciornei wrote: > > >The phylink_config structure will encapsulate a pointer to a struct > >device and the operation type request

Re: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c

2019-05-29 Thread Russell King - ARM Linux admin
On Wed, May 29, 2019 at 04:11:57PM +, Ioana Ciornei wrote: > > Subject: [net] 9dd6d07682: kernel_BUG_at_drivers/net/phy/mdio_bus.c > > > > FYI, we noticed the following commit (built with gcc-6): > > > > commit: 9dd6d07682b10a55d1f49d495b85f7b945ff75ca ("[PATCH 10/11] net: > > dsa: Use PHYLIN

[PATCH net-next v2 0/6] add TFO backup key

2019-05-29 Thread Jason Baron
Hi, Christoph, Igor, and I have worked on an API that facilitates TFO key rotation. This is a follow up to the series that Christoph previously posted, with an API that meets both of our use-cases. Here's a link to the previous work: https://patchwork.ozlabs.org/cover/1013753/ Thanks, -Jason C

[PATCH bpf v3] libbpf: Return btf_fd for load_sk_storage_btf

2019-05-29 Thread Michal Rostecki
Before this change, function load_sk_storage_btf expected that libbpf__probe_raw_btf was returning a BTF descriptor, but in fact it was returning an information about whether the probe was successful (0 or 1). load_sk_storage_btf was using that value as an argument of the close function, which was

[PATCH net-next v2 4/6] tcp: add support for optional TFO backup key to net.ipv4.tcp_fastopen_key

2019-05-29 Thread Jason Baron
Add the ability to add a backup TFO key as: # echo "x-x-x-x,x-x-x-x" > /proc/sys/net/ipv4/tcp_fastopen_key The key before the comma acks as the primary TFO key and the key after the comma is the backup TFO key. This change is intended to be backwards compatible since if only one key is set, users

[PATCH net-next v2 2/6] tcp: add backup TFO key infrastructure

2019-05-29 Thread Jason Baron
We would like to be able to rotate TFO keys while minimizing the number of client cookies that are rejected. Currently, we have only one key which can be used to generate and validate cookies, thus if we simply replace this key clients can easily have cookies rejected upon rotation. We propose hav

[PATCH net-next v2 6/6] selftests/net: add TFO key rotation selftest

2019-05-29 Thread Jason Baron
Demonstrate how the primary and backup TFO keys can be rotated while minimizing the number of client cookies that are rejected. Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Acked-by: Yuchung Cheng --- tools/testing/selftests/net/.gitignore | 1 + tools/testing/selft

[PATCH net-next v2 1/6] tcp: introduce __tcp_fastopen_cookie_gen_cipher()

2019-05-29 Thread Jason Baron
From: Christoph Paasch Restructure __tcp_fastopen_cookie_gen() to take a 'struct crypto_cipher' argument and rename it as __tcp_fastopen_cookie_gen_cipher(). Subsequent patches will provide different ciphers based on which key is being used for the cookie generation. Signed-off-by: Christoph Paa

[PATCH net-next v2 3/6] tcp: add support to TCP_FASTOPEN_KEY for optional backup key

2019-05-29 Thread Jason Baron
Add support for get/set of an optional backup key via TCP_FASTOPEN_KEY, in addition to the current 'primary' key. The primary key is used to encrypt and decrypt TFO cookies, while the backup is only used to decrypt TFO cookies. The backup key is used to maximize successful TFO connections when TFO

[PATCH net-next v2 5/6] Documentation: ip-sysctl.txt: Document tcp_fastopen_key

2019-05-29 Thread Jason Baron
Add docs for /proc/sys/net/ipv4/tcp_fastopen_key Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Cc: Jeremy Sowden Acked-by: Yuchung Cheng --- Documentation/networking/ip-sysctl.txt | 20 1 file changed, 20 insertions(+) diff --git a/Documentation/networking/i

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-29 Thread Jakub Kicinski
On Wed, 29 May 2019 10:00:16 +0200, Jiri Pirko wrote: > Tue, May 28, 2019 at 10:01:15PM CEST, jakub.kicin...@netronome.com wrote: > >On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: > >> From: Jiri Pirko > >> > >> Signed-off-by: Jiri Pirko > >> --- > >> v1->v2: > >> - added debugfs toggle

Re: [RFC PATCH bpf-next] selftests/bpf: measure RTT from xdp using xdping

2019-05-29 Thread Song Liu
On Wed, May 29, 2019 at 8:36 AM Alan Maguire wrote: > > xdping allows us to get latency estimates from XDP. Output looks > like this: > > ./xdping -I eth4 192.168.55.8 > Setting up XDP for eth4, please wait... > XDP setup disrupts network connectivity, hit Ctrl+C to quit > > Normal ping RTT data

Re: [PATCH bpf-next 1/9] libbpf: fix detection of corrupted BPF instructions section

2019-05-29 Thread Song Liu
On Tue, May 28, 2019 at 6:14 PM Andrii Nakryiko wrote: > > Ensure that size of a section w/ BPF instruction is exactly a multiple > of BPF instruction size. > > Signed-off-by: Andrii Nakryiko > --- > tools/lib/bpf/libbpf.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > >

  1   2   3   >