1. 29 4月, 2018 4 次提交
  2. 27 4月, 2018 8 次提交
  3. 26 4月, 2018 1 次提交
    • J
      bpf: fix for lex/yacc build error with gcc-5 · 9c299a32
      John Fastabend 提交于
      Fix build error found with Ubuntu shipped gcc-5
      
      ~/git/bpf/tools/bpf$ make all
      
      Auto-detecting system features:
      ...                        libbfd: [ OFF ]
      ...        disassembler-four-args: [ OFF ]
      
        CC       bpf_jit_disasm.o
        LINK     bpf_jit_disasm
        CC       bpf_dbg.o
      /home/john/git/bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’:
      /home/john/git/bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        } else if (matches(subcmd, "pcap") == 0) {
                   ^
        LINK     bpf_dbg
        CC       bpf_asm.o
      make: *** No rule to make target `bpf_exp.yacc.o', needed by `bpf_asm'.  Stop.
      
      Fixes: 5a8997f2 ("tools: bpf: respect output directory during build")
      Signed-off-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      9c299a32
  4. 25 4月, 2018 6 次提交
  5. 24 4月, 2018 1 次提交
  6. 23 4月, 2018 2 次提交
  7. 20 4月, 2018 4 次提交
  8. 19 4月, 2018 12 次提交
  9. 18 4月, 2018 2 次提交
    • Q
      tools: bpftool: make it easier to feed hex bytes to bpftool · 0c90f224
      Quentin Monnet 提交于
      bpftool uses hexadecimal values when it dumps map contents:
      
          # bpftool map dump id 1337
          key: ff 13 37 ff  value: a1 b2 c3 d4 ff ff ff ff
          Found 1 element
      
      In order to lookup or update values with bpftool, the natural reflex is
      then to copy and paste the values to the command line, and to try to run
      something like:
      
          # bpftool map update id 1337 key ff 13 37 ff \
                  value 00 00 00 00 00 00 1a 2b
          Error: error parsing byte: ff
      
      bpftool complains, because it uses strtoul() with a 0 base to parse the
      bytes, and that without a "0x" prefix, the bytes are considered as
      decimal values (or even octal if they start with "0").
      
      To feed hexadecimal values instead, one needs to add "0x" prefixes
      everywhere necessary:
      
          # bpftool map update id 1337 key 0xff 0x13 0x37 0xff \
                  value 0 0 0 0 0 0 0x1a 0x2b
      
      To make it easier to use hexadecimal values, add an optional "hex"
      keyword to put after "key" or "value" to tell bpftool to consider the
      digits as hexadecimal. We can now do:
      
          # bpftool map update id 1337 key hex ff 13 37 ff \
                  value hex 0 0 0 0 0 0 1a 2b
      
      Without the "hex" keyword, the bytes are still parsed according to
      normal integer notation (decimal if no prefix, or hexadecimal or octal
      if "0x" or "0" prefix is used, respectively).
      
      The patch also add related documentation and bash completion for the
      "hex" keyword.
      Suggested-by: NDaniel Borkmann <daniel@iogearbox.net>
      Suggested-by: NDavid Beckett <david.beckett@netronome.com>
      Signed-off-by: NQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      0c90f224
    • A
      libbpf: Type functions for raw tracepoints · e14c93fd
      Andrey Ignatov 提交于
      Add missing pieces for BPF_PROG_TYPE_RAW_TRACEPOINT in libbpf:
      * is- and set- functions;
      * support guessing prog type.
      Signed-off-by: NAndrey Ignatov <rdna@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      e14c93fd