[PATCH bpf-next] libbpf: add xsk_umem__adjust_offset

2019-09-12 Thread Kevin Laatz
only in xsk.c. We therefore add an extra API to return the flags field to the user from the structure, and have the inline function use this flags field directly. Signed-off-by: Kevin Laatz --- tools/lib/bpf/libbpf.map | 1 + tools/lib/bpf/xsk.c | 5 + tools/lib/bpf/xsk.h

[PATCH bpf-next] ixgbe: fix xdp handle calculations

2019-09-05 Thread Kevin Laatz
oom isvnon-zero. This patch fixes this and uses xsk_umem_adjust_offset to add it appropritely based on the mode being run. Fixes: d8c3061e5edd ("ixgbe: modify driver for handling offsets") Reported-by: Bjorn Topel Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_

[PATCH bpf-next] i40e: fix xdp handle calculations

2019-09-05 Thread Kevin Laatz
non-zero. This patch fixes this and uses xsk_umem_adjust_offset to add it appropritely based on the mode being run. Fixes: 2f86c806a8a8 ("i40e: modify driver for handling offsets") Reported-by: Bjorn Topel Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 7 +

[PATCH bpf-next v6 06/12] mlx5e: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v6 05/12] ixgbe: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v6 07/12] net/mlx5e: Allow XSK frames smaller than a page

2019-08-27 Thread Kevin Laatz
From: Maxim Mikityanskiy Relax the requirements to the XSK frame size to allow it to be smaller than a page and even not a power of two. The current implementation can work in this mode, both with Striding RQ and without it. The code that checks `mtu + headroom <= XSK frame size` is modified acc

[PATCH bpf-next v6 08/12] libbpf: add flags to umem config

2019-08-27 Thread Kevin Laatz
Since we change the size of the xsk_umem_config struct, we need to version the ABI. This patch includes the ABI versioning for xsk_umem__create. The Makefile was also updated to handle multiple function versions in check-abi. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - R

[PATCH bpf-next v6 01/12] i40e: simplify Rx buffer recycle

2019-08-27 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH bpf-next v6 04/12] i40e: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v6 00/12] XDP unaligned chunk placement support

2019-08-27 Thread Kevin Laatz
This patch set adds the ability to use unaligned chunks in the XDP umem. Currently, all chunk addresses passed to the umem are masked to be chunk size aligned (max is PAGE_SIZE). This limits where we can place chunks within the umem as well as limiting the packet sizes that are supported. The cha

[PATCH bpf-next v6 02/12] ixgbe: simplify Rx buffer recycle

2019-08-27 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v6 03/12] xsk: add support to allow unaligned chunk placement

2019-08-27 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v6 10/12] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-08-27 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling v5:

[PATCH bpf-next v6 09/12] samples/bpf: add unaligned chunks mode support to xdpsock

2019-08-27 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v6 12/12] doc/af_xdp: include unaligned chunk case

2019-08-27 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v6 11/12] samples/bpf: use hugepages in xdpsock app

2019-08-27 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index dc3d50f8ed86..102eace22956 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v5 10/11] samples/bpf: use hugepages in xdpsock app

2019-08-22 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index dc3d50f8ed86..102eace22956 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v5 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-08-22 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v5 06/11] mlx5e: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
. An additional patch that enables the unaligned chunks feature (makes mlx5e accept arbitrary frame sizes) will be added later and will apply on top of this patch. Signed-off-by: Kevin Laatz --- v3: - Use new helper function to handle offset v4: - fixed headroom addition to handle. Using

[PATCH bpf-next v5 07/11] libbpf: add flags to umem config

2019-08-22 Thread Kevin Laatz
Since we change the size of the xsk_umem_config struct, we need to version the ABI. This patch includes the ABI versioning for xsk_umem__create. The Makefile was also updated to handle multiple function versions in check-abi. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - R

[PATCH bpf-next v5 05/11] ixgbe: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v5 11/11] doc/af_xdp: include unaligned chunk case

2019-08-22 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v5 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-08-22 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling v5:

[PATCH bpf-next v5 04/11] i40e: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v5 02/11] ixgbe: simplify Rx buffer recycle

2019-08-22 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v5 03/11] xsk: add support to allow unaligned chunk placement

2019-08-22 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v5 01/11] i40e: simplify Rx buffer recycle

2019-08-22 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH bpf-next v5 00/11] XDP unaligned chunk placement support

2019-08-22 Thread Kevin Laatz
bpf-af-xdp-wakeup' which was merged recently. - Fixed typo in mlx driver patch. - Moved libbpf patch to later in the set (7/11, just before the sample app changes) Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle xsk: add support to allow unalign

[PATCH bpf-next v4 11/11] doc/af_xdp: include unaligned chunk case

2019-07-30 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v4 10/11] samples/bpf: use hugepages in xdpsock app

2019-07-30 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 62b2059cd0e3..d1c61ec0e697 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v4 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-07-30 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling --- s

[PATCH bpf-next v4 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-07-30 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v4 03/11] libbpf: add flags to umem config

