1. 28 May, 2014 3 commits
    • Jamal Hadi Salim's avatar
      actions: keyword flowid or classid terminates action pipeline · 9282d08d
      Jamal Hadi Salim authored
      scenario testcase:
      
      TC="sudo ./tc/tc"
      DEV="dev eth0"
      $TC qdisc del $DEV ingress
      $TC qdisc add $DEV ingress
      $TC filter add $DEV parent ffff: protocol ip u32 match ip src 10.0.0.0/24 action police rate 6Mbit burst 6Mbit drop flowid :1
      $TC filter add $DEV parent ffff: protocol ip u32 match ip dst 10.0.0.0/24 action police rate 1Gbit burst 1Gbit pass flowid :1
      $TC -s filter ls $DEV parent ffff: protocol ip
      $TC qdisc del $DEV ingress
      $TC qdisc add $DEV ingress
      $TC filter add $DEV parent ffff: protocol ip u32 match ip src 10.0.0.0/24 flowid 1:1 action police rate 6Mbit burst 6Mbit drop
      $TC filter add $DEV parent ffff: protocol ip u32 match ip dst 10.0.0.0/24 flowid 1:2 action police rate 1Gbit burst 1Gbit pass
      
      $TC -s filter ls $DEV parent ffff: protocol ip
      $TC qdisc del $DEV ingress
      $TC qdisc add $DEV ingress
      $TC filter add $DEV parent ffff: protocol ip pref 10 \
      u32 match ip protocol 1 0xff \
      flowid 1:10 \
      action skbedit mark 11 \
      action police rate 10kbit burst 10k pipe index 1 \
      action skbedit mark 12 \
      action police rate 20kbit burst 20k pipe index 2 \
      action mirred egress mirror dev dummy0
      
      $TC -s filter ls $DEV parent ffff: protocol ip
      $TC qdisc del $DEV ingress
      $TC qdisc add $DEV ingress
      $TC filter add $DEV parent ffff: protocol ip pref 10 \
      u32 match ip protocol 1 0xff \
      action skbedit mark 11 \
      action police rate 10kbit burst 10k pipe index 1 \
      action skbedit mark 12 \
      action police rate 20kbit burst 20k pipe index 2 \
      action mirred egress mirror dev dummy0 \
      flowid 1:10
      
      $TC -s filter ls $DEV parent ffff: protocol ip
      Reported-by: default avatarSeann Herdejurgen <seann@herdejurgen.com>
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      9282d08d
    • Jamal Hadi Salim's avatar
      cacba03b
    • Natanael Copa's avatar
      iproute2: various header include fixes for compiling with musl libc · dd9cc0ee
      Natanael Copa authored
      We need limits.h for LONG_MIN and LONG_MAX, sys/param.h for MIN and
      sys/select for struct timeval.
      
      This fixes the following compile errors with musl libc:
      
      f_bpf.c: In function 'bpf_parse_opt':
      f_bpf.c:181:12: error: 'LONG_MIN' undeclared (first use in this function)
         if (h == LONG_MIN || h == LONG_MAX) {
                  ^
      ...
      
      tc_util.o: In function `print_tcstats2_attr':
      tc_util.c:(.text+0x13fe): undefined reference to `MIN'
      tc_util.c:(.text+0x1465): undefined reference to `MIN'
      tc_util.c:(.text+0x14ce): undefined reference to `MIN'
      tc_util.c:(.text+0x154c): undefined reference to `MIN'
      tc_util.c:(.text+0x160a): undefined reference to `MIN'
      tc_util.o:tc_util.c:(.text+0x174e): more undefined references to `MIN' follow
      ...
      
      tc_stab.o: In function `print_size_table':
      tc_stab.c:(.text+0x40f): undefined reference to `MIN'
      ...
      
      fdb.c:247:30: error: 'ULONG_MAX' undeclared (first use in this function)
              (vni >> 24) || vni == ULONG_MAX)
                                    ^
      
      lnstat.h:28:17: error: field 'last_read' has incomplete type
        struct timeval last_read;  /* last time of read */
                       ^
      Signed-off-by: default avatarNatanael Copa <ncopa@alpinelinux.org>
      dd9cc0ee
  2. 13 May, 2014 3 commits
  3. 09 May, 2014 8 commits
    • Sergey V. Lobanov's avatar
      TBF man page fix (tbf is not classless) · 7bc7fcaa
      Sergey V. Lobanov authored
      TBF is not classless qdisc. man page corrected, added example
      describing the use of inner qdisc
      Signed-off-by: default avatarSergey V. Lobanov <sergey@lobanov.in>
      7bc7fcaa
    • Sergey V. Lobanov's avatar
      Fix Linux priority and band for TOS==0x2 (man 8 tc-prio) · 96e8ab7c
      Sergey V. Lobanov authored
      Due to commit 4a2b9c3(in Linux kernel) Linux priority(skb->priority)
      changed for TOS==0x2
      Signed-off-by: default avatarSergey V. Lobanov <sergey@lobanov.in>
      96e8ab7c
    • Stephen Hemminger's avatar
      Whitespace and indentation cleanup · 4b726cb1
      Stephen Hemminger authored
      Need to go over whole source and scrub..
      4b726cb1
    • david decotigny's avatar
      iproute2: show counter of carrier on<->off transitions · 30b55792
      david decotigny authored
      This patch allows to display the current counter of carrier on<->off
      transitions (IFLA_CARRIER_CHANGES, see kernel commit "expose number of
      carrier on/off changes"):
      
        ip -s -s link show dev eth0
        32: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
          link/ether ................. brd ff:ff:ff:ff:ff:ff
          RX: bytes  packets  errors  dropped overrun mcast
          125552461  258881   0       0       0       10150
          RX errors: length  crc     frame   fifo    missed
                     0        0       0       0       0
          TX: bytes  packets  errors  dropped carrier collsns
          40426119   224444   0       0       0       0
          TX errors: aborted fifo    window  heartbeat transns
                     0        0       0       0        3
      
      Tested:
        - kernel with patch "net-sysfs: expose number of carrier on/off
          changes": see "transns" column above
        - kernel wthout the patch: "transns" not displayed (as expected)
      Signed-off-by: default avatarDavid Decotigny <decot@googlers.com>
      30b55792
    • Terry Lam's avatar
      support for Heavy Hitter Filter (HHF) qdisc · ac74bd2a
      Terry Lam authored
      $tc qdisc add dev eth0 hhf help
      Usage: ... hhf [ limit PACKETS ] [ quantum BYTES]
                     [ hh_limit NUMBER ]
                     [ reset_timeout TIME ]
                     [ admit_bytes BYTES ]
                     [ evict_timeout TIME ]
                     [ non_hh_weight NUMBER ]
      
      $tc -s -d qdisc show dev eth0
      qdisc hhf 8005: root refcnt 32 limit 1000p quantum 1514 hh_limit 2048
      reset_timeout 40.0ms admit_bytes 131072 evict_timeout 1.0s non_hh_weight 2
       Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0
          drop_overlimit 0 hh_overlimit 0 tot_hh 0 cur_hh 0
      
      HHF qdisc parameters:
      - limit: max number of packets in qdisc (default 1000)
      - quantum: max deficit per RR round (default 1 MTU)
      - hh_limit: max number of HHs to keep states (default 2048)
      - reset_timeout: time to reset HHF counters (default 40ms)
      - admit_bytes: counter thresh to classify as HH (default 128KB)
      - evict_timeout: threshold to evict idle HHs (default 1s)
      - non_hh_weight:  DRR weight for mice (default 2)
      Signed-off-by: default avatarTerry Lam <vtlam@google.com>
      ac74bd2a
    • Jay Vosburgh's avatar
      tc/netem: fix loss state display and p14 parsing · 8f9672af
      Jay Vosburgh authored
      The display of the entire netem loss state is shown as if it
      were gemodel state, as the loss state information is assigned to the
      wrong pointer.  Correct this by assigning the loss state to the correct
      pointer.
      
      	Additionally, attempting to set netem loss state will result in
      random values in the p14 state probability because the option value
      passed to the kernel by tc netem is not parsed or initialized.  Fix this
      by supplying a default value of 0 for p14 and parsing the p14 value if
      one is supplied.
      Signed-off-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      8f9672af
    • Oliver Hartkopp's avatar
      iproute2: can: support CAN FD control interface · 2bfe0470
      Oliver Hartkopp authored
      For CAN FD a new set of bittiming configuration and enabling functions for the
      data section is provided by the CAN driver infrastructure.
      
      This patch allows to configure the newly introduced CAN FD properties.
      Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      2bfe0470
    • Oliver Hartkopp's avatar
      iproute2: can: fix indention white spaces · 3bbff7df
      Oliver Hartkopp authored
      When preparing a patch for CAN FD support these white space issues showed up.
      Fix it in the current code to be able to provide a proper follow up patch.
      Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      3bbff7df
  4. 21 Apr, 2014 1 commit
  5. 12 Apr, 2014 5 commits
    • Stephen Hemminger's avatar
      Merge branch 'net-next' · e4d5edba
      Stephen Hemminger authored
      e4d5edba
    • Stephen Hemminger's avatar
      v3.14.0 · af6e4234
      Stephen Hemminger authored
      af6e4234
    • Heiner Kallweit's avatar
      ip: officially support flag mngtmpaddr also for "ip addr del" · a424c393
      Heiner Kallweit authored
      Kernel is being extended to support flag IFA_F_MANAGETEMPADDR also for
      deletion of addresses. This will allow a userspace application to indicate
      that for a global address the kernel should delete all related temporary
      addresses as well.
      
      "ip addr del" internally calls ipaddr_modify which silently accepts
      any flag provided on the command line already, independent of the
      actual command.
      Therefore only the usage documentation needs to be extended.
      Signed-off-by: default avatarHeiner Kallweit <heiner.kallweit@web.de>
      a424c393
    • WANG Cong's avatar
      ipaddress: do not add IFA_FLAGS when not necessary · 8b21f88d
      WANG Cong authored
      commit 37c9b94e (add support for extended ifa_flags)
      introduced a regression:
      
              # ./ip/ip addr add 192.168.0.1/24 dev eth0
              RTNETLINK answers: Invalid argument
      
      This is due to old kernels don't support IFA_FLAGS flag, we should not
      use it if we don't use the flags beyond old .ifa_flags.
      
      Cc: Jiri Pirko <jiri@resnulli.us>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      8b21f88d
    • Kusanagi Kouichi's avatar
      veth: Handle flags correctry · 18917544
      Kusanagi Kouichi authored
      Flags for a peer override flags for the other and not used for the
      peer.
      
      before:
      # ip link add up type veth peer down multicast off
      # ip link
      1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether 2e:5c:cd:f5:63:d2 brd ff:ff:ff:ff:ff:ff
      3: veth1: <BROADCAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether 72:b0:fa:1e:76:7a brd ff:ff:ff:ff:ff:ff
      
      after:
      # ip link add up type veth peer down multicast off
      # ip link
      1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: veth0: <BROADCAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether 6e:db:03:b3:bd:ff brd ff:ff:ff:ff:ff:ff
      3: veth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
          link/ether a6:62:d9:84:f0:73 brd ff:ff:ff:ff:ff:ff
      Signed-off-by: default avatarKusanagi Kouichi <slash@ac.auone-net.jp>
      18917544
  6. 01 Apr, 2014 1 commit
  7. 21 Mar, 2014 6 commits
  8. 10 Mar, 2014 3 commits
  9. 05 Mar, 2014 1 commit
  10. 28 Feb, 2014 1 commit
  11. 17 Feb, 2014 7 commits
  12. 10 Feb, 2014 1 commit