doc/testpmd: update compile steps for bpf examples
PATCH 1/1 doc/testpmd: update compile steps for bpf examples
Add the missing arguments for compiling t2.c and t3.c BPF examples.
--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++++ 1 file changed, 4 insertions(+)
doc/guides/testpmd_app_ug/testpmd_funcs.rst +4 -0
@@ -4657,6 +4657,10 @@ To load (not JITed) t1.o at TX queue 0, port 0:: testpmd> bpf-load tx 0 0 - ./dpdk.org/examples/bpf/t1.o +.. note:: + + In order to build t2.c and t3.c; pass DPDK target's include and library path as compiler options. + bpf-unload ~~~~~~~~~~
Signature · 1 line
2.17.1
Quoted 13 lines
-----Original Message-----
From: Varghese, Vipin
Sent: Tuesday, May 7, 2019 9:41 AM
To: [email protected]; Kovacevic, Marko <[email protected]>; Mcnamara, John <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Jingjing <[email protected]>; Iremonger, Bernard <[email protected]>
Cc: Padubidri, Sanjay A <[email protected]>; Varghese, Vipin <[email protected]>
Subject: [PATCH] doc/testpmd: update compile steps for bpf examples
Quoted 2 lines
Add the missing arguments for compiling
t2.candt3.cBPF examples.
Acked from a doc point of view. Maintainers should check if the instructions are okay.
07/05/2019 10:41, Vipin Varghese:
doc/guides/testpmd_app_ug/testpmd_funcs.rst To load (not JITed) t1.o at TX queue 0, port 0:: · line 4662
Quoted 9 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +3
-0@@ -4657,6 +4657,10 @@ To load (not JITed) t1.o at TX queue 0, port 0:: testpmd> bpf-load tx 0 0 - ./dpdk.org/examples/bpf/t1.o +.. note:: + + In order to build t2.c and t3.c; pass DPDK target's include and library path as compiler options.
This note should be below the compilation command.
When adding more BPF examples, it will be easily outdated. We could say "to build other examples, more arguments may be required". About the compiler options, I suggest to name them: -I, -L?
snipped
Quoted 6 lines
07/05/2019 10:41, Vipin Varghese:
Quoted 4 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +0
-0@@ -4657,6 +4657,10 @@ To load (not JITed) t1.o at TX queue 0, port 0::
Quoted 8 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst To load (not JITed) t1.o at TX queue 0, port 0::
Quoted 5 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +3
-0testpmd> bpf-load tx 0 0 - ./dpdk.org/examples/bpf/t1.o +.. note:: + + In order to build t2.c and t3.c; pass DPDK target's include and library path ascompiler options.
This note should be below the compilation command.
I agree, I will make the change.
Quoted 1 line
When adding more BPF examples, it will be easily outdated.
Thanks, can we get some update on BPF examples. Reasoning, we are planning to add dpdk-example specific BPF code but not in test/bpf.
Quoted 2 lines
We could say "to build other examples, more arguments may be required". About the compiler options, I suggest to name them: -I, -L?
Sure
Quoted 2 lines
PATCH v2 1/1 doc/testpmd: update compile steps for bpf examples
In reply to Vipin VargheseAdd note in the missing arguments for compiling BPF examples.
---
V2:
- ACK for documentation - John McNamara
- move to compile section - Thomas Monjalon
--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++++ 1 file changed, 4 insertions(+)
doc/guides/testpmd_app_ug/testpmd_funcs.rst +4 -0
@@ -4651,6 +4651,10 @@ For example: cd examples/bpf clang -O2 -target bpf -c t1.c +.. note:: + + To built other BPF examples, the compiler requires additional command-line options. + Then to load (and JIT compile) t1.o at RX queue 0, port 1: .. code-block:: console
Signature · 1 line
2.17.1
23/05/2019 15:47, Vipin Varghese:
doc/guides/testpmd_app_ug/testpmd_funcs.rst For example: · line 4656
Quoted 9 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +3
-0@@ -4651,6 +4651,10 @@ For example: cd examples/bpf clang -O2 -target bpf -c t1.c +.. note:: + + To built other BPF examples, the compiler requires additional command-line options.
"To built" -> "To build"
I think this note is vague. Don't you think it may confuse user if we don't explicit which kind of options are required?
HI Thomas,
Snipped
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ + To built other BPF examples, the compiler requires additional command-line options.
"To built" -> "To build"
ok
Quoted 3 lines
I think this note is vague. Don't you think it may confuse user if we don't explicit which kind of options are required?
Ok, the v1 content was In order to build t2.c and t3.c; pass DPDK targets include and library path as compiler options.. But as user adds other library functions are added to `examples/bpf' these may vary too.
Hence should we state as, To build other BPF examples, appropriate libraries and dependencies is to be passed as command line options.
PATCH v3 1/1 doc/testpmd: update compile steps for bpf examples
In reply to Vipin VargheseAdd note in the missing arguments for compiling BPF examples.
---
V3:
- update the dependency for DPDK and others - Thomas Monjalon
V2:
- ACK for documentation - John McNamara
- move to compile section - Thomas Monjalon
--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/testpmd_app_ug/testpmd_funcs.rst +6 -0
@@ -4651,6 +4651,12 @@ For example: cd examples/bpf clang -O2 -target bpf -c t1.c +.. note:: + + To build DPDK based example, appropriate include and library path is to be + passed to compiler. For other examples, corresponding dependencies is to be + passed for include and libraries. + Then to load (and JIT compile) t1.o at RX queue 0, port 1: .. code-block:: console
Signature · 1 line
2.17.1
Quoted 24 lines · On Mon, 10 Jun 2019 11:11:21 +0530 Vipin Varghese <[email protected]>…
Add note in the missing arguments for compiling BPF examples.
Signed-off-by Vipin Varghese <[email protected]>Acked-by John McNamara <[email protected]>---
V3:
- update the dependency for DPDK and others - Thomas MonjalonV2:
- ACK for documentation - John McNamara
- move to compile section - Thomas Monjalon--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/testpmd_app_ug/testpmd_funcs.rst +0
-0@@ -4651,6 +4651,12 @@ For example: cd examples/bpf clang -O2 -target bpf -c t1.c
doc/guides/testpmd_app_ug/testpmd_funcs.rst For example: · line 4662
Quoted 10 lines
doc/guides/testpmd_app_ug/testpmd_funcs.rst +6
-0+.. note:: + + To build DPDK based example, appropriate include and library path is to be + passed to compiler. For other examples, corresponding dependencies is to be + passed for include and libraries. + Then to load (and JIT compile) t1.o at RX queue 0, port 1: .. code-block:: console
I am ok with this but the wording is so generic it doesn't really help the user. A real example on a real distribution would be better. Could someone update this patch and resubmit it? Or better yet just have a make or meson script in examples/bpf?