)]}'
{
  "commit": "aaf3bdee4c1de08a2571ee323a88d6f8f8e71497",
  "tree": "4ebe1e7f45fe610c93fa564a415973deeee16c59",
  "parents": [
    "27711f3e2d27b11b73c3f81fc244b7da4d2e9a26"
  ],
  "author": {
    "name": "Daniel Mack",
    "email": "daniel@zonque.org",
    "time": "Thu Aug 11 00:54:59 2016 +0200"
  },
  "committer": {
    "name": "Alexei Starovoitov",
    "email": "ast@fb.com",
    "time": "Fri Oct 21 12:25:07 2016 -0700"
  },
  "message": "samples: bpf: add userspace example for attaching eBPF programs to cgroups\n\nAdd a simple userpace program to demonstrate the new API to attach eBPF\nprograms to cgroups. This is what it does:\n\n * Create arraymap in kernel with 4 byte keys and 8 byte values\n\n * Load eBPF program\n\n   The eBPF program accesses the map passed in to store two pieces of\n   information. The number of invocations of the program, which maps\n   to the number of packets received, is stored to key 0. Key 1 is\n   incremented on each iteration by the number of bytes stored in\n   the skb.\n\n * Detach any eBPF program previously attached to the cgroup\n\n * Attach the new program to the cgroup using BPF_PROG_ATTACH\n\n * Once a second, read map[0] and map[1] to see how many bytes and\n   packets were seen on any socket of tasks in the given cgroup.\n\nThe program takes a cgroup path as 1st argument, and either \"ingress\"\nor \"egress\" as 2nd. Optionally, \"drop\" can be passed as 3rd argument,\nwhich will make the generated eBPF program return 0 instead of 1, so\nthe kernel will drop the packet.\n\nlibbpf gained two new wrappers for the new syscall commands.\n\nSigned-off-by: Daniel Mack \u003cdaniel@zonque.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c53fdb67ca75a920089e8b3b3a3e983f246463e",
      "old_mode": 33188,
      "old_path": "samples/bpf/Makefile",
      "new_id": "2624d5d7ce8b25fa2ac1460e92c433e1d873a89b",
      "new_mode": 33188,
      "new_path": "samples/bpf/Makefile"
    },
    {
      "type": "modify",
      "old_id": "9969e35550c3dd3c9702e7e99dab35b3df9fb7f6",
      "old_mode": 33188,
      "old_path": "samples/bpf/libbpf.c",
      "new_id": "9ce707bf02a7a7aee8e37383af34429d97c569cf",
      "new_mode": 33188,
      "new_path": "samples/bpf/libbpf.c"
    },
    {
      "type": "modify",
      "old_id": "ac6edb61b64a2798f4c4beb261ed8996e6957877",
      "old_mode": 33188,
      "old_path": "samples/bpf/libbpf.h",
      "new_id": "d0a799a52eaff7a5ec9544ddc03d558403e6fb51",
      "new_mode": 33188,
      "new_path": "samples/bpf/libbpf.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "63ef2083f766b9e319ae4a43bdf4fb7095e5d855",
      "new_mode": 33188,
      "new_path": "samples/bpf/test_cgrp2_attach.c"
    }
  ]
}
