1. 14 Jul, 2014 3 commits
  2. 10 Jun, 2014 2 commits
  3. 09 Jun, 2014 9 commits
    • Roopa Prabhu's avatar
      bridge: Add master device name to bridge fdb show · cc273a51
      Roopa Prabhu authored
      This patch adds master dev name from NDA_MASTER netlink attribute
       to bridge fdb show output
      
      current iproute2 tries to print 'master' in the output if NTF_MASTER
      is present. But, kernel today does not set NTF_MASTER during dump
      requests. Which means I have not seen iproute2 bridge cmd print 'master' atall.
      This patch overrides the NTF_MASTER flag if NDA_MASTER attribute is present.
      
      Example output:
      
      before this patch:
      # bridge fdb show
      44:38:39:00:27:ba dev bond2.2003 permanent
      44:38:39:00:27:bb dev bond4.2003 permanent
      44:38:39:00:27:bc dev bond2.2004 permanent
      
      After this patch:
      # bridge fdb show
      44:38:39:00:27:ba dev bond2.2003 master br-2003 permanent
      44:38:39:00:27:bb dev bond4.2003 master br-2003 permanent
      44:38:39:00:27:bc dev bond2.2004 master br-2004 permanent
      
      For comparision with the above, below is the output for NTF_SELF today,
      # bridge fdb show
      33:33:00:00:00:01 dev eth0 self permanent
      01:00:5e:00:00:01 dev eth0 self permanent
      33:33:ff:00:01:cc dev eth0 self permanent
      
      If change in output is a concern, 'master' can be put at the end of the fdb
      output line or made optional with -d[etails] option.
      
      change from v1 to v2:
          use 'bridge' instead of 'master' in fdb show output
      
      change from v2 to v3:
          use 'master' instead of 'bridge' in fdb show output
          (master could also be a vxlan device)
      Signed-off-by: default avatarWilson Kok <wkok@cumulusnetworks.com>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      cc273a51
    • Sucheta Chakraborty's avatar
      Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool · f89a2a05
      Sucheta Chakraborty authored
      o "min_tx_rate" option has been added for minimum Tx rate. Hence, for
        consistent naming, "max_tx_rate" option has been introduced for maximum
        Tx rate.
      
      o Change in v2: "rate" can be used along with "max_tx_rate".
        When both are specified, "max_tx_rate" should override.
      
      o Change in v3:
        * IFLA_VF_RATE: When IFLA_VF_RATE is used, and user has given only one of
          min_tx_rate or max_tx_rate, reading of previous rate limits is done in
          userspace instead of in kernel space before ndo_set_vf_rate.
      
        * IFLA_VF_TX_RATE: When IFLA_VF_TX_RATE is used, min_tx_rate is always read
          in kernel space. This takes care of below scenarios:
          (1) when old tool sends "rate" but kernel is new (expects min and max)
          (2) when new tool sends only "rate" but kernel is old (expects only "rate")
      
      o Change in v4 as suggested by Stephen Hemminger:
        * As per iproute policy, input and output formats should match. Changing display
          of max_tx_rate and min_tx_rate options accordingly.
      	./ip/ip link show p3p1
      	8: p3p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
              link/ether 00:0e:1e:16:ce:40 brd ff:ff:ff:ff:ff:ff
              vf 0 MAC 2a:18:8f:4d:3d:d4, tx rate 700 (Mbps), max_tx_rate 700Mbps, min_tx_rate 200Mbps
              vf 1 MAC 72:dc:ba:f9:df:fd
      Signed-off-by: default avatarSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
      f89a2a05
    • Stephen Hemminger's avatar
      Update to current net-next kernel headers · fd5c1d43
      Stephen Hemminger authored
      Update sanitized headers
      fd5c1d43
    • Jiri Pirko's avatar
    • Jiri Pirko's avatar
      iproute2: arpd: use ll_addr_a2n and ll_addr_n2a · dd50247d
      Jiri Pirko authored
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      dd50247d
    • Yang Yingliang's avatar
      fq: allow options of fair queue set to ~0U · aeb199d5
      Yang Yingliang authored
      Some options of fair queue cannot be (~0U). It leads to maxrate
      cannot be reset to unlimited because it cannot be (~0U). Allow
      the options being ~0U.
      
      Tested by the following command:
       # tc qdisc add dev eth4 root handle 1: fq limit 2000 flow_limit 200 maxrate 100mbit quantum 2000 initial_quantum 1600
       # tc -s -d qdisc show
      qdisc fq 1: dev eth4 root refcnt 2 limit 2000p flow_limit 200p buckets 1024 quantum 2000 initial_quantum 1600 maxrate 100Mbit
       Sent 1492 bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
       backlog 0b 0p requeues 0
        1 flows (0 inactive, 0 throttled)
        0 gc, 0 highprio, 0 throttled
      
       # tc qdisc change dev eth4 root handle 1: fq limit 4294967295 flow_limit 4294967295 maxrate 34359738360 quantum 4294967295 initial_quantum 4294967295
       # tc -s -d qdisc show
      qdisc fq 1: dev eth4 root refcnt 2 limit 4294967295p flow_limit 4294967295p buckets 1024 quantum 4294967295 initial_quantum 4294967295
       Sent 38372 bytes 216 pkt (dropped 0, overlimits 0 requeues 0)
       backlog 0b 0p requeues 0
        2 flows (1 inactive, 0 throttled)
        0 gc, 2 highprio, 7 throttled
      Suggested-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      aeb199d5
    • Andreas Henriksson's avatar
      bridge: Make filter_index match in signedness · 9dca899b
      Andreas Henriksson authored
      Michael Tautschnig wrote:
      
      During a rebuild [...]. Please note that we use our research
      compiler tool-chain (using tools from the cbmc package), which permits extended
      reporting on type inconsistencies at link time.
      
      [...]
      gcc   bridge.o fdb.o monitor.o link.o mdb.o vlan.o ../lib/libnetlink.a ../lib/libutil.a  ../lib/libnetlink.a ../lib/libutil.a -o bridge
      file link.c line 18: error: conflicting types for variable "filter_index"
      old definition in module fdb file fdb.c line 29
      signed int
      new definition in module link file link.c line 18
      unsigned int
      <builtin>: recipe for target 'bridge' failed
      make[3]: *** [bridge] Error 64
      make[3]: Leaving directory '/srv/jenkins-slave/workspace/sid-goto-cc-iproute2/iproute2-3.14.0/bridge'
      Makefile:45: recipe for target 'all' failed
      
      While practical constraints may limit the value of filter_index to remain within
      the bounds of a positive signed int, there is certainly no such guarantee here.
      Also, a plain majority vote suggests that this really just a wrong declaration
      in link.c as several declarations of filter_index as signed int exist.
      
      [...]
      
      My followup on this was:
      
      I think the majority is wrong.
      
      filter_index is assigned exclusively from if_nametoindex or ll_name_to_index
      which both return unsigned int.
      
      Changing it to unsigned everywhere seems better.
      
      This has been minimally tested by using the bridge tool
      to add vids and showing available vids on different devices.
      Reported-by: default avatarMichael Tautschnig <mt@debian.org>
      Signed-off-by: default avatarAndreas Henriksson <andreas@fatal.se>
      9dca899b
    • Cong Wang's avatar
      do not exit silently when link is not found · 0cb6bb51
      Cong Wang authored
      When we create a tunnel on top of a link and the link specified
      in cmdline doesn't exist, an error message should be shown.
      
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      0cb6bb51
    • Eric Dumazet's avatar
      ss: display pacing_rate/max_pacing_rate · eb6028b2
      Eric Dumazet authored
      Since linux-3.15, kernel exports tcpi_pacing_rate and
      tcpi_max_pacing_rate in tcp_info
      
      Add TCP pacing_rate information on ss -i output :
      
      lpaa23:~# ./ss -ti dst 10.246.7.151
      State      Recv-Q Send-Q   Local Address:Port       Peer Address:Port
      ESTAB      0      325800    10.246.7.151:57614
      10.246.7.152:46811
      	 cubic wscale:7,7 rto:201 rtt:0.081/0.006 mss:1448 cwnd:90 ssthresh:63
      send 12871.1Mbps pacing_rate 15397.8Mbps unacked:90 retrans:0/305
      rcv_space:29200
      
      If SO_MAX_PACING_RATE is set on the socket, we add /max_pacing_rate as
      in :
      
      ... pacing_rate 1570.5Mbps/2.0Gbps ...
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      eb6028b2
  4. 29 May, 2014 4 commits
  5. 28 May, 2014 6 commits
    • Oliver Hartkopp's avatar
      iplink: can: fix help text and man page · 2b70fe15
      Oliver Hartkopp authored
      Controller Area Network (CAN) interfaces are physical network interfaces.
      They can't be 'created' like software devices by 'ip link add type can'.
      Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      2b70fe15
    • Jiri Pirko's avatar
      iproute2: ipa: show port id · c8970674
      Jiri Pirko authored
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      c8970674
    • Jamal Hadi Salim's avatar
      actions: correctly report the number of actions flushed · 288abf51
      Jamal Hadi Salim authored
      This also fixes a long standing bug of not sanely reporting the
      action chain ordering
      
      Sample scenario test
      
      on window 1(event window):
      run "tc monitor" and observe events
      
      on window 2:
      sudo tc actions add action drop index 10
      sudo tc actions add action ok index 12
      sudo tc actions ls action gact
      sudo tc actions flush action gact
      
      See the event window reporting two entries
      (doing another listing should show empty generic actions)
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      288abf51
    • 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
  6. 13 May, 2014 3 commits
  7. 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
  8. 21 Apr, 2014 1 commit
  9. 12 Apr, 2014 4 commits