le: remove target for native build"
- added fix:
"samples: bpf: makefile: fix cookie_uid_helper_example obj build"
- limited -D option filter only for arm
- improved comments
- added couple instructions to verify cross compilation for arm and
arm64 arches based on TI am57xx
On Mon, Sep 16, 2019 at 01:13:23PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 3:59 AM Ivan Khoronzhuk
wrote:
echo should be replaced with echo -e to handle '\n' correctly, but
instead, replace it with printf as some systems can't handle echo -e.
Signed-off-by:
On Mon, Sep 16, 2019 at 01:35:21PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 4:01 AM Ivan Khoronzhuk
wrote:
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
With GCC
On Mon, Sep 16, 2019 at 01:44:23PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 3:59 AM Ivan Khoronzhuk
wrote:
For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction
set selector and is absolutely required while parsing some parts of
headers. It's present in KBUILD_C
On Tue, Sep 17, 2019 at 04:19:40PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 3:58 AM Ivan Khoronzhuk
wrote:
The makefile.target is added only and will be used in
typo: Makefile
sample/bpf/Makefile later in order to switch cross-compiling on CC
on -> to
from HOS
On Tue, Sep 17, 2019 at 04:28:01PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 3:58 AM Ivan Khoronzhuk
wrote:
Please don't prepend "samples: bpf: makefile:" to patches,
"samples/bpf: " is a typical we've used for BPF samples changes.
Ok.
The mai
On Tue, Sep 17, 2019 at 04:42:07PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 3:59 AM Ivan Khoronzhuk
wrote:
While compile natively, the hosts cflags and ldflags are equal to ones
used from HOSTCFLAGS and HOSTLDFLAGS. When cross compiling it should
have own, used for target arch
On Tue, Sep 17, 2019 at 10:19:22PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 4:00 AM Ivan Khoronzhuk
wrote:
In case of LDFLAGS and EXTRA_CC/CXX flags there is no way to pass them
correctly to build command, for instance when --sysroot is used or
external libraries are used, like
On Tue, Sep 17, 2019 at 10:23:57PM -0700, Andrii Nakryiko wrote:
On Mon, Sep 16, 2019 at 4:00 AM Ivan Khoronzhuk
wrote:
Basically it only enables that was added by previous couple fixes.
Sysroot contains correct libs installed and its headers ofc. Useful
Please, let's not use unnece
.
Signed-off-by: Ivan Khoronzhuk
---
tools/testing/selftests/bpf/cgroup_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c
b/tools/testing/selftests/bpf/cgroup_helpers.c
index e95c33e333a4..4d74f3c4619b 100644
--- a/tools
This micro series fixes annoying warn described in patches
while samples/bpf build. Second patch fixes new warn that
comes after fixing warn of first patch, that was masked.
Ivan Khoronzhuk (2):
selftests/bpf: add static to enable_all_controllers()
selftests/bpf: correct path to include msg
th);
"
In order to avoid warns, lets decrease buf size for cgroup workdir on
24 bytes with assumption to include also "/cgroup.subtree_control" to
the address. The cut will never happen anyway.
Signed-off-by: Ivan Khoronzhuk
---
tools/testing/selftests/bpf/cgroup_helpers.c | 2
elper_example obj build"
- limited -D option filter only for arm
- improved comments
- added couple instructions to verify cross compilation for arm and
arm64 arches based on TI am57xx and am65xx sdks.
- corrected include a little order
Ivan Khoronzhuk (15):
samples/bpf: fix HDR_PROBE &qu
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/samples
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file chang
inter
-Wmissing-prototypes
-Wstrict-prototypes
So, add them as they were verified and used before adding
Makefile.target and lets omit "-fomit-frame-pointer" as were
proposed while review, as no sense in such optimization for samples.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 6
No need in hacking HOSTCC to be cross-compiler any more, so drop
this trick and use target CC for HDR_PROBE.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples
clean
configure and install headers:
make ARCH=arm defconfig
make ARCH=arm headers_install
build samples/bpf:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \
SYSROOT="path/to/sysroot"
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 +++
In case of C/LDFLAGS there is no way to pass them correctly to build
command, for instance when --sysroot is used or external libraries
are used, like -lelf, wich can be absent in toolchain. This can be
used for samples/bpf cross-compiling allowing to get elf lib from
sysroot.
Signed-off-by: Ivan
In order to build lib using C/LD flags of target arch, provide them
to libbpf make.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index a6c33496e8ca..6b161326ac67 100644
Add couple preparation steps: clean and configuration. Also add newly
added sysroot support info to cross-compile section.
---
samples/bpf/README.rst | 41 -
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/samples/bpf/README.rst b/samples/bpf/
lso remove spaces at
start of the lines to keep same style and avoid warns while apply.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/Makefile | 18 +-
.../lib/bpf/{test_libbpf.cpp => test_libbpf.c} | 14 --
2 files changed, 13 insertions(+),
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is
included for all objects anyway, with above line:
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion
pf cross compilation.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile.target | 75 +
1 file changed, 75 insertions(+)
create mode 100644 samples/bpf/Makefile.target
diff --git a/samples/bpf/Makefile.target b/samples/bpf/Makefile.target
new fi
compilation (CC) with host build (HOSTCC),
lets base samples on Makefile.target. It allows to cross-compile
samples/bpf programs with CC while auxialry tools running on host
built with HOSTCC.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 135 ++-
1
For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction
set selector and is absolutely required while parsing some parts of
headers. It's present in KBUILD_CFLAGS but not in autoconf.h, so let's
retrieve it from and add to programs cflags. In another case errors
like "SMP is not supporte
;t be in 'always'.
Let us remove `always += cookie_uid_helper_example.o`, which avoids
breaking cross compilation due to mismatched includes.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/
echo should be replaced with echo -e to handle '\n' correctly, but
instead, replace it with printf as some systems can't handle echo -e.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefil
On Wed, Sep 18, 2019 at 02:29:53PM -0700, Andrii Nakryiko wrote:
On Wed, Sep 18, 2019 at 3:35 AM Ivan Khoronzhuk
wrote:
On Tue, Sep 17, 2019 at 04:42:07PM -0700, Andrii Nakryiko wrote:
>On Mon, Sep 16, 2019 at 3:59 AM Ivan Khoronzhuk
> wrote:
>>
>> While compile natively, th
ffset][opts][,end[.offset][opts]] [-t CHAR] [FILE]...
Lets modify command a little to avoid -V option.
Fixes: dadb81d0afe732 ("libbpf: make libbpf.map source of truth for libbpf
version")
Signed-off-by: Ivan Khoronzhuk
---
Based on bpf/master
tools/lib/bpf/Makefile | 2 +-
1 file chang
On Thu, Sep 19, 2019 at 07:05:18PM +0300, Ivan Khoronzhuk wrote:
It's very often for embedded to have stripped version of sort in
busybox, when no -V option present. It breaks build natively on target
board causing recursive loop.
BusyBox v1.24.1 (2019-04-06 04:09:16 UTC) multi-call b
On Thu, Sep 19, 2019 at 01:02:40PM -0700, Andrii Nakryiko wrote:
On Thu, Sep 19, 2019 at 11:22 AM Ivan Khoronzhuk
wrote:
It's very often for embedded to have stripped version of sort in
busybox, when no -V option present. It breaks build natively on target
board causing recursive
On Fri, Sep 20, 2019 at 09:41:54AM -0700, Andrii Nakryiko wrote:
On Fri, Sep 20, 2019 at 1:22 AM Ivan Khoronzhuk
wrote:
On Thu, Sep 19, 2019 at 01:02:40PM -0700, Andrii Nakryiko wrote:
>On Thu, Sep 19, 2019 at 11:22 AM Ivan Khoronzhuk
> wrote:
>>
>> It's very oft
On Fri, Sep 20, 2019 at 09:34:51PM +0300, Ivan Khoronzhuk wrote:
On Fri, Sep 20, 2019 at 09:41:54AM -0700, Andrii Nakryiko wrote:
On Fri, Sep 20, 2019 at 1:22 AM Ivan Khoronzhuk
wrote:
On Thu, Sep 19, 2019 at 01:02:40PM -0700, Andrii Nakryiko wrote:
On Thu, Sep 19, 2019 at 11:22 AM Ivan
On Fri, Sep 20, 2019 at 10:19:43PM +0300, Ivan Khoronzhuk wrote:
On Fri, Sep 20, 2019 at 09:34:51PM +0300, Ivan Khoronzhuk wrote:
On Fri, Sep 20, 2019 at 09:41:54AM -0700, Andrii Nakryiko wrote:
On Fri, Sep 20, 2019 at 1:22 AM Ivan Khoronzhuk
wrote:
On Thu, Sep 19, 2019 at 01:02:40PM -0700
On Fri, Sep 20, 2019 at 02:51:14PM -0700, Andrii Nakryiko wrote:
On Fri, Sep 20, 2019 at 12:19 PM Ivan Khoronzhuk
wrote:
On Fri, Sep 20, 2019 at 09:34:51PM +0300, Ivan Khoronzhuk wrote:
>On Fri, Sep 20, 2019 at 09:41:54AM -0700, Andrii Nakryiko wrote:
>>On Fri, Sep 20, 2019 at 1:2
echo should be replaced with echo -e to handle '\n' correctly, but
instead, replace it with printf as some systems can't handle echo -e.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Add couple preparation steps: clean and configuration. Also add newly
added sysroot support info to cross-compile section.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/README.rst | 41 -
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/samples
clean
configure and install headers:
make ARCH=arm defconfig
make ARCH=arm headers_install
build samples/bpf:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \
SYSROOT="path/to/sysroot"
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 +++
On Fri, Oct 11, 2019 at 02:00:56AM +0200, Daniel Borkmann wrote:
On Wed, Oct 09, 2019 at 11:41:19PM +0300, Ivan Khoronzhuk wrote:
This series contains mainly fixes/improvements for cross-compilation
but not only, tested for arm, arm64, and intended for any arch.
Also verified on native build
lso remove spaces at
start of the lines to keep same style and avoid warns while apply.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/Makefile | 18 +-
.../lib/bpf/{test_libbpf.cpp => test_libbpf.c} | 14 --
2 file
quot;SMP is not supported" for armv7 and bunch of other errors are
issued resulting to incorrect final object.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8
1 file changed, 8 insertions(+)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index cf882e43648a..9b33e
In order to build lib using C/LD flags of target arch, provide them
to libbpf make.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index a6c33496e8ca..6b161326ac67 100644
;t be in 'always'.
Let us remove `always += cookie_uid_helper_example.o`, which avoids
breaking cross compilation due to mismatched includes.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/
compilation (CC) with host build (HOSTCC),
lets base samples on Makefile.target. It allows to cross-compile
samples/bpf programs with CC while auxialry tools running on host
built with HOSTCC.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 135 ++-
1
inter
-Wmissing-prototypes
-Wstrict-prototypes
So, add them as they were verified and used before adding
Makefile.target and lets omit "-fomit-frame-pointer" as were proposed
while review, as no sense in such optimization for samples.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 6
In case of C/LDFLAGS there is no way to pass them correctly to build
command, for instance when --sysroot is used or external libraries
are used, like -lelf, wich can be absent in toolchain. This can be
used for samples/bpf cross-compiling allowing to get elf lib from
sysroot.
Signed-off-by: Ivan
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is
included for all objects anyway, with above line:
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion
pf cross compilation.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile.target | 75 +
1 file changed, 75 insertions(+)
create mode 100644 samples/bpf/Makefile.target
diff --git a/samples/bpf/Makefile.target b/samples/bpf/Makefile.target
new fi
No need in hacking HOSTCC to be cross-compiler any more, so drop
this trick and use target CC for HDR_PROBE.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples
ed fix:
"samples: bpf: makefile: fix cookie_uid_helper_example obj build"
- limited -D option filter only for arm
- improved comments
- added couple instructions to verify cross compilation for arm and
arm64 arches based on TI am57xx and am65xx sdks.
- corrected include a little order
Ivan K
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file chang
On Fri, Oct 11, 2019 at 11:46:54AM +0300, Sergei Shtylyov wrote:
Hello!
Sorry, didn't comment on v4...
On 11.10.2019 3:27, Ivan Khoronzhuk wrote:
For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction
set selector and is absolutely required while parsing some parts of
he
On Fri, Oct 11, 2019 at 11:49:38AM +0300, Sergei Shtylyov wrote:
More grammar nitpicking...
On 11.10.2019 3:28, Ivan Khoronzhuk wrote:
While compiling natively, the host's cflags and ldflags are equal to
ones used from HOSTCFLAGS and HOSTLDFLAGS. When cross compiling it
should hav
On Fri, Oct 11, 2019 at 02:16:05PM +0300, Sergei Shtylyov wrote:
On 10/11/2019 12:57 PM, Ivan Khoronzhuk wrote:
While compiling natively, the host's cflags and ldflags are equal to
ones used from HOSTCFLAGS and HOSTLDFLAGS. When cross compiling it
should have own, used for target arch.
On Wed, Feb 13, 2019 at 08:49:39PM -0800, Florian Fainelli wrote:
On February 13, 2019 8:17:16 AM PST, Ivan Khoronzhuk
wrote:
On Tue, Jan 22, 2019 at 03:12:41PM +0200, Ivan Khoronzhuk wrote:
On Mon, Jan 21, 2019 at 03:37:41PM -0800, Florian Fainelli wrote:
On 12/4/18 3:42 PM, Ivan
On Mon, Jan 21, 2019 at 03:37:41PM -0800, Florian Fainelli wrote:
On 12/4/18 3:42 PM, Ivan Khoronzhuk wrote:
On Tue, Dec 04, 2018 at 11:49:27AM -0800, Florian Fainelli wrote:
[...]
Ivan, based on the recent submission I copied you on [1], it sounds like
we want to move ahead with your
On Tue, Jan 08, 2019 at 10:21:25AM -0800, Florian Fainelli wrote:
On 1/7/19 9:01 PM, Florian Fainelli wrote:
Le 12/4/18 à 4:04 PM, Ivan Khoronzhuk a écrit :
On Tue, Dec 04, 2018 at 11:49:27AM -0800, Florian Fainelli wrote:
...
I was thinking also about pinned list of vlans to the address
/JSMT0iZ4
Based on net-next/master
Ivan Khoronzhuk (3):
net: ethernet: ti: davinci_cpdma: add dma mapped submit
net: ethernet: ti: davinci_cpdma: return handler status
net: ethernet: ti: cpsw: add XDP support
drivers/net/ethernet/ti/Kconfig | 1 +
drivers/net/ethernet/ti/cpsw.c
infrastructure.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/Kconfig| 1 +
drivers/net/ethernet/ti/cpsw.c | 555 ++---
drivers/net/ethernet/ti/cpsw_ethtool.c | 53 +++
drivers/net/ethernet/ti/cpsw_priv.h| 7 +
4 files changed, 554
This change is needed to return flush status of rx handler for
flushing redirected xdp frames after processing channel packets.
Do it as separate patch for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 23 +++--
drivers/net/ethernet/ti
In case if dma mapped packet needs to be sent, like with XDP
page pool, the "mapped" submit can be used. This patch adds dma
mapped submit based on regular one.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/davinci_cpdma.c | 88 -
drivers/net/e
On Fri, May 24, 2019 at 01:54:18PM +0200, Jesper Dangaard Brouer wrote:
On Thu, 23 May 2019 21:20:35 +0300
Ivan Khoronzhuk wrote:
Add XDP support based on rx page_pool allocator, one frame per page.
Page pool allocator is used with assumption that only one rx_handler
is running simultaneously
On Fri, May 24, 2019 at 02:05:11PM +0300, Ilias Apalodimas wrote:
On Thu, May 23, 2019 at 09:20:35PM +0300, Ivan Khoronzhuk wrote:
Add XDP support based on rx page_pool allocator, one frame per page.
Page pool allocator is used with assumption that only one rx_handler
is running simultaneously
On Fri, May 24, 2019 at 08:49:38PM +0300, grygorii wrote:
Hi Ivan,
On 23/05/2019 21:20, Ivan Khoronzhuk wrote:
Add XDP support based on rx page_pool allocator, one frame per page.
Page pool allocator is used with assumption that only one rx_handler
is running simultaneously. DMA map/unmap is
maximum allowed file size verification.
The offsets can be tuned ofc, but instead of changing existent
interface - extend max allowed file size for sockets.
Signed-off-by: Ivan Khoronzhuk
---
Based on bpf-next/master
v2..v1:
removed not necessarily #ifdev as ULL and UL for 64 has same size
On Tue, Aug 13, 2019 at 10:02:54AM +0200, Magnus Karlsson wrote:
On Mon, Aug 12, 2019 at 2:45 PM Ivan Khoronzhuk
wrote:
The AF_XDP sockets umem mapping interface uses XDP_UMEM_PGOFF_FILL_RING
and XDP_UMEM_PGOFF_COMPLETION_RING offsets. The offsets seems like are
established already and are
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/syscall_nrs.c | 5 +
samples/bpf/tracex5_kern.c | 11 +++
2 files changed, 16 insertions(+)
diff --git a/samples/bpf/syscall_nrs.c b/samples/bpf/syscall_nrs.c
block and should be used rather
for dynamic mm.
Signed-off-by: Ivan Khoronzhuk
---
net/xdp/xdp_umem.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index a0607969f8c0..907c9019fe21 100644
--- a/net/xdp/xdp_umem.c
+++ b
uot;
https://lkml.org/lkml/2019/8/12/549
Based on bpf-next/master
Ivan Khoronzhuk (3):
libbpf: add asm/unistd.h to xsk to get __NR_mmap2
xdp: xdp_umem: replace kmap on vmap for umem map
samples: bpf: syscal_nrs: use mmap2 if defined
net/xdp/xdp_umem.c | 16
s
That's needed to get __NR_mmap2 when mmap2 syscall is used.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/xsk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
index 5007b5d4fd2c..f2fc40f9804c 100644
--- a/tools/lib/bpf/xsk.c
+++ b/tools/li
On Tue, Aug 13, 2019 at 10:42:18AM -0700, Jonathan Lemon wrote:
On 13 Aug 2019, at 3:23, Ivan Khoronzhuk wrote:
For 64-bit there is no reason to use vmap/vunmap, so use page_address
as it was initially. For 32 bits, in some apps, like in samples
xdpsock_user.c when number of pgs in use is
On Tue, Aug 13, 2019 at 10:41:54AM -0700, Jonathan Lemon wrote:
On 13 Aug 2019, at 3:23, Ivan Khoronzhuk wrote:
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined.
Signed-off-by: Ivan Khoronzhuk
Doesn't this change the application API?
--
Jonathan
From w
On Tue, Aug 13, 2019 at 04:38:13PM -0700, Andrii Nakryiko wrote:
Hi, Andrii
On Tue, Aug 13, 2019 at 3:24 AM Ivan Khoronzhuk
wrote:
That's needed to get __NR_mmap2 when mmap2 syscall is used.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/xsk.c | 1 +
1 file changed, 1 inse
On Wed, Aug 14, 2019 at 12:32:41AM +, Yonghong Song wrote:
Hi, Yonghong Song
On 8/13/19 3:23 AM, Ivan Khoronzhuk wrote:
That's needed to get __NR_mmap2 when mmap2 syscall is used.
It seems I did not have this issue on x64 machine e.g., Fedora 29.
My glibc version is 2.28. gcc
On Wed, Aug 14, 2019 at 12:24:05PM +0300, Ivan Khoronzhuk wrote:
On Tue, Aug 13, 2019 at 04:38:13PM -0700, Andrii Nakryiko wrote:
Hi, Andrii
On Tue, Aug 13, 2019 at 3:24 AM Ivan Khoronzhuk
wrote:
That's needed to get __NR_mmap2 when mmap2 syscall is used.
Signed-off-by: Ivan Khoro
On Mon, Aug 12, 2019 at 02:19:24PM -0700, Andrew Morton wrote:
Hi, Andrew
On Mon, 12 Aug 2019 15:43:26 +0300 Ivan Khoronzhuk
wrote:
The AF_XDP sockets umem mapping interface uses XDP_UMEM_PGOFF_FILL_RING
and XDP_UMEM_PGOFF_COMPLETION_RING offsets. The offsets seems like are
established
maximum allowed file size verification.
The offsets can be tuned ofc, but instead of changing existent
interface - extend max allowed file size for sockets. The 64-bit
systems seems like ok with this, so extend threshold only for
32-bits for now.
Signed-off-by: Ivan Khoronzhuk
---
Based on bpf-next
In case off error, all entries should be freed from the sched list
before deleting it. For simplicity use rcu way.
Fixes: 5a781ccbd19e46 ("tc: Add support for configuring the taprio scheduler")
Signed-off-by: Ivan Khoronzhuk
---
Based on net/master
net/sched/sch_taprio.c | 3 +
On Tue, Aug 06, 2019 at 11:41:14AM -0700, David Miller wrote:
From: Ivan Khoronzhuk
Date: Tue, 6 Aug 2019 13:04:25 +0300
Based on net/master
I wonder about that because:
Applies cleanly on net/master, but line num is not correct.
I've sent v2.
--- a/net/sched/sch_taprio.c
+++
In error case, all entries should be freed from the sched list
before deleting it. For simplicity use rcu way.
Fixes: 5a781ccbd19e46 ("tc: Add support for configuring the taprio scheduler")
Acked-by: Vinicius Costa Gomes
Signed-off-by: Ivan Khoronzhuk
---
net/sched/sch_taprio.c | 3 +
Use kmap instead of page_address as it's not always in low memory.
Acked-by: Björn Töpel
Signed-off-by: Ivan Khoronzhuk
---
Based on bpf-next/master
v2..v1:
included highmem.h
v1: https://lkml.org/lkml/2019/6/26/693
net/xdp/xdp_umem.c | 12 +++-
1 file changed, 11 inser
i < cpsw->data.slaves; i++)
+ if (netif_running(cpsw->slaves[i].ndev))
+ cpsw_ndo_open(cpsw->slaves[i].ndev);
+
same here
rtnl_unlock();
return 0;
--
2.17.1
--
Regards,
Ivan Khoronzhuk
Add missed static for local __mem_id_disconnect().
Signed-off-by: Ivan Khoronzhuk
---
net/core/xdp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/xdp.c b/net/core/xdp.c
index b29d7b513a18..829377cc83db 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -85,7
It fixes build error for 32bit coused by type mistmatch
size_t/unsigned long.
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index
prog is common for all channels till appropriate changes are added
in XDP infrastructure. Also, once page_pool recycling becomes part of
skb netstack some simplifications can be added, like removing marked
with comments.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/Kconfig
: ti: cpsw_ethtool: simplify slave loops
Based on net-next/master
Ivan Khoronzhuk (4):
net: core: page_pool: add user cnt preventing pool deletion
net: ethernet: ti: davinci_cpdma: add dma mapped submit
net: ethernet: ti: davinci_cpdma: return handler status
net: ethernet: ti: cpsw: add
In case if dma mapped packet needs to be sent, like with XDP
page pool, the "mapped" submit can be used. This patch adds dma
mapped submit based on regular one.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/davinci_cpdma.c | 89 ++---
drivers/net/e
This change is needed to return flush status of rx handler for
flushing redirected xdp frames after processing channel packets.
Do it as separate patch for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/ti/cpsw.c | 21 ++-
drivers/net/ethernet/ti
kes to use page_pool_free()
explicitly, not fully hidden in xdp unreg, which looks more
correct after page pool "create" routine.
Signed-off-by: Ivan Khoronzhuk
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 +---
include/net/page_pool.h |
It fixes build error for 32bit caused by type mismatch
size_t/unsigned long.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 68f45a96769f..5186b7710430 100644
f7bd26458915..5c7663699efa 100644
--- a/arch/arm/boot/dts/am57xx-idk-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi
@@ -367,7 +367,7 @@
};
&mac {
- status = "okay";
+// status = "okay";
?
--
Regards,
Ivan Khoronzhuk
;
+clean_cpts:
+ cpts_release(cpsw->cpts);
+ cpdma_ctlr_destroy(cpsw->dma);
+clean_dt_ret:
+ cpsw_remove_dt(cpsw);
+ pm_runtime_put_sync(dev);
+ pm_runtime_disable(dev);
+ return ret;
+}
+
+static int cpsw_remove(struct platform_device *pdev)
+{
+ struct net_device *ndev = platform_get_drvdata(pdev);
now it's cpsw, as in probe?
+ struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
+ int ret;
+
+ ret = pm_runtime_get_sync(&pdev->dev);
+ if (ret < 0) {
+ pm_runtime_put_noidle(&pdev->dev);
+ return ret;
+ }
+
+ cpsw_unregister_devlink(cpsw);
+ cpsw_unregister_ports(cpsw);
+
+ cpts_release(cpsw->cpts);
+ cpdma_ctlr_destroy(cpsw->dma);
+ cpsw_remove_dt(cpsw);
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+
[...]
--
Regards,
Ivan Khoronzhuk
It fixes build error for 32bit caused by type mismatch
size_t/unsigned long.
Fixes: bf82927125dd ("libbpf: refactor map initialization")
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+),
On Wed, Jun 26, 2019 at 12:42:16PM +0200, Jesper Dangaard Brouer wrote:
On Tue, 25 Jun 2019 20:59:45 +0300
Ivan Khoronzhuk wrote:
Add user counter allowing to delete pool only when no users.
It doesn't prevent pool from flush, only prevents freeing the
pool instance. Helps when no ne
On Wed, Jun 26, 2019 at 01:51:28PM +0200, Jesper Dangaard Brouer wrote:
On Wed, 26 Jun 2019 13:49:49 +0300
Ivan Khoronzhuk wrote:
On Wed, Jun 26, 2019 at 12:42:16PM +0200, Jesper Dangaard Brouer wrote:
>On Tue, 25 Jun 2019 20:59:45 +0300
>Ivan Khoronzhuk wrote:
>
>> Add user c
On Tue, Jun 25, 2019 at 09:36:15PM -0400, Willem de Bruijn wrote:
On Tue, Jun 25, 2019 at 2:00 PM Ivan Khoronzhuk
wrote:
Add user counter allowing to delete pool only when no users.
It doesn't prevent pool from flush, only prevents freeing the
pool instance. Helps when no need to delet
Use kmap instead of page_address as it's not always in low memory.
Signed-off-by: Ivan Khoronzhuk
---
net/xdp/xdp_umem.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 9c6de4f114f8..d3c1411420fd 100644
--- a/ne
No need to set ndev for drvdata when mainly cpsw reference is needed,
so correct this legacy decision.
Reviewed-by: Grygorii Strashko
Signed-off-by: Ivan Khoronzhuk
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions
401 - 500 of 744 matches
Mail list logo