2019-07-30 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - Removed the headroom check from this patch. It has moved to the previous patch. v4: - modified chunk flag define --- tools/include/uapi/linux/if_xdp.h | 9 +++-- tools/lib/bpf/xsk.c | 3 +++ tools/lib

[PATCH bpf-next v4 02/11] ixgbe: simplify Rx buffer recycle

2019-07-30 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v4 00/11] XDP unaligned chunk placement support

2019-07-30 Thread Kevin Laatz
minor changes based on review comments Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle libbpf: add flags to umem config xsk: add support to allow unaligned chunk placement i40e: modify driver for handling offsets ixgbe: modify driver for handling offs

[PATCH bpf-next v4 07/11] mlx5e: modify driver for handling offsets

2019-07-30 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v4 06/11] ixgbe: modify driver for handling offsets

2019-07-30 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v4 05/11] i40e: modify driver for handling offsets

2019-07-30 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v4 04/11] xsk: add support to allow unaligned chunk placement

2019-07-30 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v4 01/11] i40e: simplify Rx buffer recycle

2019-07-30 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH bpf-next v3 04/11] i40e: modify driver for handling offsets

2019-07-24 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v3 10/11] samples/bpf: use hugepages in xdpsock app

2019-07-24 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index f824fa3b5021..d5cf3111d3b0 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v3 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-07-24 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling --- s

[PATCH bpf-next v3 11/11] doc/af_xdp: include unaligned chunk case

2019-07-24 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v3 00/11] XDP unaligned chunk placement support

2019-07-24 Thread Kevin Laatz
fset handling to new helper function - changed value used for the umem chunk_mask. Now using the new descriptor format to save us doing the calculations in a number of places meaning more of the code is left unchanged while adding unaligned chunk support. Kevin Laatz (11): i40e: simpli

[PATCH bpf-next v3 03/11] xsk: add support to allow unaligned chunk placement

2019-07-24 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v3 05/11] ixgbe: modify driver for handling offsets

2019-07-24 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v3 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-07-24 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- samples/bpf/xdpsock_user.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 93eaaf7239b2..26ba1a1fd582 100644 --- a/samples/bpf/xdpsock_

[PATCH bpf-next v3 07/11] libbpf: add flags to umem config

2019-07-24 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - Removed the headroom check from this patch. It has moved to the previous patch. --- tools/include/uapi/linux/if_xdp.h | 4 tools/lib/bpf/xsk.c | 3 +++ tools/lib/bpf/xsk.h | 2 ++ 3 files

[PATCH bpf-next v3 02/11] ixgbe: simplify Rx buffer recycle

2019-07-24 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v3 06/11] mlx5e: modify driver for handling offsets

2019-07-24 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v3 01/11] i40e: simplify Rx buffer recycle

2019-07-24 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH v2 06/10] libbpf: add flags to umem config

2019-07-16 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - Removed the headroom check from this patch. It has moved to the previous patch. --- tools/include/uapi/linux/if_xdp.h | 4 tools/lib/bpf/xsk.c | 3 +++ tools/lib/bpf/xsk.h | 2 ++ 3 files

[PATCH v2 07/10] samples/bpf: add unaligned chunks mode support to xdpsock

2019-07-16 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- samples/bpf/xdpsock_user.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 93eaaf7239b2..26ba1a1fd582 100644 --- a/samples/bpf/xdpsock_

[PATCH v2 05/10] ixgbe: modify driver for handling offsets

2019-07-16 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe

[PATCH v2 08/10] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-07-16 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling --- s

[PATCH v2 10/10] doc/af_xdp: include unaligned chunk case

2019-07-16 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH v2 09/10] samples/bpf: use hugepages in xdpsock app

2019-07-16 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 8f220afd549a..958a27193582 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH v2 03/10] xsk: add support to allow unaligned chunk placement

2019-07-16 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH v2 04/10] i40e: modify driver for handling offsets

2019-07-16 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH v2 01/10] i40e: simplify Rx buffer recycle

2019-07-16 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH v2 02/10] ixgbe: simplify Rx buffer recycle

2019-07-16 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH v2 00/10] XDP unaligned chunk placement support

2019-07-16 Thread Kevin Laatz
- modified descriptor format to make it easier to retrieve original address - removed patch adding off_t off to the zero copy allocator. This is no longer needed with the new descriptor format. Kevin Laatz (10): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle xsk: add

[PATCH 00/11] XDP unaligned chunk placement support

2019-06-20 Thread Kevin Laatz
gned chunk mode. Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle xdp: add offset param to zero_copy_allocator i40e: add offset to zca_free ixgbe: add offset to zca_free xsk: add support to allow unaligned chunk placement libbpf: add flags to umem c

[PATCH 11/11] doc/af_xdp: include unaligned chunk case

2019-06-20 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-06-20 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- samples/bpf/xdpsock_user.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index d08ee1ab7bb4..e26f43382d01 100644 --- a/samples/bpf/

[PATCH 01/11] i40e: simplify Rx buffer recycle

