Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sun, Jun 30, 2019 at 07:47:45PM +0300, Ilias Apalodimas wrote: On Sun, Jun 30, 2019 at 07:41:28PM +0300, Ivan Khoronzhuk wrote: On Sun, Jun 30, 2019 at 07:32:14PM +0300, Ilias Apalodimas wrote: >On Sun, Jun 30, 2019 at 07:25:53PM +0300, Ivan Khoronzhuk wrote: >>On Sat, Jun 29, 2019 at 08:23:2

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sun, Jun 30, 2019 at 07:47:45PM +0300, Ilias Apalodimas wrote: On Sun, Jun 30, 2019 at 07:41:28PM +0300, Ivan Khoronzhuk wrote: On Sun, Jun 30, 2019 at 07:32:14PM +0300, Ilias Apalodimas wrote: >On Sun, Jun 30, 2019 at 07:25:53PM +0300, Ivan Khoronzhuk wrote: >>On Sat, Jun 29, 2019 at 08:23:2

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ilias Apalodimas
On Sun, Jun 30, 2019 at 07:45:13PM +0300, Ivan Khoronzhuk wrote: > On Sun, Jun 30, 2019 at 07:34:17PM +0300, Ilias Apalodimas wrote: > >Hi Ivan, > >> > >>[...] > >> > >>>+ > >>>+static int netsec_xdp(struct net_device *ndev, struct netdev_bpf *xdp) > >>>+{ > >>>+ struct netsec_priv *priv = netdev_

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ilias Apalodimas
On Sun, Jun 30, 2019 at 07:41:28PM +0300, Ivan Khoronzhuk wrote: > On Sun, Jun 30, 2019 at 07:32:14PM +0300, Ilias Apalodimas wrote: > >On Sun, Jun 30, 2019 at 07:25:53PM +0300, Ivan Khoronzhuk wrote: > >>On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote: > >>>The interface only supp

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sun, Jun 30, 2019 at 07:34:17PM +0300, Ilias Apalodimas wrote: Hi Ivan, [...] >+ >+static int netsec_xdp(struct net_device *ndev, struct netdev_bpf *xdp) >+{ >+ struct netsec_priv *priv = netdev_priv(ndev); >+ >+ switch (xdp->command) { >+ case XDP_SETUP_PROG: >+ return nets

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sun, Jun 30, 2019 at 07:32:14PM +0300, Ilias Apalodimas wrote: On Sun, Jun 30, 2019 at 07:25:53PM +0300, Ivan Khoronzhuk wrote: On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote: >The interface only supports 1 Tx queue so locking is introduced on >the Tx queue if XDP is enabled

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ilias Apalodimas
Hi Ivan, > > [...] > > >+ > >+static int netsec_xdp(struct net_device *ndev, struct netdev_bpf *xdp) > >+{ > >+struct netsec_priv *priv = netdev_priv(ndev); > >+ > >+switch (xdp->command) { > >+case XDP_SETUP_PROG: > >+return netsec_xdp_setup(priv, xdp->prog, xdp->extack);

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ilias Apalodimas
On Sun, Jun 30, 2019 at 07:25:53PM +0300, Ivan Khoronzhuk wrote: > On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote: > >The interface only supports 1 Tx queue so locking is introduced on > >the Tx queue if XDP is enabled to make sure .ndo_start_xmit and > >.ndo_xdp_xmit won't corrup

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote: The interface only supports 1 Tx queue 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 - Performance (SMMU off) Benchmark XDP_SKB XDP_DRV xdp1

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-30 Thread Ivan Khoronzhuk
On Sat, Jun 29, 2019 at 08:23:25AM +0300, Ilias Apalodimas wrote: [...] + +static int netsec_xdp(struct net_device *ndev, struct netdev_bpf *xdp) +{ + struct netsec_priv *priv = netdev_priv(ndev); + + switch (xdp->command) { + case XDP_SETUP_PROG: + return netsec

Re: [net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-29 Thread Jesper Dangaard Brouer
On Sat, 29 Jun 2019 08:23:25 +0300 Ilias Apalodimas wrote: > The interface only supports 1 Tx queue 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 > > - Performance (SMMU off) > > Benchmark XDP_SKB XDP_DR

[net-next, PATCH 3/3, v2] net: netsec: add XDP support

2019-06-28 Thread Ilias Apalodimas
The interface only supports 1 Tx queue 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 - Performance (SMMU off) Benchmark XDP_SKB XDP_DRV xdp1291kpps 344kpps rxdrop 282kpps 342kpps - Perfor