1. 20 Apr, 2016 7 commits
    • Vivien Didelot's avatar
      net: dsa: kill circular reference with slave priv · 46e7b8d8
      Vivien Didelot authored
      The dsa_slave_priv structure does not need a pointer to its net_device.
      Kill it.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46e7b8d8
    • David S. Miller's avatar
      Merge branch 'bpf_event_output' · 9f4ab6ec
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      BPF updates
      
      This minor set adds a new helper bpf_event_output() for eBPF cls/act
      program types which allows to pass events to user space applications.
      For details, please see individual patches.
      
      v1 -> v2:
        - Address kbuild bot found compile issue in patch 2
        - Rest as is
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f4ab6ec
    • Daniel Borkmann's avatar
      bpf: add event output helper for notifications/sampling/logging · bd570ff9
      Daniel Borkmann authored
      This patch adds a new helper for cls/act programs that can push events
      to user space applications. For networking, this can be f.e. for sampling,
      debugging, logging purposes or pushing of arbitrary wake-up events. The
      idea is similar to a43eec30 ("bpf: introduce bpf_perf_event_output()
      helper") and 39111695 ("samples: bpf: add bpf_perf_event_output example").
      
      The eBPF program utilizes a perf event array map that user space populates
      with fds from perf_event_open(), the eBPF program calls into the helper
      f.e. as skb_event_output(skb, &my_map, BPF_F_CURRENT_CPU, raw, sizeof(raw))
      so that the raw data is pushed into the fd f.e. at the map index of the
      current CPU.
      
      User space can poll/mmap/etc on this and has a data channel for receiving
      events that can be post-processed. The nice thing is that since the eBPF
      program and user space application making use of it are tightly coupled,
      they can define their own arbitrary raw data format and what/when they
      want to push.
      
      While f.e. packet headers could be one part of the meta data that is being
      pushed, this is not a substitute for things like packet sockets as whole
      packet is not being pushed and push is only done in a single direction.
      Intention is more of a generically usable, efficient event pipe to applications.
      Workflow is that tc can pin the map and applications can attach themselves
      e.g. after cls/act setup to one or multiple map slots, demuxing is done by
      the eBPF program.
      
      Adding this facility is with minimal effort, it reuses the helper
      introduced in a43eec30 ("bpf: introduce bpf_perf_event_output() helper")
      and we get its functionality for free by overloading its BPF_FUNC_ identifier
      for cls/act programs, ctx is currently unused, but will be made use of in
      future. Example will be added to iproute2's BPF example files.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd570ff9
    • Daniel Borkmann's avatar
      bpf, trace: add BPF_F_CURRENT_CPU flag for bpf_perf_event_output · 1e33759c
      Daniel Borkmann authored
      Add a BPF_F_CURRENT_CPU flag to optimize the use-case where user space has
      per-CPU ring buffers and the eBPF program pushes the data into the current
      CPU's ring buffer which saves us an extra helper function call in eBPF.
      Also, make sure to properly reserve the remaining flags which are not used.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e33759c
    • Julia Lawall's avatar
      arcnet: com90xx: add __init attribute · 553bc087
      Julia Lawall authored
      Add __init attribute on a function that is only called from other __init
      functions and that is not inlined, at least with gcc version 4.8.4 on an
      x86 machine with allyesconfig.  Currently, the function is put in the
      .text.unlikely segment.  Declaring it as __init will cause it to be put in
      the .init.text and to disappear after initialization.
      
      The result of objdump -x on the function before the change is as follows:
      
      0000000000000000 l     F .text.unlikely 00000000000000bf check_mirror
      
      And after the change it is as follows:
      
      0000000000000000 l     F .init.text	00000000000000ba check_mirror
      
      Done with the help of Coccinelle.  The semantic patch checks for local
      static non-init functions that are called from an __init function and are
      not called from any other function.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: default avatarMichael Grzeschik <mgr@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      553bc087
    • Konstantin Khlebnikov's avatar
      net/ipv6/addrconf: fix sysctl table indentation · 5df1f77f
      Konstantin Khlebnikov authored
      Separated from previous patch for readability.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5df1f77f
    • Konstantin Khlebnikov's avatar
      net/ipv6/addrconf: simplify sysctl registration · 607ea7cd
      Konstantin Khlebnikov authored
      Struct ctl_table_header holds pointer to sysctl table which could be used
      for freeing it after unregistration. IPv4 sysctls already use that.
      Remove redundant NULL assignment: ndev allocated using kzalloc.
      
      This also saves some bytes: sysctl table could be shorter than
      DEVCONF_MAX+1 if some options are disable in config.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      607ea7cd
  2. 19 Apr, 2016 5 commits
  3. 18 Apr, 2016 9 commits
  4. 17 Apr, 2016 19 commits