Re: [PATCH v3 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-20 Thread Lorenzo Bianconi
[...] > > + TP_ARGS(map_id, processed, sched, xdp_stats), > > > > TP_STRUCT__entry( > > __field(int, map_id) > > __field(u32, act) > > __field(int, cpu) > > - __field(unsigned int, drops) > > __field(unsigned int, processed) > > So,

[PATCH v3 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-20 Thread Lorenzo Bianconi
discarded packets, remove drop counter from xdp_cpumap_kthread tracepoint and update related xdp samples. Signed-off-by: Lorenzo Bianconi --- Changes since v2: - remove drop counter and update related xdp samples - rebased on top of bpf-next Changes since v1: - fixed comment - rebased on top of bpf

Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-18 Thread Lorenzo Bianconi
> On Sun, Apr 18, 2021 at 6:18 PM Jesper Dangaard Brouer > wrote: > > > > On Fri, 16 Apr 2021 16:27:18 +0200 > > Magnus Karlsson wrote: > > > > > On Thu, Apr 8, 2021 at 2:51 PM Lorenzo Bianconi > > > wrote: > > > > > > > &

Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-16 Thread Lorenzo Bianconi
gt; > bpd: add multi-buffer support to xdp copy helpers > > bpf: add new frame_length field to the XDP ctx > > bpf: update xdp_adjust_tail selftest to include multi-buffer > > > > Lorenzo Bianconi (10): > > xdp: introduce mb in xdp_buff/xdp_frame > > xdp: a

Re: [PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-15 Thread Lorenzo Bianconi
> On 4/15/21 9:03 AM, Lorenzo Bianconi wrote: > >> On 4/15/21 8:05 AM, Daniel Borkmann wrote: > > > > [...] > >>>> &stats); > >>> > >>> Given we stop counting drops with the netif_receive_skb_list(), we > >>> should t

Re: [PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-15 Thread Lorenzo Bianconi
> On 4/15/21 8:05 AM, Daniel Borkmann wrote: [...] > >> &stats); > > > > Given we stop counting drops with the netif_receive_skb_list(), we > > should then > > also remove drops from trace_xdp_cpumap_kthread(), imho, as otherwise it > > is rather > > misleading (as in: drops actually happening, b

Re: [PATCH net] igb: Fix XDP with PTP enabled

2021-04-15 Thread Lorenzo Bianconi
[...] > @@ -8683,7 +8676,10 @@ static int igb_clean_rx_irq(struct igb_q_vector > *q_vector, const int budget) > while (likely(total_packets < budget)) { > union e1000_adv_rx_desc *rx_desc; > struct igb_rx_buffer *rx_buffer; > + ktime_t timestamp = 0; >

[PATCH v2 bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-13 Thread Lorenzo Bianconi
cpumap entry and then to the networking stack. UDP frames are generated using pkt_gen. $xdp_redirect_cpu --cpu --progname xdp_cpu_map0 --dev bpf-next: ~2.2Mpps bpf-next + cpumap skb-list: ~3.15Mpps Signed-off-by: Lorenzo Bianconi --- Changes since v1: - fixed comment - rebased on top of bpf-next

Re: [PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-09 Thread Lorenzo Bianconi
> Lorenzo Bianconi wrote: [...] > > I just read the commit messages for v8 so far. But, I'm still wondering how > to handle use cases where we want to put extra bytes at the end of the > packet, or really anywhere in the general case. We can extend tail with above >

Re: [PATCH v8 bpf-next 09/14] bpd: add multi-buffer support to xdp copy helpers

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 02:51:01PM +0200, Lorenzo Bianconi wrote: > > From: Eelco Chaudron > > > > This patch adds support for multi-buffer for the following helpers: > > - bpf_xdp_output() > > - bpf_perf_event_output() > > > > Signed-off-b

Re: [PATCH v8 bpf-next 08/14] bpf: add multi-buff support to the bpf_xdp_adjust_tail() API

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 10:15:47PM +0300, Vladimir Oltean wrote: > > > + if (unlikely(offset > ((int)(xdp->data_end - xdp->data) + > > > +xdp_sinfo->data_length - > > > +ETH_HLEN))) > > > > Also: should we have some sort of

Re: [PATCH v8 bpf-next 05/14] net: mvneta: add multi buffer support to XDP_TX

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 02:50:57PM +0200, Lorenzo Bianconi wrote: > > Introduce the capability to map non-linear xdp buffer running > > mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT > > > > Signed-off-by: Lorenzo Bianconi > > --- > > dri

Re: [PATCH v8 bpf-next 04/14] xdp: add multi-buff support to xdp_return_{buff/frame}

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 02:50:56PM +0200, Lorenzo Bianconi wrote: > > Take into account if the received xdp_buff/xdp_frame is non-linear > > recycling/returning the frame memory to the allocator or into > > xdp_frame_bulk. > > Introduce xdp_return_num_frags_from_buff

Re: [PATCH v8 bpf-next 03/14] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 02:50:55PM +0200, Lorenzo Bianconi wrote: > > Update multi-buffer bit (mb) in xdp_buff to notify XDP/eBPF layer and > > XDP remote drivers if this is a "non-linear" XDP buffer. Access > > xdp_shared_info only if xdp_buff mb is set. > >

Re: [PATCH v8 bpf-next 01/14] xdp: introduce mb in xdp_buff/xdp_frame

2021-04-09 Thread Lorenzo Bianconi
> On Thu, Apr 08, 2021 at 02:50:53PM +0200, Lorenzo Bianconi wrote: > > Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer data structure > > in order to specify if this is a linear buffer (mb = 0) or a multi-buffer > > frame (mb = 1). In the latter case the shared_info a

Re: [PATCH v8 bpf-next 02/14] xdp: add xdp_shared_info data structure

2021-04-08 Thread Lorenzo Bianconi
> Hi Lorenzo, > > On Thu, Apr 08, 2021 at 02:50:54PM +0200, Lorenzo Bianconi wrote: > > Introduce xdp_shared_info data structure to contain info about > > "non-linear" xdp frame. xdp_shared_info will alias skb_shared_info > > allowing to keep mos

[PATCH v8 bpf-next 14/14] bpf: update xdp_adjust_tail selftest to include multi-buffer

2021-04-08 Thread Lorenzo Bianconi
From: Eelco Chaudron This change adds test cases for the multi-buffer scenarios when shrinking and growing. Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- .../bpf/prog_tests/xdp_adjust_tail.c | 105 ++ .../bpf/progs/test_xdp_adjust_tail_grow.c

[PATCH v8 bpf-next 13/14] bpf: test_run: add xdp_shared_info pointer in bpf_test_finish signature

2021-04-08 Thread Lorenzo Bianconi
introduce xdp_shared_info pointer in bpf_test_finish signature in order to copy back paged data from a xdp multi-buff frame to userspace buffer Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 48 ++ 1 file changed, 40 insertions(+), 8

[PATCH v8 bpf-next 12/14] bpf: introduce multibuff support to bpf_prog_test_run_xdp()

2021-04-08 Thread Lorenzo Bianconi
Introduce the capability to allocate a xdp multi-buff in bpf_prog_test_run_xdp routine. This is a preliminary patch to introduce the selftests for new xdp multi-buff ebpf helpers Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 52 +++--- 1 file

[PATCH v8 bpf-next 11/14] bpf: move user_size out of bpf_test_init

2021-04-08 Thread Lorenzo Bianconi
Rely on data_size_in in bpf_test_init routine signature. This is a preliminary patch to introduce xdp multi-buff selftest Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/bpf/test_run.c b/net/bpf

[PATCH v8 bpf-next 09/14] bpd: add multi-buffer support to xdp copy helpers

2021-04-08 Thread Lorenzo Bianconi
From: Eelco Chaudron This patch adds support for multi-buffer for the following helpers: - bpf_xdp_output() - bpf_perf_event_output() Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- net/core/filter.c | 63 - .../selftests/bpf

[PATCH v8 bpf-next 10/14] bpf: add new frame_length field to the XDP ctx

2021-04-08 Thread Lorenzo Bianconi
< ctx->frame_length) { /* Fragements exists. /* } Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- include/linux/filter.h | 7 +++ include/net/xdp.h | 15 +++ include/uapi/linux/bpf.h | 1 + net/core/filter.c | 8 ++

[PATCH v8 bpf-next 08/14] bpf: add multi-buff support to the bpf_xdp_adjust_tail() API

2021-04-08 Thread Lorenzo Bianconi
From: Eelco Chaudron This change adds support for tail growing and shrinking for XDP multi-buff. Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 5 net/core/filter.c | 63 +++ 2 files changed, 68

[PATCH v8 bpf-next 07/14] net: xdp: add multi-buff support to xdp_build_skb_from_fram

2021-04-08 Thread Lorenzo Bianconi
Introduce xdp multi-buff support to __xdp_build_skb_from_frame/xdp_build_skb_from_fram utility routines. Signed-off-by: Lorenzo Bianconi --- net/core/xdp.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/net/core/xdp.c b/net/core/xdp.c index 430f516259d9

[PATCH v8 bpf-next 06/14] net: mvneta: enable jumbo frames for XDP

2021-04-08 Thread Lorenzo Bianconi
Enable the capability to receive jumbo frames even if the interface is running in XDP mode Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet

[PATCH v8 bpf-next 02/14] xdp: add xdp_shared_info data structure

2021-04-08 Thread Lorenzo Bianconi
Introduce xdp_shared_info data structure to contain info about "non-linear" xdp frame. xdp_shared_info will alias skb_shared_info allowing to keep most of the frags in the same cache-line. Introduce some xdp_shared_info helpers aligned to skb_frag* ones Signed-off-by: Lorenz

[PATCH v8 bpf-next 03/14] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer

2021-04-08 Thread Lorenzo Bianconi
Update multi-buffer bit (mb) in xdp_buff to notify XDP/eBPF layer and XDP remote drivers if this is a "non-linear" XDP buffer. Access xdp_shared_info only if xdp_buff mb is set. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 26

[PATCH v8 bpf-next 04/14] xdp: add multi-buff support to xdp_return_{buff/frame}

2021-04-08 Thread Lorenzo Bianconi
Take into account if the received xdp_buff/xdp_frame is non-linear recycling/returning the frame memory to the allocator or into xdp_frame_bulk. Introduce xdp_return_num_frags_from_buff to return a given number of fragments from a xdp multi-buff starting from the tail. Signed-off-by: Lorenzo

[PATCH v8 bpf-next 05/14] net: mvneta: add multi buffer support to XDP_TX

2021-04-08 Thread Lorenzo Bianconi
Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 94 +-- 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/drivers

[PATCH v8 bpf-next 01/14] xdp: introduce mb in xdp_buff/xdp_frame

2021-04-08 Thread Lorenzo Bianconi
. Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index a5bc214a49d9..842580a61563 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -73,7 +73,10 @@ struct xdp_buff

[PATCH v8 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-04-08 Thread Lorenzo Bianconi
dd-XDP-support-to-a-NIC-driver (XDPmulti-buffers section) Eelco Chaudron (4): bpf: add multi-buff support to the bpf_xdp_adjust_tail() API bpd: add multi-buffer support to xdp copy helpers bpf: add new frame_length field to the XDP ctx bpf: update xdp_adjust_tail selftest to include multi-buffer

Re: [PATCH bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-08 Thread Lorenzo Bianconi
> On Thu, Apr 1, 2021 at 9:49 AM Lorenzo Bianconi wrote: > > > > > On Thu, Apr 1, 2021 at 1:57 AM Lorenzo Bianconi > > > wrote: > > > > > > > > [...] > > > > > > - /* Inject into network stac

Re: [PATCH bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-01 Thread Lorenzo Bianconi
> On Thu, Apr 1, 2021 at 1:57 AM Lorenzo Bianconi wrote: > > [...] > > - /* Inject into network stack */ > > - ret = netif_receive_skb_core(skb); > > - if (ret == NET_RX_DROP) > > -

[PATCH bpf-next] cpumap: bulk skb using netif_receive_skb_list

2021-04-01 Thread Lorenzo Bianconi
cpumap entry and then to the networking stack. UDP frames are generated using pkt_gen. $xdp_redirect_cpu --cpu --progname xdp_cpu_map0 --dev bpf-next: ~2.2Mpps bpf-next + cpumap skb-list: ~3.15Mpps Signed-off-by: Lorenzo Bianconi --- kernel/bpf/cpumap.c | 9 - 1 file changed, 4

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

2021-03-24 Thread Lorenzo Bianconi
[...] > > diff --git a/drivers/net/ethernet/marvell/mvneta.c > > b/drivers/net/ethernet/marvell/mvneta.c > > index a635cf84608a..8b3250394703 100644 > > --- a/drivers/net/ethernet/marvell/mvneta.c > > +++ b/drivers/net/ethernet/marvell/mvneta.c > > @@ -2332,7 +2332,7 @@ mvneta_swbm_build_skb(struc

[PATCH v7 bpf-next 13/14] bpf: test_run: add xdp_shared_info pointer in bpf_test_finish signature

2021-03-19 Thread Lorenzo Bianconi
introduce xdp_shared_info pointer in bpf_test_finish signature in order to copy back paged data from a xdp multi-buff frame to userspace buffer Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 48 ++ 1 file changed, 40 insertions(+), 8

[PATCH v7 bpf-next 14/14] bpf: update xdp_adjust_tail selftest to include multi-buffer

2021-03-19 Thread Lorenzo Bianconi
From: Eelco Chaudron This change adds test cases for the multi-buffer scenarios when shrinking and growing. Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- .../bpf/prog_tests/xdp_adjust_tail.c | 105 ++ .../bpf/progs/test_xdp_adjust_tail_grow.c

[PATCH v7 bpf-next 12/14] bpf: introduce multibuff support to bpf_prog_test_run_xdp()

2021-03-19 Thread Lorenzo Bianconi
Introduce the capability to allocate a xdp multi-buff in bpf_prog_test_run_xdp routine. This is a preliminary patch to introduce the selftests for new xdp multi-buff ebpf helpers Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 52 +++--- 1 file

[PATCH v7 bpf-next 10/14] bpf: add new frame_length field to the XDP ctx

2021-03-19 Thread Lorenzo Bianconi
< ctx->frame_length) { /* Fragements exists. /* } Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- include/linux/filter.h | 7 +++ include/net/xdp.h | 12 include/uapi/linux/bpf.h | 1 + net/core/filter.c | 8 ++

[PATCH v7 bpf-next 11/14] bpf: move user_size out of bpf_test_init

2021-03-19 Thread Lorenzo Bianconi
Rely on data_size_in in bpf_test_init routine signature. This is a preliminary patch to introduce xdp multi-buff selftest Signed-off-by: Lorenzo Bianconi --- net/bpf/test_run.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/bpf/test_run.c b/net/bpf

[PATCH v7 bpf-next 09/14] bpd: add multi-buffer support to xdp copy helpers

2021-03-19 Thread Lorenzo Bianconi
From: Eelco Chaudron This patch adds support for multi-buffer for the following helpers: - bpf_xdp_output() - bpf_perf_event_output() Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- net/core/filter.c | 60 - .../selftests/bpf

[PATCH v7 bpf-next 08/14] bpf: add multi-buff support to the bpf_xdp_adjust_tail() API

2021-03-19 Thread Lorenzo Bianconi
From: Eelco Chaudron This change adds support for tail growing and shrinking for XDP multi-buff. Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 5 net/core/filter.c | 63 +++ 2 files changed, 68

[PATCH v7 bpf-next 06/14] net: mvneta: enable jumbo frames for XDP

2021-03-19 Thread Lorenzo Bianconi
Enable the capability to receive jumbo frames even if the interface is running in XDP mode Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet

[PATCH v7 bpf-next 07/14] net: xdp: add multi-buff support to xdp_build_skb_from_fram

2021-03-19 Thread Lorenzo Bianconi
Introduce xdp multi-buff support to __xdp_build_skb_from_frame/xdp_build_skb_from_fram utility routines. Signed-off-by: Lorenzo Bianconi --- net/core/xdp.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/net/core/xdp.c b/net/core/xdp.c index 430f516259d9

[PATCH v7 bpf-next 03/14] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer

2021-03-19 Thread Lorenzo Bianconi
Update multi-buffer bit (mb) in xdp_buff to notify XDP/eBPF layer and XDP remote drivers if this is a "non-linear" XDP buffer. Access xdp_shared_info only if xdp_buff mb is set. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 26

[PATCH v7 bpf-next 04/14] xdp: add multi-buff support to xdp_return_{buff/frame}

2021-03-19 Thread Lorenzo Bianconi
Take into account if the received xdp_buff/xdp_frame is non-linear recycling/returning the frame memory to the allocator or into xdp_frame_bulk. Introduce xdp_return_num_frags_from_buff to return a given number of fragments from a xdp multi-buff starting from the tail. Signed-off-by: Lorenzo

[PATCH v7 bpf-next 05/14] net: mvneta: add multi buffer support to XDP_TX

2021-03-19 Thread Lorenzo Bianconi
Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 91 --- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/drivers

[PATCH v7 bpf-next 02/14] xdp: add xdp_shared_info data structure

2021-03-19 Thread Lorenzo Bianconi
Introduce xdp_shared_info data structure to contain info about "non-linear" xdp frame. xdp_shared_info will alias skb_shared_info allowing to keep most of the frags in the same cache-line. Introduce some xdp_shared_info helpers aligned to skb_frag* ones Signed-off-by: Lorenz

[PATCH v7 bpf-next 01/14] xdp: introduce mb in xdp_buff/xdp_frame

2021-03-19 Thread Lorenzo Bianconi
. Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index a5bc214a49d9..b57ff2c81e7c 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -73,7 +73,8 @@ struct xdp_buff

[PATCH v7 bpf-next 00/14] mvneta: introduce XDP multi-buffer support

2021-03-19 Thread Lorenzo Bianconi
ail() API bpd: add multi-buffer support to xdp copy helpers bpf: add new frame_length field to the XDP ctx bpf: update xdp_adjust_tail selftest to include multi-buffer Lorenzo Bianconi (10): xdp: introduce mb in xdp_buff/xdp_frame xdp: add xdp_shared_info data structure net: mvneta: up

[PATCH net-next] net: export dev_set_threaded symbol

2021-03-14 Thread Lorenzo Bianconi
For wireless devices (e.g. mt76 driver) multiple net_devices belongs to the same wireless phy and the napi object is registered in a dummy netdevice related to the wireless phy. Export dev_set_threaded in order to be reused in device drivers enabling threaded NAPI. Signed-off-by: Lorenzo Bianconi

[PATCH v3 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-08 Thread Lorenzo Bianconi
new APIs: - veth - virtio-net - mvneta - mvpp2 - socionext - amazon ena - bnxt - freescale (dpaa2, dpaa) - xen-frontend - qede - ice - igb - ixgbe - i40e - mlx5 - ti (cpsw, cpsw-new) - tun - sfc Acked-by: Edward Cree Reviewed-by: Ioana Ciornei Reviewed-by: Ilias Apalodimas Signed-off-by: Lorenzo

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-03-02 Thread Lorenzo Bianconi
> On Mon, 1 Mar 2021 13:23:06 +0200 > Shay Agroskin wrote: > > > Jesper Dangaard Brouer writes: > > > > > On Sun, 28 Feb 2021 23:27:25 +0100 > > > Lorenzo Bianconi wrote: > > > > > >> > > drops = bq->count - sen

Re: [PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-28 Thread Lorenzo Bianconi
> > Lorenzo Bianconi writes: > > > ... > > diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c > > b/drivers/net/ethernet/amazon/ena/ena_netdev.c > > index 102f2c91fdb8..7ad0557dedbd 100644 > > --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c &g

[PATCH v2 bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-27 Thread Lorenzo Bianconi
new APIs: - veth - virtio-net - mvneta - mvpp2 - socionext - amazon ena - bnxt - freescale (dpaa2, dpaa) - xen-frontend - qede - ice - igb - ixgbe - i40e - mlx5 - ti (cpsw, cpsw-new) - tun - sfc Acked-by: Edward Cree Signed-off-by: Lorenzo Bianconi --- More details about the new ndo_xdp_xmit design

Re: [PATCH bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-27 Thread Lorenzo Bianconi
> On 2/17/21 2:56 PM, Lorenzo Bianconi wrote: > > We want to change the current ndo_xdp_xmit drop semantics because > > it will allow us to implement better queue overflow handling. > > This is working towards the larger goal of a XDP TX queue-hook. > > Move XDP_REDIRE

[PATCH bpf-next] bpf: devmap: move drop error path to devmap for XDP_REDIRECT

2021-02-17 Thread Lorenzo Bianconi
/xdp-project/blob/master/areas/core/redesign01_ndo_xdp_xmit.org Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 20 ++ .../net/ethernet/freescale/dpaa/dpaa_eth.c| 12

Re: mt76: mt7921: add MCU support

2021-02-11 Thread Lorenzo Bianconi
> Hi, > Hi Colin, a fix for this issue has been already posted upstream: https://patchwork.kernel.org/project/linux-wireless/patch/857ff74f736d4e593f5ad602cee7ac67ebfca5ca.1612867656.git.lore...@kernel.org/ Regards, Lorenzo > Static analysis with Coverity on linux-next has found an issue with

[RFC bpf-next] bpf: devmap: move drop error path to devmpap for XDP_REDIRECT

2021-02-10 Thread Lorenzo Bianconi
/redesign01_ndo_xdp_xmit.org Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 20 ++ .../net/ethernet/freescale/dpaa/dpaa_eth.c| 12 - .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2

Re: pull-request: wireless-drivers-2021-02-05

2021-02-08 Thread Lorenzo Bianconi
On Feb 08, Kalle Valo wrote: > Lorenzo Bianconi writes: > > >> So what's the plan? Is there going to be a followup patch? And should > >> that also go to v5.11 or can it wait v5.12? > >> > >> -- > >> https://patchwork

Re: pull-request: wireless-drivers-2021-02-05

2021-02-07 Thread Lorenzo Bianconi
> > > > > [...] > > > > > So what's the plan? Is there going to be a followup patch? And should > > that also go to v5.11 or can it wait v5.12? > > > > -- > > https://patchwork.kernel.org/project/linux-wireless/list/ > > > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpat

Re: pull-request: wireless-drivers-2021-02-05

2021-02-07 Thread Lorenzo Bianconi
> [...] > > So what's the plan? Is there going to be a followup patch? And should > that also go to v5.11 or can it wait v5.12? > > -- > https://patchwork.kernel.org/project/linux-wireless/list/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches > Hi Kalle, I wil

Re: pull-request: wireless-drivers-2021-02-05

2021-02-06 Thread Lorenzo Bianconi
> On Fri, 5 Feb 2021 16:34:34 + (UTC) Kalle Valo wrote: > > Hi, > > > > here's a pull request to net tree, more info below. Please let me know if > > there > > are any problems. > > Pulled, thanks! One thing to confirm tho.. > > > ath9k > > > > * fix build regression related to LEDS_CLASS

[PATCH net-next] net: ethernet: ti: fix netdevice stats for XDP

2021-02-03 Thread Lorenzo Bianconi
interface (XDP_TX). This patch allows the system administrator to very the device is receiving data correctly. Signed-off-by: Lorenzo Bianconi --- - this patch is compile-only tested --- drivers/net/ethernet/ti/cpsw.c | 4 +--- drivers/net/ethernet/ti/cpsw_new.c | 4 +--- drivers/net

Re: [PATCH v6 bpf-next 0/8] mvneta: introduce XDP multi-buffer support

2021-01-31 Thread Lorenzo Bianconi
> Hi Lorenzo, Hi Daniel, sorry for the delay. > > On 1/19/21 9:20 PM, Lorenzo Bianconi wrote: > > This series introduce XDP multi-buffer support. The mvneta driver is > > the first to support these new "non-linear" xdp_{buff,frame}. Reviewers > > please

[PATCH v3 bpf-next] net: veth: alloc skb in bulk for ndo_xdp_xmit

2021-01-29 Thread Lorenzo Bianconi
veth0 --> (remote-ns) veth1 --> XDP_PASS XDP_REDIRECT: xdp_redirect_map bpf sample XDP_PASS: xdp_rxq_info bpf sample traffic generator: pkt_gen sending udp traffic on a remote device bpf-next master: ~3.64Mpps bpf-next + skb bulking allocation: ~3.79Mpps Signed-off-by: Lorenzo Bianconi

Re: [PATCH v2 bpf-next] net: veth: alloc skb in bulk for ndo_xdp_xmit

2021-01-29 Thread Lorenzo Bianconi
On Jan 29, Lorenzo Bianconi wrote: > On Jan 29, Jesper Dangaard Brouer wrote: > > On Fri, 29 Jan 2021 17:02:16 +0100 > > Jesper Dangaard Brouer wrote: > > > > > > + for (i = 0; i < n_skb; i++) { > > > > + struct sk_buff *skb = s

Re: [PATCH v2 bpf-next] net: veth: alloc skb in bulk for ndo_xdp_xmit

2021-01-29 Thread Lorenzo Bianconi
On Jan 29, Jesper Dangaard Brouer wrote: > On Fri, 29 Jan 2021 17:02:16 +0100 > Jesper Dangaard Brouer wrote: > > > > + for (i = 0; i < n_skb; i++) { > > > + struct sk_buff *skb = skbs[i]; > > > + > > > + memset(skb, 0, offsetof(struct sk_buff, tail)); > > > > It is very subtle

Re: [PATCH v2 bpf-next] net: veth: alloc skb in bulk for ndo_xdp_xmit

2021-01-29 Thread Lorenzo Bianconi
> On 2021/01/29 4:41, Lorenzo Bianconi wrote: > > Split ndo_xdp_xmit and ndo_start_xmit use cases in veth_xdp_rcv routine > > in order to alloc skbs in bulk for XDP_PASS verdict. > > Introduce xdp_alloc_skb_bulk utility routine to alloc skb bulk list. > > The proposed

Re: [PATCH bpf-next 1/3] net: veth: introduce bulking for XDP_PASS

2021-01-28 Thread Lorenzo Bianconi
> On 2021/01/27 3:41, Lorenzo Bianconi wrote: > > Introduce bulking support for XDP_PASS verdict forwarding skbs to > > the networking stack > > > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/net/veth.c | 43 ++---

[PATCH bpf-next 0/3] veth: add skb bulking allocation for XDP_PASS

2021-01-27 Thread Lorenzo Bianconi
ple traffic generator: pkt_gen sending udp traffic on a remote device bpf-next master: ~3.64Mpps bpf-next + skb bulking allocation: ~3.75Mpps Lorenzo Bianconi (3): net: veth: introduce bulking for XDP_PASS net: xdp: move XDP_BATCH_SIZE in common header net: veth: alloc skb in bulk for

[PATCH bpf-next 2/3] net: xdp: move XDP_BATCH_SIZE in common header

2021-01-27 Thread Lorenzo Bianconi
Move CPUMAP_BATCH macro in xdp common header and rename it to XDP_BATCH_SIZE in order to be reused in veth driver Signed-off-by: Lorenzo Bianconi --- drivers/net/veth.c | 2 +- include/net/xdp.h | 1 + kernel/bpf/cpumap.c | 13 + 3 files changed, 7 insertions(+), 9 deletions

[PATCH bpf-next 3/3] net: veth: alloc skb in bulk for ndo_xdp_xmit

2021-01-26 Thread Lorenzo Bianconi
Split ndo_xdp_xmit and ndo_start_xmit use cases in veth_xdp_rcv routine in order to alloc skbs in bulk for XDP_PASS verdict. Introduce xdp_alloc_skb_bulk utility routine to alloc skb bulk list. Signed-off-by: Lorenzo Bianconi --- drivers/net/veth.c | 96

[PATCH bpf-next 1/3] net: veth: introduce bulking for XDP_PASS

2021-01-26 Thread Lorenzo Bianconi
Introduce bulking support for XDP_PASS verdict forwarding skbs to the networking stack Signed-off-by: Lorenzo Bianconi --- drivers/net/veth.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/net/veth.c b/drivers/net/veth.c

[PATCH v6 bpf-next 0/8] mvneta: introduce XDP multi-buffer support

2021-01-19 Thread Lorenzo Bianconi
section) Eelco Chaudron (1): bpf: add multi-buff support to the bpf_xdp_adjust_tail() API Lorenzo Bianconi (7): xdp: introduce mb in xdp_buff/xdp_frame xdp: add xdp_shared_info data structure net: mvneta: update mb bit before passing the xdp buffer to eBPF layer xdp: add multi-buff support

[PATCH v6 bpf-next 1/8] xdp: introduce mb in xdp_buff/xdp_frame

2021-01-19 Thread Lorenzo Bianconi
. Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index c4bfdc9a8b79..945767813fdd 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -73,7 +73,8 @@ struct xdp_buff

[PATCH v6 bpf-next 7/8] net: xdp: add multi-buff support to xdp_build_skb_from_fram

2021-01-19 Thread Lorenzo Bianconi
Introduce xdp multi-buff support to __xdp_build_skb_from_frame/xdp_build_skb_from_fram utility routines. Signed-off-by: Lorenzo Bianconi --- net/core/xdp.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/net/core/xdp.c b/net/core/xdp.c index af9b9c1194fc

[PATCH v6 bpf-next 3/8] net: mvneta: update mb bit before passing the xdp buffer to eBPF layer

2021-01-19 Thread Lorenzo Bianconi
Update multi-buffer bit (mb) in xdp_buff to notify XDP/eBPF layer and XDP remote drivers if this is a "non-linear" XDP buffer. Access xdp_shared_info only if xdp_buff mb is set. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 26

[PATCH v6 bpf-next 6/8] net: mvneta: enable jumbo frames for XDP

2021-01-19 Thread Lorenzo Bianconi
Enable the capability to receive jumbo frames even if the interface is running in XDP mode Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet

[PATCH v6 bpf-next 4/8] xdp: add multi-buff support to xdp_return_{buff/frame}

2021-01-19 Thread Lorenzo Bianconi
Take into account if the received xdp_buff/xdp_frame is non-linear recycling/returning the frame memory to the allocator or into xdp_frame_bulk. Introduce xdp_return_num_frags_from_buff to return a given number of fragments from a xdp multi-buff starting from the tail. Signed-off-by: Lorenzo

[PATCH v6 bpf-next 8/8] bpf: add multi-buff support to the bpf_xdp_adjust_tail() API

2021-01-19 Thread Lorenzo Bianconi
From: Eelco Chaudron This change adds support for tail growing and shrinking for XDP multi-buff. Signed-off-by: Eelco Chaudron Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 5 net/core/filter.c | 63 +++ 2 files changed, 68

[PATCH v6 bpf-next 5/8] net: mvneta: add multi buffer support to XDP_TX

2021-01-19 Thread Lorenzo Bianconi
Introduce the capability to map non-linear xdp buffer running mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 94 --- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/drivers

[PATCH v6 bpf-next 2/8] xdp: add xdp_shared_info data structure

2021-01-19 Thread Lorenzo Bianconi
Introduce xdp_shared_info data structure to contain info about "non-linear" xdp frame. xdp_shared_info will alias skb_shared_info allowing to keep most of the frags in the same cache-line. Introduce some xdp_shared_info helpers aligned to skb_frag* ones Signed-off-by: Lorenz

[PATCH v2 bpf-next 2/2] net: xdp: introduce xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
missing metadata support in veth_xdp_rcv_one(). Reviewed-by: Toshiaki Makita Acked-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi --- drivers/net/veth.c | 18 +++--- include/net/xdp.h | 2 ++ net/core/xdp.c | 15 +++ 3 files changed, 20 insertions

[PATCH v2 bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
since v1: - fix a checkpatch warning - improve commit log in patch 2/2 Lorenzo Bianconi (2): net: xdp: introduce __xdp_build_skb_from_frame utility routine net: xdp: introduce xdp_build_skb_from_frame utility routine drivers/net/veth.c | 18 +++--- include/net/xdp.h | 5

[PATCH v2 bpf-next 1/2] net: xdp: introduce __xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
Introduce __xdp_build_skb_from_frame utility routine to build the skb from xdp_frame. Rely on __xdp_build_skb_from_frame in cpumap code. Acked-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 3 +++ kernel/bpf/cpumap.c | 46

Re: [PATCH bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
> On 1/12/21 5:08 PM, Lorenzo Bianconi wrote: > > > Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame > > > routines to > > > build the skb from a xdp_frame. Respect to __xdp_build_skb_from_frame, > > > xdp_build_skb_from_frame will

Re: [PATCH bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
veth > code. Hi Daniel/Alexei, since this series is marked as "archived" in patchwork, do I need to resubmit it? Regards, Lorenzo > > Lorenzo Bianconi (2): > net: xdp: introduce __xdp_build_skb_from_frame utility routine > net: xdp: introduce xdp_build_skb_from_fr

Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split

2020-12-31 Thread Lorenzo Bianconi
send_message to be > more neutral like mt7615_mcu_send_message. > > Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array") > Link: https://github.com/ClangBuiltLinux/linux/issues/1229 > Signed-off-by: Nathan Chancellor Acked-by: Lorenzo Bianconi > --- >

Re: [PATCH v5 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-29 Thread Lorenzo Bianconi
> > + hard_start = page_address(rx_buffer->page) + > > + rx_buffer->page_offset - offset; > > + xdp_prepare_buff(&xdp, hard_start, offset, size, > > true); > > #if (PAGE_SIZE > 4096) > > /* At larger P

[PATCH v5 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-22 Thread Lorenzo Bianconi
Introduce xdp_prepare_buff utility routine to initialize per-descriptor xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in all XDP capable drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 7 +++ drivers/net/ethernet/broadcom

[PATCH v5 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff

2020-12-22 Thread Lorenzo Bianconi
p->data as hard_start + headroom and save it in a local variable to reuse it for xdp->data_end and xdp->data_meta in xdp_prepare_buff() Changes since v1: - introduce xdp_prepare_buff utility routine Lorenzo Bianconi (2): net: xdp: introduce xdp_init_buff utility routine net: xdp: introdu

[PATCH v5 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-22 Thread Lorenzo Bianconi
Introduce xdp_init_buff utility routine to initialize xdp_buff fields const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on xdp_init_buff in all XDP capable drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c| 3 +-- drivers/net

Re: [PATCH v4 bpf-next 1/2] net: xdp: introduce xdp_init_buff utility routine

2020-12-21 Thread Lorenzo Bianconi
On Mon, Dec 21, 2020 at 9:37 AM Jesper Dangaard Brouer wrote: > > On Sat, 19 Dec 2020 18:55:00 +0100 > Lorenzo Bianconi wrote: > > > diff --git a/include/net/xdp.h b/include/net/xdp.h > > index 11ec93f827c0..323340caef88 100644 > > --- a/include/net/xdp.h > >

Re: [PATCH v5 bpf-next 06/14] net: mvneta: add multi buffer support to XDP_TX

2020-12-20 Thread Lorenzo Bianconi
On Sat, Dec 19, 2020 at 4:56 PM Shay Agroskin wrote: > > > Lorenzo Bianconi writes: > > > Introduce the capability to map non-linear xdp buffer running > > mvneta_xdp_submit_frame() for XDP_TX and XDP_REDIRECT > > > > Signed-off-by: Lorenzo Bianconi >

Re: [PATCH v5 bpf-next 11/14] bpf: cpumap: introduce xdp multi-buff support

2020-12-20 Thread Lorenzo Bianconi
> > > Lorenzo Bianconi writes: > > > Introduce __xdp_build_skb_from_frame and > > xdp_build_skb_from_frame > > utility routines to build the skb from xdp_frame. > > Add xdp multi-buff support to cpumap > > > > Signed-off-by: Lorenzo Bianconi > &

Re: [PATCH v5 bpf-next 03/14] xdp: add xdp_shared_info data structure

2020-12-20 Thread Lorenzo Bianconi
> > > Lorenzo Bianconi writes: > > >> On Mon, 2020-12-07 at 17:32 +0100, Lorenzo Bianconi wrote: > >> > Introduce xdp_shared_info data structure to contain info > >> > about > >> > "non-linear" xdp frame. xdp_shared_info will ali

Re: [PATCH v4 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff

2020-12-20 Thread Lorenzo Bianconi
> > > Lorenzo Bianconi writes: > > > Introduce xdp_init_buff and xdp_prepare_buff utility routines to > > initialize > > xdp_buff data structure and remove duplicated code in all XDP > > capable > > drivers. > > > > Changes sin

[PATCH v4 bpf-next 2/2] net: xdp: introduce xdp_prepare_buff utility routine

2020-12-19 Thread Lorenzo Bianconi
Introduce xdp_prepare_buff utility routine to initialize per-descriptor xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in all XDP capable drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 7 +++ drivers/net/ethernet

[PATCH v4 bpf-next 0/2] introduce xdp_init_buff/xdp_prepare_buff

2020-12-19 Thread Lorenzo Bianconi
xdp_prepare_buff() Changes since v1: - introduce xdp_prepare_buff utility routine Lorenzo Bianconi (2): net: xdp: introduce xdp_init_buff utility routine net: xdp: introduce xdp_prepare_buff utility routine Acked-by: Martin Habets Acked-by: Camelia Groza drivers/net/ethernet/amazon/ena

  1   2   3   4   5   6   7   >