[PATCH net-next 3/5] selftests: mlxsw: Add Spectrum-2 mirror-to-gretap target scale test

2019-10-16 Thread Ido Schimmel
From: Danielle Ratson Like in Spectrum, use the number of analyzers taken from the devlink command. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/mirror_gre_scale.sh | 16 1 file changed, 16 insertions(+) cr

[PATCH net-next 4/5] selftests: mlxsw: Add a resource scale test for Spectrum-2

2019-10-16 Thread Ido Schimmel
From: Danielle Ratson Add resource_scale test suitable for Spectrum-2. Invoke the mirror_gre test and check that the advertised scale numbers are indeed supported. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/resource_scale.sh

[PATCH net-next 0/5] selftests: mlxsw: Add scale tests for Spectrum-2

2019-10-16 Thread Ido Schimmel
From: Ido Schimmel This series from Danielle adds two scale tests for the Spectrum-2 ASIC. The first scale test (patches #1-#4) validates the number of mirroring sessions (using tc-mirred) that can be supported by the device. As a preparatory step, patch #1 exposes the maximum number and current

[PATCH net-next 5/5] selftests: mlxsw: Add Spectrum-2 target scale for tc flower scale test

2019-10-16 Thread Ido Schimmel
From: Danielle Ratson Return the maximum number of tc flower filters that can be offloaded. Currently, this value corresponds to the number of counters supported by the driver. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/mlxsw/spectrum-2/resour

[PATCH net-next 1/5] mlxsw: spectrum: Register switched port analyzers (SPAN) as resource

2019-10-16 Thread Ido Schimmel
From: Danielle Ratson The switch supports an enhanced switched port analyzer that enables selecting network traffic for analysis by a network analyzer. SPAN agents are configured and consumed whenever a tc filter is added with a mirror action to a new destination. The destination can either be a

[PATCH net-next 2/5] selftests: mlxsw: Generalize the parameters of mirror_gre test

2019-10-16 Thread Ido Schimmel
From: Danielle Ratson Use the number of analyzers taken from the devlink command, instead of hard-coded value, in order to make the test more generic. Signed-off-by: Danielle Ratson Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../drivers/net/mlxsw/spectrum/mirror_gre_scale.sh

Re: [PATCH v4 bpf-next 0/7] Fix, clean up, and revamp selftests/bpf Makefile

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 9:28 PM Alexei Starovoitov wrote: > > On Wed, Oct 16, 2019 at 4:49 AM Andrii Nakryiko wrote: > > > > This patch set extensively revamps selftests/bpf's Makefile to generalize > > test > > runner concept and apply it uniformly to test_maps and test_progs test > > runners,

Re: lan78xx and phy_state_machine

2019-10-16 Thread Daniel Wagner
On Wed, Oct 16, 2019 at 05:51:07PM +0200, Andrew Lunn wrote: > Hi Daniel > > Please could you give this a go. It is totally untested, not even > compile tested... Sure. The system boots but ther is one splat: [2.213987] usb 1-1: new high-speed USB device number 2 using dwc2 [2.426789] h

Re: [PATCH] net: netsec: Correct dma sync for XDP_TX frames

2019-10-16 Thread Ilias Apalodimas
Hi Jakub, On Wed, Oct 16, 2019 at 05:14:01PM -0700, Jakub Kicinski wrote: > On Wed, 16 Oct 2019 14:40:32 +0300, Ilias Apalodimas wrote: > > bpf_xdp_adjust_head() can change the frame boundaries. Account for the > > potential shift properly by calculating the new offset before > > syncing the buff

Re: [PATCH net-next] Change in Openvswitch to support MPLS label depth of 3 in ingress direction

2019-10-16 Thread Pravin Shelar
On Tue, Oct 15, 2019 at 8:05 PM Martin Varghese wrote: > > On Tue, Oct 15, 2019 at 12:03:35AM -0700, Pravin Shelar wrote: > > On Mon, Oct 14, 2019 at 9:06 AM Martin Varghese > > wrote: > > > > > > On Sat, Oct 12, 2019 at 01:08:26PM -0700, Pravin Shelar wrote: > > > > On Wed, Oct 9, 2019 at 9:31 P

Re: [PATCH net] ipv4: fix race condition between route lookup and invalidation

2019-10-16 Thread Ido Schimmel
On Wed, Oct 16, 2019 at 12:03:15PM -0700, Wei Wang wrote: > Jesse and Ido reported the following race condition: > - Received packet A is forwarded and cached dst entry is > taken from the nexthop ('nhc->nhc_rth_input'). Calls skb_dst_set() > > - Given Jesse has busy routers ("ingesting full BGP

Documentation for filters in ss

2019-10-16 Thread Thayne
The man page for ss(8) states: > Please take a look at the official documentation for details regarding > filters. However, I have been unable to find any documentation on the filters for ss, official or otherwise. There was some documentation that was removed in commit d77ce080d33370d90de8b12

Re: [net-next 4/7] e1000e: Add support for S0ix

2019-10-16 Thread Neftin, Sasha
On 10/17/2019 03:02, Jakub Kicinski wrote: On Wed, 16 Oct 2019 16:47:08 -0700, Jeff Kirsher wrote: static int e1000e_pm_freeze(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); @@ -6650,6 +6822,9 @@ static int e1000e_pm_thaw(struct device *dev) static int e100

Re: [PATCHv3 net-next 0/5] sctp: update from rfc7829

2019-10-16 Thread Xin Long
On Wed, Oct 16, 2019 at 6:42 PM David Laight wrote: > > From: David Miller > > Sent: 16 October 2019 01:57 > > From: Xin Long > > Date: Mon, 14 Oct 2019 14:14:43 +0800 > > > > > SCTP-PF was implemented based on a Internet-Draft in 2012: > > > > > > https://tools.ietf.org/html/draft-nishida-tsvw

Re: big ICMP requests get disrupted on IPSec tunnel activation

2019-10-16 Thread Bartschies, Thomas
No problem. This is exactly the way I've adapted it myself. So my tests seem to be valid. Regards, -- Thomas Bartschies CVK IT Systeme -Ursprüngliche Nachricht- Von: Eric Dumazet [mailto:eric.duma...@gmail.com] Gesendet: Mittwoch, 16. Oktober 2019 21:54 An: Bartschies, Thomas ; 'David A

Re: [PATCH net] sunrpc: fix UDP memory accounting for v4.4 kernel

2019-10-16 Thread JABLONSKY Jan
On Tue, 2019-10-15 at 11:19 +0200, Paolo Abeni wrote: > Hi, > > On Tue, 2019-10-15 at 07:21 +, JABLONSKY Jan wrote: > > The same warnings reported by Jan Stancek may appear also on 4.4 > > Based on Paolo Abeni's work. > > > > WARNING: at net/ipv4/af_inet.c:155 > > CPU: 1 PID: 214 Comm: kworke

Bunch of compiler warning fixes for ethtool.

2019-10-16 Thread Maciej Żenczykowski
You can merge them via: git fetch https://github.com/zenczykowski/ethtool.git fix-warnings git merge FETCH_HEAD and I'll follow up this email with the full set.

Re: [PATCH v4 bpf-next 0/7] Fix, clean up, and revamp selftests/bpf Makefile

2019-10-16 Thread Alexei Starovoitov
On Wed, Oct 16, 2019 at 4:49 AM Andrii Nakryiko wrote: > > This patch set extensively revamps selftests/bpf's Makefile to generalize test > runner concept and apply it uniformly to test_maps and test_progs test > runners, along with test_progs' few build "flavors", exercising various ways > to bui

Re: [PATCH net] af_packet: fix the tx skb protocol in raw sockets with ETH_P_ALL

2019-10-16 Thread Maciej Żenczykowski
> The Fixes tag is missing. Calling sendmsg on a packet socket bound to > ETH_P_ALL goes back a long way. It is a user, not kernel, bug to do > so. I would argue it's not a bug at all - at least not the way you phrased it. AFAIK it can/could be done correctly via specifying the protocol in the sl

Re: [PATCH 03/10 net-next] net/mlx5e: RX, Internal DMA mapping in page_pool

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 15:50:21 -0700, Jonathan Lemon wrote: > From: Tariq Toukan > > After RX page-cache is removed in previous patch, let the > page_pool be responsible for the DMA mapping. > > Issue: 1487631 > Signed-off-by: Tariq Toukan > > Signed-off-by: Jonathan Lemon IIUC you'll need to

Re: [PATCH 01/10 net-next] net/mlx5e: RX, Remove RX page-cache

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 15:50:19 -0700, Jonathan Lemon wrote: > From: Tariq Toukan > > Obsolete the RX page-cache layer, pages are now recycled > in page_pool. > > This patch introduce a temporary degradation as recycling > does not keep the pages DMA-mapped. That is fixed in a > downstream patch. >

Re: [PATCH v4 net-next 7/7] net: mvneta: add XDP_TX support

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 23:03:12 +0200, Lorenzo Bianconi wrote: > Implement XDP_TX verdict and ndo_xdp_xmit net_device_ops function > pointer > > Signed-off-by: Lorenzo Bianconi > +static int > +mvneta_xdp_submit_frame(struct mvneta_port *pp, struct mvneta_tx_queue *txq, > + stru

Re: [PATCH v4 net-next 4/7] net: mvneta: add basic XDP support

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 23:03:09 +0200, Lorenzo Bianconi wrote: > Add basic XDP support to mvneta driver for devices that rely on software > buffer management. Currently supported verdicts are: > - XDP_DROP > - XDP_PASS > - XDP_REDIRECT > - XDP_ABORTED > > - iptables drop: > $iptables -t raw -I PREROU

Re: [PATCH v4 net-next 3/7] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 23:03:08 +0200, Lorenzo Bianconi wrote: > Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and > mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to > allocate skb since the previous patch introduced buffer recycling using > the page_pool API. > Thi

Re: [PATCH v4 net-next 2/7] net: mvneta: introduce page pool API for sw buffer manager

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 23:03:07 +0200, Lorenzo Bianconi wrote: > Use the page_pool api for allocations and DMA handling instead of > __dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page(). > Pages are unmapped using page_pool_release_page before packets > go into the network stack. > > Th

Re: [PATCH v4 net-next 1/7] net: mvneta: introduce mvneta_update_stats routine

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 23:03:06 +0200, Lorenzo Bianconi wrote: > Introduce mvneta_update_stats routine to collect {rx/tx} statistics > (packets and bytes). This is a preliminary patch to add XDP support to > mvneta driver > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/ethernet/marvell/mvne

[PATCH net] net: ensure correct skb->tstamp in various fragmenters

2019-10-16 Thread Eric Dumazet
Thomas found that some forwarded packets would be stuck in FQ packet scheduler because their skb->tstamp contained timestamps far in the future. We thought we addressed this point in commit 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths") but there is still an issue when/if a packet nee

Re: [PATCH] net: netsec: Correct dma sync for XDP_TX frames

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 14:40:32 +0300, Ilias Apalodimas wrote: > bpf_xdp_adjust_head() can change the frame boundaries. Account for the > potential shift properly by calculating the new offset before > syncing the buffer to the device for XDP_TX > > Fixes: ba2b232108d3 ("net: netsec: add XDP support"

Re: [net-next 4/7] e1000e: Add support for S0ix

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 16:47:08 -0700, Jeff Kirsher wrote: > static int e1000e_pm_freeze(struct device *dev) > { > struct net_device *netdev = dev_get_drvdata(dev); > @@ -6650,6 +6822,9 @@ static int e1000e_pm_thaw(struct device *dev) > static int e1000e_pm_suspend(struct device *dev) > { >

Re: [net-next 1/7] igb/igc: Don't warn on fatal read failures when the device is removed

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 16:47:05 -0700, Jeff Kirsher wrote: > From: Lyude Paul > > Fatal read errors are worth warning about, unless of course the device > was just unplugged from the machine - something that's a rather normal > occurence when the igb/igc adapter is located on a Thunderbolt dock. So,

Re: [net-next 2/7] igb: add rx drop enable attribute

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 16:47:06 -0700, Jeff Kirsher wrote: > From: Robert Beckett > > To allow userland to enable or disable dropping packets when descriptor > ring is exhausted, add RX_DROP_EN private flag. > > This can be used in conjunction with flow control to mitigate packet storms > (e.g. due

Re: [PATCH v3 bpf-next 06/11] bpf: implement accurate raw_tp context access via BTF

2019-10-16 Thread Alexei Starovoitov
On 10/16/19 3:08 PM, Daniel Borkmann wrote: > On 10/16/19 11:28 PM, Alexei Starovoitov wrote: >> On Wed, Oct 16, 2019 at 2:22 PM Daniel Borkmann >> wrote: >>> On 10/16/19 5:25 AM, Alexei Starovoitov wrote: libbpf analyzes bpf C program, searches in-kernel BTF for given type name a

[net-next 4/7] e1000e: Add support for S0ix

2019-10-16 Thread Jeff Kirsher
From: Sasha Neftin Implement flow for S0ix support. Modern SoCs support S0ix low power states during idle periods, which are sub-states of ACPI S0 that increase power saving while supporting an instant-on experience for providing lower latency that ACPI S0. The S0ix states shut off parts of the S

[net-next 1/7] igb/igc: Don't warn on fatal read failures when the device is removed

2019-10-16 Thread Jeff Kirsher
From: Lyude Paul Fatal read errors are worth warning about, unless of course the device was just unplugged from the machine - something that's a rather normal occurence when the igb/igc adapter is located on a Thunderbolt dock. So, let's only WARN() if there's a fatal read error while the device

[net-next 7/7] igc: Clean up unused shadow_vfta pointer

2019-10-16 Thread Jeff Kirsher
From: Sasha Neftin VLAN filter table array not implemented yet and shadow_vfta pointer not used. Clean up the code and remove the unused shadow_vfta pointer. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 1 - dr

[net-next 0/7][pull request] 1GbE Intel Wired LAN Driver Updates 2019-10-16

2019-10-16 Thread Jeff Kirsher
This series contains updates to e1000e, igc and igb. Lyude Paul fixes a warning that was occurring during a fatal read error while the device is still present. Robert Beckett adds receive drop enable support via ehttool private flag for igb. Sasha adds stream control transmission protocol (SCTP)

[net-next 2/7] igb: add rx drop enable attribute

2019-10-16 Thread Jeff Kirsher
From: Robert Beckett To allow userland to enable or disable dropping packets when descriptor ring is exhausted, add RX_DROP_EN private flag. This can be used in conjunction with flow control to mitigate packet storms (e.g. due to network loop or DoS) by forcing the network adapter to send pause

[net-next 6/7] igc: Add Rx checksum support

2019-10-16 Thread Jeff Kirsher
From: Sasha Neftin Extend the socket buffer field process and add Rx checksum functionality Minor: fix indentation with tab instead of spaces. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 5 ++- drivers/net

[net-next 5/7] igc: Add set_rx_mode support

2019-10-16 Thread Jeff Kirsher
From: Sasha Neftin Add multicast addresses list to the MTA table. Implement basic Rx mode support. Add option for IPv6 address settings. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 3 + drivers/net/ethern

[net-next 3/7] igc: Add SCTP CRC checksumming functionality

2019-10-16 Thread Jeff Kirsher
From: Sasha Neftin Add stream control transmission protocol CRC checksum. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c

Re: [PATCH net-next,v5 3/4] net: flow_offload: mangle action at byte level

2019-10-16 Thread Jakub Kicinski
On Tue, 15 Oct 2019 00:10:50 +0200, Pablo Neira Ayuso wrote: > The flow mangle action is originally modeled after the tc pedit action, > this has a number of shortcomings: > > 1) The tc pedit offset must be set on the 32-bits boundaries. Many >protocol header field offsets are not aligned to 3

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread Eric Dumazet
On Wed, Oct 16, 2019 at 4:24 PM David Howells wrote: > > Eric Dumazet wrote: > > > We need to extend the rcu_read_lock() section in rxrpc_error_report() > > and use rcu_dereference_sk_user_data() instead of plain access > > to sk->sk_user_data to make sure all rules are respected. > > Should I ta

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread David Howells
Eric Dumazet wrote: > We need to extend the rcu_read_lock() section in rxrpc_error_report() > and use rcu_dereference_sk_user_data() instead of plain access > to sk->sk_user_data to make sure all rules are respected. Should I take it that the caller won't be guaranteed to be holding the RCU read

Re: [PATCH net] net: netem: fix error path for corrupted GSO frames

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 15:42:28 -0700, Cong Wang wrote: > > @@ -612,7 +613,7 @@ static int netem_enqueue(struct sk_buff *skb, struct > > Qdisc *sch, > > } > > segs = skb2; > > } > > - qdisc_tree_reduce_backlog(sch, -nb, pre

[PATCH 08/10 net-next] page_pool: Add statistics

2019-10-16 Thread Jonathan Lemon
Add statistics to the page pool, providing visibility into its operation. Callers can provide a location where the stats are stored, otherwise the page pool will allocate a statistic area. Signed-off-by: Jonathan Lemon --- include/net/page_pool.h | 21 +--- net/core/page_pool.c|

[PATCH 02/10 net-next] net/mlx5e: RX, Manage RX pages only via page pool API

2019-10-16 Thread Jonathan Lemon
From: Tariq Toukan Do not directly call page allocator functions, but use page pool API only. Obsolete the recycle param. Issue: 1487631 Signed-off-by: Tariq Toukan Signed-off-by: Jonathan Lemon --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +- .../net/ethernet/mellanox/mlx5/core/e

[PATCH 03/10 net-next] net/mlx5e: RX, Internal DMA mapping in page_pool

2019-10-16 Thread Jonathan Lemon
From: Tariq Toukan After RX page-cache is removed in previous patch, let the page_pool be responsible for the DMA mapping. Issue: 1487631 Signed-off-by: Tariq Toukan Signed-off-by: Jonathan Lemon --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- drivers/net/ethernet/mellanox/mlx5

[PATCH 04/10 net-next] page_pool: Add API to update numa node and flush page caches

2019-10-16 Thread Jonathan Lemon
From: Saeed Mahameed Add page_pool_update_nid() to be called from drivers when they detect numa node changes. It will do: 1) Flush the pool's page cache and ptr_ring. 2) Update page pool nid value to start allocating from the new numa node. Signed-off-by: Saeed Mahameed Signed-off-by: Jonathan

[PATCH 00/10 net-next] page_pool cleanups

2019-10-16 Thread Jonathan Lemon
This patch combines work from various people: - part of Tariq's work to move the DMA mapping from the mlx5 driver into the page pool. This does not include later patches which remove the dma address from the driver, as this conflicts with AF_XDP. - Saeed's changes to check the numa node bef

[PATCH 07/10 net-next] page_pool: allow configurable linear cache size

2019-10-16 Thread Jonathan Lemon
Some drivers may utilize more than one page per RX work entry. Allow a configurable cache size, with the same defaults if the size is zero. Convert magic numbers into descriptive entries. Re-arrange the page_pool structure for efficiency. Signed-off-by: Jonathan Lemon --- include/net/page_pool

[PATCH 05/10 net-next] net/mlx5e: Rx, Update page pool numa node when changed

2019-10-16 Thread Jonathan Lemon
From: Saeed Mahameed On poll rx ring napi cycle check if numa node is different than the page pool nid and update it using page_pool_update_nid(); Signed-off-by: Saeed Mahameed Signed-off-by: Jonathan Lemon --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +++ 1 file changed, 3 inserti

[PATCH 09/10 net-next] net/mlx5: Add page_pool stats to the Mellanox driver

2019-10-16 Thread Jonathan Lemon
Replace the now deprecated inernal cache stats with the page pool stats. # ethtool -S eth0 | grep rx_pool rx_pool_cache_hit: 1646798 rx_pool_cache_full: 0 rx_pool_cache_empty: 15723566 rx_pool_ring_produce: 474958 rx_pool_ring_consume: 0 rx_pool_ring_return: 474958

[PATCH 06/10 net-next] page_pool: Add page_pool_keep_page

2019-10-16 Thread Jonathan Lemon
When releasing a page to the pool, only retain the page if page_pool_keep_page() returns true. Do not flush the page pool on node changes, but instead lazily discard the pages as they are returned. Signed-off-by: Jonathan Lemon --- include/net/page_pool.h | 2 -- net/core/page_pool.c| 39 +

[PATCH 10/10 net-next] page_pool: Cleanup and rename page_pool functions.

2019-10-16 Thread Jonathan Lemon
Functions starting with __ usually indicate those which are called while holding a lock, or are exported, but should not be called directly. Internal static functions don't meet either of these criteria, so make it more readable. Move stub functions to end of file in their own section for readabi

[PATCH 01/10 net-next] net/mlx5e: RX, Remove RX page-cache

2019-10-16 Thread Jonathan Lemon
From: Tariq Toukan Obsolete the RX page-cache layer, pages are now recycled in page_pool. This patch introduce a temporary degradation as recycling does not keep the pages DMA-mapped. That is fixed in a downstream patch. Issue: 1487631 Signed-off-by: Tariq Toukan Signed-off-by: Jonathan Lemon

Re: [PATCH net] net: netem: fix error path for corrupted GSO frames

2019-10-16 Thread Cong Wang
On Wed, Oct 16, 2019 at 3:23 PM Jakub Kicinski wrote: > > To corrupt a GSO frame we first perform segmentation. We then > proceed using the first segment instead of the full GSO skb and > requeue the rest of the segments as separate packets. > > If there are any issues with processing the first s

Re: [PATCH v3 bpf-next 06/11] bpf: implement accurate raw_tp context access via BTF

2019-10-16 Thread Daniel Borkmann
On 10/16/19 11:28 PM, Alexei Starovoitov wrote: On Wed, Oct 16, 2019 at 2:22 PM Daniel Borkmann wrote: On 10/16/19 5:25 AM, Alexei Starovoitov wrote: libbpf analyzes bpf C program, searches in-kernel BTF for given type name and stores it into expected_attach_type. The kernel verifier expects t

Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy waiting loop

2019-10-16 Thread Cong Wang
On Wed, Oct 16, 2019 at 11:48 AM Sebastian Andrzej Siewior wrote: > > On 2019-10-16 10:28:04 [-0700], Cong Wang wrote: > > > Link: > > > https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-...@pengutronix.de > > > > BTW, this link doesn't work, 404 is returned. > > here it returns 200: M

Re: [PATCH v3 bpf-next 06/11] bpf: implement accurate raw_tp context access via BTF

2019-10-16 Thread Alexei Starovoitov
On Wed, Oct 16, 2019 at 2:22 PM Daniel Borkmann wrote: > > On 10/16/19 5:25 AM, Alexei Starovoitov wrote: > > libbpf analyzes bpf C program, searches in-kernel BTF for given type name > > and stores it into expected_attach_type. > > The kernel verifier expects this btf_id to point to something lik

Re: [PATCH v3 bpf-next 06/11] bpf: implement accurate raw_tp context access via BTF

2019-10-16 Thread Daniel Borkmann
On 10/16/19 5:25 AM, Alexei Starovoitov wrote: libbpf analyzes bpf C program, searches in-kernel BTF for given type name and stores it into expected_attach_type. The kernel verifier expects this btf_id to point to something like: typedef void (*btf_trace_kfree_skb)(void *, struct sk_buff *skb, vo

[PATCH v4 net-next 7/7] net: mvneta: add XDP_TX support

2019-10-16 Thread Lorenzo Bianconi
Implement XDP_TX verdict and ndo_xdp_xmit net_device_ops function pointer Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 128 -- 1 file changed, 121 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/n

[PATCH v4 net-next 6/7] net: mvneta: make tx buffer array agnostic

2019-10-16 Thread Lorenzo Bianconi
Allow tx buffer array to contain both skb and xdp buffers in order to enable xdp frame recycling adding XDP_TX verdict support Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 66 +-- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git

[PATCH v4 net-next 4/7] net: mvneta: add basic XDP support

2019-10-16 Thread Lorenzo Bianconi
Add basic XDP support to mvneta driver for devices that rely on software buffer management. Currently supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_ABORTED - iptables drop: $iptables -t raw -I PREROUTING -p udp --dport 9 -j DROP $nstat -n && sleep 1 && nstat IpInReceives

[PATCH v4 net-next 5/7] net: mvneta: move header prefetch in mvneta_swbm_rx_frame

2019-10-16 Thread Lorenzo Bianconi
Move data buffer prefetch in mvneta_swbm_rx_frame after dma_sync_single_range_for_cpu Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) di

[PATCH v4 net-next 3/7] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine

2019-10-16 Thread Lorenzo Bianconi
Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to allocate skb since the previous patch introduced buffer recycling using the page_pool API. This patch fixes even an issue in the original driver where dma buffers a

[PATCH v4 net-next 1/7] net: mvneta: introduce mvneta_update_stats routine

2019-10-16 Thread Lorenzo Bianconi
Introduce mvneta_update_stats routine to collect {rx/tx} statistics (packets and bytes). This is a preliminary patch to add XDP support to mvneta driver Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 41 +-- 1 file changed, 20 insertions(+), 2

[PATCH v4 net-next 2/7] net: mvneta: introduce page pool API for sw buffer manager

2019-10-16 Thread Lorenzo Bianconi
Use the page_pool api for allocations and DMA handling instead of __dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page(). Pages are unmapped using page_pool_release_page before packets go into the network stack. The page_pool API offers buffer recycling capabilities for XDP but allocat

[PATCH v4 net-next 0/7] add XDP support to mvneta driver

2019-10-16 Thread Lorenzo Bianconi
Add XDP support to mvneta driver for devices that rely on software buffer management. Supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_TX Moreover set ndo_xdp_xmit net_device_ops function pointer in order to support redirecting from other device (e.g. virtio-net). Convert mvneta d

Re: [PATCH v4 bpf-next 5/7] selftests/bpf: replace test_progs and test_maps w/ general rule

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 9:32 AM Stanislav Fomichev wrote: > > On 10/15, Andrii Nakryiko wrote: > > Define test runner generation meta-rule that codifies dependencies > > between test runner, its tests, and its dependent BPF programs. Use that > > for defining test_progs and test_maps test-runners.

Re: taprio testing - Any help?

2019-10-16 Thread Vinicius Costa Gomes
Murali Karicheri writes: > Hi Vinicius, > > On 10/14/2019 07:39 PM, Vinicius Costa Gomes wrote: >> Murali Karicheri writes: >>> >>> My expectation is as follows >>> >>> AABCDE >>> >>> Where A is traffic from TC0, B is udp stream for port 1 >>> C is stream for

Re: [PATCH bpf-next] scripts/bpf: Emit an #error directive known types list needs updating

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 6:21 AM Jakub Sitnicki wrote: > > Make the compiler report a clear error when bpf_helpers_doc.py needs > updating rather than rely on the fact that Clang fails to compile > English: > > ../../../lib/bpf/bpf_helper_defs.h:2707:1: error: unknown type name > 'Unrecognized' >

Re: [PATCH net-next] net: phy: avoid NPE if read_page/write_page callbacks are not available

2019-10-16 Thread Heiner Kallweit
On 16.10.2019 22:20, Florian Fainelli wrote: > On 10/16/19 12:53 PM, Heiner Kallweit wrote: >> Currently there's a bug in the module subsystem [0] preventing load of >> the PHY driver module on certain systems (as one symptom). >> This results in a NPE on such systems for the following reason: >> I

Re: [PATCH iproute2 1/2] ip-netns.8: document the 'auto' keyword of 'ip netns set'

2019-10-16 Thread Stephen Hemminger
On Wed, 16 Oct 2019 17:00:51 +0200 Nicolas Dichtel wrote: > This is a follow up of the commit ebe3ce2fcc5f ("ipnetns: parse nsid as a > signed integer"). > > Signed-off-by: Nicolas Dichtel Thank you for following up. Applied

Re: [PATCH iproute2] man: remove "defaut group" sentence on ip link

2019-10-16 Thread Stephen Hemminger
On Tue, 15 Oct 2019 17:35:50 +0200 Florent Fourcot wrote: > By default, all devices are listed, not only the default group. > > Signed-off-by: Florent Fourcot > Signed-off-by: Romain Bellan Thanks for catching this. Applied

Re: [PATCH net-next] net: phy: avoid NPE if read_page/write_page callbacks are not available

2019-10-16 Thread Florian Fainelli
On 10/16/19 12:53 PM, Heiner Kallweit wrote: > Currently there's a bug in the module subsystem [0] preventing load of > the PHY driver module on certain systems (as one symptom). > This results in a NPE on such systems for the following reason: > Instead of the correct PHY driver the genphy driver

Re: [PATCH v3 bpf-next 09/11] bpf: add support for BTF pointers to x86 JIT

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 4:16 AM Alexei Starovoitov wrote: > > Pointer to BTF object is a pointer to kernel object or NULL. > Such pointers can only be used by BPF_LDX instructions. > The verifier changed their opcode from LDX|MEM|size > to LDX|PROBE_MEM|size to make JITing easier. > The number of

Re: [PATCH v3 bpf-next 07/11] bpf: attach raw_tp program with BTF via type name

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 4:16 AM Alexei Starovoitov wrote: > > BTF type id specified at program load time has all > necessary information to attach that program to raw tracepoint. > Use kernel type name to find raw tracepoint. > > Add missing CHECK_ATTR() condition. > > Signed-off-by: Alexei Starov

Re: [PATCH bpf] xdp: Handle device unregister for devmap_hash map type

2019-10-16 Thread Tetsuo Handa
On 2019/10/16 22:28, Toke Høiland-Jørgensen wrote: > It seems I forgot to add handling of devmap_hash type maps to the device > unregister hook for devmaps. This omission causes devices to not be > properly released, which causes hangs. > > Fix this by adding the missing handler. > > Fixes: 6f9d4

Re: [PATCH v3 bpf-next 06/11] bpf: implement accurate raw_tp context access via BTF

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 4:16 AM Alexei Starovoitov wrote: > > libbpf analyzes bpf C program, searches in-kernel BTF for given type name > and stores it into expected_attach_type. > The kernel verifier expects this btf_id to point to something like: > typedef void (*btf_trace_kfree_skb)(void *, str

Re: [PATCH v2 net 2/4] net: aquantia: when cleaning hw cache it should be toggled

2019-10-16 Thread Jakub Kicinski
On Wed, 16 Oct 2019 13:19:30 +, Igor Russkikh wrote: > >> It was previosly always just set. Due to the way driver stops HW this > >> never actually caused any issues, but it still may, so cleaning this up. > > > > Hm. So is it a cleanup of fix? Does the way code is written guarantee > > it w

Re: AW: big ICMP requests get disrupted on IPSec tunnel activation

2019-10-16 Thread Eric Dumazet
On 10/16/19 11:54 AM, Bartschies, Thomas wrote: > Hello, > > I had to adapt the second half to my test kernel. Just had to make some > guesses, tested. and it works. > Your conclusions are correct. I also suspected something like that, but with > no knowledge of the inner > workings of the ip

[PATCH net-next] net: phy: avoid NPE if read_page/write_page callbacks are not available

2019-10-16 Thread Heiner Kallweit
Currently there's a bug in the module subsystem [0] preventing load of the PHY driver module on certain systems (as one symptom). This results in a NPE on such systems for the following reason: Instead of the correct PHY driver the genphy driver is loaded that doesn't implement the read_page/write_

Re: [PATCH v3 bpf-next 04/11] bpf: add attach_btf_id attribute to program load

2019-10-16 Thread Alexei Starovoitov
On 10/16/19 12:45 PM, Andrii Nakryiko wrote: > On Wed, Oct 16, 2019 at 4:15 AM Alexei Starovoitov wrote: >> >> Add attach_btf_id attribute to prog_load command. >> It's similar to existing expected_attach_type attribute which is >> used in several cgroup based program types. >> Unfortunately expec

Re: [PATCH v3 bpf-next 05/11] libbpf: auto-detect btf_id of BTF-based raw_tracepoints

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 4:14 AM Alexei Starovoitov wrote: > > It's a responsiblity of bpf program author to annotate the program > with SEC("tp_btf/name") where "name" is a valid raw tracepoint. > The libbpf will try to find "name" in vmlinux BTF and error out > in case vmlinux BTF is not availabl

Re: [PATCH v3 bpf-next 04/11] bpf: add attach_btf_id attribute to program load

2019-10-16 Thread Andrii Nakryiko
On Wed, Oct 16, 2019 at 4:15 AM Alexei Starovoitov wrote: > > Add attach_btf_id attribute to prog_load command. > It's similar to existing expected_attach_type attribute which is > used in several cgroup based program types. > Unfortunately expected_attach_type is ignored for > tracing programs an

Re: [PATCH v2 net-next 10/12] net: aquantia: add support for Phy access

2019-10-16 Thread Andrew Lunn
> Hi Andrew, > No it can't. This is a monolitic MAC+Phy solution. O.K, then not using the core infrastructure is O.K. Thanks Andrew

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread David Miller
From: Eric Dumazet Date: Mon, 14 Oct 2019 06:04:38 -0700 > We need to extend the rcu_read_lock() section in rxrpc_error_report() > and use rcu_dereference_sk_user_data() instead of plain access > to sk->sk_user_data to make sure all rules are respected. > > The compiler wont reload sk->sk_user_d

Re: [PATCH net] cxgb4: Fix panic when attaching to ULD fails

2019-10-16 Thread David Miller
From: Vishal Kulkarni Date: Mon, 14 Oct 2019 13:20:35 +0530 > @@ -760,7 +762,9 @@ void cxgb4_register_uld(enum cxgb4_uld type, > if (ret) > goto free_irq; > adap->uld[type] = *p; > - uld_attach(adap, type); > + ret = uld_at

Re: [PATCHv3 net-next 0/5] sctp: update from rfc7829

2019-10-16 Thread David Miller
From: Marcelo Ricardo Leitner Date: Wed, 16 Oct 2019 15:32:09 -0300 > On Wed, Oct 16, 2019 at 02:25:34PM -0400, David Miller wrote: >> From: Xin Long >> Date: Mon, 14 Oct 2019 14:14:43 +0800 >> >> > SCTP-PF was implemented based on a Internet-Draft in 2012: >> > >> > https://tools.ietf.org/h

[PATCH net] ipv4: fix race condition between route lookup and invalidation

2019-10-16 Thread Wei Wang
Jesse and Ido reported the following race condition: - Received packet A is forwarded and cached dst entry is taken from the nexthop ('nhc->nhc_rth_input'). Calls skb_dst_set() - Given Jesse has busy routers ("ingesting full BGP routing tables from multiple ISPs"), route is added / deleted and r

Fw: [Bug 205215] New: Amiga X5000 Cyrus board DPAA network driver issue

2019-10-16 Thread Stephen Hemminger
Begin forwarded message: Date: Wed, 16 Oct 2019 18:57:44 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 205215] New: Amiga X5000 Cyrus board DPAA network driver issue https://bugzilla.kernel.org/show_bug.cgi?id=205215 Bug ID: 205215

AW: big ICMP requests get disrupted on IPSec tunnel activation

2019-10-16 Thread Bartschies, Thomas
Hello, I had to adapt the second half to my test kernel. Just had to make some guesses, tested. and it works. Your conclusions are correct. I also suspected something like that, but with no knowledge of the inner workings of the ip stack I had very little chances to find the right fix by myself

[PATCH net v2] ipv4: Return -ENETUNREACH if we can't create route but saddr is valid

2019-10-16 Thread Stefano Brivio
...instead of -EINVAL. An issue was found with older kernel versions while unplugging a NFS client with pending RPCs, and the wrong error code here prevented it from recovering once link is back up with a configured address. Incidentally, this is not an issue anymore since commit 4f8943f80883 ("SU

Re: [PATCH net-next] ipv4: Return -ENETUNREACH if we can't create route but saddr is valid

2019-10-16 Thread Stefano Brivio
On Wed, 16 Oct 2019 14:21:59 -0400 (EDT) David Miller wrote: > From: Stefano Brivio > Date: Thu, 10 Oct 2019 17:51:50 +0200 > > > I think this should be considered for -stable, < 5.2 > > Changes meant for -stable should not target net-next, but rather net. Oh, sorry for that. I thought this

Re: [PATCH net-next v2] net: sched: Avoid using yield() in a busy waiting loop

2019-10-16 Thread Sebastian Andrzej Siewior
On 2019-10-16 10:28:04 [-0700], Cong Wang wrote: > > Link: > > https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-...@pengutronix.de > > BTW, this link doesn't work, 404 is returned. here it returns 200: |$ wget https://lkml.kernel.org/r/1393976987-23555-1-git-send-email-...@pengutron

[PATCH v2 net-next] net: dsa: sja1105: Switch to hardware operations for PTP

2019-10-16 Thread Vladimir Oltean
Adjusting the hardware clock (PTPCLKVAL, PTPCLKADD, PTPCLKRATE) is a requirement for the auxiliary PTP functionality of the switch (TTEthernet, PPS input, PPS output). Therefore we need to switch to using these registers to keep a synchronized time in hardware, instead of the timecounter/cyclecoun

Re: [PATCHv3 net-next 0/5] sctp: update from rfc7829

2019-10-16 Thread Marcelo Ricardo Leitner
On Wed, Oct 16, 2019 at 02:25:34PM -0400, David Miller wrote: > From: Xin Long > Date: Mon, 14 Oct 2019 14:14:43 +0800 > > > SCTP-PF was implemented based on a Internet-Draft in 2012: > > > > https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 > > > > It's been updated quite a fe

Re: [PATCH net-next] net: sfp: move fwnode parsing into sfp-bus layer

2019-10-16 Thread David Miller
From: Russell King Date: Tue, 15 Oct 2019 11:38:39 +0100 > Rather than parsing the sfp firmware node in phylink, parse it in the > sfp-bus code, so we can re-use this code for PHYs without having to > duplicate the parsing. > > Signed-off-by: Russell King Applied, thank you.

Re: [PATCHv3 net-next 0/5] sctp: update from rfc7829

2019-10-16 Thread David Miller
From: Xin Long Date: Mon, 14 Oct 2019 14:14:43 +0800 > SCTP-PF was implemented based on a Internet-Draft in 2012: > > https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 > > It's been updated quite a few by rfc7829 in 2016. > > This patchset adds the following features: Sorry b

Re: [PATCH net-next] ipv4: Return -ENETUNREACH if we can't create route but saddr is valid

2019-10-16 Thread David Miller
From: Stefano Brivio Date: Thu, 10 Oct 2019 17:51:50 +0200 > I think this should be considered for -stable, < 5.2 Changes meant for -stable should not target net-next, but rather net.

  1   2   >