RE: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for configuration attributes.

2019-06-25 Thread Sudarsana Reddy Kalluru
> -Original Message- > From: Jiri Pirko > Sent: Thursday, June 20, 2019 7:08 PM > To: Sudarsana Reddy Kalluru > Cc: Jakub Kicinski ; da...@davemloft.net; > netdev@vger.kernel.org; Michal Kalderon ; Ariel > Elior > Subject: Re: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for

Re: [for-next V2 05/10] linux/dim: Rename externally used net_dim members

2019-06-25 Thread Tal Gilboa
On 6/26/2019 12:57 AM, Sagi Grimberg wrote: > Question, do any other nics use or plan to use this? Yes, see the changed files list under drivers/net for existing usage. > > Reviewed-by: Sagi Grimberg

[PATCH net v2] ipv4: reset rt_iif for recirculated mcast/bcast out pkts

2019-06-25 Thread Stephen Suryaputra
Multicast or broadcast egress packets have rt_iif set to the oif. These packets might be recirculated back as input and lookup to the raw sockets may fail because they are bound to the incoming interface (skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function returns rt_iif instead

[PATCH v2 bpf-next 2/3] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-06-25 Thread Andrii Nakryiko
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for

[PATCH v2 bpf-next 1/3] libbpf: add perf buffer API

2019-06-25 Thread Andrii Nakryiko
BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch

[PATCH v2 bpf-next 3/3] selftests/bpf: test perf buffer API

2019-06-25 Thread Andrii Nakryiko
Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu --- .../selftests/bpf/prog_tests/perf_buffer.c| 86 +++ .../selftests/bpf/progs/test_perf_buffer.c| 29 +++ 2 files changed, 115 insertions(+) create mode 100644 tool

[PATCH v2 bpf-next 0/3] libbpf: add perf buffer abstraction and API

2019-06-25 Thread Andrii Nakryiko
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to supprot auto-setting PE

Re: samples/bpf compilation failures - 5.2.0

2019-06-25 Thread Srinivas Ramana
+ Joel if he has seen this issue. On 5/28/2019 2:27 PM, Srinivas Ramana wrote: Hello, I am trying to build samples/bpf in kernel(5.2.0-rc1) but unsuccessful with below errors. Can you help to point what i am missing or if there is some known issue? ==8<==

Re: [PATCH bpf-next 2/2] selftests/bpf: test perf buffer API

2019-06-25 Thread Andrii Nakryiko
On Tue, Jun 25, 2019 at 4:26 PM Andrii Nakryiko wrote: > > Add test verifying perf buffer API functionality. > > Signed-off-by: Andrii Nakryiko > --- > .../selftests/bpf/prog_tests/perf_buffer.c| 86 +++ > .../selftests/bpf/progs/test_perf_buffer.c| 31 +++ > 2 files

Re: [PATCH net] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-25 Thread Roopa Prabhu
On Tue, Jun 25, 2019 at 9:08 AM Taehee Yoo wrote: > > On Tue, 25 Jun 2019 at 13:12, Roopa Prabhu wrote: > > > > Hi Roopa, > > Thank you for the review! > > > On Sun, Jun 23, 2019 at 7:18 PM Taehee Yoo wrote: > > > > > > On Mon, 24 Jun 2019 at 03:07, David Miller wrote: > > > > > > > > > > Hi Da

Re: [PATCH net] net: make skb_dst_force return false when dst was cleared

2019-06-25 Thread Eric Dumazet
On 6/25/19 12:59 PM, Florian Westphal wrote: > Eric Dumazet wrote: >>> -static inline void skb_dst_force(struct sk_buff *skb) >>> +static inline bool skb_dst_force(struct sk_buff *skb) >>> { >>> if (skb_dst_is_noref(skb)) { >>> struct dst_entry *dst = skb_dst(skb); >>> @@ -313,

Re: [PATCH bpf-next 1/2] libbpf: add perf buffer reading API

2019-06-25 Thread Andrii Nakryiko
On Tue, Jun 25, 2019 at 7:19 PM Song Liu wrote: > > On Tue, Jun 25, 2019 at 4:28 PM Andrii Nakryiko wrote: > > > > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF > > program > > to user space for additional processing. libbpf already has very low-level > > API > > to read

Re: [PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-25 Thread Eyal Birger
Hi Jamal, John, On Tue, 25 Jun 2019 07:24:37 -0400 Jamal Hadi Salim wrote: > On 2019-06-25 5:06 a.m., John Hurley wrote: > > On Tue, Jun 25, 2019 at 9:30 AM Eyal Birger > > wrote: > > > I'm not sure on the history of why a value of 4 was selected here > > but it seems to fall into line with

Re: [PATCH iproute2 1/2] devlink: fix format string warning for 32bit targets

2019-06-25 Thread Baruch Siach
Hi Stephen, On Tue, Jun 25, 2019 at 11:58:06AM -0700, Stephen Hemminger wrote: > On Tue, 25 Jun 2019 14:49:04 +0300 > Baruch Siach wrote: > > > diff --git a/devlink/devlink.c b/devlink/devlink.c > > index 436935f88bda..b400fab17578 100644 > > --- a/devlink/devlink.c > > +++ b/devlink/devlink.c >

Re: [PATCH bpf-next 2/2] selftests/bpf: test perf buffer API

2019-06-25 Thread Song Liu
On Tue, Jun 25, 2019 at 4:27 PM Andrii Nakryiko wrote: > > Add test verifying perf buffer API functionality. > > Signed-off-by: Andrii Nakryiko Acked-by: Song Liu > --- > .../selftests/bpf/prog_tests/perf_buffer.c| 86 +++ > .../selftests/bpf/progs/test_perf_buffer.c|

Re: [PATCH bpf-next 1/2] libbpf: add perf buffer reading API

2019-06-25 Thread Song Liu
On Tue, Jun 25, 2019 at 4:28 PM Andrii Nakryiko wrote: > > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program > to user space for additional processing. libbpf already has very low-level API > to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to

Re: [PATCH] net: phylink: further documentation clarifications

2019-06-25 Thread Florian Fainelli
On 6/25/2019 2:44 AM, Russell King wrote: > Clarify the validate() behaviour in a few cases which weren't mentioned > in the documentation, but which are necessary for users to get the > correct behaviour. > > Signed-off-by: Russell King Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Andrew Lunn
On Wed, Jun 26, 2019 at 02:13:25AM +0300, Vladimir Oltean wrote: > On Wed, 26 Jun 2019 at 02:10, Vladimir Oltean wrote: > > > > On Wed, 26 Jun 2019 at 01:58, Russell King - ARM Linux admin > > wrote: > > > > > > On Wed, Jun 26, 2019 at 01:14:59AM +0300, Vladimir Oltean wrote: > > > > On Wed, 26 J

[PATCHv2 iproute2] ip/iptoken: fix dump error when ipv6 disabled

2019-06-25 Thread Hangbin Liu
When we disable IPv6 from the start up (ipv6.disable=1), there will be no IPv6 route info in the dump message. If we return -1 when ifi->ifi_family != AF_INET6, we will get error like $ ip token list Dump terminated which will make user feel confused. There is no need to return -1 if the dump mes

Re: [PATCH bpf-next] bpf: fix compiler warning with CONFIG_MODULES=n

2019-06-25 Thread Song Liu
> On Jun 25, 2019, at 5:35 PM, Yonghong Song wrote: > > With CONFIG_MODULES=n, the following compiler warning occurs: > /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: > ‘do_bpf_send_signal’ defined but not used [-Wunused-function] > static void do_bpf_send_signal

[PATCH bpf-next] bpf: fix compiler warning with CONFIG_MODULES=n

2019-06-25 Thread Yonghong Song
With CONFIG_MODULES=n, the following compiler warning occurs: /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: ‘do_bpf_send_signal’ defined but not used [-Wunused-function] static void do_bpf_send_signal(struct irq_work *entry) The __init function send_signal_irq_w

Re: [PATCH net-next 01/10] net: dsa: sja1105: Build PTP support in main DSA driver

2019-06-25 Thread Willem de Bruijn
On Tue, Jun 25, 2019 at 7:40 PM Vladimir Oltean wrote: > > As Arnd Bergmann pointed out in commit 78fe8a28fb96 ("net: dsa: sja1105: > fix ptp link error"), there is no point in having PTP support as a > separate loadable kernel module. > > So remove the exported symbols and make sja1105.ko contain

Re: [PATCH net-next 17/18] ionic: Add RSS support

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:23 -0700, Shannon Nelson wrote: > +static int ionic_lif_rss_init(struct lif *lif) > +{ > + static const u8 toeplitz_symmetric_key[] = { > + 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > + 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, > +

Re: [PATCH net-next 02/10] net: dsa: sja1105: Cancel PTP delayed work on unregister

2019-06-25 Thread Willem de Bruijn
On Tue, Jun 25, 2019 at 7:40 PM Vladimir Oltean wrote: > > Currently when the driver unloads and PTP is enabled, the delayed work > that prevents the timecounter from expiring becomes a ticking time bomb. > The kernel will schedule the work thread within 60 seconds of driver > removal, but the wor

Re: [PATCH net-next 14/18] ionic: Add Tx and Rx handling

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:20 -0700, Shannon Nelson wrote: > Add both the Tx and Rx queue setup and handling. The related > stats display come later. Instead of using the generic napi > routines used by the slow-path command, the Tx and Rx paths > are simplified and inlined in one file in order to

Re: [PATCH net] net/sched: flower: fix infinite loop in fl_walk()

2019-06-25 Thread Cong Wang
On Tue, Jun 25, 2019 at 12:29 PM Cong Wang wrote: > > On Tue, Jun 25, 2019 at 11:07 AM Cong Wang wrote: > > On one hand, its callers should not need to worry about details > > like overflow. On the other hand, in fact it does exactly what its > > callers tell it to do, the problematic part is act

Re: [PATCH net-next 13/18] ionic: Add initial ethtool support

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:19 -0700, Shannon Nelson wrote: > + running = test_bit(LIF_UP, lif->state); > + if (running) > + ionic_stop(netdev); > + > + lif->ntxq_descs = ring->tx_pending; > + lif->nrxq_descs = ring->rx_pending; > + > + if (running) > + ion

Re: [PATCH net-next 12/18] ionic: Add async link status check and basic stats

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:18 -0700, Shannon Nelson wrote: > + /* filter out the no-change cases */ > + if ((link_up && netif_carrier_ok(netdev)) || > + (!link_up && !netif_carrier_ok(netdev))) nit: these are both bools, you can compare them: if (link_up == netif_carrier_ok

[PATCH V4 03/10] net: dsa: microchip: Inline ksz_spi.h

2019-06-25 Thread Marek Vasut
The functions in the header file are static, and the header file is included from single C file, just inline the code into the C file. The bonus is that it's easier to spot further content to clean up. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung

[PATCH V4 02/10] net: dsa: microchip: Remove ksz_{get,set}()

2019-06-25 Thread Marek Vasut
These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn --- V2: No change V3: - Rebase on next/master - Test on KSZ9477EVB V4: Add RB --- drivers/net/dsa/microchip

[PATCH V4 07/10] net: dsa: microchip: Initial SPI regmap support

2019-06-25 Thread Marek Vasut
Add basic SPI regmap support into the driver. Previous patches unconver that ksz_spi_write() is always ever called with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN) check and we can also drop the allocation of the txbuf which is part of the driver data and wastes 256 bytes for n

[PATCH V4 01/10] net: dsa: microchip: Remove ksz_{read,write}24()

2019-06-25 Thread Marek Vasut
These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn --- V2: No change V3: - Rebase on next/master - Test on KSZ9477EVB V4: Add RB --- drivers/net/dsa/microchip

[PATCH V4 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call

2019-06-25 Thread Marek Vasut
The indirect function call to dev->dev_ops->get_port_addr() is expensive especially if called for every single register access, and only returns the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly instead. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc:

[PATCH V4 06/10] net: dsa: microchip: Factor out register access opcode generation

2019-06-25 Thread Marek Vasut
Factor out the code which sends out the register read/write opcodes to the switch, since the code differs in single bit between read and write. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn --- V2: New patch V3: - Reb

[PATCH V4 08/10] net: dsa: microchip: Dispose of ksz_io_ops

2019-06-25 Thread Marek Vasut
Since the driver now uses regmap , get rid of ad-hoc ksz_io_ops abstraction, which no longer has any meaning. Moreover, since regmap has it's own locking, get rid of the register access mutex. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh ---

[PATCH V4 00/10] net: dsa: microchip: Convert to regmap

2019-06-25 Thread Marek Vasut
This patchset converts KSZ9477 switch driver to regmap. This was tested with extra patches on KSZ8795. This was also tested on KSZ9477 on Microchip KSZ9477EVB board, which I now have. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Marek Vasut

[PATCH V4 09/10] net: dsa: microchip: Factor out regmap config generation into common header

2019-06-25 Thread Marek Vasut
The regmap config tables are rather similar for various generations of the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating those tables without duplication. Note that $regalign parameter is not used right now, but will be used in KSZ87xx series switches. Signed-off-by: Marek Va

[PATCH V4 10/10] net: dsa: microchip: Replace ad-hoc bit manipulation with regmap

2019-06-25 Thread Marek Vasut
Regmap provides bit manipulation functions to set/clear bits, use those insted of reimplementing them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh --- V2: New patch V3: - Rebase on next/master - Test on KSZ9477EVB V4: No change --- driv

[PATCH V4 04/10] net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c

2019-06-25 Thread Marek Vasut
These functions are only used by the KSZ9477 code, move them from the header into that code. Note that these functions will be soon replaced by regmap equivalents. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn --- V2:

Re: [PATCH net-next 11/18] ionic: Add Rx filter and rx_mode nod support

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:17 -0700, Shannon Nelson wrote: > Add the Rx filtering and rx_mode NDO callbacks. Also add > the deferred work thread handling needed to manage the filter > requests otuside of the netif_addr_lock spinlock. > > Signed-off-by: Shannon Nelson > static int ionic_vlan_rx_

[PATCH net-next 09/10] net: dsa: sja1105: Use correct dsa_8021q VIDs for FDB commands

2019-06-25 Thread Vladimir Oltean
A FDB entry means that "frames that match this VID and DMAC must be forwarded to this port". In the case of dsa_8021q however, the VID is not a single one (and neither two, as my previous patch assumed). The VID can be set either by the CPU port (1 tx_vid), or by any of the other front-panel port

[PATCH net-next 00/10] FDB, VLAN and PTP fixes for SJA1105 DSA

2019-06-25 Thread Vladimir Oltean
This patchset is an assortment of fixes for the net-next version of the sja1105 DSA driver: - Avoid a kernel panic when the driver fails to probe or unregisters - Finish Arnd Bermann's idea of compiling PTP support as part of the main DSA driver and not separately - Better handling of initial por

[PATCH net-next 07/10] net: dsa: sja1105: Add a high-level overview of the dynamic config interface

2019-06-25 Thread Vladimir Oltean
When trying to add support for LOCKEDS (static FDB entries) on SJA1105 P/Q/R/S, at first I didn't remember how the abstraction I created worked, and actually thought it works by mistake. To avoid other people staring at the code and not making much sense out of it, add some comments at the top of

[PATCH net-next 03/10] net: dsa: sja1105: Make vid 1 the default pvid

2019-06-25 Thread Vladimir Oltean
In SJA1105 there is no concept of 'default values' per se, everything needs to be driver-supplied through the static configuration tables. The issue is that the hardware manual says that 'at least the default untagging VLAN' is mandatory to be provided through the static config. But VLAN 0 isn't a

[PATCH net-next 04/10] net: dsa: sja1105: Actually implement the P/Q/R/S FDB bits

2019-06-25 Thread Vladimir Oltean
In commit 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series"), these bits were set in the static config, but apparently they did not do anything. The reason is that the packing accessors for them were part of a patch I forgot to send. Signed-off-by: Vladimir Oltean --- dri

[PATCH net-next 01/10] net: dsa: sja1105: Build PTP support in main DSA driver

2019-06-25 Thread Vladimir Oltean
As Arnd Bergmann pointed out in commit 78fe8a28fb96 ("net: dsa: sja1105: fix ptp link error"), there is no point in having PTP support as a separate loadable kernel module. So remove the exported symbols and make sja1105.ko contain PTP support or not based on CONFIG_NET_DSA_SJA1105_PTP. Signed-of

[PATCH net-next 06/10] net: dsa: sja1105: Back up static FDB entries in kernel memory

2019-06-25 Thread Vladimir Oltean
After commit 8456721dd4ec ("net: dsa: sja1105: Add support for configuring address ageing time"), we started to reset the switch rather often (each time the bridge core changes the ageing time on a switch port). The unfortunate reality is that SJA1105 doesn't have any {cold, warm, whatever} reset

[PATCH net-next 02/10] net: dsa: sja1105: Cancel PTP delayed work on unregister

2019-06-25 Thread Vladimir Oltean
Currently when the driver unloads and PTP is enabled, the delayed work that prevents the timecounter from expiring becomes a ticking time bomb. The kernel will schedule the work thread within 60 seconds of driver removal, but the work handler is no longer there, leading to this strange and inconclu

[PATCH net-next 05/10] net: dsa: sja1105: Make P/Q/R/S learn MAC addresses

2019-06-25 Thread Vladimir Oltean
At the end of the commit 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") message, I said that: At the moment only FDB entries installed statically through 'bridge fdb' are visible in the dump callback - the dynamically learned ones are still under investigatio

[PATCH net-next 08/10] net: dsa: sja1105: Populate is_static for FDB entries on P/Q/R/S

2019-06-25 Thread Vladimir Oltean
The reason why this wasn't tackled earlier is that I had hoped I understood the user manual wrong. But unfortunately hacks are required in order to retrieve the static/dynamic nature of FDB entries on SJA1105 P/Q/R/S, since this info is stored in the writeback buffer of the dynamic config command.

[PATCH net-next 10/10] net: dsa: sja1105: Implement is_static for FDB entries on E/T

2019-06-25 Thread Vladimir Oltean
The first generation switches don't tell us through the dynamic config interface whether the dumped FDB entries are static or not (the LOCKEDS bit from P/Q/R/S). However, now that we're keeping a mirror of all 'bridge fdb' commands in the static config, this is an opportunity to compare a dumped F

Re: [PATCH net-next 10/18] ionic: Add management of rx filters

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:16 -0700, Shannon Nelson wrote: > +int ionic_rx_filter_save(struct lif *lif, u32 flow_id, u16 rxq_index, > + u32 hash, struct ionic_admin_ctx *ctx) > +{ > + struct device *dev = lif->ionic->dev; > + struct hlist_head *head; > + struct rx_fi

Re: [PATCH net-next 09/18] ionic: Add the basic NDO callbacks for netdev support

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:15 -0700, Shannon Nelson wrote: > +static int ionic_set_features(struct net_device *netdev, > + netdev_features_t features) > +{ > + struct lif *lif = netdev_priv(netdev); > + int err; > + > + netdev_dbg(netdev, "%s: lif->features=0x%0

[PATCH bpf-next 2/2] selftests/bpf: test perf buffer API

2019-06-25 Thread Andrii Nakryiko
Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko --- .../selftests/bpf/prog_tests/perf_buffer.c| 86 +++ .../selftests/bpf/progs/test_perf_buffer.c| 31 +++ 2 files changed, 117 insertions(+) create mode 100644 tools/testing/selftests/

[PATCH bpf-next 1/2] libbpf: add perf buffer reading API

2019-06-25 Thread Andrii Nakryiko
BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch

[PATCH bpf-next 0/2] libbpf: add perf buffer API

2019-06-25 Thread Andrii Nakryiko
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Andrii Nakryiko (2): libbpf: add perf buffer reading API selftests/bpf: test perf buffer API tools/lib/bpf/lib

Re: [PATCH net-next 08/18] ionic: Add notifyq support

2019-06-25 Thread Jakub Kicinski
On Thu, 20 Jun 2019 13:24:14 -0700, Shannon Nelson wrote: > + case EVENT_OPCODE_HEARTBEAT: > + netdev_info(netdev, "Notifyq EVENT_OPCODE_HEARTBEAT eid=%lld\n", > + eid); > + break; I wonder how often this gets sent and whether the info log level

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Vladimir Oltean
On Wed, 26 Jun 2019 at 02:10, Vladimir Oltean wrote: > > On Wed, 26 Jun 2019 at 01:58, Russell King - ARM Linux admin > wrote: > > > > On Wed, Jun 26, 2019 at 01:14:59AM +0300, Vladimir Oltean wrote: > > > On Wed, 26 Jun 2019 at 00:53, Russell King - ARM Linux admin > > > wrote: > > > > > > > >

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Vladimir Oltean
On Wed, 26 Jun 2019 at 01:58, Russell King - ARM Linux admin wrote: > > On Wed, Jun 26, 2019 at 01:14:59AM +0300, Vladimir Oltean wrote: > > On Wed, 26 Jun 2019 at 00:53, Russell King - ARM Linux admin > > wrote: > > > > > > On Tue, Jun 25, 2019 at 11:24:01PM +0300, Vladimir Oltean wrote: > > > >

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Russell King - ARM Linux admin
On Wed, Jun 26, 2019 at 01:14:59AM +0300, Vladimir Oltean wrote: > On Wed, 26 Jun 2019 at 00:53, Russell King - ARM Linux admin > wrote: > > > > On Tue, Jun 25, 2019 at 11:24:01PM +0300, Vladimir Oltean wrote: > > > Hi Russell, > > > > > > On 6/24/19 6:39 PM, Russell King - ARM Linux admin wrote:

[PATCH bpf-next] selftests/bpf: build tests with debug info

2019-06-25 Thread Andrii Nakryiko
Non-BPF (user land) part of selftests is built without debug info making occasional debugging with gdb terrible. Build with debug info always. Signed-off-by: Andrii Nakryiko --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing

Re: [PATCH bpf-next 0/4] sys_bpf() access control via /dev/bpf

2019-06-25 Thread Alexei Starovoitov
On 6/25/19 2:19 PM, Stanislav Fomichev wrote: > On 06/25, Alexei Starovoitov wrote: >> On 6/25/19 1:51 PM, Stanislav Fomichev wrote: >>> On 06/25, Song Liu wrote: Currently, most access to sys_bpf() is limited to root. However, there are use cases that would benefit from non-privileged us

Re: [PATCH v4 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-25 Thread Willem de Bruijn
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c > index a29d66da7394..a7ca6a003ebe 100644 > --- a/net/packet/af_packet.c > +++ b/net/packet/af_packet.c > @@ -2401,6 +2401,9 @@ static void tpacket_destruct_skb(struct sk_buff *skb) > > ts = __packet_set_timestamp(po, ph

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Vladimir Oltean
On Wed, 26 Jun 2019 at 00:53, Russell King - ARM Linux admin wrote: > > On Tue, Jun 25, 2019 at 11:24:01PM +0300, Vladimir Oltean wrote: > > Hi Russell, > > > > On 6/24/19 6:39 PM, Russell King - ARM Linux admin wrote: > > > This should be removed - state->link is not for use in mac_config. > > >

[PATCH net-next v6 8/8] taprio: Adjust timestamps for TCP packets

2019-06-25 Thread Vedang Patel
When the taprio qdisc is running in "txtime offload" mode, it will set the launchtime value (in skb->tstamp) for all the packets which do not have the SO_TXTIME socket option. But, the TCP packets already have this value set and it indicates the earliest departure time represented in CLOCK_MONOTONI

[PATCH net-next v6 6/8] taprio: Add support for txtime-assist mode

2019-06-25 Thread Vedang Patel
Currently, we are seeing non-critical packets being transmitted outside of their timeslice. We can confirm that the packets are being dequeued at the right time. So, the delay is induced in the hardware side. The most likely reason is the hardware queues are starving the lower priority queues. In

[PATCH net-next v6 4/8] taprio: calculate cycle_time when schedule is installed

2019-06-25 Thread Vedang Patel
cycle time for a particular schedule is calculated only when it is first installed. So, it makes sense to just calculate it once right after the 'cycle_time' parameter has been parsed and store it in cycle_time. Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 29 +++-

[PATCH net-next v6 7/8] taprio: make clock reference conversions easier

2019-06-25 Thread Vedang Patel
Later in this series we will need to transform from CLOCK_MONOTONIC (used in TCP) to the clock reference used in TAPRIO. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(

[PATCH net-next v6 0/8] net/sched: Add txtime-assist support for taprio.

2019-06-25 Thread Vedang Patel
Changes in v6: - Use _BITUL() instead of BIT() in UAPI for etf. (patch #1) - Fix a bug reported by kbuild test bot in length_to_duration(). (patch #6) - Remove an unused function (get_cycle_start()). (Patch #6) Changes in v5: - Commit message improved for the igb patch (patch #1). - Fixed typo in

[PATCH net-next v6 5/8] taprio: Remove inline directive

2019-06-25 Thread Vedang Patel
Remove inline directive from length_to_duration(). We will let the compiler make the decisions. Signed-off-by: Vedang Patel --- net/sched/sch_taprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index a41d7d4434ee..6ef0cc03f

[PATCH net-next v6 1/8] igb: clear out skb->tstamp after reading the txtime

2019-06-25 Thread Vedang Patel
If a packet which is utilizing the launchtime feature (via SO_TXTIME socket option) also requests the hardware transmit timestamp, the hardware timestamp is not delivered to the userspace. This is because the value in skb->tstamp is mistaken as the software timestamp. Applications, like ptp4l, req

[PATCH net-next v6 2/8] etf: Don't use BIT() in UAPI headers.

2019-06-25 Thread Vedang Patel
The BIT() macro isn't exported as part of the UAPI interface. So, the compile-test to ensure they are self contained fails. So, use _BITUL() instead. Signed-off-by: Vedang Patel --- include/uapi/linux/pkt_sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uap

[PATCH net-next v6 3/8] etf: Add skip_sock_check

2019-06-25 Thread Vedang Patel
Currently, etf expects a socket with SO_TXTIME option set for each packet it encounters. So, it will drop all other packets. But, in the future commits we are planning to add functionality where tstamp value will be set by another qdisc. Also, some packets which are generated from within the kernel

Re: [for-next V2 08/10] linux/dim: Implement rdma_dim

2019-06-25 Thread Sagi Grimberg
+void rdma_dim(struct dim *dim, u64 completions) +{ + struct dim_sample *curr_sample = &dim->measuring_sample; + struct dim_stats curr_stats; + u32 nevents; + + dim_update_sample_with_comps(curr_sample->event_ctr + 1, +curr_sample->pkt

Re: [PATCH v3 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-25 Thread Willem de Bruijn
On Tue, Jun 25, 2019 at 12:20 PM Neil Horman wrote: > > On Tue, Jun 25, 2019 at 09:37:17AM -0400, Willem de Bruijn wrote: > > On Tue, Jun 25, 2019 at 7:03 AM Neil Horman wrote: > > > > > > On Mon, Jun 24, 2019 at 06:15:29PM -0400, Willem de Bruijn wrote: > > > > > > > + if (need_wai

[PATCH v4 net] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-06-25 Thread Neil Horman
When an application is run that: a) Sets its scheduler to be SCHED_FIFO and b) Opens a memory mapped AF_PACKET socket, and sends frames with the MSG_DONTWAIT flag cleared, its possible for the application to hang forever in the kernel. This occurs because when waiting, the code in tpacket_snd call

Re: [for-next V2 05/10] linux/dim: Rename externally used net_dim members

2019-06-25 Thread Sagi Grimberg
Question, do any other nics use or plan to use this? Reviewed-by: Sagi Grimberg

Re: [for-next V2 04/10] linux/dim: Rename net_dim_sample() to net_dim_update_sample()

2019-06-25 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [for-next V2 03/10] linux/dim: Rename externally exposed macros

2019-06-25 Thread Sagi Grimberg
This can be squashed to the prev one, otherwise Reviewed-by: Sagi Grimberg

Re: [for-next V2 02/10] linux/dim: Remove "net" prefix from internal DIM members

2019-06-25 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Russell King - ARM Linux admin
On Tue, Jun 25, 2019 at 11:24:01PM +0300, Vladimir Oltean wrote: > Hi Russell, > > On 6/24/19 6:39 PM, Russell King - ARM Linux admin wrote: > > This should be removed - state->link is not for use in mac_config. > > Even in fixed mode, the link can be brought up/down by means of a > > gpio, and th

Re: [for-next V2 01/10] linux/dim: Move logic to dim.h

2019-06-25 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Russell King - ARM Linux admin
On Tue, Jun 25, 2019 at 10:41:48PM +0200, Andrew Lunn wrote: > On Tue, Jun 25, 2019 at 02:27:55PM -0500, Daniel Santos wrote: > > On 6/25/19 2:02 PM, Andrew Lunn wrote: > > >> But will there still be a mechanism to ignore link partner's advertising > > >> and force these parameters? > > > >From man

Re: [PATCH bpf-next 0/4] sys_bpf() access control via /dev/bpf

2019-06-25 Thread Stanislav Fomichev
On 06/25, Alexei Starovoitov wrote: > On 6/25/19 1:51 PM, Stanislav Fomichev wrote: > > On 06/25, Song Liu wrote: > >> Currently, most access to sys_bpf() is limited to root. However, there are > >> use cases that would benefit from non-privileged use of sys_bpf(), e.g. > >> systemd. > >> > >> This

Re: [for-next V2 09/10] RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink

2019-06-25 Thread Sagi Grimberg
On 6/25/19 1:57 PM, Saeed Mahameed wrote: From: Yamin Friedman Added parameter in ib_device for enabling dynamic interrupt moderation so that it can be configured in userspace using rdma tool. In order to set dim for an ib device the command is: rdma dev set [DEV] dim [on|off] Please set on

Re: [for-next V2 10/10] RDMA/core: Provide RDMA DIM support for ULPs

2019-06-25 Thread Sagi Grimberg
+static int ib_poll_dim_handler(struct irq_poll *iop, int budget) +{ + struct ib_cq *cq = container_of(iop, struct ib_cq, iop); + struct dim *dim = cq->dim; + int completed; + + completed = __ib_process_cq(cq, budget, cq->wc, IB_POLL_BATCH); + if (completed < budg

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Russell King - ARM Linux admin
On Tue, Jun 25, 2019 at 09:02:46PM +0200, Andrew Lunn wrote: > > But will there still be a mechanism to ignore link partner's advertising > > and force these parameters? > > From man 1 ethtool: > >-a --show-pause > Queries the specified Ethernet device for pause parameter >

Re: [PATCH 0/1] Fix broken build of mlx5

2019-06-25 Thread Saeed Mahameed
On Tue, 2019-06-25 at 14:01 -0400, Jes Sorensen wrote: > On 6/25/19 1:54 PM, Saeed Mahameed wrote: > > On Tue, 2019-06-25 at 11:27 -0400, Jes Sorensen wrote: > > > From: Jes Sorensen > > > > > > This fixes an obvious build error that could have been caught by > > > simply building the code before

Re: [PATCH net-next] Revert "net: ena: ethtool: add extra properties retrieval via get_priv_flags"

2019-06-25 Thread David Miller
From: Jakub Kicinski Date: Tue, 25 Jun 2019 09:59:56 -0700 > This reverts commit 315c28d2b714 ("net: ena: ethtool: add extra properties > retrieval via get_priv_flags"). > > As discussed at netconf and on the mailing list we can't allow > for the the abuse of private flags for exposing arbitrar

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

2019-06-25 Thread David Miller
From: Saeed Mahameed Date: Tue, 25 Jun 2019 21:01:58 + > BTW is there a way to clear up "Awaiting Upstream" clutter [1] for mlx5 > patches that are already pulled ? > > [1] > https://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=&state=8&q=mlx5&archive=&delegate= I don't unde

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread René van Dorst
Quoting Andrew Lunn : Hi Andrew, On Tue, Jun 25, 2019 at 02:27:55PM -0500, Daniel Santos wrote: On 6/25/19 2:02 PM, Andrew Lunn wrote: >> But will there still be a mechanism to ignore link partner's advertising >> and force these parameters? > >From man 1 ethtool: > >-a --show-pause >

Re: [PATCH net-next] Revert "net: ena: ethtool: add extra properties retrieval via get_priv_flags"

2019-06-25 Thread Machulsky, Zorik
As we agreed during Netconf discussion we'll look into other alternative - the devlink tool that should potentially answer our needs. On 6/25/19, 1:43 PM, "David Miller" wrote: From: Jakub Kicinski Date: Tue, 25 Jun 2019 09:59:56 -0700 > This reverts commit 315c28d2b714 ("n

Re: [pull request][for-next V2 0/7] Generic DIM lib for netdev and RDMA

2019-06-25 Thread Saeed Mahameed
On Tue, 2019-06-25 at 20:57 +, Saeed Mahameed wrote: > Hi Dave, Doug & Jason > > This series improves DIM - Dynamically-tuned Interrupt > Moderation- to be generic for netdev and RDMA use-cases. > > From Tal and Yamin: > > First 7 patches provide the necessary refactoring to current net_dim

Re: What to do when a bridge port gets its pvid deleted?

2019-06-25 Thread Vladimir Oltean
On Tue, 25 Jun 2019 at 23:49, Vladimir Oltean wrote: > > Hi, > > A number of DSA drivers (BCM53XX, Microchip KSZ94XX, Mediatek MT7530 > at the very least), as well as Mellanox Spectrum (I didn't look at all > the pure switchdev drivers) try to restore the pvid to a default value > on .port_vlan_de

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

2019-06-25 Thread Saeed Mahameed
On Tue, 2019-06-25 at 13:34 -0700, David Miller wrote: > From: Jes Sorensen > Date: Tue, 25 Jun 2019 11:27:08 -0400 > > > From: Jes Sorensen > > > > The previous patch broke the build with a static declaration for > > a public function. > > > > Fixes: 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh

Re: [PATCH bpf-next 0/4] sys_bpf() access control via /dev/bpf

2019-06-25 Thread Alexei Starovoitov
On 6/25/19 1:51 PM, Stanislav Fomichev wrote: > On 06/25, Song Liu wrote: >> Currently, most access to sys_bpf() is limited to root. However, there are >> use cases that would benefit from non-privileged use of sys_bpf(), e.g. >> systemd. >> >> This set introduces a new model to control the access

[for-next V2 09/10] RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink

2019-06-25 Thread Saeed Mahameed
From: Yamin Friedman Added parameter in ib_device for enabling dynamic interrupt moderation so that it can be configured in userspace using rdma tool. In order to set dim for an ib device the command is: rdma dev set [DEV] dim [on|off] Please set on/off. rdma dev show 0: mlx5_0: node_type ca fw

[for-next V2 08/10] linux/dim: Implement rdma_dim

2019-06-25 Thread Saeed Mahameed
From: Yamin Friedman rdma_dim implements a different algorithm than net_dim and is based on completions which is how we can implement interrupt moderation in RDMA. The algorithm optimizes for number of completions and ratio between completions and events. It also has a feature for fast reduction

[for-next V2 06/10] linux/dim: Move implementation to .c files

2019-06-25 Thread Saeed Mahameed
From: Tal Gilboa Moved all logic from dim.h and net_dim.h to dim.c and net_dim.c. This is both more structurally appealing and would allow to only expose externally used functions. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed --- MAINTAINERS | 2

Re: [PATCH bpf-next] libbpf: fix max() type mismatch for 32bit

2019-06-25 Thread Song Liu
On Tue, Jun 25, 2019 at 1:28 PM Ivan Khoronzhuk wrote: > > It fixes build error for 32bit caused by type mismatch > size_t/unsigned long. > > Signed-off-by: Ivan Khoronzhuk Acked-by: Song Liu > --- > tools/lib/bpf/libbpf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

  1   2   3   >