On Sat, May 5, 2018 at 2:34 AM, Alexei Starovoitov
<alexei.starovoi...@gmail.com> wrote:
> On Fri, May 04, 2018 at 01:22:17PM +0200, Magnus Karlsson wrote:
>> On Fri, May 4, 2018 at 1:38 AM, Alexei Starovoitov
>> <alexei.starovoi...@gmail.com> wrote:
>> > On F
On Fri, May 4, 2018 at 1:38 AM, Alexei Starovoitov
wrote:
> On Fri, May 04, 2018 at 12:49:09AM +0200, Daniel Borkmann wrote:
>> On 05/02/2018 01:01 PM, Björn Töpel wrote:
>> > From: Björn Töpel
>> >
>> > This patch set introduces a new address
On Wed, May 16, 2018 at 4:28 PM, Jesper Dangaard Brouer
<bro...@redhat.com> wrote:
> On Tue, 15 May 2018 21:06:15 +0200
> Björn Töpel <bjorn.to...@gmail.com> wrote:
>
>> From: Magnus Karlsson <magnus.karls...@intel.com>
>>
>> Here, the zero-copy nd
On Wed, May 16, 2018 at 4:38 PM, Magnus Karlsson
<magnus.karls...@gmail.com> wrote:
> On Wed, May 16, 2018 at 4:28 PM, Jesper Dangaard Brouer
> <bro...@redhat.com> wrote:
>> On Tue, 15 May 2018 21:06:15 +0200
>> Björn Töpel <bjorn.to...@gmail.com> wrote:
>&g
message to user space being lost.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson
Reported-by: Pavel Odintsov
---
net/xdp/xsk_queue.h | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h
index ef
in this case has been changed from EAGAIN to EBUSY
in order to tell user space that the sending of the packet failed
and the buffer has been return to user space through the completion
queue.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson
Reported-by: Pave
/Magnus
Magnus Karlsson (4):
xsk: fix potential lost completion message in SKB path
xsk: frame could be completed more than once in SKB path
samples/bpf: deal with EBUSY return code from sendmsg in xdpsock
sample
xsk: fix potential race in SKB TX completion code
include/net/xdp_sock.h
Signed-off-by: Magnus Karlsson
---
include/net/xdp_sock.h | 4
net/xdp/xsk.c | 4
2 files changed, 8 insertions(+)
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index 9fe472f2ac95..7161856bcf9c 100644
--- a/include/net/xdp_sock.h
+++ b/include/net/xdp_sock.h
@@ -6
Sendmsg in the SKB path of AF_XDP can now return EBUSY when a packet
was discarded and completed by the driver. Just ignore this message
in the sample application.
Fixes: b4b8faa1ded7 ("samples/bpf: sample application and documentation for
AF_XDP sockets")
Signed-off-by: Magnu
and as a bonus gets rid of one internal header file.
The i40e driver is also adapted to the new interface in this commit.
Signed-off-by: Magnus Karlsson
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++--
include/net/xdp_sock.h | 8 ++--
net/xdp/xdp_umem.c
With certain gcc versions, it was possible to get the warning
"'tx_desc' may be used uninitialized in this function" for the
i40e_xmit_zc. This was not possible, however this commit simplifies
the code path so that this warning is no longer emitted.
Signed-off-by: Magnus Karlsson
--
the i40e driver to this
new interface.
I based this patch set on bpf-next commit 9c4f39811db8 ("samples/bpf:
xdpsock, minor fixes")
Thanks: Magnus
Magnus Karlsson (2):
i40e: fix possible compiler warning in xsk TX path
xsk: i40e: get rid of useless struct xdp_umem_props
d
t;xsk: support for Tx")
Signed-off-by: Magnus Karlsson
---
net/xdp/xsk.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 9c784307f7b0..72335c2e8108 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -233,15 +233,10 @@ static int xsk_ge
t;)
Signed-off-by: Magnus Karlsson
---
net/xdp/xsk.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 87567232d0f8..9c784307f7b0 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -218,9 +218,6 @@ static int xsk_generic_xmit(struct sock *
the two modes.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson
---
net/xdp/xsk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 7d220cbd09b6..08d09115093e 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
performance
implications for zero-copy mode as we will touch one more cache line
with dev->mtu.
Thanks: Magnus
Magnus Karlsson (4):
xsk: do not return ENXIO from TX copy mode
xsk: do not return EAGAIN from sendmsg when completion queue is full
xsk: always return ENOBUFS from send
no amount of calling sendmsg will solve
the problem. Only consuming one or more messages on the completion
queue will fix this.
With this patch, the error reporting becomes consistent between copy
mode and zero-copy mode.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnu
On Tue, Apr 24, 2018 at 6:57 PM, Willem de Bruijn
<willemdebruijn.ker...@gmail.com> wrote:
> On Mon, Apr 23, 2018 at 9:56 AM, Björn Töpel <bjorn.to...@gmail.com> wrote:
>> From: Magnus Karlsson <magnus.karls...@intel.com>
>>
>> Here, Tx support is added.
On Tue, Apr 24, 2018 at 6:58 PM, Willem de Bruijn
<willemdebruijn.ker...@gmail.com> wrote:
> On Mon, Apr 23, 2018 at 9:56 AM, Björn Töpel <bjorn.to...@gmail.com> wrote:
>> From: Magnus Karlsson <magnus.karls...@intel.com>
>>
>> In this commit, a
s
> Thanks
>
>
>>
>> * Daniel Borkmann's suggestion for a "copy to XDP socket, and return
>>XDP_PASS" for a tcpdump-like functionality.
>>
>> * And of course getting to zero-copy support in small increments.
>>
>> Thanks: Björn and
On Tue, Apr 24, 2018 at 1:59 AM, Willem de Bruijn
<willemdebruijn.ker...@gmail.com> wrote:
> On Mon, Apr 23, 2018 at 7:21 PM, Michael S. Tsirkin <m...@redhat.com> wrote:
>> On Mon, Apr 23, 2018 at 03:56:07PM +0200, Björn Töpel wrote:
>>> From: Magnus Karls
On Tue, Apr 24, 2018 at 11:10 AM, Jason Wang <jasow...@redhat.com> wrote:
>
>
> On 2018年04月24日 16:44, Magnus Karlsson wrote:
>>>>
>>>> We have run some benchmarks on a dual socket system with two Broadwell
>>>> E5 2660 @ 2.0 GHz with hyperthread
On Tue, Apr 24, 2018 at 1:31 AM, Michael S. Tsirkin <m...@redhat.com> wrote:
> On Mon, Apr 23, 2018 at 03:56:19PM +0200, Björn Töpel wrote:
>> From: Magnus Karlsson <magnus.karls...@intel.com>
>>
>> This is a sample application for AF_XDP sockets. The application
Changes from v1:
* Added explanation of race in commit message of patch 4.
/Magnus
Magnus Karlsson (4):
xsk: fix potential lost completion message in SKB path
xsk: frame could be completed more than once in SKB path
samples/bpf: deal with EBUSY return code from sendmsg in xdpsock
sample
Sendmsg in the SKB path of AF_XDP can now return EBUSY when a packet
was discarded and completed by the driver. Just ignore this message
in the sample application.
Fixes: b4b8faa1ded7 ("samples/bpf: sample application and documentation for
AF_XDP sockets")
Signed-off-by: Magnu
t;xsk: support for Tx")
Signed-off-by: Magnus Karlsson
---
include/net/xdp_sock.h | 4
net/xdp/xsk.c | 4
2 files changed, 8 insertions(+)
diff --git a/include/net/xdp_sock.h b/include/net/xdp_sock.h
index 9fe472f2ac95..7161856bcf9c 100644
--- a/include/net/xdp_sock.h
+++ b/i
message to user space being lost.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson
Reported-by: Pavel Odintsov
---
net/xdp/xsk_queue.h | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h
index ef
in this case has been changed from EAGAIN to EBUSY
in order to tell user space that the sending of the packet failed
and the buffer has been return to user space through the completion
queue.
Fixes: 35fcde7f8deb ("xsk: support for Tx")
Signed-off-by: Magnus Karlsson
Reported-by: Pave
On Wed, Jun 27, 2018 at 5:57 PM Eric Dumazet wrote:
>
>
>
> On 06/27/2018 07:02 AM, Magnus Karlsson wrote:
> > There was a potential race in the TX completion code for
> > the SKB case when the TX napi thread and the error path
> > of the sendmsg code coul
On Mon, Oct 1, 2018 at 10:34 PM Jakub Kicinski
wrote:
>
> On Mon, 1 Oct 2018 14:51:32 +0200, Magnus Karlsson wrote:
> > Jakub, please take a look at your patches. The last one I had to
> > change slightly to make it fit with the new interface
> > xdp_get_umem_fr
been bound to a queue id and can
act appropriately at bind time.
Signed-off-by: Magnus Karlsson
---
net/xdp/xdp_umem.c | 90 ++
net/xdp/xdp_umem.h | 2 +-
net/xdp/xsk.c | 7 -
3 files changed, 64 insertions(+), 35 deletions(-)
diff
From: Jakub Kicinski
ethtool_set_channels() validates the config against driver's max
settings. It retrieves the current config and stores it in a
variable called max. This was okay when only max settings were
accessed but we will soon want to access current settings as
well, so calling the
As we now do not allow ethtool to deactivate the queue id we are
running an AF_XDP socket on, we can simplify the implementation of
xdp_clear_umem_at_qid().
Signed-off-by: Magnus Karlsson
---
net/xdp/xdp_umem.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/xdp
From: Jakub Kicinski
We already check the RSS indirection table does not use queues which
would be disabled by channel reconfiguration. Make sure user does not
try to disable queues which have a UMEM and zero-copy AF_XDP socket
installed.
Signed-off-by: Jakub Kicinski
Reviewed-by: Quentin
nus
Jakub Kicinski (2):
ethtool: rename local variable max -> curr
ethtool: don't allow disabling queues with umem installed
Magnus Karlsson (3):
net: add umem reference in netdev{_rx}_queue
xsk: fix bug when trying to use both copy and zero-copy on one queue
id
These references to the umem will be used to store information
on what kind of AF_XDP umem that is bound to a queue id, if any.
Signed-off-by: Magnus Karlsson
---
include/linux/netdevice.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux
;)
Thanks: Magnus
Magnus Karlsson (3):
i40e: fix possible compiler warning in xsk TX path
xsk: get rid of useless struct xdp_umem_props
i40e: adapt driver to new xdp_umem structure
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 10 --
include/net/xdp_sock.h | 8 ++-
and as a bonus gets rid of one internal header file.
Signed-off-by: Magnus Karlsson
---
include/net/xdp_sock.h | 8 ++--
net/xdp/xdp_umem.c | 4 ++--
net/xdp/xdp_umem_props.h | 14 --
net/xdp/xsk.c| 10 ++
net/xdp/xsk_queue.c | 5 +++--
net/xdp
With certain gcc versions, it was possible to get the warning
"'tx_desc' may be used uninitialized in this function" for the
i40e_xmit_zc. This was not possible, however this commit simplifies
the code path so that this warning is no longer emitted.
Signed-off-by: Magnus Karlsson
--
The struct xdp_umem_props was removed in the xsk code and this commit
adapts the i40e af_xdp zero-copy driver code to the new xdp_umem
structure.
Signed-off-by: Magnus Karlsson
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
On Thu, Sep 20, 2018 at 4:41 PM Jakub Kicinski
wrote:
>
> On Thu, 20 Sep 2018 11:17:17 +0200, Magnus Karlsson wrote:
> > On Wed, Sep 19, 2018 at 9:18 AM Magnus Karlsson wrote:
> > > On Wed, Sep 19, 2018 at 3:58 AM Jakub Kicinski wrote:
> > > >
> > > &g
On Wed, Sep 19, 2018 at 9:18 AM Magnus Karlsson
wrote:
>
> On Wed, Sep 19, 2018 at 3:58 AM Jakub Kicinski
> wrote:
> >
> > On Tue, 18 Sep 2018 10:22:11 -0700, Y Song wrote:
> > > > +/* The umem is stored both in the _rx struct and the _tx struct as we
These references to the umem will be used to store information
on what kind of AF_XDP umem that is bound to a queue id, if any.
Signed-off-by: Magnus Karlsson
---
include/linux/netdevice.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux
.
I based this patch set on bpf-next commit 70e88c758a6b
("selftests/bpf: fix bpf_flow.c build")
Thanks: Magnus
Magnus Karlsson (2):
net: add umem reference in netdev{_rx}_queue
xsk: fix bug when trying to use both copy and zero-copy on one queue
id
include/linux/netdev
been bound to a queue id and can
act appropriately at bind time.
Signed-off-by: Magnus Karlsson
---
net/xdp/xdp_umem.c | 87 +++---
net/xdp/xdp_umem.h | 2 +-
2 files changed, 71 insertions(+), 18 deletions(-)
diff --git a/net/xdp/xdp_umem.c b/net
On Wed, Sep 19, 2018 at 3:58 AM Jakub Kicinski
wrote:
>
> On Tue, 18 Sep 2018 10:22:11 -0700, Y Song wrote:
> > > +/* The umem is stored both in the _rx struct and the _tx struct as we do
> > > + * not know if the device has more tx queues than rx, or the opposite.
> > > + * This might also
On Tue, Sep 18, 2018 at 7:23 PM Y Song wrote:
>
> On Tue, Sep 18, 2018 at 3:13 AM Magnus Karlsson
> wrote:
> >
> > Previously, the xsk code did not record which umem was bound to a
> > specific queue id. This was not required if all drivers were zero-copy
> > e
47 matches
Mail list logo