[PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ilias Apalodimas
/udhcpc /tmp/root/bin cp /path/to/setup.sh /tmp/root/bin chroot /tmp/root/ busybox sh /bin/run_nfs.sh run ./run_nfs.sh This is on top of 4.17-rc2 tree. P.S: I am not 100% sure that the promiscuity handling is correct. Please let me know if i should change anything on that Ilias Apalodimas (4):

[PATCH 1/4] cpsw: move common headers definitions to cpsw_priv.h

2018-05-24 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org> --- drivers/net/ethernet/ti/cpsw.c | 111 +--- drivers/net/ethernet/ti/cpsw_priv.h | 141 2 files changed, 142 insertions(+), 110 deletions(-) create mode

[PATCH 4/4] cpsw: add switchdev support

2018-05-24 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org> --- drivers/net/ethernet/ti/cpsw.c | 503 +++- drivers/net/ethernet/ti/cpsw_priv.h | 9 +- 2 files changed, 450 insertions(+), 62 deletions(-) diff --git a/drivers/net/ethernet/ti/cp

[PATCH 2/4] cpsw_ale: add support functions for switchdev

2018-05-24 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org> --- drivers/net/ethernet/ti/cpsw_ale.c | 129 + drivers/net/ethernet/ti/cpsw_ale.h | 8 +++ 2 files changed, 137 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drive

[PATCH 3/4] cpsw_switchdev: add switchdev support files

2018-05-24 Thread Ilias Apalodimas
Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org> --- drivers/net/ethernet/ti/Kconfig | 9 + drivers/net/ethernet/ti/Makefile | 1 + drivers/net/ethernet/ti/cpsw_switchdev.c | 299 +++ drivers/net/ethernet/ti/cpsw_switchdev.h |

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 10:05:28AM +0200, Jiri Pirko wrote: > Thu, May 24, 2018 at 08:56:20AM CEST, ilias.apalodi...@linaro.org wrote: > Any reason you need cpu port? We don't need it in mlxsw and also in dsa. Yes i've seen that on mlxsw/rocker drivers and i was reluctant adding one here. The

Re: [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs

2018-05-25 Thread Ilias Apalodimas
On Fri, May 25, 2018 at 01:09:46PM +0300, Petr Machata wrote: > Florian Fainelli writes: > > > You seem to have approached the bridge changes a little differently from > > this series: > > > > https://lists.linux-foundation.org/pipermail/bridge/2016-November/010112.html >

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-25 Thread Ilias Apalodimas
On Fri, May 25, 2018 at 09:29:02AM +0300, Ilias Apalodimas wrote: > On Thu, May 24, 2018 at 06:33:10PM +0200, Andrew Lunn wrote: > > On Thu, May 24, 2018 at 07:02:54PM +0300, Ilias Apalodimas wrote: > > > On Thu, May 24, 2018 at 05:25:59PM +0200, Andrew Lunn wrote: > > &g

Re: [PATCH 4/4] cpsw: add switchdev support

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 03:12:29PM +0200, Andrew Lunn wrote: > Device tree is supposed to describe the hardware. Using that hardware > in different ways is not something you should describe in DT. > The new switchdev mode is applied with a .config option in the kernel. What you see is

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 03:44:54PM +0200, Ivan Vecera wrote: > On 24.5.2018 14:54, Andrew Lunn wrote: > > On Thu, May 24, 2018 at 11:48:31AM +0300, Ilias Apalodimas wrote: > >> On Thu, May 24, 2018 at 10:05:28AM +0200, Jiri Pirko wrote: > >>> Thu, May 24, 2018 at

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 05:25:59PM +0200, Andrew Lunn wrote: > O.K, back to the basic idea. Switch ports are just normal Linux > interfaces. > > How would you configure this with two e1000e put in a bridge? I want > multicast to be bridged between the two e1000e, but the host stack > should not

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 04:54:41PM +0200, Andrew Lunn wrote: > If you cannot get an IP address, it is plain broken. The whole idea is > that switch port interfaces are just linux interfaces. A linux > interface which cannot get an IP address is broken. The switch interfaces can get ip addresses

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-25 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 06:33:10PM +0200, Andrew Lunn wrote: > On Thu, May 24, 2018 at 07:02:54PM +0300, Ilias Apalodimas wrote: > > On Thu, May 24, 2018 at 05:25:59PM +0200, Andrew Lunn wrote: > > > O.K, back to the basic idea. Switch ports are just normal Linux > > > i

Re: [PATCH 4/4] cpsw: add switchdev support

2018-05-24 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 06:39:04PM +0200, Andrew Lunn wrote: > On Thu, May 24, 2018 at 04:32:34PM +0300, Ilias Apalodimas wrote: > > On Thu, May 24, 2018 at 03:12:29PM +0200, Andrew Lunn wrote: > > > Device tree is supposed to describe the hardware. Using that hardware >

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-18 Thread Ilias Apalodimas
On Mon, Jun 18, 2018 at 06:16:27PM +0200, Andrew Lunn wrote: > > @@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data > > *data, > > if (of_property_read_bool(node, "dual_emac")) > > data->switch_mode = CPSW_DUAL_EMAC; > > > > + /* switchdev overrides DTS

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:39:58PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:34:04PM CEST, ilias.apalodi...@linaro.org wrote: > >On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: > >> Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > >> > >> [...] > >>

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:30:28PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > > [...] > > >@@ -2711,6 +2789,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data > >*data, > > if (of_property_read_bool(node, "dual_emac")) > >

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
On Thu, Jun 14, 2018 at 01:23:49PM +0200, Jiri Pirko wrote: > Thu, Jun 14, 2018 at 01:11:30PM CEST, ilias.apalodi...@linaro.org wrote: > >This patch enables switchdev funtionality on the driver based on a > >.config option(CONFIG_TI_CPSW_SWITCHDEV). CPSW driver used a DTS option > >called

[RFC v2, net-next, PATCH 1/4] net/cpsw: move common headers definitions to cpsw_priv.h

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Move common definitions to a private header file Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 111 +--- drivers/net/ethernet/ti/cpsw_priv.h | 141 2

[RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW

2018-06-14 Thread Ilias Apalodimas
LANs will modify registered/unregistered multicast port masks properly. - ALE_P0_UNI_FLOOD is controlled from bridge members. As long as the bridge has members(switch interfaces) this will be enabled. - added management for SWITCHDEV_OBJ_ID_HOST_MDB to control MDBs for the CP

[RFC v2, net-next, PATCH 3/4] net/cpsw: prepare cpsw for switchdev support

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Prepare cpsw driver to accommodate an extra mode of operation using switchdev. This patch does not changes the cpsw driver current functionality Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw.c | 146

[RFC v2, net-next, PATCH 2/4] net/cpsw_ale: add functions to modify VLANs/MDBs

2018-06-14 Thread Ilias Apalodimas
A following patch introduces switchdev functionality. Add functions to cpsw ALE engine to modify VLANs/MDBs Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/cpsw_ale.c | 188 - drivers/net/ethernet/ti/cpsw_ale.h | 10 ++ 2 files changed, 195

[RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-14 Thread Ilias Apalodimas
the last interface leaves the bridge Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/ti/Kconfig | 9 + drivers/net/ethernet/ti/Makefile | 1 + drivers/net/ethernet/ti/cpsw.c | 306 +- drivers/net/ethernet/ti/cpsw_priv.h | 2 + drivers

Re: [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW

2018-06-18 Thread Ilias Apalodimas
On Mon, Jun 18, 2018 at 05:04:24PM +0200, Andrew Lunn wrote: > Hi Ilias > > Thanks for removing the CPU port. That helps a lot moving forward. > > > - Multicast testing client-port1(tagged on vlan 100) server-port1 > > switch-config is provided by TI (https://git.ti.com/switch-config) > > and is

Re: [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW

2018-06-18 Thread Ilias Apalodimas
On Mon, Jun 18, 2018 at 06:28:36PM +0200, Andrew Lunn wrote: > > Yes, if the CPU port is added on the VLAN then unregistered multicast > > traffic > > (and thus IGMP joins) will reach the CPU port and everything will work as > > expected. I think we should not consider this as a "problem" as long

Re: [RFC v2, net-next, PATCH 0/4] Add switchdev on TI-CPSW

2018-06-18 Thread Ilias Apalodimas
On Mon, Jun 18, 2018 at 07:30:25PM +0200, Andrew Lunn wrote: > On Mon, Jun 18, 2018 at 07:46:02PM +0300, Ilias Apalodimas wrote: > > On Mon, Jun 18, 2018 at 06:28:36PM +0200, Andrew Lunn wrote: > > > > Yes, if the CPU port is added on the VLAN then unregistered multi

Re: [PATCH 4/4] cpsw: add switchdev support

2018-06-02 Thread Ilias Apalodimas
Hi Florian, Thanks for taking time to look into this On Fri, Jun 01, 2018 at 02:48:48PM -0700, Florian Fainelli wrote: > > > On 05/24/2018 09:56 PM, Ilias Apalodimas wrote: > > On Thu, May 24, 2018 at 06:39:04PM +0200, Andrew Lunn wrote: > >> On Thu, May 24, 2018 at

Re: [PATCH 4/4] cpsw: add switchdev support

2018-06-02 Thread Ilias Apalodimas
On Sat, Jun 02, 2018 at 09:10:08AM -0700, Florian Fainelli wrote: > On June 2, 2018 3:34:32 AM MST, Ilias Apalodimas > wrote: > >Hi Florian, > > > >Thanks for taking time to look into this > > > >On Fri, Jun 01, 2018 at 02:48:48PM -0700, Florian Fainelli wrot

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-06-06 Thread Ilias Apalodimas
Hi Andrew, >On Wed, Jun 06, 2018 at 01:53:56AM +0200, Andrew Lunn wrote: > > And I just have to look a little bit in the future as selected approach > > expected to be extended on future SoC (and other parts of existing SoCs - > > ICSS-G SW switch) > > where we going to have more features, like

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-31 Thread Ilias Apalodimas
Sorry for the late response i had some time to take another look and do some extra testing > switchdev is about offloading what Linux can do to hardware to > accelerate it. The switch is a block of accelerator hardware, like a > GPU is for accelerating graphics. Linux can render OpenGL, but it is

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ilias Apalodimas
Hi Florian, On Wed, Jun 20, 2018 at 10:58:26AM -0700, Florian Fainelli wrote: > On 06/20/2018 10:51 AM, Ilias Apalodimas wrote: > > Hello Ivan, > > On Wed, Jun 20, 2018 at 02:56:48PM +0200, Ivan Vecera wrote: > >> On 18.6.2018 22:19, Ilias Apalodimas wrote: > >

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ilias Apalodimas
Hello Ivan, On Wed, Jun 20, 2018 at 02:56:48PM +0200, Ivan Vecera wrote: > On 18.6.2018 22:19, Ilias Apalodimas wrote: > > Jiri proposed using devlink, which makes sense, but i am not sure it's > > applicable on this patchset. This will change the driver completely and will &g

AF_PACKET V4/AF_XDP userspace API questions

2018-01-30 Thread Ilias Apalodimas
We've noticed 3 different hardware approaches in receiving payloads 1. Host driver needs to pre-load descriptor ring with addresses of RAM buffers to write arriving data. The "standard" functionality for most NICs is (in little detail) fetch the descriptor, write the payload to host RAM and

Re: AF_PACKET V4/AF_XDP userspace API questions

2018-01-30 Thread Ilias Apalodimas
Really sorry for the noise, mail is in lkml properly now. I failed at marking it as plain text. You can disregard this one. Regards Ilias On 30 January 2018 at 10:02, Ilias Apalodimas <ilias.apalodi...@linaro.org> wrote: > We've noticed 3 different hardware approaches in receiving

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-21 Thread Ilias Apalodimas
On Thu, Jun 21, 2018 at 02:19:55PM +0200, Ivan Vecera wrote: > On 20.6.2018 20:03, Ilias Apalodimas wrote: > > Hi Florian, > > > > On Wed, Jun 20, 2018 at 10:58:26AM -0700, Florian Fainelli wrote: > >> On 06/20/2018 10:51 AM, Ilias Apalodimas wrote: > >>&

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ilias Apalodimas
On Wed, Jun 20, 2018 at 02:53:47PM +0200, Ivan Vecera wrote: > On 20.6.2018 09:08, Jiri Pirko wrote: > > Tue, Jun 19, 2018 at 01:19:00AM CEST, grygorii.stras...@ti.com wrote: > >> > >> > >> On 06/14/2018 06:43 AM, Ilias Apalodimas wrote: > >>> On T

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-22 Thread Ilias Apalodimas
On Thu, Jun 21, 2018 at 05:31:31PM +0200, Arnd Bergmann wrote: > On Thu, Jun 21, 2018 at 2:45 PM, Ilias Apalodimas > wrote: > > On Thu, Jun 21, 2018 at 02:19:55PM +0200, Ivan Vecera wrote: > > > The driver is currently widely used and that's the reason we tried t

[net-next, PATCH 1/2] net: socionext: Use descriptor info instead of MMIO reads on Rx

2018-08-09 Thread Ilias Apalodimas
tested with 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 01589b6..ae32909

[net-next, PATCH 2/2] net: socionext: Increase descriptors to 256

2018-08-09 Thread Ilias Apalodimas
Increasing descriptors to 256 from 128 and adjusting the NAPI weight to 64 increases performace on Rx by ~20% on 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net

[net-next, PATCH 1/2 v2] net: socionext: Use descriptor info instead of MMIO reads on Rx

2018-08-10 Thread Ilias Apalodimas
tested with 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 01589b6

[net-next, PATCH 0/2 v2] netsec driver improvements

2018-08-10 Thread Ilias Apalodimas
the NETSEC_RX_PKT_OWN_FIELD bit Ilias Apalodimas (2): net: socionext: Use descriptor info instead of MMIO reads on Rx net: socionext: Increase descriptors to 256 drivers/net/ethernet/socionext/netsec.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) -- 2.7.4

[net-next, PATCH 2/2 v2] net: socionext: Increase descriptors to 256

2018-08-10 Thread Ilias Apalodimas
Increasing descriptors to 256 from 128 and adjusting the NAPI weight to 64 increases performace on Rx by ~20% on 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net

Re: [net-next, PATCH 1/2] net: socionext: Use descriptor info instead of MMIO reads on Rx

2018-08-09 Thread Ilias Apalodimas
On Thu, Aug 09, 2018 at 05:37:15PM +0200, Arnd Bergmann wrote: > On Thu, Aug 9, 2018 at 10:02 AM Ilias Apalodimas > wrote: > > > > MMIO reads for remaining packets in queue occur (at least)twice per > > invocation of netsec_process_rx(). We can use the packet descriptor

[net-next, PATCH 0/2, v1] net: socionext: add AF_XDP support

2018-09-10 Thread Ilias Apalodimas
This patch series adds AF_XDP support socionext netsec driver - patch [1/2]: Use a different allocation scheme for Rx DMA buffers to prepare the driver for AF_XDP support - patch [2/2]: Add AF_XDP support without zero-copy Ilias Apalodimas (2): net: socionext: different approach on DMA net

[net-next, PATCH 1/2, v1] net: socionext: different approach on DMA

2018-09-10 Thread Ilias Apalodimas
the necessary buffers for the network stack Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 239 +--- 1 file changed, 130 insertions(+), 109 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext

[net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support

2018-09-10 Thread Ilias Apalodimas
Add basic AF_XDP support without zero-copy Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 211 ++-- 1 file changed, 202 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet

Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support

2018-09-10 Thread Ilias Apalodimas
On Mon, Sep 10, 2018 at 07:56:49PM +0900, Toshiaki Makita wrote: > On 2018/09/10 17:24, Ilias Apalodimas wrote: > > Add basic AF_XDP support without zero-copy > > > > Signed-off-by: Ilias Apalodimas > > --- > ... > > @@ -707,6 +731,26 @@ static int netsec

Re: [net-next, PATCH 2/2, v1] net: socionext: add AF_XDP support

2018-09-10 Thread Ilias Apalodimas
> > @@ -707,6 +731,26 @@ static int netsec_process_rx(struct netsec_priv *priv, > > int budget) > > if (unlikely(!buf_addr)) > > break; > > > > + if (xdp_prog) { > > + xdp_result = netsec_run_xdp(desc, priv, xdp_prog, > > +

[net-next, PATCH 1/2, v2] net: socionext: different approach on DMA

2018-09-12 Thread Ilias Apalodimas
the necessary buffers for the network stack Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 239 +--- 1 file changed, 130 insertions(+), 109 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext

[net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
Add basic XDP support Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 234 +--- 1 file changed, 216 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index

[net-next, PATCH 0/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
of netdev_warn, when tryint to setup XDP as suggested by Toshiaki Makita Ilias Apalodimas (2): net: socionext: different approach on DMA net: socionext: add XDP support drivers/net/ethernet/socionext/netsec.c | 449 1 file changed, 334 insertions(+), 115

[net-next, PATCH 2/2] net: socionext: refactor netsec_alloc_dring()

2018-11-08 Thread Ilias Apalodimas
return -ENOMEM directly instead of assigning it in a variable Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext

[net-next, PATCH 1/2] net: socionext: different approach on DMA

2018-11-08 Thread Ilias Apalodimas
the necessary buffers for the network stack. This change increases performance ~15% on 64b packets with smmu disabled and ~5% with smmu enabled Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 227 ++-- 1 file changed, 128 insertions(+), 99

Re: [PATCH iproute2 net-next v2 2/6] include: Add helper to retrieve a __s64 from a netlink msg

2018-10-05 Thread Ilias Apalodimas
On Thu, Oct 04, 2018 at 04:17:07PM -0700, Vinicius Costa Gomes wrote: > This allows signed 64-bit integers to be retrieved from a netlink > message. > --- > include/libnetlink.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/libnetlink.h b/include/libnetlink.h > index

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 11:26:31AM +0200, Jesper Dangaard Brouer wrote: > > On Sat, 29 Sep 2018 14:28:01 +0300 Ilias Apalodimas > wrote: > > > +static void *netsec_alloc_rx_data(struct netsec_priv *priv, > > + dma_addr_t *d

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
> > #2: You have allocations on the XDP fast-path. > > > > The REAL secret behind the XDP performance is to avoid allocations on > > the fast-path. While I just told you to use the page-allocator and > > order-0 pages, this will actually kill performance. Thus, to make this > > fast, you need a

[net-next, PATCH 0/2, v3] net: socionext: XDP support

2018-09-29 Thread Ilias Apalodimas
p_xmit - XDP_TX does not flush every packet Changes since v1: - patch [2/2]: Toshiaki Makita: - Added XDP_PACKET_HEADROOM - Fixed a bug on XDP_PASS case - Using extact for error messaging instead of netdev_warn, when trying to setup XDP Ilias Apalodimas (2): net: socionext: different

[net-next, PATCH 2/2, v3] net: socionext: add XDP support

2018-09-29 Thread Ilias Apalodimas
Add basic XDP support. The interface only supports 1 Tx queue for now so locking is introduced on the Tx queue if XDP is enabled to make sure .ndo_start_xmit and .ndo_xdp_xmit won't corrupt Tx ring Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 345

[net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-09-29 Thread Ilias Apalodimas
the necessary buffers for the network stack Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 238 +--- 1 file changed, 129 insertions(+), 109 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c

[PATCH 1/1] net: socionext: clear rx irq correctly

2018-10-11 Thread Ilias Apalodimas
ets needed processing and ksoftirq getting 100% cpu usage. Issue one mmio read to clear the irq correcty after processing packets Signed-off-by: Ilias Apalodimas Reported-by: Ard Biesheuvel --- drivers/net/ethernet/socionext/netsec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 1 Oct 2018 12:56:58 +0300 > Ilias Apalodimas wrote: > > > > > #2: You have allocations on the XDP fast-path. > > > > > > > > The REAL secret behind the XDP performanc

Re: [net-next, PATCH 1/2, v3] net: socionext: different approach on DMA

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 03:48:45PM +0200, Jesper Dangaard Brouer wrote: > On Mon, 1 Oct 2018 14:20:21 +0300 > Ilias Apalodimas wrote: > > > On Mon, Oct 01, 2018 at 01:03:13PM +0200, Jesper Dangaard Brouer wrote: > > > On Mon, 1 Oct 2018 12:56:58 +0300 >

Re: [net-next, PATCH 0/2, v3] net: socionext: XDP support

2018-10-01 Thread Ilias Apalodimas
On Mon, Oct 01, 2018 at 02:48:54PM +0200, Björn Töpel wrote: > On 2018-09-29 13:28, Ilias Apalodimas wrote: > >This patch series adds AF_XDP support socionext netsec driver > > This series adds *XDP* support and as a result, the AF_XDP batteries > are included. ;-) > Noted

Re: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support

2018-12-07 Thread Ilias Apalodimas
Hi Ioana, > > > > > > I only did a quick grep around the driver so i might be missing something, > > but i can only see allocations via napi_alloc_frag(). XDP requires pages > > (either a single page per packet or a driver that does the page management > > of > > its own and fits 2 frames in a

Re: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support

2018-12-07 Thread Ilias Apalodimas
Hi Ioana, > > > > > Add support for XDP programs. Only XDP_PASS, XDP_DROP and XDP_TX > > > actions are supported for now. Frame header changes are also > > > allowed. I only did a quick grep around the driver so i might be missing something, but i can only see allocations via napi_alloc_frag().

Re: [net-next PATCH RFC 1/8] page_pool: add helper functions for DMA

2018-12-07 Thread Ilias Apalodimas
On Fri, Dec 07, 2018 at 11:06:55PM -0800, David Miller wrote: > This isn't going to work on 32-bit platforms where dma_addr_t is a u64, > because the page private is unsigned long. > > Grep for PHY_ADDR_T_64BIT under arch/ to see the vast majority of the > cases where this happens, then

Re: [net-next PATCH RFC 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-07 Thread Ilias Apalodimas
On Fri, Dec 07, 2018 at 11:15:14PM -0800, David Miller wrote: > From: Jesper Dangaard Brouer > Date: Fri, 07 Dec 2018 00:25:47 +0100 > > > @@ -744,6 +745,10 @@ struct sk_buff { > > head_frag:1, > > xmit_more:1, > >

Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-08 Thread Ilias Apalodimas
Hi Eric, > >> This patch is changing struct sk_buff, and is thus per-definition > >> controversial. > >> > >> Place a new member 'mem_info' of type struct xdp_mem_info, just after > >> members (flags) head_frag and pfmemalloc, And not in between > >> headers_start/end to ensure skb_copy() and

Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-08 Thread Ilias Apalodimas
On Sat, Dec 08, 2018 at 12:21:10PM -0800, David Miller wrote: > From: Ilias Apalodimas > Date: Sat, 8 Dec 2018 16:57:28 +0200 > > > The patchset speeds up the mvneta driver on the default network > > stack. The only change that was needed was to adapt the driver to > &

Re: [net-next, RFC, 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-08 Thread Ilias Apalodimas
On Sat, Dec 08, 2018 at 09:11:53PM +0100, Jesper Dangaard Brouer wrote: > > > > I want to make sure you guys thought about splice() stuff, and > > skb_try_coalesce(), and GRO, and skb cloning, and ... > > Thanks for the pointers. To Ilias, we need to double check skb_try_coalesce() > code path,

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
On Wed, Sep 12, 2018 at 11:14:57AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:02:38 +0300 > Ilias Apalodimas wrote: > > > @@ -1003,20 +1076,29 @@ static int netsec_setup_rx_dring(struct netsec_priv > > *priv) > > u16 len

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-12 Thread Ilias Apalodimas
On Wed, Sep 12, 2018 at 11:25:24AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:02:38 +0300 > Ilias Apalodimas wrote: > > > static const struct net_device_ops netsec_netdev_ops = { > > .ndo_init = netsec_netdev_init

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-13 Thread Ilias Apalodimas
On Thu, Sep 13, 2018 at 04:32:06PM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:29:15 +0300 > Ilias Apalodimas wrote: > > > On Wed, Sep 12, 2018 at 11:25:24AM +0200, Jesper Dangaard Brouer wrote: > > > On Wed, 12 Sep 2018 12:02:38 +0300 >