]> git.proxmox.com Git - mirror_iproute2.git/log
mirror_iproute2.git
10 years agoTBF man page fix (tbf is not classless)
Sergey V. Lobanov [Fri, 9 May 2014 18:12:54 +0000 (22:12 +0400)]
TBF man page fix (tbf is not classless)

TBF is not classless qdisc. man page corrected, added example
describing the use of inner qdisc

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
10 years agoFix Linux priority and band for TOS==0x2 (man 8 tc-prio)
Sergey V. Lobanov [Fri, 9 May 2014 19:22:42 +0000 (23:22 +0400)]
Fix Linux priority and band for TOS==0x2 (man 8 tc-prio)

Due to commit 4a2b9c3(in Linux kernel) Linux priority(skb->priority)
changed for TOS==0x2

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
10 years agoWhitespace and indentation cleanup
Stephen Hemminger [Fri, 9 May 2014 19:36:46 +0000 (12:36 -0700)]
Whitespace and indentation cleanup

Need to go over whole source and scrub..

10 years agoiproute2: show counter of carrier on<->off transitions
david decotigny [Tue, 6 May 2014 03:38:18 +0000 (20:38 -0700)]
iproute2: show counter of carrier on<->off transitions

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: David Decotigny <decot@googlers.com>
10 years agosupport for Heavy Hitter Filter (HHF) qdisc
Terry Lam [Fri, 9 May 2014 19:10:47 +0000 (12:10 -0700)]
support for Heavy Hitter Filter (HHF) qdisc

$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: Terry Lam <vtlam@google.com>
10 years agotc/netem: fix loss state display and p14 parsing
Jay Vosburgh [Fri, 9 May 2014 02:02:20 +0000 (19:02 -0700)]
tc/netem: fix loss state display and p14 parsing

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: Jay Vosburgh <jay.vosburgh@canonical.com>
10 years agoiproute2: can: support CAN FD control interface
Oliver Hartkopp [Wed, 23 Apr 2014 17:27:27 +0000 (19:27 +0200)]
iproute2: can: support CAN FD control interface

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: Oliver Hartkopp <socketcan@hartkopp.net>
10 years agoiproute2: can: fix indention white spaces
Oliver Hartkopp [Wed, 23 Apr 2014 17:27:26 +0000 (19:27 +0200)]
iproute2: can: fix indention white spaces

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: Oliver Hartkopp <socketcan@hartkopp.net>
10 years agoUpdate to 3.15-rc2 headers
Stephen Hemminger [Mon, 21 Apr 2014 15:26:44 +0000 (08:26 -0700)]
Update to 3.15-rc2 headers

10 years agoMerge branch 'net-next'
Stephen Hemminger [Sat, 12 Apr 2014 01:06:13 +0000 (18:06 -0700)]
Merge branch 'net-next'

10 years agov3.14.0
Stephen Hemminger [Sat, 12 Apr 2014 00:48:41 +0000 (17:48 -0700)]
v3.14.0

10 years agoip: officially support flag mngtmpaddr also for "ip addr del"
Heiner Kallweit [Thu, 10 Apr 2014 19:16:45 +0000 (21:16 +0200)]
ip: officially support flag mngtmpaddr also for "ip addr del"

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: Heiner Kallweit <heiner.kallweit@web.de>
10 years agoipaddress: do not add IFA_FLAGS when not necessary
WANG Cong [Fri, 4 Apr 2014 17:07:20 +0000 (10:07 -0700)]
ipaddress: do not add IFA_FLAGS when not necessary

