[PATCH bpf-next] samples/bpf: Add hello world sample for newbies

2021-02-04 Thread Tiezhu Yang
oader completely"), so the old version can not work in the latest mainline kernel. Since it is very simple and useful for newbies, I think it is necessary to be upstreamed. [1] https://github.com/bpftools/linux-observability-with-bpf/tree/master/code/chapter-2/hello_world Signed-off-by: T

[PATCH bpf-next] MAINTAINERS: BPF: Update web-page bpf.io to ebpf.io to avoid redirects

2021-01-28 Thread Tiezhu Yang
rect}\n' 0.000 So update https://bpf.io/ to https://ebpf.io/ to avoid redirects. Signed-off-by: Tiezhu Yang --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1df56a3..09314ce 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -

Re: [PATCH bpf-next] samples/bpf: Add include dir for MIPS Loongson64 to fix build errors

2021-01-26 Thread Tiezhu Yang
On 01/27/2021 12:01 AM, Daniel Borkmann wrote: On 1/26/21 3:05 PM, Tiezhu Yang wrote: There exists many build errors when make M=samples/bpf on the Loongson platform, this issue is MIPS related, x86 compiles just fine. Here are some errors: [...] So we can do the similar things in samples

[PATCH bpf-next] samples/bpf: Add include dir for MIPS Loongson64 to fix build errors

2021-01-26 Thread Tiezhu Yang
just add platform specific and generic include dir for MIPS Loongson64 to fix the build errors. Signed-off-by: Tiezhu Yang --- samples/bpf/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 362f314..45ceca4 100644 --- a/samples/

[PATCH bpf-next v2] samples/bpf: Set flag __SANE_USERSPACE_TYPES__ for MIPS to fix build warnings

2021-01-24 Thread Tiezhu Yang
With #ifndef __SANE_USERSPACE_TYPES__ in tools/include/linux/types.h, the above error has gone and this ifndef change does not hurt other compilations. Signed-off-by: Tiezhu Yang --- v2: Update the commit message samples/bpf/Makefile| 4 tools/include/linux/types.h | 3 +++ 2 fil

[PATCH bpf-next v4] samples/bpf: Update build procedure for manually compiling LLVM and Clang

2021-01-21 Thread Tiezhu Yang
html [3] https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages Signed-off-by: Tiezhu Yang Acked-by: Yonghong Song Reviewed-by: Nathan Chancellor --- v2: Update the commit message suggested by Yonghong, thank you very much. v3: Remove the default option BUILD_SHARED_LIBS=O

[PATCH bpf-next v3] samples/bpf: Update build procedure for manually compiling LLVM and Clang

2021-01-20 Thread Tiezhu Yang
[2] https://www.llvm.org/docs/CMake.html Signed-off-by: Tiezhu Yang Acked-by: Yonghong Song --- v2: Update the commit message suggested by Yonghong, thank you very much. v3: Remove the default option BUILD_SHARED_LIBS=OFF and just mkdir llvm-project/llvm/build suggested by Fangrui.

Re: [PATCH bpf-next v2] samples/bpf: Update README.rst and Makefile for manually compiling LLVM and clang

2021-01-19 Thread Tiezhu Yang
On 01/20/2021 10:43 AM, Nick Desaulniers wrote: On Mon, Jan 18, 2021 at 11:56 PM Tiezhu Yang wrote: The current llvm/clang build procedure in samples/bpf/README.rst is out of date. See below that the links are not accessible any more. $ git clone http://llvm.org/git/llvm.git Cloning into

Re: [PATCH bpf-next v2] samples/bpf: Update README.rst and Makefile for manually compiling LLVM and clang

2021-01-19 Thread Tiezhu Yang
On 01/20/2021 05:58 AM, Fangrui Song wrote: On 2021-01-19, Tiezhu Yang wrote: The current llvm/clang build procedure in samples/bpf/README.rst is out of date. See below that the links are not accessible any more. $ git clone http://llvm.org/git/llvm.git Cloning into 'llvm'... fatal:

[PATCH bpf-next v2] samples/bpf: Update README.rst and Makefile for manually compiling LLVM and clang

2021-01-18 Thread Tiezhu Yang
same time, update the related comment in Makefile. [1] https://clang.llvm.org/get_started.html Signed-off-by: Tiezhu Yang Acked-by: Yonghong Song --- v2: Update the commit message suggested by Yonghong, thank you very much. samples/bpf/Makefile | 2 +- samples/bpf/README.rst | 1

[PATCH bpf] samples/bpf: Update README.rst and Makefile for manually compiling LLVM and clang

2021-01-18 Thread Tiezhu Yang
llvm.org/get_started.html Signed-off-by: Tiezhu Yang --- samples/bpf/Makefile | 2 +- samples/bpf/README.rst | 17 ++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 26fc96c..d061446 100644 --- a/samples/bpf/Makef

Re: [PATCH 2/2] compiler.h: Include asm/rwonce.h under ARM64 and ALPHA to fix build errors

