Re: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-16 Thread Matteo Croce
On Tue, Apr 13, 2021 at 9:53 AM David Laight wrote: > > From: Matteo Croce > > Sent: 12 April 2021 01:38 > > > > Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. > > The real question is why, the change is: > > - for (i =

[PATCH net-next v2 3/3] net: use skb_for_each_frag() in illegal_highdma()

2021-04-11 Thread Matteo Croce
From: Matteo Croce Coccinelle failed with the following error: EXN: Failure("no position information") in net/core/dev.c Apply it by hand as it's trivial. Signed-off-by: Matteo Croce --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/c

[PATCH net-next v2 2/3] net: use skb_for_each_frag() helper where possible

2021-04-11 Thread Matteo Croce
From: Matteo Croce use the new helper macro skb_for_each_frag() which allows to iterate through all the SKB fragments. The patch was created with Coccinelle, this was the semantic patch: @@ struct sk_buff *skb; identifier i; statement S; iterator name skb_for_each_frag; @@ -for (i = 0; i

[PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-11 Thread Matteo Croce
From: Matteo Croce Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. First patch introduces the helper, the second one is generated with coccinelle and uses the macro where possible. Last one is a chunk which have to be applied by hand. The second patch raises some

[PATCH net-next v2 1/3] skbuff: add helper to walk over the fraglist

2021-04-11 Thread Matteo Croce
From: Matteo Croce Add an skb_for_each_frag() macro to iterate on SKB fragments. Signed-off-by: Matteo Croce --- include/linux/skbuff.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index dbf820a50a39..a8d4ccacdda5 100644 --- a/include

Re: [PATCH net-next 2/3] net: use skb_for_each_frag() helper where possible

2021-04-09 Thread Matteo Croce
On Fri, Apr 9, 2021 at 11:28 PM Jakub Kicinski wrote: > > On Fri, 9 Apr 2021 22:44:50 +0200 Matteo Croce wrote: > > > What pops to mind (although quite nit picky) is the question if the > > > assembly changes much between driver which used to cache nr_frags and > >

Re: [PATCH net-next v3 3/5] page_pool: Allow drivers to hint on SKB recycling

2021-04-09 Thread Matteo Croce
On Sat, Apr 10, 2021 at 2:11 AM Ilias Apalodimas wrote: > > Hi Matteo, > > [...] > > +bool page_pool_return_skb_page(void *data); > > + > > struct page_pool *page_pool_create(const struct page_pool_params *params); > > > > #ifdef CONFIG_PAGE_POOL > > @@ -243,4 +247,13 @@ static inline void page_

[PATCH net-next v3 5/5] mvneta: recycle buffers

2021-04-09 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate increased di 10%, from 269 Kpps to 296 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 21.78% [kernel] [k] __pi___inval_dcache_area 21.66% [mvneta

[PATCH net-next v3 3/5] page_pool: Allow drivers to hint on SKB recycling

2021-04-09 Thread Matteo Croce
information we need for recycling in page->private and enabling the recycling bit, or page_pool_store_mem_info() for a fragment Since we added an extra argument on __skb_frag_unref() to handle recycling, update the current users of the function with that. Co-developed-by: Jesper Dangaard Bro

[PATCH net-next v3 4/5] mvpp2: recycle buffers

2021-04-09 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate is more than doubled, from 962 Kpps to 2047 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 30.67% [kernel] [k] page_pool_release_page 8.37% [kernel

[PATCH net-next v3 2/5] mm: add a signature in struct page

2021-04-09 Thread Matteo Croce
From: Matteo Croce This is needed by the page_pool to avoid recycling a page not allocated via page_pool. Signed-off-by: Matteo Croce --- include/linux/mm_types.h | 1 + include/net/page_pool.h | 2 ++ net/core/page_pool.c | 4 3 files changed, 7 insertions(+) diff --git a/include

[PATCH net-next v3 1/5] xdp: reduce size of struct xdp_mem_info

2021-04-09 Thread Matteo Croce
From: Jesper Dangaard Brouer It is possible to compress/reduce the size of struct xdp_mem_info. This change reduce struct xdp_mem_info from 8 bytes to 4 bytes. The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE

[PATCH net-next v3 0/5] page_pool: recycle buffers

2021-04-09 Thread Matteo Croce
From: Matteo Croce This is a respin of [1] This patchset shows the plans for allowing page_pool to handle and maintain DMA map/unmap of the pages it serves to the driver. For this to work a return hook in the network core is introduced. The overall purpose is to simplify drivers, by

Re: [PATCH net-next 2/3] net: use skb_for_each_frag() helper where possible

2021-04-09 Thread Matteo Croce
On Fri, Apr 9, 2021 at 8:54 PM Jakub Kicinski wrote: > > On Fri, 9 Apr 2021 20:06:04 +0200 Matteo Croce wrote: > > From: Matteo Croce > > > > use the new helper macro skb_for_each_frag() which allows to iterate > > through all the SKB fragments. > > >

[PATCH net-next 3/3] net: use skb_for_each_frag() in illegal_highdma()

2021-04-09 Thread Matteo Croce
From: Matteo Croce Coccinelle failed with the following error: EXN: Failure("no position information") in net/core/dev.c Apply it by hand as it's trivial. Signed-off-by: Matteo Croce --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/c

[PATCH net-next 2/3] net: use skb_for_each_frag() helper where possible

2021-04-09 Thread Matteo Croce
From: Matteo Croce use the new helper macro skb_for_each_frag() which allows to iterate through all the SKB fragments. The patch was created with Coccinelle, this was the semantic patch: @@ struct sk_buff *skb; identifier i; statement S; iterator name skb_for_each_frag; @@ -for (i = 0; i

[PATCH net-next 1/3] skbuff: add helper to walk over the fraglist

2021-04-09 Thread Matteo Croce
From: Matteo Croce Add an skb_for_each_frag() macro to iterate on SKB fragments. Signed-off-by: Matteo Croce --- include/linux/skbuff.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index dbf820a50a39..a8d4ccacdda5 100644 --- a/include

[PATCH net-next 0/3] introduce skb_for_each_frag()

2021-04-09 Thread Matteo Croce
From: Matteo Croce Introduce skb_for_each_frag, an helper macro to iterate over the SKB frags. First patch introduces the helper, the second one is generated with coccinelle and uses the macro where possible. Last one is a chunk which have to be applied by hand. The second patch raises some

[PATCH net-next v2 5/5] mvneta: recycle buffers

2021-04-02 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate increased di 10%, from 269 Kpps to 296 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 21.78% [kernel] [k] __pi___inval_dcache_area 21.66% [mvneta

[PATCH net-next v2 4/5] mvpp2: recycle buffers

2021-04-02 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate is more than doubled, from 962 Kpps to 2047 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 30.67% [kernel] [k] page_pool_release_page 8.37% [kernel

[PATCH net-next v2 3/5] page_pool: Allow drivers to hint on SKB recycling

2021-04-02 Thread Matteo Croce
information we need for recycling in page->private and enabling the recycling bit, or page_pool_store_mem_info() for a fragment Since we added an extra argument on __skb_frag_unref() to handle recycling, update the current users of the function with that. Co-developed-by: Jesper Dangaard Br

[PATCH net-next v2 2/5] mm: add a signature in struct page

2021-04-02 Thread Matteo Croce
From: Matteo Croce This is needed by the page_pool to avoid recycling a page not allocated via page_pool. Signed-off-by: Matteo Croce --- include/linux/mm_types.h | 1 + include/net/page_pool.h | 2 ++ net/core/page_pool.c | 4 3 files changed, 7 insertions(+) diff --git a/include

[PATCH net-next v2 1/5] xdp: reduce size of struct xdp_mem_info

2021-04-02 Thread Matteo Croce
From: Jesper Dangaard Brouer It is possible to compress/reduce the size of struct xdp_mem_info. This change reduce struct xdp_mem_info from 8 bytes to 4 bytes. The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE

[PATCH net-next v2 0/5] page_pool: recycle buffers

2021-04-02 Thread Matteo Croce
From: Matteo Croce This is a respin of [1] This patchset shows the plans for allowing page_pool to handle and maintain DMA map/unmap of the pages it serves to the driver. For this to work a return hook in the network core is introduced. The overall purpose is to simplify drivers, by

Re: [PATCH net-next 0/6] page_pool: recycle buffers

2021-03-23 Thread Matteo Croce
bakin wrote: > > > > From: Matteo Croce > > > > Date: Mon, 22 Mar 2021 18:02:55 +0100 > > > > > > > > > From: Matteo Croce > > > > > > > > > > This series enables recycling of the buffers allocated with the >

Re: [PATCH net-next 3/6] page_pool: DMA handling and allow to recycles frames via SKB

2021-03-22 Thread Matteo Croce
On Mon, Mar 22, 2021 at 6:03 PM Matteo Croce wrote: > > From: Ilias Apalodimas > > During skb_release_data() intercept the packet and if it's a buffer > coming from our page_pool API recycle it back to the pool for further > usage. > To achieve that we introdu

[PATCH net-next 6/6] mvneta: recycle buffers

2021-03-22 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate increased di 10%, from 269 Kpps to 296 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 21.78% [kernel] [k] __pi___inval_dcache_area 21.66% [mvneta

[PATCH net-next 5/6] mvpp2: recycle buffers

2021-03-22 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate is more than doubled, from 962 Kpps to 2047 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 30.67% [kernel] [k] page_pool_release_page 8.37% [kernel

[PATCH net-next 3/6] page_pool: DMA handling and allow to recycles frames via SKB

2021-03-22 Thread Matteo Croce
Dangaard Brouer Signed-off-by: Matteo Croce --- include/linux/skbuff.h | 33 +++ include/net/page_pool.h | 13 + include/net/xdp.h | 1 + net/core/page_pool.c| 43 + net/core/skbuff.c | 20 +

[PATCH net-next 4/6] net: change users of __skb_frag_unref() and add an extra argument

2021-03-22 Thread Matteo Croce
From: Ilias Apalodimas On a previous patch we added an extra argument on __skb_frag_unref() to handle recycling. Update the current users of the function with that. Signed-off-by: Ilias Apalodimas Signed-off-by: Matteo Croce --- drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c

[PATCH net-next 2/6] mm: add a signature in struct page

2021-03-22 Thread Matteo Croce
From: Matteo Croce This is needed by the page_pool to avoid recycling a page not allocated via page_pool. Signed-off-by: Matteo Croce --- include/linux/mm_types.h | 1 + include/net/page_pool.h | 2 ++ net/core/page_pool.c | 4 3 files changed, 7 insertions(+) diff --git a/include

[PATCH net-next 1/6] xdp: reduce size of struct xdp_mem_info

2021-03-22 Thread Matteo Croce
From: Jesper Dangaard Brouer It is possible to compress/reduce the size of struct xdp_mem_info. This change reduce struct xdp_mem_info from 8 bytes to 4 bytes. The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE

[PATCH net-next 0/6] page_pool: recycle buffers

2021-03-22 Thread Matteo Croce
From: Matteo Croce This series enables recycling of the buffers allocated with the page_pool API. The first two patches are just prerequisite to save space in a struct and avoid recycling pages allocated with other API. Patch 2 was based on a previous idea from Jonathan Lemon. The third one is

[RFC net-next 6/6] mvneta: recycle buffers

2021-03-11 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate increased di 10%, from 269 Kpps to 296 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 21.78% [kernel] [k] __pi___inval_dcache_area 21.66% [mvneta

[RFC net-next 5/6] mvpp2: recycle buffers

2021-03-11 Thread Matteo Croce
From: Matteo Croce Use the new recycling API for page_pool. In a drop rate test, the packet rate is more than doubled, from 962 Kpps to 2047 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 30.67% [kernel] [k] page_pool_release_page 8.37% [kernel

[RFC net-next 4/6] net: change users of __skb_frag_unref() and add an extra argument

2021-03-11 Thread Matteo Croce
From: Ilias Apalodimas On a previous patch we added an extra argument on __skb_frag_unref() to handle recycling. Update the current users of the function with that. Signed-off-by: Ilias Apalodimas Signed-off-by: Matteo Croce --- drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c

[RFC net-next 3/6] page_pool: DMA handling and frame recycling via SKBs

2021-03-11 Thread Matteo Croce
Dangaard Brouer Signed-off-by: Matteo Croce --- include/linux/skbuff.h | 33 +++ include/net/page_pool.h | 13 + include/net/xdp.h | 1 + net/core/page_pool.c| 43 + net/core/skbuff.c | 20 +

[RFC net-next 2/6] mm: add a signature in struct page

2021-03-11 Thread Matteo Croce
From: Matteo Croce This is needed by the page_pool to avoid recycling a page not allocated via page_pool. Signed-off-by: Matteo Croce --- include/linux/mm_types.h | 1 + include/net/page_pool.h | 2 ++ net/core/page_pool.c | 4 3 files changed, 7 insertions(+) diff --git a/include

[RFC net-next 1/6] xdp: reduce size of struct xdp_mem_info

2021-03-11 Thread Matteo Croce
From: Jesper Dangaard Brouer It is possible to compress/reduce the size of struct xdp_mem_info. This change reduce struct xdp_mem_info from 8 bytes to 4 bytes. The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE

[RFC net-next 0/6] page_pool: recycle buffers

2021-03-11 Thread Matteo Croce
From: Matteo Croce This series enables recycling of the buffers allocated with the page_pool API. The first two patches are just prerequisite to save space in a struct and avoid recycling pages allocated with other API. Patch 2 was based on a previous idea from Jonathan Lemon. The third one is

[PATCH RESEND net-next] cfg80211: remove unused callback

2021-02-06 Thread Matteo Croce
From: Matteo Croce The ieee80211 class registers a callback which actually does nothing. Given that the callback is optional, and all its accesses are protected by a NULL check, remove it entirely. Signed-off-by: Matteo Croce --- net/wireless/sysfs.c | 7 --- 1 file changed, 7 deletions

Re: [PATCH net-next] cfg80211: remove unused callback

2021-02-06 Thread Matteo Croce
On Sat, Feb 6, 2021 at 1:29 PM Matteo Croce wrote: > > From: Matteo Croce > > The ieee80211 class registers a callback which actually does nothing. > Given that the callback is optional, and all its accesses are protected > by a NULL check, remove it entirely. > > Sig

[PATCH net-next] cfg80211: remove unused callback

2021-02-06 Thread Matteo Croce
From: Matteo Croce The ieee80211 class registers a callback which actually does nothing. Given that the callback is optional, and all its accesses are protected by a NULL check, remove it entirely. Signed-off-by: Matteo Croce --- net/wireless/sysfs.c | 7 --- 1 file changed, 7 deletions

Re: [PATCH net-next v3] mptcp: fix length of MP_PRIO suboption

2021-02-01 Thread Matteo Croce
PRIO' >and use 'TCPOLEN_MPTCP_PRIO_ALIGN' instead, thanks to Matthieu Baerts. > Changes since v1: > - refactor patch to avoid using 'TCPOLEN_MPTCP_PRIO' with its old value, >thanks to Geliang Tang. > > Fixes: 067065422fcd ("mptcp: add the outgoing MP_PRIO support") > Reviewed-by: Mat Martineau > Reviewed-by: Matthieu Baerts > Signed-off-by: Davide Caratti Reviewed-by: Matteo Croce -- per aspera ad upstream

Re: [PATCH net 0/2] ipv6: fixes for the multicast routes

2021-01-16 Thread Matteo Croce
On Sat, Jan 16, 2021 at 5:41 AM David Ahern wrote: > > On 1/15/21 4:12 PM, Matteo Croce wrote: > > On Fri, Jan 15, 2021 at 11:50 PM Jakub Kicinski wrote: > >> > >> On Fri, 15 Jan 2021 19:42:07 +0100 Matteo Croce wrote: > >>> From: Matteo Croce &

Re: [PATCH net 1/2] ipv6: create multicast route with RTPROT_KERNEL

2021-01-16 Thread Matteo Croce
On Sat, Jan 16, 2021 at 5:36 AM David Ahern wrote: > > On 1/15/21 11:42 AM, Matteo Croce wrote: > > From: Matteo Croce > > > > The ff00::/8 multicast route is created without specifying the fc_protocol > > field, so the default RTPROT_BOOT value is used: > >

Re: [PATCH net 0/2] ipv6: fixes for the multicast routes

2021-01-15 Thread Matteo Croce
On Fri, Jan 15, 2021 at 11:50 PM Jakub Kicinski wrote: > > On Fri, 15 Jan 2021 19:42:07 +0100 Matteo Croce wrote: > > From: Matteo Croce > > > > Fix two wrong flags in the IPv6 multicast routes created > > by the autoconf code. > > Any chance for Fixes tag

[PATCH net 2/2] ipv6: set multicast flag on the multicast route

2021-01-15 Thread Matteo Croce
From: Matteo Croce The multicast route ff00::/8 is created with type RTN_UNICAST: $ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium unicast ff00::/8 dev eth0 proto kernel scope

[PATCH net 0/2] ipv6: fixes for the multicast routes

2021-01-15 Thread Matteo Croce
From: Matteo Croce Fix two wrong flags in the IPv6 multicast routes created by the autoconf code. Matteo Croce (2): ipv6: create multicast route with RTPROT_KERNEL ipv6: set multicast flag on the multicast route net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH net 1/2] ipv6: create multicast route with RTPROT_KERNEL

2021-01-15 Thread Matteo Croce
From: Matteo Croce The ff00::/8 multicast route is created without specifying the fc_protocol field, so the default RTPROT_BOOT value is used: $ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric

[PATCH iproute2-next] ip: don't use program name to select command

2021-01-11 Thread Matteo Croce
From: Matteo Croce ip has an ancient behaviour of looking at its program name to determine the command to run. If the name is longer than 2 characters, the first two letters are stripped and the others are interpreted as the command name: $ ln -s /sbin/ip iproute $ ln -s /sbin/ip ipa

Re: [PATCH net] net: openvswitch: fix TTL decrement action netlink message format

2020-11-23 Thread Matteo Croce
On Fri, Nov 20, 2020 at 10:12 PM Jakub Kicinski wrote: > > On Thu, 19 Nov 2020 04:04:04 -0500 Eelco Chaudron wrote: > > Currently, the openvswitch module is not accepting the correctly formated > > netlink message for the TTL decrement action. For both setting and getting > > the dec_ttl action, t

Re: [PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI

2020-09-26 Thread Matteo Croce
> From: Andrew Lunn > Subject: [PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with > !CONFIG_ACPI > > Wrap the definition inside #ifdef/#endif. > > Compile tested only. > > Signed-off-by: Andrew Lunn Looks good, ACPI_PTR() should be NULL if !CONFIG_ACPI -- per aspera ad upstream

Re: [PATCH net] net: mvpp2: fix memory leak in mvpp2_rx

2020-07-31 Thread Matteo Croce
d apply too. Acked-by: Matteo Croce

[PATCH net-next] mvpp2: fix pointer check

2020-07-07 Thread Matteo Croce
From: Matteo Croce priv->page_pool is an array, so comparing against it will always return true. Do a meaningful check by checking priv->page_pool[0] instead. While at it, clear the page_pool pointers on deallocation, or when an allocation error happens during init. Reported-by: Colin Ia

Re: mvpp2: XDP TX support

2020-07-06 Thread Matteo Croce
On Mon, 6 Jul 2020 14:59:22 +0100 Colin Ian King wrote: > Hi, > > Static analysis with Coverity has found a potential issue in the > following commit: > > commit c2d6fe6163de80d7f7cf400ee351f56d6cdb7a5a > Author: Matteo Croce > Date: Thu Jul 2 16:12:43 2020 +020

Re: [PATCH net-next v2 0/5] mvpp2: XDP support

2020-07-02 Thread Matteo Croce
On Thu, Jul 2, 2020 at 4:12 PM Matteo Croce wrote: > > From: Matteo Croce > > From: Matteo Croce > DUP! Sorry. -- per aspera ad upstream

[PATCH net-next v2 5/5] mvpp2: xdp ethtool stats

2020-07-02 Thread Matteo Croce
From: Sven Auhagen Add ethtool statistics for XDP. Signed-off-by: Sven Auhagen --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 8 + .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 158 -- 2 files changed, 148 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethern

[PATCH net-next v2 4/5] mvpp2: XDP TX support

2020-07-02 Thread Matteo Croce
From: Matteo Croce Add the transmit part of XDP support, which includes: - support for XDP_TX in mvpp2_xdp() - .ndo_xdp_xmit hook for AF_XDP and XDP_REDIRECT with mvpp2 as destination mvpp2_xdp_submit_frame() is a generic function which is called by mvpp2_xdp_xmit_back() when doing XDP_TX, and

[PATCH net-next v2 2/5] mvpp2: use page_pool allocator

2020-07-02 Thread Matteo Croce
From: Matteo Croce Use the page_pool API for memory management. This is a prerequisite for native XDP support. Tested-by: Sven Auhagen Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 8 + .../net

[PATCH net-next v2 3/5] mvpp2: add basic XDP support

2020-07-02 Thread Matteo Croce
From: Matteo Croce Add XDP native support. By now only XDP_DROP, XDP_PASS and XDP_REDIRECT verdicts are supported. Co-developed-by: Sven Auhagen Signed-off-by: Sven Auhagen Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 28 ++- .../net/ethernet/marvell

[PATCH net-next v2 0/5] mvpp2: XDP support

2020-07-02 Thread Matteo Croce
From: Matteo Croce From: Matteo Croce Add XDP support to mvpp2. This series converts the driver to the page_pool API for RX buffer management, and adds native XDP support. XDP support comes with extack error reporting and statistics as well. These are the performance numbers, as measured by

[PATCH net-next v2 1/5] mvpp2: refactor BM pool init percpu code

2020-07-02 Thread Matteo Croce
From: Matteo Croce In mvpp2_swf_bm_pool_init_percpu(), a reference to a struct mvpp2_bm_pool is obtained traversing multiple structs, when a local variable already points to the same object. Fix it and, while at it, give the variable a meaningful name. Signed-off-by: Matteo Croce --- .../net

Re: [PATCH 1/1] mvpp2: xdp ethtool stats

2020-07-02 Thread Matteo Croce
Hi all, Sven agreed to add the v2 of this patch to the series it depends on, please drop this one. I'm sending a v2 of the series soon. Thanks, On Wed, Jul 1, 2020 at 9:48 PM David Miller wrote: > > From: Sven Auhagen > Date: Wed, 1 Jul 2020 17:30:44 +0200 > > > static void mvpp2_read_stats(s

Re: [PATCH net-next 3/4] mvpp2: add basic XDP support

2020-07-02 Thread Matteo Croce
On Thu, Jul 2, 2020 at 11:14 AM Maciej Fijalkowski wrote: > > > + if (port->dev->mtu > ETH_DATA_LEN) { > > > + netdev_err(port->dev, "Jumbo frames are not supported by XDP, > > > current MTU %d.\n", > > > + port->dev->mtu); > > > > ditto > > Here I agree and for e

Re: [PATCH net-next 2/4] mvpp2: use page_pool allocator

2020-07-02 Thread Matteo Croce
On Thu, Jul 2, 2020 at 9:31 AM wrote: > > Hi Matteo, > > Thanks for working on this! > :) > On Tue, Jun 30, 2020 at 08:09:28PM +0200, Matteo Croce wrote: > > From: Matteo Croce > > -static void *mvpp2_frag_alloc(const struct mvpp2_bm_pool *pool) > > +/* R

[PATCH net-next 0/4] mvpp2: XDP support

2020-06-30 Thread Matteo Croce
From: Matteo Croce Add XDP support to mvpp2. This series converts the driver to the page_pool API for RX buffer management, and adds native XDP support. These are the performance numbers, as measured by Sven: SKB fwd page pool: Rx bps 390.38 Mbps Rx pps 762.46 Kpps XDP fwd: Rx bps

[PATCH net-next 4/4] mvpp2: XDP TX support

2020-06-30 Thread Matteo Croce
From: Matteo Croce Add the transmit part of XDP support, which includes: - support for XDP_TX in mvpp2_xdp() - .ndo_xdp_xmit hook for AF_XDP and XDP_REDIRECT with mvpp2 as destination mvpp2_xdp_submit_frame() is a generic function which is called by mvpp2_xdp_xmit_back() when doing XDP_TX, and

[PATCH net-next 3/4] mvpp2: add basic XDP support

2020-06-30 Thread Matteo Croce
From: Matteo Croce Add XDP native support. By now only XDP_DROP, XDP_PASS and XDP_REDIRECT verdicts are supported. Co-developed-by: Sven Auhagen Signed-off-by: Sven Auhagen Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 28 ++- .../net/ethernet/marvell

[PATCH net-next 2/4] mvpp2: use page_pool allocator

2020-06-30 Thread Matteo Croce
From: Matteo Croce Use the page_pool API for memory management. This is a prerequisite for native XDP support. Tested-by: Sven Auhagen Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2.h| 8 + .../net

[PATCH net-next 1/4] mvpp2: refactor BM pool init percpu code

2020-06-30 Thread Matteo Croce
From: Matteo Croce In mvpp2_swf_bm_pool_init_percpu(), a reference to a struct mvpp2_bm_pool is obtained traversing multiple structs, when a local variable already points to the same object. Fix it and, while at it, give the variable a meaningful name. Signed-off-by: Matteo Croce --- .../net

Re: [PATCH 1/1] mvpp2: ethtool rxtx stats fix

2020-06-14 Thread Matteo Croce
_early_drops: 0 rxq_2_packets_bm_drops: 0 rxq_3_desc_enqueue: 4 rxq_3_queue_full_drops: 0 rxq_3_packets_early_drops: 0 rxq_3_packets_bm_drops: 0 If you manage to find the commit which introduced this tag, please add a Fixes tag. Thanks, -- Matteo Croce perl -e 'for($t=0;;$t

Re: [PATCH 1/1] mvpp2: remove module bugfix

2020-06-14 Thread Matteo Croce
. > > This eventually leads to a kernel crash. > > Signed-off-by: Sven Auhagen Hi Sven, Nice fix, if you think that I introduced it in 7d04b0b13b1175ce0c4bdc77f1278c1f120f874f, please add a Fixes tag. -- Matteo Croce perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-20 Thread Matteo Croce
On Wed, May 20, 2020 at 1:11 PM Russell King - ARM Linux admin wrote: > > On Tue, May 19, 2020 at 07:05:34PM +0200, Matteo Croce wrote: > > On Tue, 19 May 2020 12:05:20 +0200 > > Matteo Croce wrote: > > > > Hi, > > > > The patch seems to work. I&#

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-19 Thread Matteo Croce
On Tue, 19 May 2020 12:05:20 +0200 Matteo Croce wrote: > On Tue, May 19, 2020 at 11:54 AM Russell King - ARM Linux admin > wrote: > > > > On Sat, May 09, 2020 at 09:20:50PM +0100, Russell King - ARM Linux > > admin wrote: > > > On Sat, May 09, 2020 at 08:

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-19 Thread Matteo Croce
ort that feature, and the kernel restricts the packet size, > > so we should never violate the MTU validator and end up with such a > > packet. In any case, _if_ we were to attempt to transmit an oversized > > packet, we have no support in the kernel to deal with that appearing >

[PATCH bpf] samples: bpf: fix build error

2020-05-11 Thread Matteo Croce
exit status bpf_log_buf here seems to be a leftover, so removing it. Signed-off-by: Matteo Croce --- samples/bpf/lwt_len_hist_user.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/bpf/lwt_len_hist_user.c b/samples/bpf/lwt_len_hist_user.c index 587b68b1f8dd..430a4b7e353e 100644

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-09 Thread Matteo Croce
On Sat, May 9, 2020 at 4:49 PM Russell King - ARM Linux admin wrote: > > On Sat, May 09, 2020 at 02:51:05PM +0100, Russell King - ARM Linux admin > wrote: > > On Sat, May 09, 2020 at 03:14:05PM +0200, Matteo Croce wrote: > > > On Sat, May 9, 2020 at 1:45 PM Russel

[PATCH net] mvpp2: enable rxhash only on the first port

2020-05-09 Thread Matteo Croce
("net: mvpp2: cls: Use RSS contexts to handle RSS tables") Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvp

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-09 Thread Matteo Croce
On Sat, May 9, 2020 at 1:45 PM Russell King - ARM Linux admin wrote: > > On Sat, May 09, 2020 at 11:15:58AM +, Stefan Chulski wrote: > > > > > > > -Original Message----- > > > From: Matteo Croce > > > Sent: Saturday, May 9, 2020 3:13 AM

Re: [EXT] Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-09 Thread Matteo Croce
very effective, the throughput goes 4x when enabled, so it would be a big drawback to disable it on all interfaces. Honestly I don't have any 2.5 gbit hardware to test it on eth3, so I don't know if rxhash actually only works on the first interface of a unit (so eth0 and eth1), or if it just doesn't work on the gigabit one. If someone could test it on the 2.5 gbit port, this will be helpful. Regards, -- Matteo Croce per aspera ad upstream

Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-08 Thread Matteo Croce
On Thu, Apr 23, 2020 at 7:00 PM Russell King - ARM Linux admin wrote: > > On Tue, Apr 14, 2020 at 01:43:02AM +0200, Matteo Croce wrote: > > On Tue, Apr 14, 2020 at 1:21 AM Maxime Chevallier > > wrote: > > > > > > The PPv2 controller has 8 RSS tables that ar

Re: [PATCH net v2 0/2] Fix 88x3310 leaving power save mode

2020-05-08 Thread Matteo Croce
On Wed, Apr 15, 2020 at 1:48 AM David Miller wrote: > > From: Russell King - ARM Linux admin > Date: Tue, 14 Apr 2020 20:47:53 +0100 > > > This series fixes a problem with the 88x3310 PHY on Macchiatobin > > coming out of powersave mode noticed by Matteo Croce. It se

[PATCH net-next 1/4] flow_dissector: add meaningful comments

2019-10-21 Thread Matteo Croce
Documents two piece of code which can't be understood at a glance. Signed-off-by: Matteo Croce --- include/net/flow_dissector.h | 1 + net/core/flow_dissector.c| 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h

Re: [PATCH iproute2] testsuite: don't clobber /tmp

2019-10-12 Thread Matteo Croce
On Tue, Jun 25, 2019 at 4:39 PM Matteo Croce wrote: > > On Thu, Jun 13, 2019 at 7:15 PM Matteo Croce wrote: > > > > On Wed, Jun 12, 2019 at 8:20 PM Stephen Hemminger > > wrote: > > > > To me any path could work, both /tmp or in the current dir, I have no >

Re: [RFC 3/4] net: mvneta: add basic XDP support

2019-10-01 Thread Matteo Croce
); only stop and restart if already running > + > + old_prog = xchg(&pp->xdp_prog, prog); > + if (old_prog) > + bpf_prog_put(old_prog); > + > + mvneta_open(dev); ^^ -- Matteo Croce per aspera ad upstream

Re: [PATCH] iplink: document 'change' option to ip link

2019-07-26 Thread Matteo Croce
On Sat, Jul 27, 2019 at 12:00 AM Stephen Hemminger wrote: > > Add the command alias "change" to man page. > Don't show it on usage, since it is not commonly used. > > Reported-off-by: Matteo Croce > Signed-off-by: Stephen Hemminger > --- > man/man8/ip-l

Re: [PATCH iproute2] iplink: document the 'link change' subcommand

2019-07-26 Thread Matteo Croce
On July 26, 2019 8:25:14 PM GMT+02:00, Stephen Hemminger wrote: > On Wed, 24 Jul 2019 21:12:18 +0200 > Matteo Croce wrote: > > > ip link can set parameters both via the 'set' and 'change' keyword. > > In fact, 'change' is an alias f

[PATCH iproute2] iplink: document the 'link change' subcommand

2019-07-24 Thread Matteo Croce
ip link can set parameters both via the 'set' and 'change' keyword. In fact, 'change' is an alias for 'set'. Document this in the help and manpage. Fixes: 1d93483985f0 ("iplink: use netlink for link configuration") Signed-off-by: Matteo Croce ---

[PATCH iproute2 v2] utils: don't match empty strings as prefixes

2019-07-15 Thread Matteo Croce
ee times: the actual implementation does 2 strlen and a memcpy to accomplish the same task. Signed-off-by: Matteo Croce --- include/utils.h | 2 +- lib/utils.c | 15 ++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/utils.h b/include/utils.h index 1d9c1127..794d

Re: [PATCH iproute2-next] Makefile: pass -pipe to the compiler

2019-07-14 Thread Matteo Croce
On Tue, Jun 11, 2019 at 9:28 PM Stephen Hemminger wrote: > > On Tue, 11 Jun 2019 20:05:13 +0200 > Matteo Croce wrote: > > > Pass the -pipe option to GCC, to use pipes instead of temp files. > > On a slow AMD G-T40E CPU we get a non negligible 6% improvement > &g

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-14 Thread Matteo Croce
On Wed, Jul 10, 2019 at 1:18 AM Matteo Croce wrote: > > On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger > wrote: > > > > On Tue, 9 Jul 2019 22:40:40 +0200 > > Matteo Croce wrote: > > > > > iproute has an utility function which checks if a string i

Re: [PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-09 Thread Matteo Croce
On Tue, Jul 9, 2019 at 11:38 PM Stephen Hemminger wrote: > > On Tue, 9 Jul 2019 22:40:40 +0200 > Matteo Croce wrote: > > > iproute has an utility function which checks if a string is a prefix for > > another one, to allow use of abbreviated commands, e.g. 'addr&#x

[PATCH iproute2] utils: don't match empty strings as prefixes

2019-07-09 Thread Matteo Croce
ee times: the actual implementation does 2 strlen and a memcpy to accomplish the same task. Signed-off-by: Matteo Croce --- include/utils.h | 2 +- lib/utils.c | 14 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/utils.h b/include/utils.h index 927fdc17..f4d1

[PATCH net v2] ipv4: don't set IPv6 only flags to IPv4 addresses

2019-07-01 Thread Matteo Croce
dadfailed home tentative mngtmpaddr noprefixroute stable-privacy dummy0 valid_lft forever preferred_lft forever Signed-off-by: Matteo Croce --- net/ipv4/devinet.c | 8 1 file changed, 8 insertions(+) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index c6bd0f7a020a

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Matteo Croce
On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel wrote: > > Le 30/06/2019 à 21:29, Matteo Croce a écrit : > > When ip creates a netns, there is a small time interval between the > > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > > &

[RFC iproute2] netns: add mounting state file for each netns

2019-06-30 Thread Matteo Croce
watchers only after the bind mount has been done. Signed-off-by: Matteo Croce --- ip/ipnetns.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/ip/ipnetns.c b/ip/ipnetns.c index a883f210..23b95173 100644 --- a/ip/ipnetns.c +++ b/ip

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-29 Thread Matteo Croce
On Fri, Jun 28, 2019 at 7:06 PM Matteo Croce wrote: > > On Fri, Jun 28, 2019 at 6:27 PM David Howells wrote: > > > > Nicolas Dichtel wrote: > > > > > David Howells was working on a mount notification mechanism: > > > https://lwn.net/Articles/760714/

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-28 Thread Matteo Croce
this road, please either: - disallow netns creation with names ending with .mounted - or properly document it in the manpage Regards, -- Matteo Croce per aspera ad upstream

Re: [PATCH iproute2] testsuite: don't clobber /tmp

2019-06-25 Thread Matteo Croce
On Thu, Jun 13, 2019 at 7:15 PM Matteo Croce wrote: > > On Wed, Jun 12, 2019 at 8:20 PM Stephen Hemminger > wrote: > > > > On Wed, 12 Jun 2019 19:32:29 +0200 > > Matteo Croce wrote: > > > > > On Wed, Jun 12, 2019 at 6:04 PM Matteo Croce wrote: >

  1   2   3   >