1. 26 Jun, 2016 3 commits
  2. 23 Jun, 2016 2 commits
  3. 22 Jun, 2016 1 commit
  4. 21 Jun, 2016 2 commits
  5. 20 Jun, 2016 1 commit
  6. 15 Jun, 2016 6 commits
  7. 13 Jun, 2016 3 commits
    • Brenden Blanco's avatar
      Merge pull request #563 from qmonnet/debug-output · cfac8da4
      Brenden Blanco authored
      libbpf.c: Prepend BPF syscall error to log_bug when debug is enabled.
      cfac8da4
    • Quentin Monnet's avatar
      python: With DEBUG_BPF, print BPF error even if log_buf is not empty. · 4ddedda5
      Quentin Monnet authored
      When BPF syscall fails and DEBUG_FLAG has been provided to a Python
      caller script, the BPF error string would be printed only if log_buf had
      not been filled by the kernel. This commit removes this requirement,
      printing the error string even if log_buf is not empty.
      Signed-off-by: default avatarQuentin Monnet <quentin.monnet@6wind.com>
      4ddedda5
    • Quentin Monnet's avatar
      python: Print BPF syscall error if DEBUG_BPF is on but log_buf is empty. · bb699887
      Quentin Monnet authored
      Commit 759029fe provided an option to
      store the output from BPF syscall into a buffer (and not to print it
      systematically to standard output) on program load in libbpf.c.
      
      But doing so, it only stores the content of attr.log_buf, while the
      error string--resulting from a failed BPF syscall--is no more displayed
      when the DEBUG_BPF flag is used in the Python script responsible for
      converting and injecting the code.
      
      This commit proposes a fix for this bug by printing the error message
      (associated to the return value from the syscall) from the Python
      caller, when all the following conditions are met:
      
      - the syscall fails,
      - the DEBUG_BPF flag has been provided, and
      - log_buf is empty (has not been filled by kernel).
      
      Note: when DEBUG_BPF is not provided, the error string is printed in the
      C wrapper in libbpf.c (bpf_prog_load) anyway.
      
      Fixes: 759029fe ("Add option for custom log string to bpf_prog_load")
      Signed-off-by: default avatarQuentin Monnet <quentin.monnet@6wind.com>
      bb699887
  8. 08 Jun, 2016 1 commit
  9. 07 Jun, 2016 4 commits
  10. 06 Jun, 2016 3 commits
  11. 03 Jun, 2016 2 commits
  12. 02 Jun, 2016 2 commits
  13. 01 Jun, 2016 2 commits
  14. 29 May, 2016 1 commit
    • Jincheng Miao's avatar
      set use_errno to True for libbcc.so · f4a3e41a
      Jincheng Miao authored
      Currently, errno could not be accessed by libbcc.py, like:
      ```
      binding socket to 'eth0'
      cannot create raw socket: Operation not permitted
      Traceback (most recent call last):
        File "/home/ryan/Software/bcc/examples/networking/http_filter/http-parse-simple.py", line 73, in <module>
          BPF.attach_raw_socket(function_http_filter, interface)
        File "/usr/lib/python2.7/site-packages/bcc/__init__.py", line 330, in attach_raw_socket
          raise Exception("Failed to open raw device %s: %s" % (dev, errstr))
      Exception: Failed to open raw device eth0: Success
      ```
      The exception prints the errno as `Success`, instead of `EPERM`.
      
      This patch would fix this problem.
      Signed-off-by: default avatarJincheng Miao <jincheng.miao@gmail.com>
      f4a3e41a
  15. 27 May, 2016 1 commit
  16. 26 May, 2016 2 commits
  17. 24 May, 2016 4 commits