2021-01-18 Thread Tiezhu Yang
On 01/14/2021 01:14 AM, Yonghong Song wrote: I do not think this fix is correct. x86 does not define its own rwonce.h and still compiles fine. As noted in the above, we have include/asm-generic/rwonce.h. Once you do a proper build, you will have rwonce.h in arch generated directory like -bash-4

[PATCH bpf] samples/bpf: Update README.rst for manually compiling LLVM and clang

2021-01-18 Thread Tiezhu Yang
o be feasible, so we should update it to reflect the reality. [1] https://clang.llvm.org/get_started.html Signed-off-by: Tiezhu Yang --- samples/bpf/README.rst | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index d

Re: [PATCH bpf 1/2] samples/bpf: Set flag __SANE_USERSPACE_TYPES__ for MIPS to fix build warnings

2021-01-17 Thread Tiezhu Yang
On 01/14/2021 01:12 AM, Yonghong Song wrote: On 1/13/21 2:57 AM, Tiezhu Yang wrote: MIPS needs __SANE_USERSPACE_TYPES__ before to select 'int-ll64.h' in arch/mips/include/uapi/asm/types.h and avoid compile warnings when printing __u64 with %llu, %llx or %lld. could you men

[PATCH bpf 1/2] samples/bpf: Set flag __SANE_USERSPACE_TYPES__ for MIPS to fix build warnings

2021-01-13 Thread Tiezhu Yang
%lu printf("%s/%llx;", sym->name, addr); ~~~^ %lx printf(";%s %lld\n", key->waker, count); ~~~^ ~ %ld Signed-off-by: Tiezhu Yang --- samples/bpf/Makefile|

[PATCH 2/2] compiler.h: Include asm/rwonce.h under ARM64 and ALPHA to fix build errors

2021-01-13 Thread Tiezhu Yang
x/kernel.h:10: ./include/linux/compiler.h:246:10: fatal error: 'asm/rwonce.h' file not found ^~ 1 error generated. $ find . -name rwonce.h ./include/asm-generic/rwonce.h ./arch/arm64/include/asm/rwonce.h ./arch/alpha/include/asm/rwonce.h Signed-off-by: Tiezhu Yang

[PATCH 0/2] Fix build errors and warnings when make M=samples/bpf

2021-01-13 Thread Tiezhu Yang
There exists many build errors and warnings when make M=samples/bpf, this patch series fix some of them, I will submit some other patches related with MIPS later. Tiezhu Yang (2): samples/bpf: Set flag __SANE_USERSPACE_TYPES__ for MIPS to fix build warnings compiler.h: Include asm

[QUESTION] build errors and warnings when make M=samples/bpf

2021-01-11 Thread Tiezhu Yang
Hi all, I found the following build errors and warnings when make M=samples/bpf on the Loongson 3A3000 platform which belongs to MIPS arch. Are theseknown issues? Should I submit patches to fix them? (1) fatal error: 'asm/rwonce.h' file not found CLANG-bpf samples/bpf/xdpsock_kern.o In file i

[PATCH bpf-next v3] Documentation/bpf: Use valid and new links in index.rst

2020-07-31 Thread Tiezhu Yang
tps://www.kernel.org/doc/html/latest/bpf/ Fixes: d9b9170a2653 ("docs: bpf: Rename README.rst to index.rst") Fixes: cb3f0d56e153 ("docs: networking: convert filter.txt to ReST") Signed-off-by: Tiezhu Yang --- Documentation/bpf/index.rst | 12 ++-- Documentation/

Re: [PATCH bpf-next v2] Documentation/bpf: Use valid and new links in index.rst

2020-07-29 Thread Tiezhu Yang
On 07/30/2020 05:06 AM, Song Liu wrote: On Wed, Jul 29, 2020 at 6:17 AM Tiezhu Yang wrote: There exists an error "404 Not Found" when I click the html link of "Documentation/networking/filter.rst" in the BPF documentation [1], fix it. Additionally, use the new link

[PATCH bpf-next v2] Documentation/bpf: Use valid and new links in index.rst

2020-07-29 Thread Tiezhu Yang
tps://www.kernel.org/doc/html/latest/bpf/ Fixes: d9b9170a2653 ("docs: bpf: Rename README.rst to index.rst") Fixes: cb3f0d56e153 ("docs: networking: convert filter.txt to ReST") Signed-off-by: Tiezhu Yang --- v2: - Fix a typo "clik" to "click" in the commit mes

[PATCH bpf-next] Documentation/bpf: Use valid and new links in index.rst

2020-07-29 Thread Tiezhu Yang
tps://www.kernel.org/doc/html/latest/bpf/ Fixes: d9b9170a2653 ("docs: bpf: Rename README.rst to index.rst") Fixes: cb3f0d56e153 ("docs: networking: convert filter.txt to ReST") Signed-off-by: Tiezhu Yang --- Documentation/bpf/index.rst | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH] net: Fix return value about devm_platform_ioremap_resource()

2020-05-22 Thread Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang --- drivers/net/can/ifi_canfd/ifi_canfd.c | 5 - drivers/net/can/sun4i_can.c | 2 +- drivers/net/dsa/b53