1. 12 1月, 2016 4 次提交
    • D
      Merge branch 'bpf-next' · 23c09c26
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      BPF update
      
      This set adds IPv6 support for bpf_skb_{set,get}_tunnel_key() helper.
      It also exports flags to user space that are being used in helpers and
      weren't exported thus far. For more details, please see the individual
      patches.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23c09c26
    • D
      bpf: support ipv6 for bpf_skb_{set,get}_tunnel_key · c6c33454
      Daniel Borkmann 提交于
      After IPv6 support has recently been added to metadata dst and related
      encaps, add support for populating/reading it from an eBPF program.
      
      Commit d3aa45ce ("bpf: add helpers to access tunnel metadata") started
      with initial IPv4-only support back then (due to IPv6 metadata support
      not being available yet).
      
      To stay compatible with older programs, we need to test for the passed
      structure size. Also TOS and TTL support from the ip_tunnel_info key has
      been added. Tested with vxlan devs in collect meta data mode with IPv4,
      IPv6 and in compat mode over different network namespaces.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6c33454
    • D
      bpf: export helper function flags and reject invalid ones · 781c53bc
      Daniel Borkmann 提交于
      Export flags used by eBPF helper functions through UAPI, so they can be
      used by programs (instead of them redefining all flags each time or just
      using the hard-coded values). It also gives a better overview what flags
      are used where and we can further get rid of the extra macros defined in
      filter.c. Moreover, reject invalid flags.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      781c53bc
    • J
      bonding: make mii_status sysfs node consistent · c8086f6d
      Jarod Wilson 提交于
      The spew in /proc/net/bonding/bond0 uses netif_carrier_ok() to determine
      mii_status, while /sys/class/net/bond0/bonding/mii_status looks at
      curr_active_slave, which doesn't actually seem to be set sometimes when
      the bond actually is up. A mode 4 bond configured via ifcfg-foo files on a
      Red Hat Enterprise Linux system, after boot, comes up clean and
      functional, but the sysfs node shows mii_status of down, while proc shows
      up. A simple enough fix here seems to be to use the same method for
      determining up or down in both places, and I'd opt for the one that seems
      to match reality.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <gospo@cumulusnetworks.com>
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8086f6d
  2. 11 1月, 2016 36 次提交