This commit fixes style problem in samples/bpf/bpf_load.c
Styles that have been changed are:
- Magic string use of 'DEBUGFS'
- Useless zero initialization of a global variable
- Minor style fix with whitespace
Signed-off-by: Daniel T. Lee
---
samples/bpf/bpf_load.c | 11 +++--
This commit fixes style problem in samples/bpf/bpf_load.c
Styles that have been changed are:
- Magic string use of 'DEBUGFS'
- Useless zero initialization of a global variable
- Minor style fix with whitespace
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- Fix string concaten
rt for XDP, through `net (un)load`,
bpftool can further support other prog attach types.
XDP (un)load tested on Netronome Agilio.
Daniel T. Lee (2):
tools: bpftool: add net load command to load XDP on interface
tools: bpftool: add net unload command to unload XDP on interface
tools/bpf/bpftool/
k_xdp_fd'.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 107 +++-
1 file changed, 106 insertions(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c
index 67e99c56bc88..d3a4f18b5b95 100644
--- a/tools/bpf/bpftool/net.c
By this commit, using `bpftool net unload`, the loaded XDP prog can
be unloaded. Unloading the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 55 +++
On Wed, Jul 31, 2019 at 7:08 PM Jesper Dangaard Brouer
wrote:
>
> On Wed, 31 Jul 2019 03:48:20 +0900
> "Daniel T. Lee" wrote:
>
> > By this commit, using `bpftool net load`, user can load XDP prog on
> > interface. New type of enum 'net_load_type'
this patch only contains support for XDP, through `net
attach/detach`, bpftool can further support other prog attach types.
XDP attach/detach tested on Mellanox ConnectX-4 and Netronome Agilio.
---
Changes in v2:
- command 'load/unload' changed to 'attach/detach' for the consis
set_link_xdp_fd'.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- command 'load' changed to 'attach' for the consistency
- 'NET_ATTACH_TYPE_XDP_DRIVE' changed to 'NET_ATTACH_TYPE_XDP_DRIVER'
tools/bpf/bpftool/net.c | 107 ++
By this commit, using `bpftool net detach`, the attached XDP prog can
be detached. Detaching the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- command 'unload' changed to 'de
On Fri, Aug 2, 2019 at 8:36 AM Jakub Kicinski
wrote:
>
> On Thu, 1 Aug 2019 17:11:32 +0900, Daniel T. Lee wrote:
> > By this commit, using `bpftool net attach`, user can attach XDP prog on
> > interface. New type of enum 'net_attach_type' has been made, as stated at
&
Thank you for letting me know.
I will add to next version of patch.
And, thank you for the detailed review. :)
On Fri, Aug 2, 2019 at 8:21 AM Jakub Kicinski
wrote:
>
> On Thu, 1 Aug 2019 17:11:31 +0900, Daniel T. Lee wrote:
> > Currently, bpftool net only supports dumping progs att
On Fri, Aug 2, 2019 at 3:26 PM Y Song wrote:
>
> On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote:
> >
> > By this commit, using `bpftool net detach`, the attached XDP prog can
> > be detached. Detaching the BPF prog will be done through libbpf
> > 'bpf_set_
On Fri, Aug 2, 2019 at 3:23 PM Y Song wrote:
>
> On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote:
> >
> > By this commit, using `bpftool net attach`, user can attach XDP prog on
> > interface. New type of enum 'net_attach_type' has been made, as stated a
On Sat, Aug 3, 2019 at 3:39 AM Jakub Kicinski
wrote:
>
> On Fri, 2 Aug 2019 14:02:29 +0900, Daniel T. Lee wrote:
> > On Fri, Aug 2, 2019 at 8:36 AM Jakub Kicinski wrote:
> > > On Thu, 1 Aug 2019 17:11:32 +0900, Daniel T. Lee wrote:
> > > > By this commit, usi
This commit adds bash-completion for new "net attach/detach"
subcommand for attaching XDP program on interface.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/bash-completion/bpftool | 64 +++
1 file changed, 55 insertions(+), 9 deletions(-)
diff --git a
By this commit, using `bpftool net detach`, the attached XDP prog can
be detached. Detaching the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 42 +++
attached XDP program could be replaced.
Added new helper 'net_parse_dev' to parse the network device at argument.
BPF prog will be attached through libbpf 'bpf_set_link_xdp_fd'.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 141 ---
PE' comes first)
- add 'dev' keyword in front of
- added bash-completion and documentation
Changes in v2:
- command 'load/unload' changed to 'attach/detach' for the consistency
Daniel T. Lee (4):
tools: bpftool: add net attach command to attach XDP on int
Since, new sub-command 'net attach/detach' has been added for
attaching XDP program on interface,
this commit documents usage and sample output of `net attach/detach`.
Signed-off-by: Daniel T. Lee
---
.../bpf/bpftool/Documentation/bpftool-net.rst | 51 +--
1 file c
On Thu, Aug 8, 2019 at 5:42 AM Jakub Kicinski
wrote:
>
> On Wed, 7 Aug 2019 11:25:06 +0900, Daniel T. Lee wrote:
> > By this commit, using `bpftool net attach`, user can attach XDP prog on
> > interface. New type of enum 'net_attach_type' has been made, as stated at
&
On Fri, Aug 9, 2019 at 2:50 AM Jakub Kicinski
wrote:
>
> On Thu, 8 Aug 2019 07:15:22 +0900, Daniel T. Lee wrote:
> > > > + return -EINVAL;
> > > > + }
> > > > +
> > > > + NEXT_ARG();
> > >
> > > nit: the n
On Fri, Aug 9, 2019 at 1:48 AM Quentin Monnet
wrote:
>
> 2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee
> > This commit adds bash-completion for new "net attach/detach"
> > subcommand for attaching XDP program on interface.
> >
> > Signed-off-by: Daniel T.
On Fri, Aug 9, 2019 at 1:48 AM Quentin Monnet
wrote:
>
> 2019-08-07 11:25 UTC+0900 ~ Daniel T. Lee
> > Since, new sub-command 'net attach/detach' has been added for
> > attaching XDP program on interface,
> > this commit documents usage and sample output of `
attached XDP program could be replaced.
Added new helper 'net_parse_dev' to parse the network device at argument.
BPF prog will be attached through libbpf 'bpf_set_link_xdp_fd'.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 136 +-
#x27; changed to 'attach/detach' for the consistency
Daniel T. Lee (4):
tools: bpftool: add net attach command to attach XDP on interface
tools: bpftool: add net detach command to detach XDP on interface
tools: bpftool: add bash-completion for net attach/detach
tools: bpftool: add doc
This commit adds bash-completion for new "net attach/detach"
subcommand for attaching XDP program on interface.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/bash-completion/bpftool | 65 +++
1 file changed, 55 insertions(+), 10 deletions(-)
diff --git a
Since, new sub-command 'net attach/detach' has been added for
attaching XDP program on interface,
this commit documents usage and sample output of `net attach/detach`.
Signed-off-by: Daniel T. Lee
---
.../bpf/bpftool/Documentation/bpftool-net.rst | 57 ++-
1 file c
By this commit, using `bpftool net detach`, the attached XDP prog can
be detached. Detaching the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 42 +++
On Mon, Aug 12, 2019 at 9:27 AM Y Song wrote:
>
> On Fri, Aug 9, 2019 at 6:35 AM Daniel T. Lee wrote:
> >
> > By this commit, using `bpftool net attach`, user can attach XDP prog on
> > interface. New type of enum 'net_attach_type' has been made, as stated a
By this commit, using `bpftool net detach`, the attached XDP prog can
be detached. Detaching the BPF prog will be done through libbpf
'bpf_set_link_xdp_fd' with the progfd set to -1.
Acked-by: Yonghong Song
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/
h-completion and documentation
Changes in v2:
- command 'load/unload' changed to 'attach/detach' for the consistency
Daniel T. Lee (4):
tools: bpftool: add net attach command to attach XDP on interface
tools: bpftool: add net detach command to detach XDP on interface
This commit adds bash-completion for new "net attach/detach"
subcommand for attaching XDP program on interface.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/bash-completion/bpftool | 65 +++
1 file changed, 55 insertions(+), 10 deletions(-)
diff --git a
Since, new sub-command 'net attach/detach' has been added for
attaching XDP program on interface,
this commit documents usage and sample output of `net attach/detach`.
Signed-off-by: Daniel T. Lee
---
.../bpf/bpftool/Documentation/bpftool-net.rst | 57 ++-
1 file c
attached XDP program could be replaced.
Added new helper 'net_parse_dev' to parse the network device at argument.
BPF prog will be attached through libbpf 'bpf_set_link_xdp_fd'.
Acked-by: Yonghong Song
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/net.c | 136 +++
On Wed, Nov 18, 2020 at 2:58 PM Martin KaFai Lau wrote:
>
> On Tue, Nov 17, 2020 at 02:56:38PM +, Daniel T. Lee wrote:
> [ ... ]
>
> > + err = bpf_link__pin(link, link_pin_path);
> > + if (err < 0) {
> > + printf("err : %d\n&
On Wed, Nov 18, 2020 at 11:10 AM Martin KaFai Lau wrote:
>
> On Tue, Nov 17, 2020 at 02:56:37PM +, Daniel T. Lee wrote:
> [ ... ]
>
> > +
> > +cleanup:
> > + if (rc != 0)
> so this test can be avoided.
>
Thanks for pointing
d variable
- change to destroy link even after link__pin()
- fix return error code on exit
- merge commit with changing Makefile
Daniel T. Lee (7):
samples: bpf: refactor hbm program with libbpf
samples: bpf: refactor test_cgrp2_sock2 program with libbpf
samples: bpf: refactor task_fd_query pr
of BPF MAP definition.
But this commit solves the problem by fixing this from 'queue_stats' map
struct hvm_queue_stats -> hbm_queue_stats.
Fixes: 36b5d471135c ("selftests/bpf: samples/bpf: Split off legacy stuff from
bpf_helpers.h")
Signed-off-by: Daniel T. L
oblem that
shell script cannot find the binary object from the current path,
relative path './' has been added in front of binary.
Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for prohibiting
sockets")
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- cha
probe events, O_TRUNC
flag has been used to clear 'uprobe_events' interface.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- add static at global variable and drop {}
- fix return error code on exit
- restore DEBUGFS macro to absolute string path
samples/bpf/Makefile |
not used on this program.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- add static at global variable and drop {}
- fix return error code on exit
samples/bpf/Makefile | 2 +-
samples/bpf/ibumad_kern.c | 26 +++---
samples/bpf/ibumad_user.c | 71
his commit add the executable permission to shell script
files.
Fixes: f74599f7c5309 ("bpf: Add tests and samples for LWT-BPF")
Signed-off-by: Daniel T. Lee
---
samples/bpf/lwt_len_hist.sh | 2 ++
samples/bpf/test_lwt_bpf.sh | 0
2 files changed, 2 insertions(+)
mode change 100644 =
with the latest kernel BPF and causes confusion.
Also, this commit removes the unused trace_helper and bpf_load from
samples/bpf target objects from Makefile.
Signed-off-by: Daniel T. Lee
Acked-by: Jesper Dangaard Brouer
Acked-by: Andrii Nakryiko
---
Changes in v2:
- merge commit with changing
code, this commit
uses the number of available cpus with _SC_NPROCESSORS_ONLN.
Signed-off-by: Daniel T. Lee
Acked-by: Andrii Nakryiko
---
Changes in v2:
- add static at global variable and drop {}
samples/bpf/Makefile | 2 +-
samples/bpf/test_overhead_user.c | 82
Sorry for the late reply.
On Sat, Nov 21, 2020 at 11:34 AM Martin KaFai Lau wrote:
>
> On Thu, Nov 19, 2020 at 03:06:11PM +, Daniel T. Lee wrote:
> [ ... ]
>
> > static int run_bpf_prog(char *prog, int cg_id)
> > [ ... ]
> > if (!o
d variable
- change to destroy link even after link__pin()
- fix return error code on exit
- merge commit with changing Makefile
Changes in v3:
- cleanup bpf_link, bpf_object and cgroup fd both on success and error
Daniel T. Lee (7):
samples: bpf: refactor hbm program with libbpf
samples: bpf
oblem that
shell script cannot find the binary object from the current path,
relative path './' has been added in front of binary.
Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for prohibiting
sockets")
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- cha
code, this commit
uses the number of available cpus with _SC_NPROCESSORS_ONLN.
Signed-off-by: Daniel T. Lee
Acked-by: Andrii Nakryiko
---
Changes in v2:
- add static at global variable and drop {}
samples/bpf/Makefile | 2 +-
samples/bpf/test_overhead_user.c | 82
not used on this program.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- add static at global variable and drop {}
- fix return error code on exit
samples/bpf/Makefile | 2 +-
samples/bpf/ibumad_kern.c | 26 +++---
samples/bpf/ibumad_user.c | 71
his commit add the executable permission to shell script
files.
Fixes: f74599f7c5309 ("bpf: Add tests and samples for LWT-BPF")
Signed-off-by: Daniel T. Lee
---
samples/bpf/lwt_len_hist.sh | 2 ++
samples/bpf/test_lwt_bpf.sh | 0
2 files changed, 2 insertions(+)
mode change 100644 =
probe events, O_TRUNC
flag has been used to clear 'uprobe_events' interface.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- add static at global variable and drop {}
- fix return error code on exit
- restore DEBUGFS macro to absolute string path
samples/bpf/Makefile
with the latest kernel BPF and causes confusion.
Also, this commit removes the unused trace_helper and bpf_load from
samples/bpf target objects from Makefile.
Signed-off-by: Daniel T. Lee
Acked-by: Jesper Dangaard Brouer
Acked-by: Andrii Nakryiko
---
Changes in v2:
- merge commit with changing
of BPF MAP definition.
But this commit solves the problem by fixing this from 'queue_stats' map
struct hvm_queue_stats -> hbm_queue_stats.
Fixes: 36b5d471135c ("selftests/bpf: samples/bpf: Split off legacy stuff from
bpf_helpers.h")
Signed-off-by: Daniel T. L
oblem that
shell script cannot find the binary object from the current path,
relative path './' has been added in front of binary.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile| 2 +-
samples/bpf/test_cgrp2_sock2.c | 63 -
samples/
This commit removes the unused trace_helper and bpf_load from
samples/bpf target objects from Makefile.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index
6b5d471135c ("selftests/bpf: samples/bpf: Split off legacy stuff from
bpf_helpers.h")
Signed-off-by: Daniel T. Lee
---
samples/bpf/.gitignore | 3 ++
samples/bpf/Makefile | 2 +-
samples/bpf/hbm.c | 96 +-
samples/bpf/hbm_kern.h | 2 +
not used on this program.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 2 +-
samples/bpf/ibumad_kern.c | 26 +++
samples/bpf/ibumad_user.c | 66 ++-
3 files changed, 65 insertions(+), 29 deletions(-)
diff --git a/samples/bpf
code, this commit
uses the number of available cpus with _SC_NPROCESSORS_ONLN.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 2 +-
samples/bpf/test_overhead_user.c | 82 +++-
2 files changed, 60 insertions(+), 24 deletions(-)
diff --git a/samples
with the latest kernel BPF and causes confusion.
Signed-off-by: Daniel T. Lee
---
samples/bpf/bpf_load.c | 667
samples/bpf/bpf_load.h | 57 ---
samples/bpf/xdp2skb_meta_kern.c | 2 +-
3 files changed, 1 insertion(+), 725 deletions(-)
delete
bpf_load, an outdated bpf loader that is difficult
to keep up with the latest kernel BPF and causes confusion.
Daniel T. Lee (9):
selftests: bpf: move tracing helpers to trace_helper.h
samples: bpf: refactor hbm program with libbpf
samples: bpf: refactor test_cgrp2_sock2 program with libbpf
ed to control uprobe events.
Furthermore, to prevent conflict of same named uprobe events, O_TRUNC
flag has been used to clear 'uprobe_events' interface.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 2 +-
samples/bpf/task_fd_query_user.c | 101 +++
Under the samples/bpf directory, similar tracing helpers are
fragmented around. To keep consistent of tracing programs, this commit
moves the helper and define locations to increase the reuse of each
helper function.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile
his commit add the executable permission to shell script
files.
Fixes: f74599f7c5309 ("bpf: Add tests and samples for LWT-BPF")
Signed-off-by: Daniel T. Lee
---
samples/bpf/lwt_len_hist.sh | 2 ++
samples/bpf/test_lwt_bpf.sh | 0
2 files changed, 2 insertions(+)
mode change 100644 =
On Wed, Nov 18, 2020 at 10:19 AM Martin KaFai Lau wrote:
>
> On Tue, Nov 17, 2020 at 02:56:36PM +, Daniel T. Lee wrote:
> > Under the samples/bpf directory, similar tracing helpers are
> > fragmented around. To keep consistent of tracing programs, this commit
> > mov
On Wed, Nov 18, 2020 at 10:58 AM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote:
> >
> > Under the samples/bpf directory, similar tracing helpers are
> > fragmented around. To keep consistent of tracing programs, this commit
> &g
On Wed, Nov 18, 2020 at 11:49 AM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 6:58 AM Daniel T. Lee wrote:
> >
> > Numerous refactoring that rewrites BPF programs written with bpf_load
> > to use the libbpf loader was finally completed, resulting in BPF
> >
On Wed, Nov 18, 2020 at 11:52 AM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote:
> >
> > This commit refactors the existing ibumad program with libbpf bpf
> > loader. Attach/detach of Tracepoint bpf programs has been mana
On Wed, Nov 18, 2020 at 11:58 AM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote:
> >
> > This commit refactors the existing kprobe program with libbpf bpf
> > loader. To attach bpf program, this uses generic bpf_program__attach()
> &
On Wed, Nov 18, 2020 at 12:02 PM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee wrote:
> >
> > This commit refactors the existing cgroup program with libbpf bpf
> > loader. The original test_cgrp2_sock2 has keeped the bpf program
> > at
On Wed, Nov 18, 2020 at 12:10 PM Andrii Nakryiko
wrote:
>
> On Tue, Nov 17, 2020 at 7:05 PM Daniel T. Lee wrote:
> >
> > On Wed, Nov 18, 2020 at 11:52 AM Andrii Nakryiko
> > wrote:
> > >
> > > On Tue, Nov 17, 2020 at 6:57 AM Daniel T. Lee
> > &g
attach kprobe events to blk_account_io_done()
to modify them to perform the same behavior as before.
Signed-off-by: Daniel T. Lee
---
samples/bpf/task_fd_query_kern.c | 2 +-
samples/bpf/task_fd_query_user.c | 2 +-
samples/bpf/tracex3_kern.c | 2 +-
3 files changed, 3 insertions(+), 3 delet
through bpf_program_attach().
- Instead of using the existing BPF MAP definition, MAP definition
has been refactored with the new BTF-defined MAP format.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 6 ++--
samples/bpf/cpustat_kern.c | 36
erformance test with
libbpf")
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index f87ee02073ba..0cac89230c6d 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Mak
() macro in
trace_common.h was used.
- Adding a kprobe/tracepoint event and attaching a bpf program to it
was done through bpf_program_attach().
- Instead of using the existing BPF MAP definition, MAP definition
has been refactored with the new BTF-defined MAP format.
Daniel T. Lee (3
trace_common.h was used.
- Adding a kprobe event and attaching a bpf program to it was done
through bpf_program_attach().
- Instead of using the existing BPF MAP definition, MAP definition
has been refactored with the new BTF-defined MAP format.
Signed-off-by: Daniel T. Lee
e)/tools/lib/bpf/ path had been included
during build, path "bpf/" in header isn't necessary anymore.
This commit removes path "bpf/" in header inclusion.
Signed-off-by: Daniel T. Lee
---
samples/bpf/fds_example.c | 2 +-
samples/bpf/hbm.c
Due to recent change of include path at commit b552d33c80a9
("samples/bpf: fix include path in Makefile"), some of the
previous include options became unnecessary.
This commit removes duplicated include options in Makefile.
Signed-off-by: Daniel T. Lee
---
samples/bpf/Makefile | 9 --
those two samples to fetch interface with it's name
without changing the original index interface fetching.
( fetching in the same way as xdp_sample_pkts_user.c does.)
Signed-off-by: Daniel T. Lee
---
samples/bpf/xdp_adjust_tail_user.c | 12 ++--
samples/bpf/xdp_tx_iptunnel_u
Will do right away! :)
On Tue, Jun 25, 2019 at 3:24 AM Toke Høiland-Jørgensen wrote:
>
> "Daniel T. Lee" writes:
>
> > Currently, each xdp samples are inconsistent in the use.
> > Most of the samples fetch the interface with it's name.
> > (ex. xdp1, x
mples to fetch interface with it's name
without changing the original index interface fetching.
( fetching in the same way as xdp_sample_pkts_user.c does.)
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- added xdp_redirect_user.c, xdp_redirect_map_user.c
samples/bpf/xdp_adjust_tail_us
mples to fetch interface with it's name
without changing the original index interface fetching.
( fetching in the same way as xdp_sample_pkts_user.c does.)
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- added xdp_redirect_user.c, xdp_redirect_map_user.c
samples/bpf/xdp_adjust_tail_us
script.
-p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed
Signed-off-by: Daniel T. Lee
---
samples/pktgen/README.rst| 1 +
samples/pktgen/parameters.sh | 7 ++-
.../pktgen/pktgen_bench_xmit_mode_netif_re
This commit adds port parsing and port validate helper function to parse
single or range of port(s) from a given string. (e.g. 1234, 443-444)
Helpers will be used in prior to set target port(s) in samples/pktgen.
Signed-off-by: Daniel T. Lee
---
samples/pktgen/functions.sh | 34
9 22:33:58 +0900
> "Daniel T. Lee" wrote:
>
> > Currently, kernel pktgen has the feature to specify udp destination port
> > for sending packet. (e.g. pgset "udp_dst_min 9")
> >
> > But on samples, each of the scripts doesn't have any option to ac
ure'.
This commit adds BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE entry to
prog_type_name enum, and will eventually fixes the segfault issue.
Signed-off-by: Daniel T. Lee
---
tools/bpf/bpftool/main.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpfto
On Wed, Aug 14, 2019 at 6:43 AM Jakub Kicinski
wrote:
>
> On Tue, 13 Aug 2019 11:46:17 +0900, Daniel T. Lee wrote:
> > Currently, bpftool net only supports dumping progs attached on the
> > interface. To attach XDP prog on interface, user must use other tool
> > (eg.
is used, the size of maximum packet
will be 600 as a default.
Signed-off-by: Daniel T. Lee
---
samples/bpf/xdp_adjust_tail_kern.c | 23 +++
samples/bpf/xdp_adjust_tail_user.c | 21 +++--
2 files changed, 38 insertions(+), 6 deletions(-)
diff
is used, the size of maximum packet
will be 600 as a default.
Signed-off-by: Daniel T. Lee
---
Changes in v2:
- Change the helper to fetch map from 'bpf_map__next' to
'bpf_object__find_map_fd_by_name'.
samples/bpf/xdp_adjust_tail_kern.c | 23 +++
On Tue, Aug 27, 2019 at 12:54 AM Maciej Fijalkowski
wrote:
>
> On Mon, 26 Aug 2019 18:57:22 +0900
> "Daniel T. Lee" wrote:
>
> > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited
> > to 600. To make this size flexible, a new map 'pcktsz' i
, length 16
05:14:18.083366 IP6 fe80::99.107 > fe80::22.3000: UDP, length 16
05:14:18.083585 IP6 fe80::99.97 > fe80::21.3000: UDP, length 16
Signed-off-by: Daniel T. Lee
---
samples/pktgen/README.rst | 2 +-
samples/pktgen/parameters.sh
existing variable name DST_MIN should be changed.
Variable names are matched to the exact keyword used with pg_ctrl.
Signed-off-by: Daniel T. Lee
---
.../pktgen_bench_xmit_mode_netif_receive.sh | 8
.../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8
samples/pk
This commit adds CIDR parsing and IP validate helper function to parse
single IP or range of IP with CIDR. (e.g. 198.18.0.0/15)
Helpers will be used in prior to set target address in samples/pktgen.
Signed-off-by: Daniel T. Lee
---
samples/pktgen/functions.sh | 134
On Fri, Aug 30, 2019 at 5:42 AM Song Liu wrote:
>
> On Mon, Aug 26, 2019 at 9:52 AM Daniel T. Lee wrote:
> >
> > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited
> > to 600. To make this size flexible, a new map 'pcktsz' is added.
> >
>
On Fri, Aug 30, 2019 at 10:28 PM Jesper Dangaard Brouer
wrote:
>
> On Thu, 29 Aug 2019 05:42:42 +0900
> "Daniel T. Lee" wrote:
>
> > This commit adds CIDR parsing and IP validate helper function to parse
> > single IP or range of IP with CIDR. (e.g. 198.18.0.0/1
On Fri, Aug 30, 2019 at 3:23 AM Daniel T. Lee wrote:
>
> On Fri, Aug 30, 2019 at 5:42 AM Song Liu wrote:
> >
> > On Mon, Aug 26, 2019 at 9:52 AM Daniel T. Lee
> > wrote:
> > >
> > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited
>
er" no longer exists)
$ sudo ./task_fd_query
failed to create kprobe 'blk_start_request' error 'No such file or
directory'
This commit will change the function 'blk_start_request' to
'blk_mq_start_request' to fix the broken sample.
Signed-off-by: Dan
er" no longer exists)
$ sudo ./task_fd_query
failed to create kprobe 'blk_start_request' error 'No such file or
directory'
This commit will change the function 'blk_start_request' to
'blk_mq_start_request' to fix the broken sample.
Signed-off-by: Dani
This commit adds xdp_sample_pkts to .gitignore which is
currently ommited from the ignore file.
Signed-off-by: Daniel T. Lee
---
samples/bpf/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore
index 8ae4940025f8..5a1d084be806 100644
ification logic whether symbols are loaded prior
to the symbol search.
Signed-off-by: Daniel T. Lee
---
tools/testing/selftests/bpf/trace_helpers.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/trace_helpers.c
b/tools/testing/selftests/bpf/trace_helper
Since, ksym_search added with verification logic for symbols existence,
it could return NULL when the kernel symbols are not loaded.
This commit will add NULL check logic after ksym_search.
Signed-off-by: Daniel T. Lee
---
samples/bpf/offwaketime_user.c | 5 +
samples/bpf/sampleip_user.c
1 - 100 of 212 matches
Mail list logo