Commit Graph

1751 Commits

Author SHA1 Message Date
Michal Kubeček
574e748806 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>
2014-02-28 10:13:46 -08:00
Michal Kubeček
f7a45e0955 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>
2014-02-17 10:58:56 -08:00
Stephen Hemminger
4806867a6c kill spaces before tabs 2014-02-17 10:56:31 -08:00
Stephen Hemminger
0612519e01 Remove trailing whitespace 2014-02-17 10:55:31 -08:00
Jiri Pirko
730d3f61d9 iplink: add support for bonding slave
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-02-17 10:53:34 -08:00
Jiri Pirko
fbea611564 introduce support for slave info data
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-02-17 10:53:33 -08:00
Michal Kubeček
32ad31fba1 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>
2014-02-17 10:48:25 -08:00
FX Le Bail
7c8a3cfba0 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>
2014-02-17 10:44:16 -08:00
Pavel Emelyanov
77a8ca8118 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>
2014-02-10 14:47:54 -08:00
Christoph Paasch
c33049044e 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>
2014-02-10 14:46:11 -08:00
Christoph Paasch
114aa720fa 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>
2014-02-10 14:46:11 -08:00
Christoph Paasch
54b237a058 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>
2014-02-10 14:46:11 -08:00
WANG Cong
1c9af05071 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>
2014-02-10 14:43:52 -08:00
Masatake YAMATO
3669d218b7 genl: fix a typo in help message of ctrl
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-02-10 14:41:25 -08:00
Stephen Hemminger
8cfeddabce Update kernel headers to 3.13-rc2 2014-02-10 14:40:33 -08:00
Stephen Hemminger
a37c74724a Merge branch 'net-next-for-3.13' 2014-02-10 14:39:20 -08:00
Mythili Prabhu
8c45275594 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>
2014-01-20 12:32:17 -08:00
Yang Yingliang
dad2f72bef 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>
2014-01-20 12:32:15 -08:00
Yang Yingliang
a01de0a336 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>
2014-01-20 12:32:14 -08:00
Thomas Haller
58c69b226f add support for IFA_F_NOPREFIXROUTE
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-01-20 12:30:45 -08:00
Jiri Pirko
5b7e21c417 add support for IFA_F_MANAGETEMPADDR
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-01-20 12:30:44 -08:00
Stephen Hemminger
3ba9ccda87 Update headers files from net-next 2014-01-20 12:28:42 -08:00
Stephen Hemminger
514cdfb443 Revert "vxlan: remove dstport option"
This reverts commit 92deabcf29.

Conflicts:
	ip/iplink_vxlan.c

Allow setting dst_port in 3.12
2014-01-10 15:17:06 -08:00
sfeldma@cumulusnetworks.com
63d127b05d 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>
2014-01-09 23:09:01 -08:00
Stephen Hemminger
6a5295a414 Merge branch 'master' into net-next-for-3.13 2014-01-09 23:08:50 -08:00
Masatake YAMATO
56dee73ea1 ss: add unix_seqpacket to the help message and the man page
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-01-09 23:05:26 -08:00
Masatake YAMATO
0d2e01c5ee 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>
2014-01-09 23:05:26 -08:00
Masatake YAMATO
30b669d7ac 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>
2014-01-09 23:05:26 -08:00
Vijay Subramanian
80dd880dd0 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>
2014-01-09 22:50:47 -08:00
Jiri Pirko
37c9b94ed2 add support for extended ifa_flags
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-01-09 22:49:29 -08:00
Stephen Hemminger
af9cd91228 Update to 3.13-rc6 + net-next headers 2014-01-09 22:45:49 -08:00
Stephen Hemminger
ef056b2190 Merge branch 'master' into net-next-for-3.13 2014-01-09 22:44:17 -08:00
Pavel Emelyanov
4de8d8851d iproute: Document the "ip link add index IDX" possibility
Signed-off-by: Pavel Emelyanov <xemul@paralles.com>
2014-01-09 22:42:01 -08:00
Hangbin Liu
1c28bd597b 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>
2013-12-28 11:29:53 -08:00
Pavel Emelyanov
5e25cf77b9 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>
2013-12-28 11:24:11 -08:00
Stephen Hemminger
a4c51eb348 update to latest net-next headers 2013-12-28 11:15:10 -08:00
Jamal Hadi Salim
f24a7e7205 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>
2013-12-28 10:57:34 -08:00
Jamal Hadi Salim
b159a7f1ae 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>
2013-12-28 10:57:34 -08:00
Jamal Hadi Salim
352f6f97be 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>
2013-12-28 10:57:34 -08:00
Jamal Hadi Salim
4bfb21ca20 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>
2013-12-28 10:57:34 -08:00
Jamal Hadi Salim
02b1d345b7 skbedit print missing metadata
skbedit should print the index and other generic metadata info

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2013-12-28 10:57:34 -08:00
Jamal Hadi Salim
64b7db4db7 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>
2013-12-28 10:57:34 -08:00
Arvid Brodin
5c0aec93a5 ip: Add HSR support
Add basic support for High-Availability Seamless Redundancy (HSR) network
devices.

Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
2013-12-20 08:33:19 -08:00
Sergey Popovich
e0d47aa303 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>
2013-12-20 08:27:51 -08:00
Stephen Hemminger
be2c3142f9 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
2013-12-20 08:25:13 -08:00
Stephen Hemminger
d2468da0a3 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>
2013-12-20 08:24:44 -08:00
Stephen Hemminger
29cc864089 netconf: add support for neighbor proxy attribute
Report changes to proxy_arp/proxy_ndp attribute.
2013-12-17 22:32:58 -08:00
Stephen Hemminger
ec69a50cc8 Update header files to 3.13-rc2 net-next 2013-12-17 22:32:19 -08:00
Stephen Hemminger
4d98ab00de Fix FSF address in file headers 2013-12-06 15:05:07 -08:00
Eric Dumazet
8cecdc2837 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>
2013-12-02 23:48:11 -08:00