2019-06-20 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH 07/11] libbpf: add flags to umem config

2019-06-20 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- tools/include/uapi/linux/if_xdp.h | 4 tools/lib/bpf/xsk.c | 7 +++ tools/lib/bpf/xsk.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/

[PATCH 03/11] xdp: add offset param to zero_copy_allocator

2019-06-20 Thread Kevin Laatz
n the aligned case. Signed-off-by: Kevin Laatz --- include/net/xdp.h | 3 ++- net/core/xdp.c| 11 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index 0f25b3675c5c..ea801fd2bf98 100644 --- a/include/net/xdp.h +++ b/include/net/

[PATCH 02/11] ixgbe: simplify Rx buffer recycle

2019-06-20 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH 10/11] samples/bpf: use hugepages in xdpsock app

2019-06-20 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 7b4ce047deb2..8ed63ad68428 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH 06/11] xsk: add support to allow unaligned chunk placement

2019-06-20 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- include/net/xdp_sock.h | 2 ++ include/uapi/linux/if_xdp.h | 4 +++ net/xdp/xdp_umem.c | 17 +++ net/xdp/xsk.c | 60

[PATCH 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-06-20 Thread Kevin Laatz
size, use the --buf-size=n argument. NOTE: For xdpsock to work in aligned chunk mode, you still need to pass 'power of 2' buffer size. Signed-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 71 +++--- 1 file changed, 51 insertions(+), 20 deletions(-

[PATCH 04/11] i40e: add offset to zca_free

2019-06-20 Thread Kevin Laatz
This patch adds the offset param to for zero_copy_allocator to i40e_zca_free. This change is required to calculate the handle, otherwise, this function will not work in unaligned chunk mode since we can't easily mask back to the original handle in unaligned chunk mode. Signed-off-by: Kevin

[PATCH 05/11] ixgbe: add offset to zca_free

2019-06-20 Thread Kevin Laatz
This patch adds the offset param to for zero_copy_allocator to ixgbe_zca_free. This change is required to calculate the handle, otherwise, this function will not work in unaligned chunk mode since we can't easily mask back to the original handle in unaligned chunk mode. Signed-off-by: Kevin

[PATCH 04/11] i40e: add offset to zca_free

2019-06-20 Thread Kevin Laatz
This patch adds the offset param to for zero_copy_allocator to i40e_zca_free. This change is required to calculate the handle, otherwise, this function will not work in unaligned chunk mode since we can't easily mask back to the original handle in unaligned chunk mode. Signed-off-by: Kevin

[PATCH 03/11] xdp: add offset param to zero_copy_allocator

2019-06-20 Thread Kevin Laatz
n the aligned case. Signed-off-by: Kevin Laatz --- include/net/xdp.h | 3 ++- net/core/xdp.c| 11 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/net/xdp.h b/include/net/xdp.h index 0f25b3675c5c..ea801fd2bf98 100644 --- a/include/net/xdp.h +++ b/include/net/

[PATCH 07/11] libbpf: add flags to umem config

2019-06-20 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- tools/include/uapi/linux/if_xdp.h | 4 tools/lib/bpf/xsk.c | 7 +++ tools/lib/bpf/xsk.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/

[PATCH 02/11] ixgbe: simplify Rx buffer recycle

2019-06-20 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-06-20 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- samples/bpf/xdpsock_user.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index d08ee1ab7bb4..e26f43382d01 100644 --- a/samples/bpf/

[PATCH 10/11] samples/bpf: use hugepages in xdpsock app

2019-06-20 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 7b4ce047deb2..8ed63ad68428 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH 11/11] doc/af_xdp: include unaligned chunk case

2019-06-20 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-06-20 Thread Kevin Laatz
size, use the --buf-size=n argument. NOTE: For xdpsock to work in aligned chunk mode, you still need to pass 'power of 2' buffer size. Signed-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 71 +++--- 1 file changed, 51 insertions(+), 20 deletions(-

[PATCH 06/11] xsk: add support to allow unaligned chunk placement

2019-06-20 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- include/net/xdp_sock.h | 2 ++ include/uapi/linux/if_xdp.h | 4 +++ net/xdp/xdp_umem.c | 17 +++ net/xdp/xsk.c | 60

[PATCH 05/11] ixgbe: add offset to zca_free

2019-06-20 Thread Kevin Laatz
This patch adds the offset param to for zero_copy_allocator to ixgbe_zca_free. This change is required to calculate the handle, otherwise, this function will not work in unaligned chunk mode since we can't easily mask back to the original handle in unaligned chunk mode. Signed-off-by: Kevin

[PATCH 01/11] i40e: simplify Rx buffer recycle

2019-06-20 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH 00/11] XDP unaligned chunk placement support

2019-06-20 Thread Kevin Laatz
gned chunk mode. Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle xdp: add offset param to zero_copy_allocator i40e: add offset to zca_free ixgbe: add offset to zca_free xsk: add support to allow unaligned chunk placement libbpf: add flags to umem c