1. 22 4月, 2016 13 次提交
  2. 21 4月, 2016 20 次提交
  3. 20 4月, 2016 7 次提交
    • E
      net: fix HAVE_EFFICIENT_UNALIGNED_ACCESS typos · cca1d815
      Eric Dumazet 提交于
      HAVE_EFFICIENT_UNALIGNED_ACCESS needs CONFIG_ prefix.
      
      Also add a comment in nla_align_64bit() explaining we have
      to add a padding if current skb->data is aligned, as it
      certainly can be confusing.
      
      Fixes: 35c58459 ("net: Add helpers for 64-bit aligning netlink attributes.")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cca1d815
    • P
      net/hsr: Fixed version field in ENUM · b84e9307
      Peter Heise 提交于
      New field (IFLA_HSR_VERSION) was added in the middle of an existing
      ENUM and would break kernel ABI, therefore moved to the end.
      Reported by Stephen Hemminger.
      Signed-off-by: NPeter Heise <peter.heise@airbus.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b84e9307
    • V
      net: dsa: kill circular reference with slave priv · 46e7b8d8
      Vivien Didelot 提交于
      The dsa_slave_priv structure does not need a pointer to its net_device.
      Kill it.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46e7b8d8
    • D
      Merge branch 'bpf_event_output' · 9f4ab6ec
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      9f4ab6ec
    • D
      bpf: add event output helper for notifications/sampling/logging · bd570ff9
      Daniel Borkmann 提交于
      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: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd570ff9
    • D
      bpf, trace: add BPF_F_CURRENT_CPU flag for bpf_perf_event_output · 1e33759c
      Daniel Borkmann 提交于
      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: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e33759c
    • J
      arcnet: com90xx: add __init attribute · 553bc087
      Julia Lawall 提交于
      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: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NMichael Grzeschik <mgr@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      553bc087