1. 24 Mar, 2015 14 commits
    • Daniel Borkmann's avatar
      tc: add eBPF support to f_bpf · 11c39b5e
      Daniel Borkmann authored
      This work adds the tc frontend for kernel commit e2e9b6541dd4 ("cls_bpf:
      add initial eBPF support for programmable classifiers").
      
      A C-like classifier program (f.e. see e2e9b6541dd4) is being compiled via
      LLVM's eBPF backend into an ELF file, that is then being passed to tc. tc
      then loads, if any, eBPF maps and eBPF opcodes (with fixed-up eBPF map file
      descriptors) out of its dedicated sections, and via bpf(2) into the kernel
      and then the resulting fd via netlink down to cls_bpf. cls_bpf allows for
      annotations, currently, I've used the file name for that, so that the user
      can easily identify his filter when dumping configurations back.
      
      Example usage:
      
        clang -O2 -emit-llvm -c cls.c -o - | llc -march=bpf -filetype=obj -o cls.o
        tc filter add dev em1 parent 1: bpf run object-file cls.o classid x:y
      
        tc filter show dev em1 [...]
        filter parent 1: protocol all pref 49152 bpf handle 0x1 flowid x:y cls.o
      
      I placed the parser bits derived from Alexei's kernel sample, into tc_bpf.c
      as my next step is to also add the same support for BPF action, so we can
      have a fully fledged eBPF classifier and action in tc.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      11c39b5e
    • Stephen Hemminger's avatar
      update kernel headers to net-next 4.0-rc5 · cbdc3ed8
      Stephen Hemminger authored
      Lastest features
      cbdc3ed8
    • Daniel Borkmann's avatar
      misc: header rebase, add bpf.h · b54ac87e
      Daniel Borkmann authored
      Include the bpf.h uapi header file.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      b54ac87e
    • Madhu Challa's avatar
      ip: enable configuring multicast group autojoin · e31867ac
      Madhu Challa authored
      Joining multicast group on ethernet level via "ip maddr" command would
      not work if we have an Ethernet switch that does igmp snooping since
      the switch would not replicate multicast packets on ports that did not
      have IGMP reports for the multicast addresses.
      
      Linux vxlan interfaces created via "ip link add vxlan" have the group option
      that enables then to do the required join.
      
      By extending ip address command with option "autojoin" we can get similar
      functionality for openvswitch vxlan interfaces as well as other tunneling
      mechanisms that need to receive multicast traffic.
      
      example:
      ip address add 224.1.1.10/24 dev eth5 autojoin
      ip address del 224.1.1.10/24 dev eth5
      e31867ac
    • Scott Feldman's avatar
      route: label externally offloaded routes · 655444bd
      Scott Feldman authored
      On ip route print dump, label externally offloaded routes with "external".
      Offloaded routes are flagged with RTNH_F_EXTERNAL, a recent additon to
      net-next.  For example:
      
      $ ip route
      default via 192.168.0.2 dev eth0
      11.0.0.0/30 dev swp1  proto kernel  scope link  src 11.0.0.2 external
      11.0.0.4/30 via 11.0.0.1 dev swp1  proto zebra  metric 20 external
      11.0.0.8/30 dev swp2  proto kernel  scope link  src 11.0.0.10 external
      11.0.0.12/30 via 11.0.0.9 dev swp2  proto zebra  metric 20 external
      12.0.0.2  proto zebra  metric 30 external
              nexthop via 11.0.0.1  dev swp1 weight 1
              nexthop via 11.0.0.9  dev swp2 weight 1
      12.0.0.3 via 11.0.0.1 dev swp1  proto zebra  metric 20 external
      12.0.0.4 via 11.0.0.9 dev swp2  proto zebra  metric 20 external
      192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.15
      Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
      Reviewed-by: default avatarJiri Pirko <jiri@resnulli.us>
      655444bd
    • Stephen Hemminger's avatar
      update headers files for net-next · 61333d24
      Stephen Hemminger authored
      Use sanitized headers from 4.0.0-rc3
      61333d24
    • Daniel Borkmann's avatar
      tc: m_bpf: fix next arg selection after tc opcode · 51cf3675
      Daniel Borkmann authored
      Next argument after the tc opcode/verdict is optional, using NEXT_ARG()
      requires to have another argument after that one otherwise tc will bail
      out. Therefore, we need to advance to the next argument manually as done
      elsewhere.
      
      Fixes: 86ab59a6 ("tc: add support for BPF based actions")
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      51cf3675
    • Vadim Kochan's avatar
      599fc319
    • Vadim Kochan's avatar
      man ip-link: Add ip-netns(8) in 'SEE ALSO' · d5910297
      Vadim Kochan authored
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      d5910297
    • Roopa Prabhu's avatar
      lib utils: fix family during af_bit_len calculation · 106ca277
      Roopa Prabhu authored
      commit f3a2ddc1 ("lib utils: Use helpers to get AF bit/byte len")
      used a wrong family or family of zero in the default case
      during af_bit_len calculation causing ip route commands to
      fail with below error
      
      Error: an inet prefix is expected rather than "10.0.2.14/24".
      Reported-by: default avatarSven-Haegar Koch <haegar@sdinet.de>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      106ca277
    • philipp@redfish-solutions.com's avatar
      xfrm: Fix -o (oneline) being broken in xfrm and correct mark radix · 6f4cad91
      philipp@redfish-solutions.com authored
      Don't insert newline in -o (oneline) mode; print mark as hex.
      
      Oneline mode is supposed to force all output to be on oneline and
      machine-parsable, but this isn't the case for "ip xfrm" as shown:
      
      % ip -o xfrm monitor
      ...
      src 0.0.0.0/0 dst 0.0.0.0/0 \   dir out priority 2051 ptype main \  mark -1879048191/0xffffffff
          tmpl src 203.0.130.10 dst 198.51.130.30\        proto esp reqid 16384 mode tunnel\
      ...
      
      as that's 2 lines, not one. Also, the "mark" is shown in signed
      decimal, but the mask is in hex. This is confusing: let's use
      hex for both.
      Signed-off-by: default avatarPhilip Prindeville <philipp@redfish-solutions.com>
      6f4cad91
    • Roopa Prabhu's avatar
      fix ip -force -batch to continue on errors · 42ecedd4
      Roopa Prabhu authored
      This patch replaces exits with returns in several
      iproute2 commands. This fixes `ip -batch -force`
      to not exit but continue on errors.
      
      $cat c.txt
      route del 1.2.3.0/24 dev eth0
      route del 1.2.4.0/24 dev eth0
      route del 1.2.5.0/24 dev eth0
      route add 1.2.3.0/24 dev eth0
      
      $ip -force -batch c.txt
      RTNETLINK answers: No such process
      Command failed c.txt:2
      RTNETLINK answers: No such process
      Command failed c.txt:3
      Reported-by: default avatarSven-Haegar Koch <haegar@sdinet.de>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      42ecedd4
    • Andy Gospodarek's avatar
      bridge: drop reference to unused option embedded from manpage · 822e9609
      Andy Gospodarek authored
      While looking at the manpage, I noticed a reference to 'embedded' that was
      added by this commit:
      
      	commit d611682a
      	Author: John Fastabend <john.r.fastabend@intel.com>
      	Date:   Thu Sep 13 23:50:36 2012 -0700
      
      	    iproute2: bridge: finish removing replace option in man pages
      
      I no longer see any reference to the 'embedded' option in any c- or h-files, so
      it seems worthwhile to remove.
      Signed-off-by: default avatarAndy Gospodarek <gospo@cumulusnetworks.com>
      CC: John Fastabend <john.r.fastabend@intel.com>
      822e9609
    • Mark Einon's avatar
      ip: Make uniform the use of synonyms list, show and lst · 473544d9
      Mark Einon authored
      Where used in the ip tool, the 'show' option always has the synonyms
      'list' and 'lst', except for ip-token and ip-addrlabel, which are missing
      'lst'. Add this as a synonym for these commands.
      Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
      473544d9
  2. 15 Mar, 2015 8 commits
  3. 28 Feb, 2015 5 commits
  4. 24 Feb, 2015 6 commits
  5. 22 Feb, 2015 7 commits