commit 37c9b94ed21d5779acc23d89a4 (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: Cong Wang <xiyou.wangcong@gmail.com>
10 years agoveth: Handle flags correctry
Kusanagi Kouichi [Tue, 1 Apr 2014 16:09:18 +0000 (01:09 +0900)]
veth: Handle flags correctry

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: Kusanagi Kouichi <slash@ac.auone-net.jp>
10 years agofix indentation of ip neighbour man page
Stephen Hemminger [Tue, 1 Apr 2014 03:23:40 +0000 (20:23 -0700)]
fix indentation of ip neighbour man page

Formatting was awful and unclear on ip neighbour

10 years agoipxfrm: allow to setup filter when dumping SA
Nicolas Dichtel [Fri, 21 Mar 2014 10:02:43 +0000 (11:02 +0100)]
ipxfrm: allow to setup filter when dumping SA

It's now possible to filter SA directly into the kernel by specifying
XFRMA_PROTO and/or XFRMA_ADDRESS_FILTER.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
10 years agoMerge branch 'master' into net-next
Stephen Hemminger [Fri, 21 Mar 2014 21:24:22 +0000 (14:24 -0700)]
Merge branch 'master' into net-next

10 years agobridge: fix reporting of IPv6 addresses
Mike Rapoport [Thu, 20 Mar 2014 11:06:10 +0000 (13:06 +0200)]
bridge: fix reporting of IPv6 addresses

Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
10 years agoiproute: Show default type, table, proto and scope of route
Masatake YAMATO [Wed, 12 Mar 2014 03:46:53 +0000 (12:46 +0900)]
iproute: Show default type, table, proto and scope of route

In "ip route show" output unicast type, main table, boot protocol and
universe scope are hidden as default labels.

Sometimes it is helpful to show the hidden label for people not enough
familiar with routing subsystem to map the output of "ip route show" and
kernel source code.

With this patch "ip route show" with -d option shows the default labels.

Example of difference of output with -d option:

    $ ./ip/ip -4   route show table all dev virbr1
    ...
    192.168.121.0/28  proto kernel  scope link  src 192.168.121.1
    ...
    $ ./ip/ip -4 -d  route show table all dev virbr1
    ...
    unicast 192.168.121.0/28  table main  proto kernel  scope link  src 192.168.121.1
    ...

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agohtb: Move direct_qlen code part to htb_parse_opt().
Hiroaki SHIMODA [Sat, 8 Mar 2014 13:10:03 +0000 (22:10 +0900)]
htb: Move direct_qlen code part to htb_parse_opt().

The direct_qlen command option is used with qdisc operation.
It happened to be implemented in htb_parse_class_opt() which is called
with class operation.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
10 years agoUpdate headers to net-next
Stephen Hemminger [Fri, 21 Mar 2014 21:16:17 +0000 (14:16 -0700)]
Update headers to net-next

10 years agoss: Add support for retrieving SELinux contexts
Richard Haines [Fri, 7 Mar 2014 10:36:52 +0000 (10:36 +0000)]
ss: Add support for retrieving SELinux contexts

The process SELinux contexts can be added to the output using the -Z
option. Using the -z option will show the process and socket contexts (see
the man page for details).
For netlink sockets: if valid process show process context, if pid = 0
show kernel initial context, if unknown show "unavailable".

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
10 years agoiproute2: use named constants instead of number literals to fill rtnl_rttable_hash
Masatake YAMATO [Fri, 7 Mar 2014 10:21:37 +0000 (19:21 +0900)]
iproute2: use named constants instead of number literals to fill rtnl_rttable_hash

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoiproute2: use named constants instead of number literals to fill rtnl_rtscope_tab
Masatake YAMATO [Fri, 7 Mar 2014 10:21:36 +0000 (19:21 +0900)]
iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoiproute2: add man page for mqprio
John Fastabend [Mon, 3 Mar 2014 17:38:20 +0000 (09:38 -0800)]
iproute2: add man page for mqprio

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
10 years agoiplink_bond_slave: show mii_status only once
Michal Kubeček [Fri, 28 Feb 2014 13:58:15 +0000 (14:58 +0100)]
iplink_bond_slave: show mii_status only once

With "ip -d link show", bonding slave mii status is displayed
twice, once as a number and once as a name.

Fixes: 730d3f61 ("iplink: add support for bonding slave")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
10 years agoiplink_bond: fix parameter value matching
Michal Kubeček [Thu, 13 Feb 2014 16:31:59 +0000 (17:31 +0100)]
iplink_bond: fix parameter value matching

Lookup function get_index() compares argument with table entries
only up to the length of the table entry so that if an entry
with lower index is a substring of a later one, earlier entry is
used even if the argument is equal to the other. For example,

  ip link set bond0 type bond xmit_hash_policy layer2+3

sets xmit_hash_policy to 0 (layer2) as this is found before
"layer2+3" can be checked.

Use strcmp() to compare whole strings instead.

v2: look for an exact match only

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
10 years agokill spaces before tabs
Stephen Hemminger [Mon, 17 Feb 2014 18:56:31 +0000 (10:56 -0800)]
kill spaces before tabs

10 years agoRemove trailing whitespace
Stephen Hemminger [Mon, 17 Feb 2014 18:55:31 +0000 (10:55 -0800)]
Remove trailing whitespace

10 years agoiplink: add support for bonding slave
Jiri Pirko [Thu, 23 Jan 2014 16:52:54 +0000 (17:52 +0100)]
iplink: add support for bonding slave

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agointroduce support for slave info data
Jiri Pirko [Thu, 23 Jan 2014 16:52:53 +0000 (17:52 +0100)]
introduce support for slave info data

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoiplink_bond: fix arp_all_targets parameter name in output
Michal Kubeček [Thu, 6 Feb 2014 11:47:33 +0000 (12:47 +0100)]
iplink_bond: fix arp_all_targets parameter name in output

Name of arp_all_targets parameter in output of "ip -d link show"
is missing trailing "s".

Fixes: 63d127b0 ("iproute2: finish support for bonding attributes")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
10 years agoss: display interface name as zone index when needed
FX Le Bail [Tue, 11 Feb 2014 09:06:23 +0000 (10:06 +0100)]
ss: display interface name as zone index when needed

This change enable the ss command to display the interface name as zone index
for local addresses when needed.

For this enhanced display *_diag stuff is needed.

It is based on a first version by Bernd Eckenfels.

example:
Netid  State   Recv-Q Send-Q                 Local Address:Port    Peer Address:Port
udp    UNCONN  0      0      fe80::20c:29ff:fe1f:7406%eth1:9999              :::*
udp    UNCONN  0      0                                 :::domain            :::*
tcp    LISTEN  0      3                                 :::domain            :::*
tcp    LISTEN  0      5      fe80::20c:29ff:fe1f:7410%eth2:99                :::*

Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
10 years agoiproute: Fix Netid value for multi-families output
Pavel Emelyanov [Tue, 28 Jan 2014 06:24:15 +0000 (10:24 +0400)]
iproute: Fix Netid value for multi-families output

When requesting simultaneous output of TCP and UDP sockets
the netid field shows "tcp" always.

[root@xemvm1 iproute2]# ./misc/ss -a -tu
Netid State      Recv-Q Send-Q                            Local Address:Port                                Peer Address:Port
tcp   UNCONN     0      0                                             *:32713                                          *:*
tcp   UNCONN     0      0                                             *:bootpc                                         *:*
tcp   UNCONN     0      0                                            :::57879                                         :::*
tcp   LISTEN     0      128                                           *:ssh                                            *:*
tcp   ESTAB      0      48                                      1.2.3.5:ssh                                      1.2.3.4:45826
tcp   ESTAB      0      0                                       1.2.3.5:ssh                                      1.2.3.4:45814
tcp   LISTEN     0      128                                          :::ssh                                           :::*

While the 1st 3 sockets are UDP ones:

[root@xemvm1 iproute2]# ./misc/ss -a -u
State       Recv-Q Send-Q                              Local Address:Port                                  Peer Address:Port
UNCONN      0      0                                               *:32713                                            *:*
UNCONN      0      0                                               *:bootpc                                           *:*
UNCONN      0      0                                              :::57879                                           :::*

Reported-by: François-Xavier Le Bail <fx.lebail@yahoo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Tested-by: François-Xavier Le Bail <fx.lebail@yahoo.com>
10 years agotcp_metrics: Allow removal based on the source-IP
Christoph Paasch [Thu, 6 Feb 2014 22:15:04 +0000 (23:15 +0100)]
tcp_metrics: Allow removal based on the source-IP

This patch allows adding the source-IP attribute to the netlink-command.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
10 years agotcp_metrics: Display source-address
Christoph Paasch [Thu, 6 Feb 2014 22:15:03 +0000 (23:15 +0100)]
tcp_metrics: Display source-address

This patch allows to display the source-IP.
stype will be used in the next patch that allows to remove based on the
source-IP.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
10 years agotcp_metrics: Rename addr to daddr and add local variable
Christoph Paasch [Thu, 6 Feb 2014 22:15:02 +0000 (23:15 +0100)]
tcp_metrics: Rename addr to daddr and add local variable

Renaming addr to daddr, because we will introduce saddr later.

The local variable is necessary to store RTA_PAYLOAD(a) temporarily.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
10 years agopedit: do not print debugging information by default
WANG Cong [Wed, 29 Jan 2014 23:12:59 +0000 (15:12 -0800)]
pedit: do not print debugging information by default

Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
10 years agogenl: fix a typo in help message of ctrl
Masatake YAMATO [Wed, 29 Jan 2014 11:30:15 +0000 (20:30 +0900)]
genl: fix a typo in help message of ctrl

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoUpdate kernel headers to 3.13-rc2
Stephen Hemminger [Mon, 10 Feb 2014 22:40:33 +0000 (14:40 -0800)]
Update kernel headers to 3.13-rc2

10 years agoMerge branch 'net-next-for-3.13'
Stephen Hemminger [Mon, 10 Feb 2014 22:39:20 +0000 (14:39 -0800)]
Merge branch 'net-next-for-3.13'

10 years agoPIE: Add man page
Mythili Prabhu [Fri, 17 Jan 2014 03:39:52 +0000 (19:39 -0800)]
PIE: Add man page

This adds the manpage for  PIE: Proportional Integral controller Enhanced AQM
scheme.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: Vijay Subramanian <vijaynsu@cisco.com>
CC: Dave Taht <dave.taht@bufferbloat.net>
10 years agonetem: add 64bit rates support
Yang Yingliang [Thu, 16 Jan 2014 03:09:14 +0000 (11:09 +0800)]
netem: add 64bit rates support

netem support 64bit rates start from linux-3.13.
Add 64bit rates support in tc tools.

tc qdisc show dev eth0
qdisc netem 1: dev eth4 root refcnt 2 limit 1000 rate 35Gbit

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Eric Dumazet <edumazet@google.com>
10 years agotbf: support sending burst/mtu to kernel directly
Yang Yingliang [Thu, 16 Jan 2014 03:09:13 +0000 (11:09 +0800)]
tbf: support sending burst/mtu to kernel directly

To avoid loss when transforming burst to buffer in userspace, send
burst/mtu to kernel directly.

Kernel commit 2e04ad424b("sch_tbf: add TBF_BURST/TBF_PBURST attribute")
make it can handle burst/mtu.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
10 years agoadd support for IFA_F_NOPREFIXROUTE
Thomas Haller [Tue, 7 Jan 2014 20:46:28 +0000 (21:46 +0100)]
add support for IFA_F_NOPREFIXROUTE

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoadd support for IFA_F_MANAGETEMPADDR
Jiri Pirko [Mon, 6 Jan 2014 09:17:10 +0000 (10:17 +0100)]
add support for IFA_F_MANAGETEMPADDR

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate headers files from net-next
Stephen Hemminger [Mon, 20 Jan 2014 20:28:42 +0000 (12:28 -0800)]
Update headers files from net-next

10 years agoRevert "vxlan: remove dstport option"
Stephen Hemminger [Fri, 10 Jan 2014 23:17:06 +0000 (15:17 -0800)]
Revert "vxlan: remove dstport option"

This reverts commit 92deabcf29e1b3df99230e89acc84fd8de53c87f.

Conflicts:
ip/iplink_vxlan.c

Allow setting dst_port in 3.12

10 years agoiproute2: finish support for bonding attributes
sfeldma@cumulusnetworks.com [Sat, 4 Jan 2014 02:45:38 +0000 (18:45 -0800)]
iproute2: finish support for bonding attributes

Add support for bonding attributes just added to net-next.
On set, allow string or number value for enumerated attributes.
On show, use always use string value for attribute.

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
10 years agoMerge branch 'master' into net-next-for-3.13
Stephen Hemminger [Fri, 10 Jan 2014 07:08:50 +0000 (23:08 -0800)]
Merge branch 'master' into net-next-for-3.13

10 years agoss: add unix_seqpacket to the help message and the man page
Masatake YAMATO [Wed, 8 Jan 2014 11:13:48 +0000 (20:13 +0900)]
ss: add unix_seqpacket to the help message and the man page

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoss: enable query by type in unix domain related socket
Masatake YAMATO [Wed, 8 Jan 2014 11:13:47 +0000 (20:13 +0900)]
ss: enable query by type in unix domain related socket

This patch enables -A unix_stream, -A unix_dgram and
-A unix_seqpacket option even if ss gets socket information
via netlink.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoss: handle seqpacket type of unix domain socket
Masatake YAMATO [Wed, 8 Jan 2014 11:13:46 +0000 (20:13 +0900)]
ss: handle seqpacket type of unix domain socket

ss didn't distignish seqpacket type from dgram type.
With this patch ss can distignish it.

 $ misc/ss -x -a | grep seq
 u_seq  LISTEN     0      128    /run/udev/control 10966                 * 0
 u_seq  ESTAB      0      0                    * 115103                * 115104
 u_seq  ESTAB      0      0                    * 115104                * 115103

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
10 years agoPIE: Proportional Integral controller Enhanced
Vijay Subramanian [Wed, 8 Jan 2014 06:00:39 +0000 (22:00 -0800)]
PIE: Proportional Integral controller Enhanced

Proportional Integral controller Enhanced (PIE) is a scheduler to address the
bufferbloat problem.

We present here a lightweight design, PIE(Proportional Integral controller
Enhanced) that can effectively control the average queueing latency to a target
value. Simulation results, theoretical analysis and Linux testbed results have
shown that PIE can ensure low latency and achieve high link utilization under
various congestion situations. The design does not require per-packet
timestamp, so it incurs very small overhead and is simple enough to implement
in both hardware and software.  "

For more information, please see technical paper about PIE in the IEEE
Conference on High Performance Switching and Routing 2013. A copy of the paper
can be found at ftp://ftpeng.cisco.com/pie/.

Please also refer to the IETF draft submission at
http://tools.ietf.org/html/draft-pan-tsvwg-pie-00

All relevant code, documents and test scripts and results can be found at
ftp://ftpeng.cisco.com/pie/.

For problems with the iproute2/tc or Linux kernel code, please contact Vijay
Subramanian (vijaynsu@cisco.com or subramanian.vijay@gmail.com) Mythili Prabhu
(mysuryan@cisco.com)

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: Mythili Prabhu <mysuryan@cisco.com>
CC: Dave Taht <dave.taht@bufferbloat.net>
10 years agoadd support for extended ifa_flags
Jiri Pirko [Mon, 6 Jan 2014 09:17:09 +0000 (10:17 +0100)]
add support for extended ifa_flags

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate to 3.13-rc6 + net-next headers
Stephen Hemminger [Fri, 10 Jan 2014 06:45:49 +0000 (22:45 -0800)]
Update to 3.13-rc6 + net-next headers

10 years agoMerge branch 'master' into net-next-for-3.13
Stephen Hemminger [Fri, 10 Jan 2014 06:44:17 +0000 (22:44 -0800)]
Merge branch 'master' into net-next-for-3.13

10 years agoiproute: Document the "ip link add index IDX" possibility
Pavel Emelyanov [Mon, 30 Dec 2013 09:55:17 +0000 (13:55 +0400)]
iproute: Document the "ip link add index IDX" possibility

Signed-off-by: Pavel Emelyanov <xemul@paralles.com>
10 years agoiptunnel: Allow GRE_KEY for vti interface
Hangbin Liu [Thu, 5 Dec 2013 16:19:01 +0000 (00:19 +0800)]
iptunnel: Allow GRE_KEY for vti interface

The vti interface will use GRE_KEY to match the right policy in kernel. So we
can not return fail when the tunnel is vti.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agoiproute: Make it possible to specify index on link creation
Pavel Emelyanov [Thu, 26 Dec 2013 19:15:20 +0000 (23:15 +0400)]
iproute: Make it possible to specify index on link creation

The RTM_NEWLINK message accepts ifi_index non-zero value and lets
creation of links with given index (if it's free, or course). This
functionality is available since linux-v3.5.

This patch makes this API available via ip tool.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
10 years agoupdate to latest net-next headers
Stephen Hemminger [Sat, 28 Dec 2013 19:15:10 +0000 (11:15 -0800)]
update to latest net-next headers

10 years agodont skip action order
Jamal Hadi Salim [Sun, 22 Dec 2013 15:37:44 +0000 (10:37 -0500)]
dont skip action order

attached.

cheers,
jamal
commit 58d78f9f6447df324cdeb99262442c5e3f1f924b
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sun Dec 22 10:34:18 2013 -0500

    dont skip displaying of action chains or lists by TCA_ACT_MAX_PRIO

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoallow batch gets of actions
Jamal Hadi Salim [Sun, 22 Dec 2013 15:33:13 +0000 (10:33 -0500)]
allow batch gets of actions

Attached.

cheers,
jamal
commit c5f30cabef14c951596210b96bc9b423b0d39592
Author: Jamal Hadi Salim <hadi@mojatatu.com>
Date:   Sun Dec 22 10:24:17 2013 -0500

    Allow batching of action gets
    Example:
    ----
    tc actions get \
    action gact index 100 \
    action gact index 4
    ----

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agosimple print newline
Jamal Hadi Salim [Sun, 22 Dec 2013 12:50:09 +0000 (07:50 -0500)]
simple print newline

attached.

cheers,
jamal
commit d7869e6167c3553e93e254940b0647032b40fed8
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sun Dec 22 07:46:28 2013 -0500

    print new line at the end for aesthetics

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agopolicer - retire old syntax
Jamal Hadi Salim [Sat, 21 Dec 2013 22:16:53 +0000 (17:16 -0500)]
policer - retire old syntax

attached.

cheers,
jamal
commit b82057d9ec851a8aba8a295b959190ef5098f330
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Sat Dec 21 17:00:11 2013 -0500

    After a decade of trying to deprecate the old policer syntax,
    I believe it is time to kill it. The kernel build option for old
    policer is gone for at least 5 years now (although backward
    compatibility is still there). Being backward compatible meant
    hijacking the keyword "action" and was obstructing policies like:

    tc filter add dev eth0 parent ffff: protocol ip pref 10 \
    u32 match ip protocol 1 0xff flowid 1:10 \
    action skbedit mark 1 \
    action police rate 10kbit burst 10k pipe \
    action skbedit mark 2 \
    action police rate 20kbit burst 20k pipe \
    action action mirred egress mirror dev dummy0

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoskbedit print missing metadata
Jamal Hadi Salim [Sat, 21 Dec 2013 21:38:37 +0000 (16:38 -0500)]
skbedit print missing metadata

skbedit should print the index and other generic metadata info

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoskbedit to default to pipe
Jamal Hadi Salim [Sat, 21 Dec 2013 21:38:36 +0000 (16:38 -0500)]
skbedit to default to pipe

Allow skbedit to be used as is in an action chain by default
without need to specify pipe

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
10 years agoip: Add HSR support
Arvid Brodin [Tue, 17 Dec 2013 01:22:46 +0000 (02:22 +0100)]
ip: Add HSR support

Add basic support for High-Availability Seamless Redundancy (HSR) network
devices.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
10 years agoHandle netdev group for veth peer too
Sergey Popovich [Wed, 11 Dec 2013 12:25:07 +0000 (14:25 +0200)]
Handle netdev group for veth peer too

Currently ip-link(8) parses, but ignores "group" argument to
peer interface on veth creation.

Insert IFLA_GROUP attribute for peer interface when present.

Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru>
10 years agoveth: fix uninitialized arguments
Stephen Hemminger [Fri, 20 Dec 2013 16:25:13 +0000 (08:25 -0800)]
veth: fix uninitialized arguments

Based on patch by Sergey Popovich <popovich_sergei@mail.ru>
This fixes crash when ip-link(8) invoced with command:

  ip link add dev veth1a type veth peer

10 years agocheck return value of rtnl_send and related functions
Stephen Hemminger [Fri, 20 Dec 2013 16:15:02 +0000 (08:15 -0800)]
check return value of rtnl_send and related functions

Use warn_unused_result to enforce checking return value of rtnl_send,
and fix where the errors are.

Suggested by initial patch from Petr Písař <ppisar@redhat.com>

10 years agonetconf: add support for neighbor proxy attribute
Stephen Hemminger [Wed, 18 Dec 2013 06:26:56 +0000 (22:26 -0800)]
netconf: add support for neighbor proxy attribute

Report changes to proxy_arp/proxy_ndp attribute.

10 years agoUpdate header files to 3.13-rc2 net-next
Stephen Hemminger [Wed, 18 Dec 2013 06:22:01 +0000 (22:22 -0800)]
Update header files to 3.13-rc2 net-next

10 years agoFix FSF address in file headers
Stephen Hemminger [Fri, 6 Dec 2013 23:05:07 +0000 (15:05 -0800)]
Fix FSF address in file headers

10 years agotc: more user friendly rates
Eric Dumazet [Fri, 22 Nov 2013 06:37:17 +0000 (22:37 -0800)]
tc: more user friendly rates

Display more user friendly rates.

10Mbit is more readable than 10000Kbit

Before :
class htb 1:2 root prio 0 rate 10000Kbit ceil 10000Kbit ...

After:
class htb 1:2 root prio 0 rate 10Mbit ceil 10Mbit ...

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agotbf: add 64bit rates support
Yang Yingliang [Tue, 26 Nov 2013 01:55:35 +0000 (09:55 +0800)]
tbf: add 64bit rates support

tbf support 64bit rates start from linux-3.13.
Add 64bit rates support in tc tools.

tc qdisc show dev eth0
qdisc tbf 1: root refcnt 2 rate 40000Mbit burst 230000b peakrate 50000Mbit minburst 87500b lat 50.0ms

This is a followup to ("htb: support 64bit rates").

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: Eric Dumazet <edumazet@google.com>
10 years agoUpdate headers to 3.13-rc2
Stephen Hemminger [Tue, 3 Dec 2013 07:42:58 +0000 (23:42 -0800)]
Update headers to 3.13-rc2

10 years agohtb: support 64bit rates
Eric Dumazet [Tue, 12 Nov 2013 22:34:07 +0000 (14:34 -0800)]
htb: support 64bit rates

Starting from linux-3.13, we can break the 32bit limitation of
rates on HTB qdisc/classes.

Prior limit was 34.359.738.360 bits per second.

lpq83:~# tc -s qdisc show dev lo ; tc -s class show dev lo
qdisc htb 1: root refcnt 2 r2q 2000 default 1 direct_packets_stat 0 direct_qlen 6000
 Sent 6591936144493 bytes 149549182 pkt (dropped 0, overlimits 213757419 requeues 0)
 rate 39464Mbit 114938pps backlog 0b 15p requeues 0
class htb 1:1 root prio 0 rate 50000Mbit ceil 50000Mbit burst 200000b cburst 0b
 Sent 6591942184547 bytes 149549310 pkt (dropped 0, overlimits 0 requeues 0)
 rate 39464Mbit 114938pps backlog 0b 15p requeues 0
 lended: 149549310 borrowed: 0 giants: 0
 tokens: 336 ctokens: -164

Signed-off-by: Eric Dumazet <edumazet@google.com>
10 years agoupdate to net-next headers
Stephen Hemminger [Sat, 23 Nov 2013 01:29:02 +0000 (17:29 -0800)]
update to net-next headers

10 years agoupdate kernel headers to 3.13-rc1
Stephen Hemminger [Sat, 23 Nov 2013 01:22:35 +0000 (17:22 -0800)]
update kernel headers to 3.13-rc1

10 years agoMerge branch 'net-next-3.11'
Stephen Hemminger [Sat, 23 Nov 2013 01:20:57 +0000 (17:20 -0800)]
Merge branch 'net-next-3.11'

10 years agov3.12.0
Stephen Hemminger [Sat, 23 Nov 2013 01:10:33 +0000 (17:10 -0800)]
v3.12.0

10 years agoip: make -resolve addr to print names rather than addresses
Sami Kerola [Mon, 30 Sep 2013 21:01:48 +0000 (22:01 +0100)]
ip: make -resolve addr to print names rather than addresses

As a system admin I occasionally want to be able to check that all
interfaces has a name in DNS or /etc/hosts file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoss: avoid passing negative numbers to malloc
Andreas Henriksson [Wed, 13 Nov 2013 08:46:42 +0000 (09:46 +0100)]
ss: avoid passing negative numbers to malloc

Example:

$ ss state established \( sport = :4060  or sport = :4061 or sport = :4062  or sport = :4063 or sport = :4064  or sport = :4065 or sport = :4066  or sport = :4067 \)  > /dev/null
Aborted

In the example above ssfilter_bytecompile(...) will return (int)136.
char l1 = 136; means -120 which will result in a negative number
being passed to malloc at misc/ss.c:913.

Simply declare l1 and l2 as integers to avoid the char overflow.

This is one of the issues originally reported in http://bugs.debian.org/511720

Fix the same problem in other code paths as well (thanks to Eric Dumazet).

Reported-by: Andreas Schuldei <andreas@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reviewed-by: Eric Dumazet <edumazet@google.com>
10 years agoipaddrlabel: use uint32_t instead of int32_t
Hangbin Liu [Tue, 19 Nov 2013 15:46:20 +0000 (23:46 +0800)]
ipaddrlabel: use uint32_t instead of int32_t

As both linux kernel and function ipaddrlabel_modify use unsigned int for
label. We should also use unsigned int value when print addrlabel in case of
misunderstanding.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agoip: make -resolve addr to print names rather than addresses
Sami Kerola [Mon, 30 Sep 2013 21:01:48 +0000 (22:01 +0100)]
ip: make -resolve addr to print names rather than addresses

As a system admin I occasionally want to be able to check that all
interfaces has a name in DNS or /etc/hosts file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
10 years agoss: avoid passing negative numbers to malloc
Andreas Henriksson [Wed, 13 Nov 2013 08:46:42 +0000 (09:46 +0100)]
ss: avoid passing negative numbers to malloc

Example:

$ ss state established \( sport = :4060  or sport = :4061 or sport = :4062  or sport = :4063 or sport = :4064  or sport = :4065 or sport = :4066  or sport = :4067 \)  > /dev/null
Aborted

In the example above ssfilter_bytecompile(...) will return (int)136.
char l1 = 136; means -120 which will result in a negative number
being passed to malloc at misc/ss.c:913.

Simply declare l1 and l2 as integers to avoid the char overflow.

This is one of the issues originally reported in http://bugs.debian.org/511720

Fix the same problem in other code paths as well (thanks to Eric Dumazet).

Reported-by: Andreas Schuldei <andreas@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reviewed-by: Eric Dumazet <edumazet@google.com>
10 years agoipaddrlabel: use uint32_t instead of int32_t
Hangbin Liu [Tue, 19 Nov 2013 15:46:20 +0000 (23:46 +0800)]
ipaddrlabel: use uint32_t instead of int32_t

As both linux kernel and function ipaddrlabel_modify use unsigned int for
label. We should also use unsigned int value when print addrlabel in case of
misunderstanding.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
10 years agotc: add cls_bpf frontend
Daniel Borkmann [Mon, 28 Oct 2013 11:35:33 +0000 (12:35 +0100)]
tc: add cls_bpf frontend

This is the iproute2 part of the kernel patch "net: sched:
add BPF-based traffic classifier".

[Will re-submit later again for iproute2 when window for
 -next submissions opens.]

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Thomas Graf <tgraf@suug.ch>
10 years agoiplink: add support for bonding netlink
Jiri Pirko [Fri, 18 Oct 2013 15:50:01 +0000 (17:50 +0200)]
iplink: add support for bonding netlink

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
10 years agoUpdate kernel headers
Stephen Hemminger [Wed, 30 Oct 2013 23:42:03 +0000 (16:42 -0700)]
Update kernel headers

Lastest from net-next

10 years agoMerge branch 'master' into net-next-3.11
Stephen Hemminger [Wed, 30 Oct 2013 23:41:07 +0000 (16:41 -0700)]
Merge branch 'master' into net-next-3.11

Conflicts:
tc/q_fq.c

10 years agoFix tc stats when using -batch mode
Nigel Kukard [Wed, 30 Oct 2013 18:44:58 +0000 (18:44 +0000)]
Fix tc stats when using -batch mode

There are two global variables in tc/tc_class.c:
__u32 filter_qdisc;
__u32 filter_classid;

These are not re-initialized for each line received in -batch mode:
class show dev eth0 parent 1: classid 1:1
class show dev eth0 parent 1: classid 1:1
Error: duplicate "classid": "1:1" is the second value.

This patch fixes the issue by initializing the two globals when we
enter print_class().

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
10 years agovxlan: add ipv6 support
WANG Cong [Thu, 17 Oct 2013 05:03:48 +0000 (22:03 -0700)]
vxlan: add ipv6 support

The kernel already supports it, so add the support
to iproute2 as well.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
10 years agoupdate kernel headers
Stephen Hemminger [Wed, 30 Oct 2013 23:36:47 +0000 (16:36 -0700)]
update kernel headers

10 years agohtb: remove old unused duplicate qdisc name
Stephen Hemminger [Sun, 27 Oct 2013 19:28:38 +0000 (12:28 -0700)]
htb: remove old unused duplicate qdisc name

Alexey had htb2 as name for version in ancient code.

10 years agoFix handling of qdis without options
Stephen Hemminger [Sun, 27 Oct 2013 19:26:47 +0000 (12:26 -0700)]
Fix handling of qdis without options

Some qdisc like htb want the parse_qopt to be called even if no options
present. Fixes regression caused by:

e9e78b0db0e023035e346ba67de838be851eb665 is the first bad commit
commit e9e78b0db0e023035e346ba67de838be851eb665
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Mon Aug 26 08:41:19 2013 -0700

    tc: allow qdisc without options

10 years agoiplink: update available type list
Nicolas Dichtel [Tue, 8 Oct 2013 14:59:45 +0000 (07:59 -0700)]
iplink: update available type list

macvtap and vti were missing.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
10 years agoxfrm: enable to set non-wildcard mark 0 on SAs and SPs
Christophe Gouault [Tue, 8 Oct 2013 12:56:54 +0000 (05:56 -0700)]
xfrm: enable to set non-wildcard mark 0 on SAs and SPs

ip xfrm considers that the user-defined mark is "any" as soon as
(mark.v & mark.m == 0), which prevents from specifying non-wildcard
marks that include the value 0 (typically 0/0xffffffff).

Yet, matching exactly mark 0 is useful for instance to separate
vti policies from global policies.

Always configure the user mark if mark.m != 0.

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
10 years agoiproute2: ip6gre: update man pages
xeb@mail.ru [Tue, 1 Oct 2013 07:18:34 +0000 (11:18 +0400)]
iproute2: ip6gre: update man pages

Update man pages with ip6gre info.

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>