Commit Graph

959 Commits

Author SHA1 Message Date
David Ahern
1dddb60503 ip vrf: Add show command
Add show command to list all configured VRF and their table ids.

Signed-off-by: David Ahern <dsahern@gmail.com>
2017-05-30 17:54:03 -07:00
Jiri Pirko
0c30d14d0a tc: flower: add support for tcp flags
Allow user to insert a flower classifier filter rule which includes
match for tcp flags.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2017-05-30 17:41:32 -07:00
Stephen Hemminger
2ecb169280 Merge branch 'master' into net-next 2017-05-30 17:40:57 -07:00
Roi Dayan
d315b706e9 devlink: Add option to set and show eswitch encapsulation support
This is an e-switch global knob to enable HW support for applying
encapsulation/decapsulation to VF traffic as part of SRIOV e-switch offloading.

The actual encap/decap is carried out (along with the matching and other
actions) per offloaded e-switch rules, e.g as done when offloading the TC tunnel
key action.

Possible values are enable/disable.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
2017-05-30 17:36:52 -07:00
Jiri Pirko
d19f72f789 tc/actions: introduce support for goto chain action
Allow user to set control action "goto" with filter chain index as
a parameter.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2017-05-22 13:31:51 -07:00
Amir Vadai
f3e1b2448a pedit: Introduce ipv6 support
Add support for modifying IPv6 headers using pedit.

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-15 15:05:20 -07:00
Amir Vadai
cdca191862 pedit: Do not allow using retain for too big fields
Using retain for fields longer than 32 bits is not supported.
Do not allow user to do it.

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-15 15:05:20 -07:00
Alexander Alemayhu
5be9971c73 tc: bpf: add ppc64 and sparc64 to list of archs with eBPF support
sparc64 support was added in 7a12b5031c6b (sparc64: Add eBPF JIT., 2017-04-17)[0]
and ppc64 in 156d0e290e96 (powerpc/ebpf/jit: Implement JIT compiler for extended BPF, 2016-06-22)[1].

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=7a12b5031c6b
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=156d0e290e96
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
2017-05-08 23:05:35 -07:00
Phil Sutter
6a78ef97b6 man: ip.8: Document -brief flag
Brief output is especially useful for new users, so at least mention
it's existence in ip man page.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-05-03 09:28:40 -07:00
Daniel Borkmann
a872b870a5 bpf: add support for generic xdp
Follow-up to commit c7272ca720 ("bpf: add initial support for
attaching xdp progs") to also support generic XDP. This adds an
indicator for loaded generic XDP programs when programs are loaded
as shown in c7272ca720, but the driver still lacks native XDP
support.

  # ip link
  [...]
  3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric qdisc [...]
      link/ether 0c:c4:7a:03:f9:25 brd ff:ff:ff:ff:ff:ff
  [...]

In case the driver does support native XDP, but the user wants
to load the program as generic XDP (e.g. for testing purposes),
then this can be done with the same semantics as in c7272ca720,
but with 'xdpgeneric' instead of 'xdp' command for loading:

  # ip -force link set dev eno1 xdpgeneric obj xdp.o

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: David S. Miller <davem@davemloft.net>
2017-05-01 09:28:19 -07:00
Stephen Hemminger
d2b9100a08 Merge branch 'master' into net-next 2017-05-01 09:26:51 -07:00
Or Gerlitz
3d2a7781ec tc/pedit: p_udp: introduce pedit udp support
For example, forward udp traffic destined to port 999 to veth0 and set
tcp port to 888:
$ tc filter add dev enp0s9 protocol ip parent ffff: \
    flower \
      ip_proto udp \
      dst_port 999 \
    action pedit ex munge \
      udp dport set 888 \
    action mirred egress \
      redirect dev veth0

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Amir Vadai
2c6eb12ab8 tc/pedit: p_tcp: introduce pedit tcp support
For example, forward tcp traffic destined to port 80 to veth0 and set
tcp port to 8080:
$ tc filter add dev enp0s9 protocol ip parent ffff: \
    flower \
      ip_proto tcp \
      dst_port 80 \
    action pedit ex munge \
      tcp dport set 8080 \
    action mirred egress \
      redirect dev veth0

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Amir Vadai
3cd5149ecd tc/pedit: p_eth: ETH header editor
For example, forward tcp traffic to veth0 and set
destination mac address to 11:22:33:44:55:66 :
$ tc filter add dev enp0s9 protocol ip parent ffff: \
    flower \
      ip_proto tcp \
    action pedit ex munge \
      eth dst set 11:22:33:44:55:66 \
    action mirred egress \
      redirect dev veth0

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Amir Vadai
8d193d9607 tc/pedit: p_ip: introduce editing ttl header
Enable user to edit IP header ttl field.

For example, to forward any TCP packet and decrease its TTL by one:
$ tc filter add dev enp0s9 protocol ip parent ffff: \
    flower \
      ip_proto tcp \
    action pedit ex munge \
      ip ttl add 0xff pipe \
    action mirred egress \
      redirect dev veth0

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Amir Vadai
c05ddaf9e0 tc/pedit: Introduce 'add' operation
This command could be useful to increase/decrease fields value.

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Amir Vadai
7c71a40cbd tc/pedit: Extend pedit to specify offset relative to mac/transport headers
Utilize the extended pedit netlink to set an offset relative to a
specific header type. Old netlink only enabled the user to set
approximated  offset relative to the IPv4 header.

To use this extended functionality need to use the 'ex' keyword after
'pedit' and before any 'munge'.
e.g:
$ tc filter add dev ens9 protocol ip parent ffff: \
    flower \
      ip_proto udp \
      dst_port 80 \
    action pedit ex munge \
      ip dst set 1.1.1.1 \
      pipe \
    action mirred egress redirect dev veth0

Signed-off-by: Amir Vadai <amir@vadai.me>
2017-05-01 09:22:16 -07:00
Phil Sutter
843fc90068 man: ip-rule.8: Further clarify how to interpret priority value
Despite the past changes, users seemed to get confused by the seemingly
contradictory relation of priority value and actual rule priority.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-04-24 11:43:09 -07:00
David Lebrun
e1b7f883e5 man: add documentation for IPv6 SR commands
This patch adds information about seg6 encapsulation in the ip-route
manual, as well as the ip-sr manual page.

Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
2017-04-16 10:21:43 -07:00
Robert Shearman
9688cf3b7a iproute: Add support for MPLS LWT ttl attribute
Add support for setting and displaying the ttl attribute
for MPLS IP lighweight tunnels.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
2017-04-12 10:02:15 -07:00
Robert Shearman
c44d18ea96 iproute: Add support for ttl-propagation attribute
Add support for setting and displaying the ttl-propagation attribute
initially used by MPLS to control propagation of MPLS TTL to IPv4/IPv6
TTL/hop-limit on popping final label on a per-route basis.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
2017-04-12 10:02:15 -07:00
Phil Sutter
058d28b44c man: ip-link: Specify min/max values for bridge slave priority and cost
The values are parsed as u16/u32, but kernel limits allowed values.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-04-04 14:54:44 -07:00
Sabrina Dubroca
3fbb5d43bb man: ip-link.8: document bridge options
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
2017-04-04 14:50:02 -07:00
Alexander Alemayhu
5caba410c2 man: fix man page warnings
While generating PDFs from the man pages, I saw the warning below from
several files. Compared the tc-matchall.8 with bridge.8 and used .RI
instead of .R. It should have no effect on the man page rendering.

    `R' is a string (producing the registered sign), not a macro.

Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
2017-04-04 14:46:34 -07:00
Alexander Alemayhu
0db70c59e1 man: add examples to ip.8
Having some examples in the top level man page might make it a little bit easier
for new users to get started. Reused some words / sentences from the existing
man pages.

Suggested-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
2017-03-14 16:41:13 -07:00
Robert Shearman
ad0e37403f man: Fix formatting of vrf parameter of ip-link show command
Add missing opening " [" for the vrf parameter.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
2017-03-10 08:58:17 -08:00
Robert Shearman
837552b445 iplink: add support for afstats subcommand
Add support for new afstats subcommand. This uses the new
IFLA_STATS_AF_SPEC attribute of RTM_GETSTATS messages to show
per-device, AF-specific stats. At the moment the kernel only supports
MPLS AF stats, so that is all that's implemented here.

The print_num function is exposed from ipaddress.c to be used for
printing the new stats so that the human-readable option, if set, can
be respected.

Example of use:

    $ ./ip/ip -f mpls link afstats dev eth1
    3: eth1
        mpls:
            RX: bytes  packets  errors  dropped  noroute
            9016       98       0       0        0
            TX: bytes  packets  errors  dropped
            7232       113      0       0

Signed-off-by: Robert Shearman <rshearma@brocade.com>
2017-03-10 08:44:55 -08:00
Phil Sutter
32b1a12713 man: ss.8: Add missing protocols to description of -A
The list was missing dccp and sctp protocols.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-03-10 08:42:13 -08:00
Roi Dayan
639785ff30 devlink: Add json and pretty options to help and man
While at it also fixed missing double dash for long opts.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2017-03-08 17:59:01 -08:00
Nikolay Aleksandrov
94f1a22aa7 iplink: add support for xstats subcommand
This patch adds support for a new xstats link subcommand which uses the
specified link type's new parse/print_ifla_xstats callbacks to display
extended statistics.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-02-18 16:36:01 -08:00
Stephen Hemminger
bb8771573a Merge branch 'master' into net-next 2017-02-18 16:32:16 -08:00
Lucas Bates
5e4dc1951e man page: add page for skbmod action
Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
2017-02-18 16:27:41 -08:00
Stephen Hemminger
c72dab6624 Merge branch 'master' into net-next 2017-02-18 16:07:32 -08:00
Simon Horman
6374961a00 tc: flower: support masked ICMP code and type match
Extend ICMP code and type match to support masks.

Also add missing documentation to synopsis in manpage.

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
	indev eth0 ip_proto icmpv6 type 128/240 code 0 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2017-02-17 15:32:03 -08:00
Hangbin Liu
e83435fcd7 man: ip-link.8: Document bridge_slave fdb_flush option
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2017-02-09 17:31:43 -08:00
Simon Horman
c7ec052bb8 tc: flower: Update documentation to indicate ARP takes IPv4 prefixes
Unlike other PREFIXes documented in the usage for tc flower, which accept
both IPv4 and IPv6 prefixes, arp_sip and arp_tip only accepts IPv4
prefixes.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2017-02-08 11:39:33 -08:00
Hangbin Liu
1e5b0e80ff man: ip-link.8: Document bridge_slave fdb_flush option
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2017-02-08 11:36:22 -08:00
Stephen Hemminger
f0337c4475 tc: add missing sample file
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-02-07 11:53:24 -08:00
Yotam Gigi
787317f50a tc: man: matchall: Update examples to include sample
Add an example of packet sampling to the tc-matchall man page examples
section. The example uses the matchall classifier and the sample action to
create packet sampling on a port.

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
2017-02-06 14:24:52 -08:00
Yotam Gigi
515e943d76 tc: man: Add man entry for the tc-sample action
In addition to general information about the tc action, the man entry
contains common usage examples and information about the tlv fields packed
within each sampled packet.

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
2017-02-06 14:24:52 -08:00
Stephen Hemminger
818a10a77f Merge branch 'master' into net-next 2017-02-06 14:13:27 -08:00
Stephen Hemminger
b5de688592 Merge branch 'master' into net-next 2017-02-06 14:07:13 -08:00
Phil Sutter
72dfff6e11 man: ip-route.8: Fix 'expires' indenting
Descriptions of each route sub-command's arguments are enclosed in
.RS/.RE pairs. For 'replace' sub-command, '.RE' was incorrectly put
before the last argument ('expires').

Fixes: 3fbe7ca847 ("iproute2: ip-route.8.in: Add expires option for ip route")
Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-02-06 13:52:52 -08:00
Nogah Frankel
aaacdfd570 ifstat: Add xstat to ifstat man page
Add documentation about the extended statistics to the ifstat man page.
Add ifstat man age to the man8 Makefile

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
2017-02-03 09:20:15 -08:00
Yotam Gigi
d65a744cdb tc: man: matchall: Fix example indentation
The man page contains two examples, which have different indentation. Fix
the indentation of the two examples to match.

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
2017-01-31 16:18:33 -08:00
Stephen Hemminger
fefc93bb28 Merge branch 'master' into net-next 2017-01-29 20:30:05 -08:00
Phil Sutter
6bbe5e6290 man: tc-csum.8: Fix example
This fixes two issues with the provided example:

- Add missing 'dev' keyword to second command.
- Use a real IPv4 address instead of a bogus hex value since that will
  be rejected by get_addr_ipv4().

Fixes: dbfb17a67f ("man: tc-csum.8: Add an example")
Reported-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-01-29 20:25:35 -08:00
Paul Blakey
08f66c80c0 tc: flower: Refactor matching flags to be more user friendly
Instead of "magic numbers" we can now specify each flag
by name. Prefix of "no"  (e.g nofrag) unsets the flag,
otherwise it wil be set.

Example:
    # add a flower filter that will drop fragmented packets
    tc filter add dev ens4f0 protocol ip parent ffff: \
            flower \
            src_mac e4:1d:2d:fd:8b:01 \
            dst_mac e4:1d:2d:fd:8b:02 \
            indev ens4f0 \
            ip_flags frag \
    action drop

    # add a flower filter that will drop non-fragmented packets
    tc filter add dev ens4f0 protocol ip parent ffff: \
            flower \
            src_mac e4:1d:2d:fd:8b:01 \
            dst_mac e4:1d:2d:fd:8b:02 \
            indev ens4f0 \
            ip_flags nofrag \
    action drop

Fixes: 22a8f01989 ('tc: flower: support matching flags')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-20 10:36:45 -08:00
Davide Caratti
6561cb28f2 tc: m_csum: add support for SCTP checksum
'sctp' parameter can now be used as 'csum' target to enable CRC32c
computation on SCTP packets.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2017-01-20 09:32:08 -08:00
Stephen Hemminger
9174b4cf3e Merge branch 'master' into net-next 2017-01-20 09:27:57 -08:00
Jiri Benc
c3d09fba93 Revert "man pages: add man page for skbmod action"
This reverts commit a40995d1c7.

The patch is missing the actual tc-skbmod.8 file which causes 'make
install' to fail:

install -m 0755 -d /tmp/ip/usr/share/man/man8
install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8
routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8
tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-fq.8 tc-drr.8 tc-ematch.8
tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 tc-mqprio.8 tc-netem.8 tc-pfifo.8
tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8
bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-addrlabel.8 ip-fou.8 ip-gue.8
ip-l2tp.8 ip-macsec.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8
ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 ip-tcp_metrics.8
ip-netconf.8 ip-token.8 tipc.8 tipc-bearer.8 tipc-link.8 tipc-media.8
tipc-nametable.8 tipc-node.8 tipc-socket.8 tc-basic.8 tc-cgroup.8 tc-flow.8
tc-flower.8 tc-fw.8 tc-route.8 tc-tcindex.8 tc-u32.8 tc-matchall.8
tc-connmark.8 tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8
tc-simple.8 tc-skbedit.8 tc-vlan.8 tc-xt.8  tc-ife.8 tc-skbmod.8
tc-tunnel_key.8 devlink.8 devlink-dev.8 devlink-monitor.8 devlink-port.8
devlink-sb.8 /tmp/ip/usr/share/man/man8
install: cannot stat ‘tc-skbmod.8’: No such file or directory
make[2]: *** [install] Error 1
make[1]: *** [install] Error 2

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2017-01-18 08:59:54 -08:00
Simon Horman
f888f4e205 tc: flower: Support matching ARP
Support matching on ARP operation, and hardware and protocol addresses
for Ethernet hardware and IPv4 protocol addresses.

Example usage:

tc qdisc add dev eth0 ingress

tc filter add dev eth0 protocol arp parent ffff: flower indev eth0 \                    arp_op request arp_sip 10.0.0.1 action drop
tc filter add dev eth0 protocol rarp parent ffff: flower indev eth0 \                   arp_op reply arp_tha 52:54:3f:00:00:00/24 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2017-01-12 17:46:37 -08:00
Stephen Hemminger
51dd3455a3 Merge branch 'master' into net-next 2017-01-12 17:44:44 -08:00
Simon Horman
aeeaae2fa9 tc: ife: correct spelling of prio in example
Correct typo in example in ife man page.

Fixes: 06f9a59170 ("man: tc-ife.8: man page for ife action")
Cc: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
2017-01-12 17:40:19 -08:00
Nikolay Aleksandrov
7f10090b9f bridge: fdb: add state filter support
This patch adds a new argument to the bridge fdb show command that allows
to filter by entry state.
Also update the man page to include all available show arguments.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2017-01-12 17:38:55 -08:00
Stephen Hemminger
3bad1dbb20 whitespace cleanup
Get rid of blanks at end of line and extra lines at eof

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-12 17:31:20 -08:00
Simon Horman
a5ae170ed8 tc: flower: Update dest UDP port documentation
Since 41aa17ff46 ("tc/cls_flower: Add dest UDP port to tunnel params")
tc flower supports setting the dest UDP port.

* Use "port_number" to be consistent with other man-page text
* Re-add "enc_dst_port" documentation to manpage which was
  accidently removed by b2a1f740aa ("tc: flower: document that *_ip
  parameters take a PREFIX as an argument.")

Cc: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
2017-01-09 12:09:46 -08:00
Stephen Hemminger
d34adf67b5 Merge branch 'master' into net-next 2016-12-29 10:31:44 -08:00
Alexey Kodanev
7f97744777 fix typo in ip-xfrm man page, rmd610 -> rmd160
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
2016-12-29 10:24:35 -08:00
Simon Horman
c2078f8dc4 tc: flower: Allow *_mac options to accept a mask
* The argument to src_mac and dst_mac may now take an optional mask
  to limit the scope of matching.
* This address is is documented as a LLADDR in keeping with ip-link(8).
* The formats accepted match those already output when dumping flower
  filters from the kernel.

Example of use of LLADDR with and without a mask:

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:01:00:00:00/ff:ff:00:00:00:01 action drop
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:00:00:00:00/23 action drop
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:00:00:00:00 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-21 16:07:53 -08:00
Simon Horman
b2a1f740aa tc: flower: document that *_ip parameters take a PREFIX as an argument.
* The argument to src_ip, dst_ip, enc_src_ip and enc_dst_ip take an
  optional prefix length which is used to provide a mask to limit the scope
  of matching.
* This is documented as a PREFIX in keeping with ip-route(8).

Example of uses of IPv4 and IPv6 prefixes

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 dst_ip 192.168.1.1 action drop
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 src_ip 10.0.0.0/8 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 src_ip 2001:DB8:1::/48 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 dst_ip 2001:DB8::1 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-21 16:07:41 -08:00
Stephen Hemminger
8578bb731d Revert "tc: flower: Allow *_mac options to accept a mask"
This reverts commit 0390185078.
2016-12-21 16:06:49 -08:00
Stephen Hemminger
10da552800 Revert "tc: flower: document that *_ip parameters take a PREFIX as an argument."
This reverts commit a8a1dccd2a.
2016-12-21 16:06:35 -08:00
Roman Mashak
00fe039dd5 tc: updated man page to reflect filter-id use in filter GET command.
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
2016-12-21 15:56:39 -08:00
Roman Mashak
17b9668a86 tc: fixed man page fonts for keywords and variable values
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
2016-12-21 15:56:39 -08:00
Simon Horman
0390185078 tc: flower: Allow *_mac options to accept a mask
* The argument to src_mac and dst_mac may now take an optional mask
  to limit the scope of matching.
* This address is is documented as a LLADDR in keeping with ip-link(8).
* The formats accepted match those already output when dumping flower
  filters from the kernel.

Example of use of LLADDR with and without a mask:

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:01:00:00:00/ff:ff:00:00:00:01 action drop
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:00:00:00:00/23 action drop
tc filter add dev eth0 protocol ip parent ffff: flower indev eth0 \
	src_mac 52:54:00:00:00:00 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-21 15:56:39 -08:00
Simon Horman
a8a1dccd2a tc: flower: document that *_ip parameters take a PREFIX as an argument.
* The argument to src_ip, dst_ip, enc_src_ip and enc_dst_ip take an
  optional prefix length which is used to provide a mask to limit the scope
  of matching.
* This is documented as a PREFIX in keeping with ip-route(8).

Example of uses of IPv4 and IPv6 prefixes

tc qdisc add dev eth0 ingress
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 dst_ip 192.168.1.1 action drop
tc filter add dev eth0 protocol ip parent ffff: flower \
    indev eth0 src_ip 10.0.0.0/8 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 src_ip 2001:DB8:1::/48 action drop
tc filter add dev eth0 protocol ipv6 parent ffff: flower \
    indev eth0 dst_ip 2001:DB8::1 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-21 15:56:39 -08:00
David Ahern
1949f82cdf Introduce ip vrf command
'ip vrf' follows the user semnatics established by 'ip netns'.

The 'ip vrf' subcommand supports 3 usages:

1. Run a command against a given vrf:
       ip vrf exec NAME CMD

   Uses the recently committed cgroup/sock BPF option. vrf directory
   is added to cgroup2 mount. Individual vrfs are created under it. BPF
   filter attached to vrf/NAME cgroup2 to set sk_bound_dev_if to the VRF
   device index. From there the current process (ip's pid) is addded to
   the cgroups.proc file and the given command is exected. In doing so
   all AF_INET/AF_INET6 (ipv4/ipv6) sockets are automatically bound to
   the VRF domain.

   The association is inherited parent to child allowing the command to
   be a shell from which other commands are run relative to the VRF.

2. Show the VRF a process is bound to:
       ip vrf id
   This command essentially looks at /proc/pid/cgroup for a "::/vrf/"
   entry with the VRF name following.

3. Show process ids bound to a VRF
       ip vrf pids NAME
   This command dumps the file MNT/vrf/NAME/cgroup.procs since that file
   shows the process ids in the particular vrf cgroup.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-12-13 10:20:16 -08:00
Roi Dayan
7d59d6354f tc: tunnel_key: Add tc-tunnel_key man page to Makefile
To be installed with the other man pages.

Fixes: d57639a475 ("tc/act_tunnel: Introduce ip tunnel action")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Amir Vadai <amir@vadai.me>
2016-12-13 10:15:11 -08:00
Roi Dayan
5c46a8fd61 tc: flower: Fix typo and style in flower man page
Replace vlan_eth_type with vlan_ethtype.

Fixes: 745d917260 ("tc: flower: Introduce vlan support")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com>
2016-12-13 10:15:11 -08:00
Hadar Hen Zion
449c709c38 tc/m_tunnel_key: Add dest UDP port to tunnel key action
Enhance tunnel key action parameters by adding destination UDP port.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
2016-12-13 10:15:11 -08:00
Hadar Hen Zion
41aa17ff46 tc/cls_flower: Add dest UDP port to tunnel params
Enhance IP tunnel parameters by adding destination UDP port.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
2016-12-13 10:15:11 -08:00
Thomas Graf
b15f440e78 lwt: BPF support for LWT
Adds support to configure BPF programs as nexthop actions via the LWT
framework.

Example:
   ip route add 192.168.253.2/32 \
     encap bpf out obj lwt_len_hist_kern.o section len_hist \
     dev veth0

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-12-12 15:32:54 -08:00
Simon Horman
eb3b5696f1 tc: flower: support matching on ICMP type and code
Support matching on ICMP type and code.

Example usage:

tc qdisc add dev eth0 ingress

tc filter add dev eth0 protocol ip parent ffff: flower \
	indev eth0 ip_proto icmp type 8 code 0 action drop

tc filter add dev eth0 protocol ipv6 parent ffff: flower \
	indev eth0 ip_proto icmpv6 type 128 code 0 action drop

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-09 12:46:34 -08:00
Daniel Borkmann
c7272ca720 bpf: add initial support for attaching xdp progs
Now that we made the BPF loader generic as a library, reuse it
for loading XDP programs as well. This basically adds a minimal
start of a facility for iproute2 to load XDP programs. There
currently only exists the xdp1_user.c sample code in the kernel
tree that sets up netlink directly and an iovisor/bcc front-end.

Since we have all the necessary infrastructure in place already
from tc side, we can just reuse its loader back-end and thus
facilitate migration and usability among the two for people
familiar with tc/bpf already. Sharing maps, performing tail calls,
etc works the same way as with tc. Naturally, once kernel
configuration API evolves, we will extend new features for XDP
here as well, resp. extend dumping of related netlink attributes.

Minimal example:

  clang -target bpf -O2 -Wall -c prog.c -o prog.o
  ip [-force] link set dev em1 xdp obj prog.o       # attaching
  ip [-d] link                                      # dumping
  ip link set dev em1 xdp off                       # detaching

For the dump, intention is that in the first line for each ip
link entry, we'll see "xdp" to indicate that this device has an
XDP program attached. Once we dump some more useful information
via netlink (digest, etc), idea is that 'ip -d link' will then
display additional relevant program information below the "link/
ether [...]" output line for such devices, for example.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
2016-12-09 12:44:12 -08:00
Roi Dayan
6566ca8cdb devlink: Add option to set and show eswitch inline mode
This is needed for some HWs to do proper macthing and steering.
Possible values are none, link, network, transport.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
2016-12-09 12:41:03 -08:00
Roi Dayan
a93b6bb3a2 devlink: Add usage help for eswitch subcommand
Add missing usage help for devlink dev eswitch subcommand.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
2016-12-09 12:40:52 -08:00
Stephen Hemminger
e6fee79104 Merge branch 'master' into net-next 2016-12-09 12:38:51 -08:00
Stephen Hemminger
b95e5c55a9 Revert "devlink: Add usage help for eswitch subcommand"
This reverts commit 11f4cd31d2.
2016-12-09 12:37:39 -08:00
Stephen Hemminger
d646916993 Revert "devlink: Add option to set and show eswitch inline mode"
This reverts commit b9dcf9c282.

Intended for net-next
2016-12-09 12:37:19 -08:00
Simon Horman
6ad7e60c1f tc: flower: document SCTP ip_proto
Add SCTP ip_proto to help text and man page.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-12-05 10:13:26 -08:00
Simon Horman
730381fede tc: flower: remove references to eth_type in manpage
Remove references to eth_type and ether_type (spelling error) in
the tc flower manpage.

Also correct formatting of boldface text with whitespace.

Cc: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-12-02 14:59:43 -08:00
Amir Vadai
d57639a475 tc/act_tunnel: Introduce ip tunnel action
This action could be used before redirecting packets to a shared tunnel
device, or when redirecting packets arriving from a such a device.

The 'unset' action is optional. It is used to explicitly unset the
metadata created by the tunnel device during decap. If not used, the
metadata will be released automatically by the kernel.
The 'set' operation, will set the metadata with the specified values for
the encap.

For example, the following flower filter will forward all ICMP packets
destined to 11.11.11.2 through the shared vxlan device 'vxlan0'. Before
redirecting, a metadata for the vxlan tunnel is created using the
tunnel_key action and it's arguments:

$ tc filter add dev net0 protocol ip parent ffff: \
    flower \
      ip_proto 1 \
      dst_ip 11.11.11.2 \
    action tunnel_key set \
      src_ip 11.11.0.1 \
      dst_ip 11.11.0.2 \
      id 11 \
    action mirred egress redirect dev vxlan0

Signed-off-by: Amir Vadai <amir@vadai.me>
2016-12-02 14:12:09 -08:00
Amir Vadai
bb9b63b18e tc/cls_flower: Classify packet in ip tunnels
Introduce classifying by metadata extracted by the tunnel device.
Outer header fields - source/dest ip and tunnel id, are extracted from
the metadata when classifying.

For example, the following will add a filter on the ingress Qdisc of shared
vxlan device named 'vxlan0'. To forward packets with outer src ip
11.11.0.2, dst ip 11.11.0.1 and tunnel id 11. The packets will be
forwarded to tap device 'vnet0':

$ tc filter add dev vxlan0 protocol ip parent ffff: \
    flower \
      enc_src_ip 11.11.0.2 \
      enc_dst_ip 11.11.0.1 \
      enc_key_id 11 \
      dst_ip 11.11.11.1 \
    action mirred egress redirect dev vnet0

Signed-off-by: Amir Vadai <amir@vadai.me>
2016-12-02 14:12:09 -08:00
Stephen Hemminger
d6ad31db57 Merge branch 'master' into net-next 2016-12-01 10:48:05 -08:00
Phil Sutter
f5f760b812 man: ip-route.8: Add notes about dropped IPv4 route cache
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-12-01 10:47:11 -08:00
Stephen Hemminger
328374dcfe Merge branch 'master' into net-next 2016-12-01 10:29:12 -08:00
Roi Dayan
b9dcf9c282 devlink: Add option to set and show eswitch inline mode
This is needed for some HWs to do proper macthing and steering.
Possible values are none, link, network, transport.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
2016-11-29 19:17:20 -08:00
Roi Dayan
11f4cd31d2 devlink: Add usage help for eswitch subcommand
Add missing usage help for devlink dev eswitch subcommand.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
2016-11-29 19:17:20 -08:00
Asbjørn Sloth Tønnesen
51a9d01aaa man: ip-l2tp.8: document UDP checksum options
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st>
2016-11-29 13:31:30 -08:00
Asbjørn Sloth Tønnesen
8a11421a5d l2tp: support sequence numbering
This patch implement and documents the user interface for
sequence numbering.

Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st>
2016-11-29 13:31:30 -08:00
Asbjørn Sloth Tønnesen
d0baf5cac8 man: ip-l2tp.8: remove non-existent tunnel parameter name
The name parameter is only valid for sessions, not tunnels.

Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st>
2016-11-29 13:31:30 -08:00
Asbjørn Sloth Tønnesen
222c4dab8e man: ip-l2tp.8: fix l2spec_type documentation
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.st>
2016-11-29 13:31:30 -08:00
michael-dev@fami-braun.de
aa1b44ca77 iproute2: macvlan: add "source" mode
Adjusting iproute2 utility to support new macvlan link type mode called
"source".

Example of commands that can be applied:
  ip link add link eth0 name macvlan0 type macvlan mode source
  ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
  ip link set link dev macvlan0 type macvlan macaddr del 00:11:11:11:11:11
  ip link set link dev macvlan0 type macvlan macaddr flush
  ip -details link show dev macvlan0

Based on previous work of Stefan Gula <steweg@gmail.com>

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>

Cc: steweg@gmail.com

v5:
 - rebase and fix checkpatch

v4:
 - add MACADDR_SET support
 - skip FLAG_UNICAST / FLAG_UNICAST_ALL as this is not upstream
 - fix man page
2016-11-29 12:41:42 -08:00
Roman Mashak
7bdcc0d942 tc: updated man page to reflect GET command to retrieve a single filter.
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-11-29 11:41:58 -08:00
Phil Sutter
f89d46ad63 ss: Add support for SCTP protocol
This makes use of the sctp_diag interface recently added to the kernel.

Joint work with Xin Long who provided the PoC implementation which I
merely polished up a bit.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-11-29 11:41:57 -08:00
Paul Blakey
d9c3995ab7 tc: flower: Fix usage message
Remove left over usage from removal of eth_type argument.

Fixes: 488b41d020 ('tc: flower no need to specify the ethertype')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
2016-11-12 10:19:06 +03:00
Shmulik Ladkani
5eca0a3701 tc: m_mirred: Add support for ingress redirect/mirror
So far, only the 'egress' direction was implemented.

Allow specifying 'ingress' as the direction packet appears on the target
interface.

For example, this takes incoming 802.1q frames on veth0 and redirects
them for input on dummy0:

 # tc filter add dev veth0 parent ffff: pref 1 protocol 802.1q basic \
     action mirred ingress redirect dev dummy0

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
2016-10-26 11:20:47 -07:00
Stephen Hemminger
c07a36c3db Revert "iproute2: macvlan: add "source" mode"
This reverts commit f33b727610.

The upstream changes are not in 4.9
2016-10-26 11:15:09 -07:00
Nikolay Aleksandrov
9208b4e7c9 bridge: add support for the multicast flood flag
Recently a new per-port flag was added which controls the flooding of
unknown multicast, this patch adds support for controlling it via iproute2.
It also updates the man pages with information about the new flag.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2016-10-17 05:29:24 -07:00
Jakub Kicinski
87e46a5198 tc: cls_bpf: handle skip_sw and skip_hw flags
Add support for controling hardware offload using (now standard)
skip_sw and skip_hw flags in cls_bpf.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
2016-10-17 05:27:59 -07:00
michael-dev@fami-braun.de
f33b727610 iproute2: macvlan: add "source" mode
Adjusting iproute2 utility to support new macvlan link type mode called
"source".

Example of commands that can be applied:
  ip link add link eth0 name macvlan0 type macvlan mode source
  ip link set link dev macvlan0 type macvlan macaddr add 00:11:11:11:11:11
  ip link set link dev macvlan0 type macvlan macaddr del 00:11:11:11:11:11
  ip link set link dev macvlan0 type macvlan macaddr flush
  ip -details link show dev macvlan0

Based on previous work of Stefan Gula <steweg@gmail.com>

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>

Cc: steweg@gmail.com
2016-10-12 15:22:14 -07:00
Lucas Bates
a40995d1c7 man pages: add man page for skbmod action
Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-10-12 15:21:55 -07:00
Jamal Hadi Salim
46871dc9c6 man pages: Add tc-ife to Makefile
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-10-12 15:09:52 -07:00
Lucas Bates
d491a3480f man pages: update ife action to include tcindex
Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-10-12 15:09:52 -07:00
Hangbin Liu
ca89c52143 ip rule: add selector support
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2016-10-09 19:25:59 -07:00
Moshe Shemesh
56e9f0ab19 ip link: Add support to configure SR-IOV VF to vlan protocol 802.1ad (VST QinQ)
Introduce a new API that exposes a list of vlans per VF (IFLA_VF_VLAN_LIST),
giving the ability for user-space application to specify it for the VF as
an option to support 802.1ad (VST QinQ).

We introduce struct vf_vlan_info, which extends struct vf_vlan and adds
an optional VF VLAN proto parameter.
Default VLAN-protocol is 802.1Q.

Add IFLA_VF_VLAN_LIST in addition to IFLA_VF_VLAN to keep backward
compatibility with older kernel versions.

Suitable ip link tool command examples:
 - Set vf vlan protocol 802.1ad (S-TAG)
	ip link set eth0 vf 1 vlan 100 proto 802.1ad
 - Set vf vlan S-TAG and vlan C-TAG (VST QinQ)
	ip link set eth0 vf 1 vlan 100 proto 802.1ad vlan 30 proto 802.1Q
 - Set vf to VST (802.1Q) mode
	ip link set eth0 vf 1 vlan 100 proto 802.1Q
 - Or by omitting the new parameter (backward compatible)
	ip link set eth0 vf 1 vlan 100

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
2016-10-09 19:17:15 -07:00
Shmulik Ladkani
4654173e90 tc: m_vlan: Add vlan modify action
The 'vlan modify' action allows to replace an existing 802.1q tag
according to user provided settings.
It accepts same arguments as the 'vlan push' action.

For example, this replaces vid 6 with vid 5:

 # tc filter add dev veth0 parent ffff: pref 1 protocol 802.1q \
      basic match 'meta(vlan mask 0xfff eq 6)' \
      action vlan modify id 5 continue

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
2016-10-09 19:11:34 -07:00
Parthasarathy Bhuvaragan
76fee71bf3 tipc: update man page for link monitor
Add description for the new link monitor commands.

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
2016-09-20 09:13:09 -07:00
Stephen Hemminger
6831acc8ef Merge branch 'master' into net-next 2016-09-20 09:13:03 -07:00
Phil Sutter
31a29009c5 iproute: fix documentation for ip rule scan order
Hi,

On Thu, Sep 08, 2016 at 11:59:55AM +0200, Michal Kubecek wrote:
> On Thu, Sep 01, 2016 at 09:04:54AM -0700, Stephen Hemminger wrote:
> > On Tue, 30 Aug 2016 17:32:52 -0700
> > Iskren Chernev <iskren@imo.im> wrote:
> >
> > > From 416f45b62f33017d19a9b14e7b0179807c993cbe Mon Sep 17 00:00:00 2001
> > > From: Iskren Chernev <iskren@imo.im>
> > > Date: Tue, 30 Aug 2016 17:08:54 -0700
> > > Subject: [PATCH bug-fix] iproute: fix documentation for ip rule scan order
> > >
> > > ---
> > >  man/man8/ip-rule.8 | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/man/man8/ip-rule.8 b/man/man8/ip-rule.8
> > > index 1774ae3..3508d80 100644
> > > --- a/man/man8/ip-rule.8
> > > +++ b/man/man8/ip-rule.8
> > > @@ -93,7 +93,7 @@ Each policy routing rule consists of a
> > >  .B selector
> > >  and an
> > >  .B action predicate.
> > > -The RPDB is scanned in order of decreasing priority. The selector
> > > +The RPDB is scanned in order of increasing priority. The selector
> > >  of each rule is applied to {source address, destination address,
> > > incoming
> > >  interface, tos, fwmark} and, if the selector matches the packet,
> > >  the action is performed. The action predicate may return with success.
> > > --
> > > 2.4.5
> >
> > Applied
>
> I'm sorry I didn't notice before but this just reverts the change done
> by commit 4957250166 ("iproute2: clarification of various man8 pages").
> IMHO the problem is that both versions are equally confusing as the word
> "priority" can be understood in two different senses.
>
> How about more explicit formulation, e.g.
>
>   ... in order of decreasing logical priority (i.e. increasing numeric
>   values).
>
> Would that be better?

Looks like the real issue is missing definition of priority. What about
this:
2016-09-20 09:08:56 -07:00
Stephen Hemminger
88ba11bc08 Merge branch 'master' into net-next 2016-09-01 09:11:10 -07:00
Davide Caratti
0330f49ea0 macsec: fix byte ordering on input/display of 'sci'
use get_be64() in place of get_u64() when parsing input 'sci' parameter,
so that 'sci' can be entered using network byte order regardless the
endianness of target system; use ntohll() when printing out 'sci'. While
at it, improve documentation of 'sci' in ip-link.8.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-09-01 09:08:50 -07:00
Davide Caratti
d0baa1389f man: ip.8: add missing 'macsec' item to OBJECT list
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-09-01 09:08:50 -07:00
Davide Caratti
5898bd667a macsec: fix input of 'port', improve documentation of 'address'
remove hardcoded base 10 parsing of 'port' parameter, update man page
and fix usage() functions as well. Fix misleading line in man page that
theoretically allowed specifying 'port' keyword right after 'sci' keyword.
Provide documentation of 'address' parameter in man pages and in usage()
functions as well.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-09-01 09:08:50 -07:00
Iskren Chernev
4a564d914d iproute: fix documentation for ip rule scan order 2016-09-01 08:41:37 -07:00
Stephen Hemminger
98a2af1d40 Merge branch 'master' into net-next 2016-09-01 08:39:15 -07:00
Hadar Hen Zion
0e43ed9dea tc: m_vlan: Add priority option to push vlan action
The current vlan push action supports only vid and protocol options.
Add priority option.

Example script that adds vlan push action with vid and priority:

tc filter add dev veth0 protocol ip parent ffff: \
	flower \
	indev veth0 \
	action vlan push id 100 priority 5

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2016-09-01 08:38:41 -07:00
Hadar Hen Zion
745d917260 tc: flower: Introduce vlan support
Classification according to vlan id and vlan priority.

Example script that adds vlan filter:

 # add ingress qdisc
 tc qdisc add dev ens4f0 ingress

 # add a flower filter with vlan id and priority classification
 tc filter add dev ens4f0 protocol 802.1Q parent ffff: \
	flower \
		indev ens4f0 \
		vlan_ethtype ipv4 \
		vlan_id 100 \
		vlan_prio 3 \
	action vlan pop

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2016-09-01 08:38:41 -07:00
Yotam Gigi
0501294bca tc: man: Add man entry for the matchall classifier.
In addition to providing information about the mathcall filter and its
configurations, the man entry contains examples for creating port
mirorring entries.

Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-09-01 08:37:01 -07:00
Richard Alpe
ed81deabf2 tipc: add the ability to get UDP bearer options
In this patch we introduce the ability to get UDP specific bearer
options such as remoteip, remoteport, localip and localport.

After some discussions on tipc-discussion on how to handle media
specific options we agreed to pass them after the media.

For media generic bearer options we already do:
$ tipc bearer get OPTION media MEDIA name|device NAME|DEVICE

For the UDP media specific bearer options we introduce in this path:
$ tipc bearer get media udp name NAME OPTION
such as
$ tipc bearer get media udp name NAME remoteip

This allows bash-completion to tab complete only appropriate options,
it makes more logical sense and it scales better. Even though it might
look a little different to the user.

In order to use the existing option parsing framework to do this we
add a flag (OPT_KEY) to the option parsing function.

If the UDP bearer has multiple remoteip addresses associated with it
(replicast) we handle the TIPC_NLA_UDP_MULTI_REMOTEIP flag and send
a TIPC_NL_UDP_GET_REMOTEIP query transparently to the user.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
2016-09-01 08:34:35 -07:00
Richard Alpe
f1f40cf77d tipc: introduce bearer add for remoteip
Introduce the ability to add remote IP addresses to an existing UDP
bearer. On the kernel side, adding a "remoteip" to an existing bearer
puts the bearer in "replicast" mode where TIPC multicast messages are
send out to each configured remoteip using unicast. This is required
for TIPC UDP bearers to work in environments where IP multicast is
disabled.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
2016-09-01 08:34:35 -07:00
Stephen Hemminger
3cc0b954b0 Merge branch 'master' into net-next 2016-08-29 11:19:03 -07:00
Or Gerlitz
f57856fab2 devlink: Add e-switch support
Implement kernel devlink e-switch interface. Currently we allow
to get and set the device e-switch mode.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2016-08-29 11:15:54 -07:00
Nikolay Aleksandrov
7abf5de677 bridge: vlan: add support to display per-vlan statistics
This patch adds support for the stats argument to the bridge
vlan command which will display the per-vlan statistics and the device
each vlan belongs to with its flags. The supported command filtering
options are dev and vid. Also the man page is updated to explain the new
option.
The patch uses the new RTM_GETSTATS interface with a filter_mask to dump
all bridges and ports vlans. Later we can add support for using the
per-device dump and filter it in the kernel instead.

Example:
$ bridge -s vlan show
port             vlan id
br0               1 Egress Untagged
                    RX: 2536 bytes 20 packets
                    TX: 2536 bytes 20 packets
                  101
                    RX: 43158 bytes 50 packets
                    TX: 43158 bytes 50 packets
eth1              1 Egress Untagged
                    RX: 2536 bytes 20 packets
                    TX: 2536 bytes 20 packets
                  100
                    RX: 0 bytes 0 packets
                    TX: 0 bytes 0 packets
                  101
                    RX: 43158 bytes 50 packets
                    TX: 43158 bytes 50 packets
                  102
                    RX: 16897 bytes 93 packets
                    TX: 0 bytes 0 packets

The format is the same as bridge vlan show but with stats, even though
under the hood the calls done to the kernel are different.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2016-08-29 10:58:40 -07:00
Stephen Hemminger
f7708201f8 Merge branch 'master' into net-next 2016-08-29 10:57:02 -07:00
Roman Mashak
27d2b08e23 police: bug fix man page
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-08-29 10:54:40 -07:00
Richard Alpe
535194a172 tipc: add peer remove functionality
This enables a user to remove an offline peer from the kernel data
structures. This could for example be useful when deliberately scaling
in peer nodes in a cloud environment.

This functionality was first merged in:
f9dec657e4 (Richard Alpe tipc: add peer remove functionality)

And later backed out (as the kernel counterpart was held up) in:
385caeb13b (Stephen Hemminger Revert "tipc: add peer remove functionality")

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
2016-08-29 10:33:24 -07:00
Richard Alpe
ff77557957 tipc: fix UDP bearer synopsis
Local ip is not required to identify a UDP bearer and shouldn't be
passed to bearer disable, set or get. In this patch we remove the
localip entry from the synopsis of these functions.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
2016-08-17 13:52:07 -07:00
Phil Sutter
7e33b09331 man: ip-link.8: Document missing geneve options
This adds missing documentation of geneve type options:

- dstport
- external
- udpcsum
- udp6zerocsumtx
- udp6zerocsumrx

The bits for the last three was just copy and pasted from vxlan section.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-08-12 12:58:53 -07:00
Stephen Hemminger
6d54c41580 Merge branch 'master' into net-next 2016-08-08 08:44:07 -07:00
Davide Caratti
89bb6e673a macsec: cipher and icvlen can be set separately
since kernel driver has valid default values for 'cipher' and 'icvlen',
there is no need for requiring users to specify both of them when a new
link is added. Also, prompt an error message and exit with appropriate
exit status in case of unsupported cipher suite.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-07-28 11:12:39 -07:00
Davide Caratti
fd4df5b211 ip {link,address}: add 'macsec' item to TYPE list
fix output of "ip address help" and "ip link help". Update TYPE list in man
pages ip-address.8 and ip-link.8 as well.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-07-28 11:12:39 -07:00
Davide Caratti
c0ab80a490 man: macsec: fix macsec related typos
- ip-macsec.8: fix wrong 'device' keyword in 'ip link add device eth0';
add missing description of 'validate' keyword; remove spurious bracket
near 'encrypt' keyword; add missing reference to configuration of 'port'
and 'sci'
- ip-link.8 fix wrong 'es' and 'encoding' keywords in MACsec section

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
2016-07-28 11:12:39 -07:00
Stephen Hemminger
79f5bf17a5 Merge branch 'master' into net-next 2016-07-25 08:21:00 -07:00
Michal Soltys
bdd6104f52 man/man8/tc-flow.8: minor corrections
- baseclass: major handle must match that of class's, Y defaults to 1
- flow map example: maps to 1-256, not 1-257

Signed-off-by: Michal Soltys <soltys@ziu.info>
2016-07-25 08:19:25 -07:00
Stephen Hemminger
ac75d5cd36 Merge branch 'master' into net-next 2016-07-20 12:21:42 -07:00
Phil Sutter
6acf086c2b ip-address.8: Document autojoin flag
Description copied from related kernel support commit message with a
little tailoring to fit.

While at it, fix font of non-terminal CONFFLAG-LIST in synopsis.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-07-20 12:21:18 -07:00
Phil Sutter
52a5986980 ip-link.8: Fix font choices
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-07-20 12:04:34 -07:00
Phil Sutter
3dd4b8936b ip-link.8: Add slave type option descriptions
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-07-20 12:04:34 -07:00
Phil Sutter
f9e9f92881 ip-link.8: Place 'ip link set' warning more prominently
This moves the warning to the beginning of the section about 'ip link
set' which makes it still stand out after adding more text to it's end.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-07-20 12:04:34 -07:00
Phil Sutter
657426c506 ip-link.8: Extend type list in synopsis
'ip link set' supports passing a type to set type-specific parameters.
Add this missing piece of information to the synopsis section.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-07-20 12:04:34 -07:00
Roopa Prabhu
db7263798a bridge: update man page
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-07-20 12:02:02 -07:00
David Ahern
7a4559f67c ss: Add option to suppress header line
Add option to suppress header line. When used the following line
is not shown:
"State  Recv-Q Send-Q     Local Address:Port  Peer Address:Port"

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-07-20 11:55:43 -07:00
Stephen Hemminger
ba5783cbf3 Merge branch 'master' into net-next 2016-07-15 11:49:41 -07:00
Ido Schimmel
78c610e6ea man: Point to 'devlink-sb' from 'devlink' man page
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
2016-07-15 11:46:39 -07:00
Ido Schimmel
e3da7a45ba man: Add devlink man pages to Makefile
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
2016-07-15 11:46:39 -07:00
Eli Cohen
d91fb3f4c7 Add support for configuring Infiniband GUIDs
Add two NLA's that allow configuration of Infiniband node or port GUIDs
by referencing the IPoIB net device set over the physical function. The
format to be used is as follows:

ip link set dev ib0 vf 0 node_guid 00:02:c9:03:00:21:6e:70
ip link set dev ib0 vf 0 port_guid 00:02:c9:03:00:21:6e:78

Signed-off-by: Eli Cohen <eli@mellanox.com>
2016-07-15 11:25:36 -07:00
Stephen Hemminger
d5b62e6439 Merge branch 'master' into net-next 2016-07-06 21:29:32 -07:00
David Ahern
0130f0120b ip route: Add support for vrf keyword
Add vrf keyword to 'ip route' commands. Allows:
1. Users can list routes by VRF name:
       $ ip route show vrf NAME

   VRF tables have all routes including local and broadcast routes.
   The VRF keyword filters LOCAL and BROADCAST routes; to see all
   routes the table option can be used. Or to see local routes only
   for a VRF:
       $ ip route show vrf NAME type local

2. Add or delete a route for a VRF:
       $ ip route {add|delete} vrf NAME <route spec>

3. Do a route lookup for a VRF:
       $ ip route get vrf NAME ADDRESS

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-07-06 21:28:31 -07:00
David Ahern
5db1adae2a ip neigh: Add support for keyword
Add vrf keyword to 'ip neigh' commands. Allows listing neighbor
entries for all links associated with a given VRF.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-07-06 21:28:31 -07:00
David Ahern
104444c201 ip link/addr: Add support for vrf keyword
Add vrf keyword to 'ip link' and 'ip addr' commands (common list code).

Allows:
1. Adding a link to a VRF
       $ ip link set NAME vrf NAME

   Removing a link from a VRF still uses 'ip link set NAME nomaster'

2. Showing links associated with a VRF:
       $ ip link show vrf NAME

3. List addresses associated with links in a VRF
       $ ip -br addr show vrf red

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-07-06 21:28:31 -07:00
Amir Vadai
cfcabf18d8 tc: flower: Add skip_{hw|sw} support
On devices that support TC flower offloads, these flags enable a filter to be
added only to HW or only to SW. skip_sw and skip_hw are mutually exclusive
flags. By default without any flags, the filter is added to both HW and SW,
but no error checks are done in case of failure to add to HW.
With skip-sw, failure to add to HW is treated as an error.

Here is a sample script that adds 2 filters, one with skip_sw and the other
with skip_hw flag.

   # add ingress qdisc
   tc qdisc add dev enp0s9 ingress

   # enable hw tc offload.
   ethtool -K enp0s9 hw-tc-offload on

   # add a flower filter with skip-sw flag.
   tc filter add dev enp0s9 protocol ip parent ffff: flower \
	   ip_proto 1 indev enp0s9 skip_sw \
	   action drop

   # add a flower filter with skip-hw flag.
   tc filter add dev enp0s9 protocol ip parent ffff: flower \
	   ip_proto 3 indev enp0s9 skip_hw \
	   action drop

Signed-off-by: Amir Vadai <amirva@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2016-07-06 21:24:48 -07:00
Stephen Hemminger
2a5855706a Merge branch 'master' into net-next 2016-07-06 21:23:26 -07:00
Jamal Hadi Salim
1d1e0fd29b actions: skbedit add support for mod-ing skb pkt_type
I'll make a formal submission sans the header when the kernel patches
makes it in. This version is for someone who wants to play around with
the net-next kernel patches i sent

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
2016-07-06 21:15:44 -07:00
Michal Soltys
509dcd43c9 iproute2: unmangle netdev/my emails in man pages (hfsc, stab)
No other man pages do so, hiding netdev is kind of silly and I don't
mind having my own address normally visible.
2016-07-06 21:07:23 -07:00
Masatake YAMATO
fab3e001fd man: rtacct: add missing TP marker
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2016-07-06 21:06:33 -07:00
Stephen Hemminger
f62f952fad Merge branch 'master' into net-next 2016-06-30 17:31:37 -07:00
Vivien Didelot
3aa8f8cb7a bridge: man: fix STP LISTENING description
Correct the unclear and poorly conjugated STP LISTENING documentation.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2016-06-30 17:30:02 -07:00
Vivien Didelot
400b5404af bridge: man: fix BPUD typo
s/BPUD/BPDU/ in guard description.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2016-06-30 17:30:02 -07:00
Phil Sutter
577cfe0b67 ip-address: Align type list in help and man page
This adds missing entries on both sides until they are identical.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-06-29 09:20:02 -07:00
Stephen Hemminger
131351086e Merge branch 'master' into net-next 2016-06-27 11:30:06 -07:00
David Ahern
2a6f9cfa8b man: ip-link: Add vrf type
Add description for vrf type to ip-link man page.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
2016-06-27 10:53:28 -07:00
Vivien Didelot
7fab22abd1 bridge: man: fix "brige" typo
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2016-06-27 10:50:37 -07:00
Vivien Didelot
296cee6fdf bridge: vlan: fix a few "fdb" typos in vlan doc
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
2016-06-27 10:49:50 -07:00
Phil Sutter
3462c116f8 man: ip-address, ip-link: Document 'type' quirk
This covers the fact that calling 'ip {link|addr} show type foobar' does
not return an error.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-06-27 10:48:35 -07:00
Stephen Hemminger
5c05c1d4a2 Merge branch 'master' into net-next 2016-06-14 16:33:24 -07:00
Phil Sutter
8e45e44b79 man: ip-link: Document query_rss option
Doc text shamelessly stolen from the introducing commit's message
(6c55c8c461 ['ip link set vf: Added "query_rss" command']).

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-06-14 14:27:03 -07:00
Phil Sutter
24604eb287 ipaddress: Allow listing addresses by type
Not sure why this was limited to ip-link before. It is semantically
equal to the 'master' keyword, which is not restricted at all.

The man page and help text adjustments include the 'master' keyword as
well since that is also supported but wasn't documented before.

Cc: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-06-14 14:20:39 -07:00
Simon Horman
6f1aded9d0 iproute2: correct port in FOU/GRE example
This resolves what appears to be a typo.

Cc: Tom Herbert <tom@herbertland.com>
Reviewed-by: Dinan Gunawardena <dinan.gunawardena@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
2016-06-08 09:40:07 -07:00
Sabrina Dubroca
b26fc590ce ip: add MACsec support
Extend ip-link to create MACsec devices

  ip link add link <master> <macsec> type macsec [options]

Add `ip macsec` command to configure receive-side secure channels and
secure associations within a macsec netdevice.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Phil Sutter <phil@nwl.cc>
2016-06-08 09:35:29 -07:00
Lucas Bates
06f9a59170 man: tc-ife.8: man page for ife action
Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Phil Sutter <phil@nwl.cc>
2016-06-08 08:38:27 -07:00
Phil Sutter
3088787c4b man: rtpr: Fix minor typo
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-06-08 08:37:30 -07:00
Peter Heise
9b3c971a49 man: ip-link: Added HSR part
Added HSR part to manpage as follow-up to last commit's
feedback.

Signed-off-by: Peter Heise <peter.heise@airbus.com>
2016-06-08 08:28:53 -07:00
Phil Sutter
134080cff3 man: ip, ip-link: Fix ip option location
This patch drops the redundant description of some of ip's options in
ip-link.8's description of the 'show' subcommand, preserving the
description of -iec (but appending it to the list in ip.8 with minor
fixes).

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-05-31 12:33:48 -07:00
Daniel Borkmann
f8daee42a5 ip, token: add del command
For convenience also add a del command for deleting a token and
update the man page accordingly.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2016-05-31 12:10:29 -07:00
Stephen Hemminger
6065805922 Merge branch 'master' into net-next 2016-04-19 08:01:55 -07:00
Jiri Pirko
4bf138d6d2 devlink: add manpage for shared buffer
Manpage for devlink "sb" object.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
43f35be4eb devlink: introduce helper to print out nice names (ifnames)
By default, ifnames will be printed out. User can turn that off using
"-n" option on the command line.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Benc
346410bdb4 vxlan: add support for VXLAN-GPE
Adds support to create a VXLAN-GPE interface.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2016-04-11 22:15:49 +00:00
Jiri Benc
42d17a617f ip-link.8: document "external" flag for vxlan
Signed-off-by: Jiri Benc <jbenc@redhat.com>
2016-04-11 22:15:49 +00:00
Daniel Borkmann
29bb2373a8 geneve: add support to set flow label
Follow-up for kernel commit 8eb3b99554b8 ("geneve: support setting
IPv6 flow label") to allow setting the label for the device config.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2016-03-27 10:58:48 -07:00
Daniel Borkmann
f8eb79a624 vxlan: add support to set flow label
Follow-up for kernel commit e7f70af111f0 ("vxlan: support setting
IPv6 flow label") to allow setting the label for the device config.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2016-03-27 10:58:48 -07:00
Jiri Pirko
a3c4b484a1 add devlink tool
Add new tool called devlink which is userspace counterpart of devlink
Netlink socket.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-03-27 10:57:15 -07:00
Phil Sutter
16418561b7 man: tc-vlan.8: Describe CONTROL option
This should be made generic and part of a common tc-actions man page.
Though leave it here for now to not confuse readers of the example which
uses it.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:49 -07:00
Phil Sutter
c73b621cfa man: tc-skbedit.8: Elaborate a bit on TX queues
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:47 -07:00
Phil Sutter
8409abd59b man: tc-police.8: Emphasize on the two rate control mechanisms
As Jamal pointed out, there are two different approaches to bandwidth
measurement. Try to make this clear by separating them in synopsis and
also documenting the way to fine-tune avrate.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:45 -07:00
Phil Sutter
26df2953a5 man: tc-mirred.8: Reword man page a bit, add generic mirror example
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:44 -07:00
Phil Sutter
dbfb17a67f man: tc-csum.8: Add an example
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:43 -07:00
Phil Sutter
1672f42195 tc: connmark, pedit: Rename BRANCH to CONTROL
As Jamal suggested, BRANCH is the wrong name, as these keywords go
beyond simple branch control - e.g. loops are possible, too. Therefore
rename the non-terminal to CONTROL instead which should be more
appropriate.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2016-03-27 10:34:42 -07:00
Zhang Shengju
c256dcd47c man: update netconf manual for new attributes
Update this manual to add attributes proxy_neigh and
ignore_routes_with_linkdown.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
2016-03-21 12:15:58 -07:00
Nikolay Aleksandrov
ba0372670d bridge: mdb: add support for extended router port information
Recently a new temp router port mode was added and with it the dumped
information was extended similar to how mdb entries were done. This
patch adds support to dump the new information by using the "-s" switch.
Example:
$ bridge -d -s mdb show
dev br0 port eth1 grp ff02::1:ffbf:5716 temp 234.39
dev br0 port eth1 grp 239.0.0.2 temp  97.17
dev br0 port eth1 grp 239.0.0.3 temp 105.36
router ports on br0: eth1    0.00 permanent
router ports on br0: eth2  254.87 temp

It also updates the bridge man page.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2016-03-14 16:05:09 -07:00
Stephen Hemminger
6b3e03881c Merge branch 'master' into net-next 2016-03-04 15:47:18 -08:00
Phil Sutter
948acfed23 man: ip-neighbour.8: Document all known nud states
Not sure how useful they are in practice, but as 'ip neigh' supports
setting them all, they deserve to be described as well.

While at it, also add a missing layer of indentation to the subordinate
nud state list.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
0ce05841d5 doc, man: ip-rule: Remove incorrect statement about rule 0
The documentation is wrong here: it is indeed possible to remove policy
rule 0 and recreate it afterwards. Therefore remove these statements.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
2452c57a52 man: ip-route: Make synopsis consistent with description
While the synopsis section contains 'ip route list', it is later
described as 'ip route show'. Make this consistent by replacing 'list'
with 'show' in synopsis.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
4853ee5281 man: ip-link: Beef up VXLAN csum options a bit
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
b487954d5b man: tc-u32: Minor syntax fix
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
bcdd39c588 man: ship action man pages
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:52 -08:00
Phil Sutter
fa2c34eff1 man: Add a man page for the xt action
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
8a1c6d4894 man: Add a man page for the vlan action
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
ae6cf29be0 man: Add a man page for the skbedit action
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
ebf9933bb3 man: Add a man page for the simple action
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
d477eea5a6 man: Add a man page for the police action
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
448800026f man: Add a man page for the pedit action
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
ec0bab1e02 man: Add a man page for the nat action
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
61d74eed70 man: Add a man page for the mirred action
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
438dd1d49d man: Add a man page for the csum action.
Cc: Gregoire Baron <baronchon@n7mm.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
1b5440e94f man: Add a man page for the connmark action
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-04 15:27:51 -08:00
Phil Sutter
e895ae0b31 man: ip-*.8: drop any reference to generic ip options
Listing generic 'ip' options in subcommand man pages is redundant and
error-prone, as they won't be kept in sync anyway. Since many other man
pages don't list them either, drop references to them in the remaining
ones.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:53 -08:00
Phil Sutter
2227f2a5a2 man: ip-l2tp.8: Fix BNF syntax
The 'ADDR' part of 'local' and 'remote' parameters is not optional, but
may also consist of the word 'any'. While at it, add missing whitespace
and fix fonts.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:53 -08:00
Phil Sutter
ac0eff58fd man: ip.8: Add missing flags and token subcommand description
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
a7eef7aa70 man: ip-xfrm.8: Document missing parameters
Namely, 'extra-flag' of 'ip xfrm state' and 'flag' of 'ip xfrm policy'.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
5d8cb0900e man: ip-tunnel.8: Document missing 6rd action
Also drop the non-terminal 'TIME' description as it is not referenced
anywhere.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
16a124ea2d man: ip-token.8: Review synopsis section
Drop unnecessary curly braces around single action keywords, point out
that 'dev' parameter to 'ip token get' is optional and clarify that 'ip
token' defaults to 'list' action.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
582b0fc6cb man: ip-rule.8: Review synopsis section
Clarify that 'ip rule' defaults to action 'list', that 'flush' and
'save' actions don't accept additional parameters, add missing 'not' and
'goto' keywords and finally fix fonts used in 'fwmark' and 'realms'
parameters.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
54beacc334 man: ip-ntable.8: Review synopsis section
The first line contained a c'n'p error, incorrectly listing 'ip address'
syntax. Since PARAMS is used just once and there are not many other
parameters to 'ip ntable change', state them inline and in addition to
that clarify the possibility to pass multiple parameters at once.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
57e1ace02a man: ip-netns.8: Clarify synopsis a bit
Use brackets to show that 'ip netns' defaults to action 'list', drop
superfluous curly braces around 'set' action keyword.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
03cb9d58bc man: ip-neighbour: Fix for missing NUD_STATE description
Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
ca611d6408 man: ip-link.8: Fix and improve synopsis
Reflect that it is possible to pass multiple parameters at the same
time, also use the same trick the help text uses to emphasize vf
specific parameters.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
d890144ecf man: ip-link.8: minor font fix
We commonly use bold font for terminals and italic for non-terminals.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Phil Sutter
37fdeb585d man: ip-address.8: Minor syntax fixes
Clarify that the optional '-' prefix of the 'tentative', 'deprecated'
and 'dadfailed' keywords has to be put right in front of them, no
whitespace is allowed in between.

In addition to that, clarify that it is valid to pass both 'valid_lft'
and 'preferred_lft' at the same time to 'ip address'.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2016-03-02 11:23:52 -08:00
Nikolay Aleksandrov
05d4f64d4a bridge: mdb: add user-space support for extended attributes
Recently support was added to the kernel to be able to add more per-mdb
entry attributes via standard netlink attributes of type MDBA_MDB_EATTR_.
This patch adds support to iproute2 to parse and output these
attributes. The first exported attribute is the mdb "timer" value which
is shown only when the "-s" iproute2 arg is used.

Example:
$ bridge -s mdb show
dev br0 port eth1 grp 239.0.0.11 permanent   0.00
dev br0 port eth1 grp 239.0.0.10 temp 244.15
dev br0 port eth1 grp 239.0.0.1 temp 245.21
dev br0 port eth1 grp 239.0.0.5 temp 246.43
dev br0 port eth2 grp 239.0.0.5 temp 248.44
dev br0 port eth1 grp 239.0.0.2 temp 245.32

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2016-03-02 09:31:46 -08:00
Hiroshi Shimamoto
b6d77d9ee3 iplink: Support VF Trust
Add IFLA_VF_TRUST message to trust the VF.
PF can accept some privileged operation from the trusted VF.
For example, ixgbe PF doesn't allow to enable VF promiscuous mode until
the VF is trusted because it may hurt performance.

To trust VF.
 # ip link set dev eth0 vf 1 trust on

To untrust VF.
 # ip link set dev eth0 vf 1 trust off

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
2016-03-02 09:26:24 -08:00
Roopa Prabhu
c6d0cfb54b bridge: add support for dynamic fdb entries
This patch is a follow up to the recently added
'static' fdb option.

It introduces a new option 'dynamic' which adds
dynamic fdb entries with NUD_REACHABLE.

$bridge fdb add 00:01:02:03:04:06 dev eth0 master dynamic

$bridge fdb show
00:01:02:03:04:06 dev eth0

This patch also documents all fdb types. Removes 'temp'
from usage message since it is now replaced by 'static'.
'temp' still works and is synonymous with static.

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2016-02-21 12:00:41 -08:00
Stephen Hemminger
385caeb13b Revert "tipc: add peer remove functionality"
This reverts commit f9dec657e4.

Since this code is not in upstream kernel, it shouldn't be in iproute2
2016-02-09 10:51:32 -08:00
Lorenzo Colitti
fb2594c183 ss: support closing inet sockets via SOCK_DESTROY.
This patch adds a -K / --kill option to ss that attempts to
forcibly close matching sockets using SOCK_DESTROY.

Because ss typically prints sockets instead of acting on them,
and because the kernel only supports forcibly closing some types
of sockets, the output of -K is as follows:

- If closing the socket succeeds, the socket is printed.
- If the kernel does not support forcibly closing this type of
  socket (e.g., if it's a UDP socket, or a TIME_WAIT socket),
  the socket is silently skipped.
- If an error occurs (e.g., permission denied), the error is
  reported and ss exits.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
2016-01-18 11:47:03 -08:00
Thomas Faivre
1ab0f02f46 ip-link: fix man page warnings
grff wrapper returns warnings when parsing the ip-link.8.in file.

How to reproduce:
$ man --warnings ip-link > /dev/null
`R' is a string (producing the registered sign), not a macro.
[...]

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2016-01-18 11:45:02 -08:00
Thomas Faivre
5cd64c979f vxlan: fix help and man text
Options 'group' and 'remote' cannot take 'any' as value but 'local' can.

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2016-01-18 11:44:22 -08:00
Stephen Hemminger
2505780c20 Merge branch 'net-next' 2016-01-18 09:37:45 -08:00
Richard Alpe
f9dec657e4 tipc: add peer remove functionality
This enables a user to remove an offline peer from the kernel data
structures. This could for example be useful when deliberately scaling
in peer nodes in a cloud environment.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
2016-01-11 08:39:15 -08:00
Stephen Hemminger
19ec5f8393 Revert "tipc: add peer remove functionality"
This reverts commit d4585a4bb1.
This commit is meant for later kernel.
2016-01-11 08:31:46 -08:00
Stephen Hemminger
e947d8947d man: fix whatis for fq
The FQ man page was not following whatis formatting rules.
2016-01-06 10:29:06 -08:00
Richard Alpe
d4585a4bb1 tipc: add peer remove functionality
This enables a user to remove an offline peer from the kernel data
structures. This could for example be useful when deliberately scaling
in peer nodes in a cloud environment.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
2016-01-06 09:24:25 -08:00
Bjørn Mork
8f0777a857 man: iplink: document new addrgenmodes
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2016-01-06 09:20:59 -08:00
Hangbin Liu
3fbe7ca847 iproute2: ip-route.8.in: Add expires option for ip route
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2015-12-30 12:35:04 -08:00
Hangbin Liu
966fe23a7c iproute2: ip-route.8.in: Add missing '[' before 'pref'
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2015-12-30 12:35:04 -08:00
Phil Sutter
b08b5ff128 tc.8: Fix reference to tc-tcindex.8
Just a typo there, it's spelled correctly in SEE ALSO section..

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-12-10 08:48:07 -08:00
Phil Sutter
fc31817d1f bridge.8: minor formatting cleanup
- Replace commas at end of subsection with dots.
- Replace double whitespace by single one.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-11-29 11:47:29 -08:00
Phil Sutter
6e2e2cf03a bridge.8: document fdb replace command
Despite commit 45a82e5 ("iproute vxlan add support for fdb replace
command"), the 'fdb replace' command was not mentioned in bridge.8.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-11-23 15:58:07 -08:00
Stephen Hemminger
5699275b42 man8: scrub trailing whitespace
Remove extraneous whitespace
2015-11-23 15:41:37 -08:00
Ville Skyttä
ac0817ef66 man: Spelling fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2015-11-23 15:39:25 -08:00
Ville Skyttä
85e3c87c82 man: Syntax and warning fixes
Fix syntax issues and warnings highlighted by `man --warnings=w' from
man-db 2.7.1.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2015-11-23 15:39:25 -08:00
Stephen Hemminger
1e5aa99024 Merge branch 'master' into net-next 2015-11-03 16:31:57 -08:00
Phil Sutter
17c53fcd2c ifstat: add manpage 2015-11-03 16:27:39 -08:00
Phil Sutter
7124942942 genl: add manpage 2015-11-03 16:27:39 -08:00
Phil Sutter
958cd21094 ifcfg: add manpage 2015-11-03 16:27:39 -08:00
Stephen Hemminger
86c392f958 Merge branch 'master' into net-next 2015-10-23 15:46:08 -07:00
Phil Sutter
a257bc7b4c tc: ship filter man pages and refer to them in tc.8
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Werner Almesberger <werner@almesberger.net>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:39:28 -07:00
Phil Sutter
f15a23966f tc: add a man page for u32 filter
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:39:28 -07:00
Phil Sutter
fc7a72f1eb tc: add a man page for tcindex filter
Cc: Werner Almesberger <werner@almesberger.net>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
02dddd6110 tc: add a man page for route filter
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
49891ba177 tc: add a man page for fw filter
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
b3aa12a401 tc: add a man page for flower filter
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
334ddc9b4d tc: add a man page for flow filter
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
5774f09ee8 tc: add a man page for cgroup filter
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Phil Sutter
55b35567ad tc: add a man page for basic filter
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-23 15:37:26 -07:00
Stephen Hemminger
651dccbee7 Merge branch 'master' into net-next 2015-10-22 23:42:37 -07:00
Kirill Tkhai
2f4e171f7d Add ip rule save/restore
This patch adds save and restore commands to "ip rule"
similar the same is made in commit f4ff11e3e2 for "ip route".

The feature is useful in checkpoint/restore for container
migration, also it may be helpful in some normal situations.

Signed-off-by: Kirill Tkhai <ktkhai@odin.com>
2015-10-22 23:35:57 -07:00
Stephen Hemminger
b89c359c15 Merge branch 'master' into net-next 2015-10-18 21:58:29 -07:00
Phil Sutter
ccaf6eb5cc ip-rule: neither prohibit nor reject or unreachable flags exist
This has been inconsistent since the beginning of Git and seems to be
merely a documentation leftover, therefore just remove it from help
output and man page.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-18 21:57:01 -07:00
Roopa Prabhu
70e4663472 ip-route man: add usage and description for lwtunnel encap attributes
This patch updates ip-route man page with lwtunnel encap
usage and description, covering MPLS and IP encapsulation.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Jiri Benc <jbenc@redhat.com>
2015-10-16 16:13:32 -07:00
Phil Sutter
a60223bc1c man: ip-link: document MACVLAN/MACVTAP interface types
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-10-12 09:46:55 -07:00
Satish Ashok
25bc3d3d4a ip, bridge: document -timestamp option
This patch documents bridge and ip -timestamp option

Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com>
2015-10-12 09:28:55 -07:00
Wilson Kok
9de8c6d976 bridge: add batch command support
This patch adds support to batch bridge commands.
Follows ip batch code.

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Christophe Gouault <christophe.gouault@6wind.com>
2015-10-12 09:24:15 -07:00
Stephen Hemminger
09a50f420b add tipc manpages to Makefile 2015-10-07 10:33:39 +01:00
Richard Alpe
dcd8d142d2 tipc: add man pages
This patch adds man pages for the TIPC tool. There is one main page
and one page for each top level sub-command. These pages mainly aims
to help a user of the tipc tool. In addition to this they describe
a bit about what TIPC is and some of its features as a protocol.

Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
2015-10-07 10:31:34 +01:00
Florian Westphal
484b3f922c man: tc: add man page for fq pacer
Partially based on kernel Kconfig help text, code comments and
git commit messages from Eric Dumazet.

Joint work with Phil Sutter.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
2015-09-25 12:36:16 -07:00
Vadim Kochan
6c19ff10b5 man tc-htb: Fix HRB -> HTB typo
Changed HRB -> HTB.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-09-23 16:16:14 -07:00
Vadim Kochan
79c7078e3b man ip-link: Fix wording in VLAN reorder_hdr explanation
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Acked-by: Jeremy Harris <jgh@redhat.com>
2015-09-23 16:08:43 -07:00
Phil Sutter
f171b85888 man: tc.8: mention available qdiscs
Some qdiscs still lack a manpage, so listing them here is the only way
for a user to get to know them. For the others, this serves as an
overview of what is there.

Content was taken over from the dedicated manpage if available and
suitable, so there is definitely room for improvement at least by
adjusting it more to the context in which it is now. In case there
wasn't appropriate wording available, I tried to identify key aspects of
the given qdisc.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 16:01:39 -07:00
Phil Sutter
e4ef49a465 man: rtpr: add minimal manpage
While there is not much to explain about this rather trivial shell
script, having a manpage for it serves as good point of reference for
users wondering what it might be for.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:58:54 -07:00
Phil Sutter
f3737abf8c man: lnstat: rewrite manpage
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:58:54 -07:00
Phil Sutter
f7afa99952 man: ip-address: document mngtmpaddr and noprefixroute flags
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:58:54 -07:00
Phil Sutter
0b17394087 man: ip-address: align synopsis with help output
When fixing the BNF syntax error, I overlooked that 'ip address help'
prints a more correct synopsis. This patch aligns them.

Fixes: 715296b ("ip-address.8.in: fix BNF syntax error")
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:58:54 -07:00
Phil Sutter
9b2e9f4a8c man: ip: add -h[uman-readable] option
Since 'ip help' lists it, it should be described in ip.8 as well.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-09-23 15:57:50 -07:00
Stephen Hemminger
f1e225beef Merge branch 'master' into net-next 2015-08-31 16:32:10 -07:00
Konstantin Shemyak
6eca32ec6f add 'vti'/'vti6' tunnel modes to ip-tunnel manual page
* "vti" and "vti6" tunnel modes added to ip-tunnel.8 manual page
* Added "hoplimit" terminology for IPv6
* Corrected usage line
* Minor language fix
2015-08-31 16:28:37 -07:00
Andy Gospodarek
5d295bb8e1 add support for brief output for link and addresses
This adds support for slightly less output than is normally provided by
'ip link show' and 'ip addr show'.  This is a bit better when you have a
host with lots of interfaces.  Sample output:

$ ip -br link show
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
p2p1             UP             08:00:27:ee:0b:3b <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1             UP             08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>
p8p1             DOWN           08:00:27:dc:d8:ca <NO-CARRIER,BROADCAST,MULTICAST,UP>
p9p1             UP             08:00:27:76:d9:75 <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1.100@p7p1    UP             08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>

$ ip -br -4 addr show
lo               UNKNOWN        127.0.0.1/8
p2p1             UP             192.168.56.2/24
p7p1             UP             70.0.0.1/24
p8p1             DOWN           80.0.0.1/24
p9p1             UP             10.0.5.15/24
p7p1.100@p7p1    UP             200.0.0.1/24

$ ip -br -6 addr show
lo               UNKNOWN        ::1/128
p2p1             UP             fe80::a00:27ff:feee:b3b/64
p7p1             UP             7000::1/8 fe80::a00:27ff:fe9d:629f/64
p8p1             DOWN           8000::1/8
p9p1             UP             fe80::a00:27ff:fe76:d975/64
p7p1.100@p7p1    UP             fe80::a00:27ff:fe9d:629f/64

$ ip -br addr show p7p1
p7p1             UP             70.0.0.1/24 7000::1/8 fe80::a00:27ff:fe9d:629f/64

v2: Now with color support!
v3: Better field width estimation (except netdev names to keep output at a
decent width) and whitespace fixup.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
2015-08-31 16:24:10 -07:00
Vadim Kochan
ab872442bd man ip-link: Add little explanations about VLAN qos map
Add little more info about how to manually set priority by iptables,
and some little clarifications about ingress/egress QoS mapping.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-08-25 13:50:52 -07:00
Stephen Hemminger
dfc3d015f6 Merge branch 'master' into net-next 2015-08-23 10:09:46 -07:00
Vadim Kochan
e612883c45 man ip-link: Add more explanation about vlan reordering
Add more explanation about VLAN reordering and what it affects.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-08-19 16:37:08 -07:00
Phil Sutter
715296b85a ip-address.8.in: fix BNF syntax error
The previous man page fixup introduced a syntax error due to missing
opening bracket, which might crash some humanoid BNF parsers.

Fixes: 4e972d5 ("ip-address: fix and extend documentation")
Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-08-19 16:32:56 -07:00
Stephen Hemminger
9a6422c243 Merge branch 'master' into net-next 2015-08-13 19:42:41 -07:00
Pavel Šimerda
4e972d5ef4 ip-address: fix and extend documentation
* Improve manual page synopsis and built-it help
 * Use full subcommand names (e.g. 'address' and 'maddress')
 * Specify when IPv4, IPv6 or both are affected
 * Add lifetimes, home and nodad
 * Remove any remaining excess spaces

Commit 43d29f7 substantially improves generated ip-address.8 instead of
ip-address.8.in and commit e419f2d removes the generated one losing the
improvements entirely. This commit recovers the lost changes, adapts
them to the current manual page and adds more man page and help
improvements.

Original commit by: Kenyon Ralph <kenyon@kenyonralph.com>
2015-08-13 14:11:09 -07:00
Pavel Šimerda
503aa4e20d ip-link: fix and extend documentation
* Add `can` to list of supported link types
 * Document `addrgenmode`
 * Document `link-netnsid`
 * Document VLAN link type
 * Improve VXLAN link type documentation
    - Fix VXLAN srcport/dstport docs
    - Document `udpcsum`, `udp6zerocsumtx` and `udp6zerocsumrx`
2015-08-13 14:11:09 -07:00
Pavel Šimerda
142434dc51 ip: fix and extend documentation
* Use unabbreviated `address` and `maddress`
 * Keep only `-n` and `-netns` for network namespace
2015-08-13 14:11:09 -07:00
Stephen Hemminger
4b942cb1df Merge branch 'master' into net-next 2015-08-12 09:09:43 -07:00
Phil Sutter
e52f3ef711 ip-link: fix minor typo in manpage
Change '-human-readble' to '-human-readable'.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2015-08-12 09:01:46 -07:00
Stephen Hemminger
68831d6b45 Merge branch 'master' into net-next 2015-07-31 18:12:57 -07:00
Roopa Prabhu
cd8df30b7c bridge fdb: add 'use' option to set NTF_USE flag in fdb add requests
This is similar to command options corresponding to other NTF_* flags
already exposed to the user space (examples self/master).

Also updates bridge man page (The man page patch also includes
a fix to the 'self' entry and documents 'master' for fdb entries)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2015-07-31 18:09:41 -07:00
Stephen Hemminger
efb169717e bridge: drop man page fragment
Left over copy/paste from ip monitor man page.
2015-07-28 16:50:19 -07:00
Nikolay Aleksandrov
6aac861713 bridge: mdb: add support for vlans
This patch allows the user to specify the vlan of the mdb group being
added or deleted and adds support for displaying the vlan when
dumping mdb information or monitoring it. It also updates the man page
to reflect the new "vid" argument for mdb.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
2015-07-28 16:45:50 -07:00
Anuradha Karuppiah
188648270a ip link: proto_down config and display.
This patch adds support to set and display protodown on a switch port. The
switch driver can handle this error state by doing a phys down on the port.

One example user space application setting this flag is a multi-chassis
LAG application to handle split-brain situation on peer-link failure.

Example:
root@net-next:~# ip link set eth1 protodown on
root@net-next:~/iproute2# ip link show eth1
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:35:01 brd ff:ff:ff:ff:ff:ff protodown on
root@net-next:~/iproute2# ip link set eth1 protodown off
root@net-next:~/iproute2# ip link show eth1
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:12:35:01 brd ff:ff:ff:ff:ff:ff
root@net-next:~/iproute2#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
2015-07-28 16:43:20 -07:00
Vadim Kochan
814f9b9919 man ss: Fix explanation when no options specified
Really by default ss dumps not only TCP sockets but any kind of socket
which is in ESTABLISHED state (TCP/UDP/UNIX).

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Reported-by: Miha Marolt <miham@beyondsemi.com>
2015-07-27 14:35:02 -07:00
Stephen Hemminger
0c4a90c446 Merge branch 'master' into net-next 2015-06-26 14:08:49 -07:00
Daniel Borkmann
cbdd1e6921 tc: bpf: add initial man page
Add a start of a man-page to the misc section as a reference and
guide on (e)BPF classifier and actions. Given that tc is only tersely
documented, this is provided in the hope that users will have an
easier getting started with tc and (e)BPF. And, that there's now more
incentive for others to also start documenting their classifier and
actions as well. ;)

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
2015-06-26 11:25:57 -07:00
John W. Linville
f4739b2ee7 iplink_geneve: add tos configuration at link creation
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2015-06-25 15:16:31 -04:00
John W. Linville
f4c05c2e99 iplink_geneve: add ttl configuration at link creation
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2015-06-25 15:16:31 -04:00
John W. Linville
c1a1d8bc4c iproute2: update ip-link.8 for geneve tunnels
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2015-06-25 15:16:31 -04:00
Nicolas Dichtel
b6ec53e300 xfrmmonitor: allows to monitor in several netns
With this patch, it's now possible to listen in all netns that have an nsid
assigned into the netns where is socket is opened.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-05-21 15:28:56 -07:00
Nicolas Dichtel
449b824ad1 ipmonitor: allows to monitor in several netns
With this patch, it's now possible to listen in all netns that have an nsid
assigned into the netns where the socket is opened.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-05-21 15:28:56 -07:00
Nicolas Dichtel
2503247d58 man: update ip monitor page
Add label option.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-05-21 15:28:56 -07:00
Vadim Kochan
699589f6df man ip-link: Remove extra GROUP explanation
Remove double explanation of GROUP option from 'ip link set' section.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-05-14 15:38:10 -07:00
Lennert Buytenhek
2c0feda8be man ip-link: Add missing lowpan link type
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
2015-05-11 09:19:22 -07:00
Stephen Hemminger
ce743da171 ip: document exit code
The ip command has always had a consistent exit status
document it so that developers see it.
2015-05-07 08:11:28 -07:00
Vadim Kochan
7f74cf6de0 man ip-link: Add deleting links by group
Indicate possibility deleting virtual links by group.

Also changed the alignment of 'ip link delete' args
descriptions, to look like similary to 'ip link set'.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-05-04 09:00:52 -07:00
Mathias Nyman
d7bd2db52c ip: Add color output option
It is hard to quickly find what you are looking for in the output of the
ip command. Color helps.

This patch adds a '-c' flag to highlight these with individual colors:
  - interface name
  - ip address
  - mac address
  - up/down state

Signed-off-by: Mathias Nyman <m.nyman@iki.fi>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
2015-05-04 08:39:17 -07:00
Nicolas Dichtel
d652ccbf81 netns: allow to dump and monitor nsid
Two commands are added:
 - ip netns list-id
 - ip monitor nsid

A cache is also added to remember the association between the iproute2 netns
name (from /var/run/netns/) and the nsid.
To avoid interfering with the rth socket, a new rtnl socket (rtnsh) is used to
get nsid (we may send rtnl request during listing on rth).

Example:
$ ip netns list-id
nsid 0 (iproute2 netns name: foo)
$ ip monitor nsid
Deleted nsid 0 (iproute2 netns name: foo)
nsid 16 (iproute2 netns name: bar)

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-04-20 10:02:38 -07:00
Stephen Hemminger
f0eb8da59a Merge branch 'master' into net-next 2015-04-10 13:27:37 -07:00
Vadim Kochan
943c30de80 man tc: Add description about class name option
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-04-10 13:26:28 -07:00
Christophe Gouault
811aca0448 xfrm: revise man page and document ip xfrm policy set
- document ip xfrm policy set
- update ip xfrm monitor documentation
- in DESCRIPTION section, reorganize grouping of commands

Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
2015-04-10 13:21:30 -07:00
Stephen Hemminger
bd733e4088 Merge branch 'master' into net-next
Conflicts:
	man/man8/ip-route.8.in
2015-04-07 08:56:14 -07:00
Pavel Šimerda
a89d5329d4 docs: make spacing consistent
Result of the following command:

    sed -ri 's/\.  /. /g' man/*/*

Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
2015-04-07 08:41:36 -07:00
Vadim Kochan
b6d6b5a1cd man ip-link: Add missing link types - vti,ipvlan,nlmon
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-04-07 08:36:20 -07:00
Vadim Kochan
bbf2f7c66d man ip-netns: Fix shifted layout at bottom of 'ip netns del'
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-04-07 08:35:46 -07:00
Lubomir Rintel
194e9b855d ip: support RFC4191 router preference
This allows querying and setting the route preference. It's usually set from
the IPv6 Neighbor Discovery Router Advertisement messages.

Introduced in "ipv6: expose RFC4191 route preference via rtnetlink", enqueued
for Linux 4.1.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2015-03-24 15:45:23 -07:00
Eric W. Biederman
dacc5d4197 add basic mpls support to iproute
- Pull in the uapi mpls.h
- Update rtnetlink.h to include the mpls rtnetlink notification multicast group.
- Define AF_MPLS in utils.h if it is not defined from elsewhere
  as is done with AF_DECnet

The address syntax for multiple mpls labels is a complete invention.
When I looked there seemed to be no wide spread convention for talking
about an mpls label stack in text for.  Sometimes people did:
"{ Label1, Label2, Label3 }", sometimes people would do:
"[ label3, label2, label1 ]", and most of the time label
stacks were not explicitly shown at all.

The syntax I wound up using, so it would not have spaces and so it
would visually distinct from other kinds of addresses is.

label1/label2/label3 Where label1 is the label at the top of the label
stack and label3 is the label at the bottom on the label stack.

When there is a single label this matches what seems to be convention
with other tools.  Just print out the numeric value of the mpls label.

The netlink protocol for labels uses the on the wire format for a
label stack. The ttl and traffic class are expected to be 0.  Using
the on the wire format is common and what happens with other address
types. BGP when passing label stacks also uses this technique with the
exception that the ttl byte is not included making each label in a BGP
label stack 3 bytes instead of 4.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-03-24 15:45:23 -07:00
Eric W. Biederman
6f7a9f4dc5 add support for the RTA_NEWDST attribute.
This attribute is like RTA_DST except it specifies the destination
address to place on a packet when it leaves the host.  For ip based
protocols this is destination NAT and not a common part of forwarding.
For protocols like MPLS label swapping is something that typically
happens on every hop.

There is likely to be a RTA_NEWSRC at some point so RTA_NEWDST
is printed as "as to"  and can be specified either as "as to"
or just "as"

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-03-24 15:45:23 -07:00
Eric W. Biederman
93ae283594 add support for the RTA_VIA attribute
Add support for the RTA_VIA attribute that specifies an address family
as well as an address for the next hop gateway.

To make it easy to pass this reorder inet_prefix so that it's tail
is a proper RTA_VIA attribute.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-03-24 15:45:23 -07:00
Vadim Kochan
599fc319eb man ip-netns: Fix syntax in default ns process, indent's
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-24 15:14:53 -07:00
Vadim Kochan
d59102975e man ip-link: Add ip-netns(8) in 'SEE ALSO'
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-24 15:13:45 -07:00
Andy Gospodarek
822e9609e7 bridge: drop reference to unused option embedded from manpage
While looking at the manpage, I noticed a reference to 'embedded' that was
added by this commit:

	commit d611682a8c
	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: Andy Gospodarek <gospo@cumulusnetworks.com>
CC: John Fastabend <john.r.fastabend@intel.com>
2015-03-24 14:54:53 -07:00
Vadim Kochan
ee9b34778c man ip-netns: Notice about loose device when do 'del'
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-15 12:10:21 -07:00
Vadim Kochan
8ce21c6b93 man tc: Highlight minor & major, notice they are hex
Also added some trivial form of the ID as "major:minor",
just for visualisation of explained words.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-15 12:10:21 -07:00
Vadim Kochan
032b4f4d19 man ip-link: Add short description about 'group'
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-15 12:10:21 -07:00
Vadim Kochan
36324eba37 man ip-link: Add notice about local netns devices
Added some clarification why 'ip link set netns' can not
change network namespace for some kind of devices.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-27 19:03:26 -08:00
Ebben Aries
409998c5a4 iproute: ip-gue/ip-fou manpages
Add missing GUE/FOU manpages to Makefile

Signed-off-by: Ebben Aries <exa@fb.com>
2015-02-27 18:59:27 -08:00
Roopa Prabhu
22a98f5140 bridge link: add support to specify master
This patch adds support to specify 'master' keyword,
to target a bridge link command explicitly to the software
bridge driver.

Adds self/master keywords to usage and man page

v2:
	fix usage to say (self and master) and not (self or master)

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
2015-02-27 18:58:04 -08:00
Vadim Kochan
34c8a95cd7 man ip-link: Add short info about 'dynamic' flag
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-27 18:54:44 -08:00
Lennart Sorensen
c9ae9bae6e Fix misspelling of defrag in ip-l2tp.8 2015-02-24 15:59:44 -08:00
Nicolas Dichtel
2dd5909d9d ip-monitor: allow to monitor ip rules
Now done by default or with 'ip monitor rule'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-02-24 15:59:44 -08:00
Alex Pilon
6b8c871dc1 Allow specifying bridge port STP state by name rather than number.
The existing behaviour forces one to memorize the integer constants for
STP port states.

    # bridge link set dev dummy0 state 3

This patch makes it possible to use the lowercased port state name.

    # bridge link set dev dummy0 state forwarding

Invalid non-integer inputs now cause exit with status -1.

Signed-off-by: Alex Pilon <alp@alexpilon.ca>
2015-02-24 15:59:44 -08:00
Nicolas Dichtel
d182ee1307 ipnetns: allow to get and set netns ids
The kernel now provides ids for peer netns. This patch implements a new command
'set' to assign an id.
When netns are listed, if an id is assigned, it is now displayed.

Example:
 $ ip netns add foo
 $ ip netns set foo 1
 $ ip netns
 foo (id: 1)
 init_net

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-02-21 16:54:53 -08:00
Vadim Kochan
95ce04bc86 ss: Show stats from specified network namespace
Added new '-N NSNAME, --net=NSNAME' option to show socket stats
from the specified network namespace name.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-10 15:11:59 -08:00
Stephen Hemminger
ebd58d19f0 Merge branch 'master' into net-next 2015-02-05 10:56:06 -08:00
Tom Herbert
90f1df715e iproute: Descriptions of fou and gue options in ip-link man pages
Add section for additional arguments to GRE, IPIP, and SIT types
that are related to Foo-over-UDP and Generic UDP Encapsulation.
Also, added an example GUE configuration in the examples section.

Signed-off-by: Tom Herbert <therbert@google.com>
2015-02-05 10:55:43 -08:00
Stephen Hemminger
c5ecc59f10 Merge branch 'master' into net-next 2015-02-05 10:33:13 -08:00
Thomas Graf
2eb90dc762 vxlan: Group policy extension
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2015-02-05 10:31:43 -08:00
Vadim Kochan
3372493909 ip netns: Delete all netns
Allow delete all namespace names by:

    $ ip -all netns del

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-05 10:28:19 -08:00
Vadim Kochan
b13ba03f54 ip netns: Allow exec on each netns
This change allows to exec some cmd on each
named netns (except default) by specifying '-all' option:

    # ip -all netns exec ip link

Each command executes synchronously.

Exit status is not considered, so there might be a case
that some CMD can fail on some netns but success on the other.

EXAMPLES:

1) Show link info on all netns:

$ ip -all netns exec ip link

netns: test_net
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
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether 1a:19:6f:25:eb:85 brd ff:ff:ff:ff:ff:ff

netns: home0
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
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ea:1a:59:40:d3:29 brd ff:ff:ff:ff:ff:ff

netns: lan0
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
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 500
    link/ether ce:49:d5:46:81:ea brd ff:ff:ff:ff:ff:ff

2) Set UP tap0 device for the all netns:

$ ip -all netns exec ip link set dev tap0 up

netns: test_net

netns: home0

netns: lan0

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-02-05 10:28:19 -08:00
Stephen Hemminger
668dfab274 Merge branch 'master' into net-next 2015-02-05 10:20:10 -08:00
Reese Moore
d36d9d41d6 iproute2: ip-link.8.in: Spelling fixes
In the ip-link(8) man page, for the gretap, ip6gre, and ip6gretap types, the
word tunnel was incorrectly spelled 'tuunel'.

Signed-off-by: Reese Moore <ram@vt.edu>
2015-02-05 10:10:15 -08:00
Daniel Borkmann
6ef87f9cce ip: route: add congestion control metric
This patch adds configuration and dumping of congestion control metric
for ip route, for example:

  ip route add <dst> dev foo congctl [lock] dctcp

Reference: http://thread.gmane.org/gmane.linux.network/344733
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2015-01-13 17:40:49 -08:00
Stephen Hemminger
dd8fac8cee fix spelling of Kuznetsov
Suggested by Vadim Kochan
2015-01-03 09:58:41 -08:00
Scott Feldman
674bb438bc bridge/link: add learning_sync policy flag
v2:

Resending now that the dust has cleared in 3.18 on "self" vs. hwmode debate for
brport settings.  learning_sync is now set/cleared using "self" qualifier on
brport.

v1:

Add 'learned_sync' flag to turn on/off syncing of learned MAC addresses from
offload device to bridge's FDB.   Flag is be set/cleared on offload device port
using "self" qualifier:

  $ sudo bridge link set dev swp1 learning_sync on self

  $ bridge -d link show dev swp1
  2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 2
      hairpin off guard off root_block off fastleave off learning off flood off
  2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br0
      learning on learning_sync on

Adds new IFLA_BRPORT_LEARNED_SYNCED attribute for IFLA_PROTINFO on the SELF
brport.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
2015-01-01 10:02:53 -08:00
Vadim Kochan
b93fe57840 man ss: Add state filter description
Stolen from generated doc/ss.html
Also added reference to RFC 793 for TCP states.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-01-01 10:01:06 -08:00
Vadim Kochan
d9d1d1fae1 man tc: Add description for -graph option
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-01-01 09:57:09 -08:00
Vadim Kochan
67e1d73be1 tc: Allow to easy change network namespace
Added new '-netns' option to simplify executing following cmd:

    ip netns exec NETNS tc OPTIONS COMMAND OBJECT

    to

    tc -n[etns] NETNS OPTIONS COMMAND OBJECT

e.g.:

    tc -net vnet0 qdisc

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-12-27 10:22:34 -08:00
Vadim Kochan
527910c801 bridge: Allow to easy change network namespace
Added new '-netns' option to simplify executing following cmd:

    ip netns exec NETNS bridge OPTIONS COMMAND OBJECT

    to

    bridge -n[etns] NETNS OPTIONS COMMAND OBJECT

e.g.:

    bridge -net vnet0 fdb

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-12-27 10:22:32 -08:00
Vadim Kochan
52700d40a2 ip: Allow to easy change network namespace
Added new '-netns' option to simplify executing following cmd:

    ip netns exec NETNS ip OPTIONS COMMAND OBJECT

    to

    ip -n[etns] NETNS OPTIONS COMMAND OBJECT

e.g.:

    ip -net vnet0 link add br0 type bridge
    ip -n vnet0 link

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2014-12-27 10:22:29 -08:00
Vadim Kochan
417b2180a5 man ip-link: Small example of 'ip link show master'
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-12-27 10:19:59 -08:00
Heiner Kallweit
18c8bbe3db ip: extend "ip-address" man page to reflect the recent flag extensions
Extend "ip-address" man page to reflect the recent extension of
allowing to list addresses with flags tentative, deprecated, dadfailed
not being set.

Signed-off-by: Heiner Kallweit <heiner.kallweit@web.de>
2014-12-27 10:15:57 -08:00
Stephen Hemminger
5c2c10b17e Merge branch 'net-next' 2014-12-24 12:23:00 -08:00
Vadim Kochan
712249d8fa ip link: Show devices by type
Added new option 'type' to 'ip link show'
command which allows to filter devices by type:

    ip link show type bridge
    ip link show type vlan

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-12-24 12:19:14 -08:00
Vadim Kochan
79aa79d058 ip lib: Added shorter timestamp option
Added another timestamp format to look like more logging info:

[2014-12-22T22:36:50.489 ] 2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default
    link/ether 3c:97:0e:a3:86:2e brd ff:ff:ff:ff:ff:ff

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-12-24 12:07:36 -08:00
Stephen Hemminger
c9b8aef6ae Merge branch 'master' into net-next 2014-12-09 16:33:59 -08:00
Florian Westphal
29d1f730b8 ip route: enable per-route ecn settings via 'features' option
This permits to selectively enable explicit congestion notification via
the routing table.

If this ecn feature is not set, the kernel will use the tcp_ecn sysctl
to decide wheter to use ECN when establising a TCP connection.

At the time of this writing, the kernel supports ecn and allfrags, but
allfrags is of dubious value and not implemented here.

Example:

ip route change 192.168.2.0/24 dev eth0 features ecn

Signed-off-by: Florian Westphal <fw@strlen.de>
2014-12-09 16:26:39 -08:00
Stephen Hemminger
f66611d823 ip-link: fix unterminated string in manpage
Missing "
2014-12-03 19:35:36 -08:00
vadimk
8322d28dca man ip-link: Fix indentation for 'ip link show' options
BEFORE:
              The show command has additional formatting options:

       -s, -stats, -statistics
              output more statistics about packet usage.

       -d, -details
              output more detailed information.

       -h, -human, -human-readble
              output statistics with human readable values number followed by suffix

       -iec   print human readable rates in IEC units (ie. 1K = 1024).
AFTER:
       The show command has additional formatting options:

              -s, -stats, -statistics
                     output more statistics about packet usage.

              -d, -details
                     output more detailed information.

              -h, -human, -human-readble
                     output statistics with human readable values number followed by suffix

              -iec   print human readable rates in IEC units (ie. 1K = 1024).

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-12-03 09:17:36 -08:00
vadimk
1f299e9249 man ip-link: Add description for 'help' command
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-11-30 09:40:08 -08:00
Vadim Kochan
1b94414854 ip link: Allow to filter devices by master dev
Added 'master' option to 'ip link show' command
to filter devices by master dev.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-11-29 11:27:41 -08:00
vadimk
0948adc01a ip netns: Identify netns for the current process
As 'ip' util will share the same netns from the caller
process then we can just look at /proc/self/.. to show
the netns of the current process by:

    ip netns id

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-11-29 11:19:11 -08:00
vadimk
093b76466e ip monitor: Allow to filter events by dev
Added 'dev' option to allow filtering events by device.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-11-29 11:15:40 -08:00
Or Gerlitz
8ca8fac7aa ip-link: Document IPoIB link type in the man page
Add documentation on how to create devices of type IP-over-Infiniband
in the man page.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
2014-11-29 11:05:51 -08:00
Tom Herbert
e4fc7e2625 iproute2: Man pages for fou and gue
Man pages for Foo-over-UDP and Generic UDP Encapsulation receive
port configuration. gue man page links to fou one.

Signed-off-by: Tom Herbert <therbert@google.com>
2014-11-06 16:17:34 -08:00
Masatake YAMATO
e37a9c73d2 man: ip-link: fix a typo
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-11-06 16:02:38 -08:00
Stephen Hemminger
1e264abc3a ip: add iec formatted option and cleanup code
Add a new -iec option in addition to -human.
Cleanup code so the formatting of numbers is done in one function,
not 2 ways and 2 sizes.
2014-11-02 12:49:19 -08:00
Christian Hesse
b68d983754 ip-link: add switch to show human readable output
Byte and packet count can increase to really big numbers. This adds a
switch to show human readable output.

4: wl: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00🇩🇪ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    1523846973 3969051  0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    8710088361 6077735  0       0       0       0
4: wl: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00🇩🇪ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    1.5G       3.9M     0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    8.7G       6.0M     0       0       0       0
2014-11-02 11:53:29 -08:00
Nicolas Dichtel
eeb669a740 man: update doc after support of ESN and anti-replay window
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2014-10-30 09:39:25 -07:00
vadimk
a5eafa9a5e man ip: Add missing '-details' option
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-10-29 22:26:16 -07:00
vadimk
338f07c699 man ip-link: Fixed missing 'up' option in 'ip link show' synopsis
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-10-29 22:26:11 -07:00
Nicolas Dichtel
c2fbc57ee7 ip/vxlan: add a help for ageing and maxaddress options
These options were missing in usage and man pages.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2014-09-28 16:19:31 -07:00
vadimk
2f937359dd ip man: Added short description for hsr link type
For hsr link there was no short description in ip-link man page.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2014-09-03 18:37:16 -07:00
Rami Rosen
e4c356827a iplink: macvtap: fix man page
This patch adds description about macvtap to ip-link.8 man page.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
2014-08-04 09:31:02 -07:00
Daniel Borkmann
cd509528ed man: token: fix couple of typos
Not sure how these typos slipped in back then, I suspect
too much coffee. ;) So lets fix them up properly.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2014-07-15 09:45:00 -07:00
Sucheta Chakraborty
f89a2a05ff Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool
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: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
2014-06-09 12:51:57 -07:00
Vlad Yasevich
f0f4ab600b bridge: Add learning and flood support
Add ability to control learning and flood flags on bridge
ports.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
2014-05-28 17:10:45 -07:00
Oliver Hartkopp
2b70fe156b iplink: can: fix help text and man page
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: Oliver Hartkopp <socketcan@hartkopp.net>
2014-05-28 16:58:13 -07:00
Or Gerlitz
63f60e3ab3 Document VF link state control in the ip-link man page
Document the support added by commit 07fa9c1 "Add VF link state
control" in the ip-link man page.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
2014-05-13 12:54:35 -07:00
Sergey V. Lobanov
7bc7fcaadb 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>
2014-05-09 13:35:18 -07:00
Sergey V. Lobanov
96e8ab7c58 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>
2014-05-09 13:30:30 -07:00
Stephen Hemminger
882e754cd4 fix indentation of ip neighbour man page
Formatting was awful and unclear on ip neighbour
2014-03-31 20:23:40 -07:00
Richard Haines
116ac9270b 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>
2014-03-10 13:20:49 -07:00
John Fastabend
39935c9374 iproute2: add man page for mqprio
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-03-04 16:59:51 -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
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
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
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
Jiri Pirko
cc26a8909f iplink: add support for bonding netlink
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-10-30 16:45:04 -07:00
xeb@mail.ru
9abde37cde iproute2: ip6gre: update man pages
Update man pages with ip6gre info.

Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2013-10-04 11:26:09 -07:00
Stephen Hemminger
f3abcfed46 lnstat, nstat, ifstat: update man pages
New json option
2013-09-24 12:00:41 -07:00
Stephen Hemminger
af60cf40c9 Merge branch 'net-next-3.11' 2013-09-23 13:16:48 -07:00
Petr Písař
54e9c3a34d iproute2: bridge: document mdb
This augments bridge(8) manual page with `bridge mdb' and `bridge
monitor mdb' commands which have been added recently.

Signed-off-by: Petr Písař <ppisar@redhat.com>
2013-09-20 09:45:35 -07:00
Stephen Hemminger
c5e3ee2c1f Merge branch 'master' into net-next-3.11 2013-09-03 08:45:27 -07:00
Richard Godbee
4b8000f37a iproute2: ip-route.8.in: minor fixes
In SYNOPSIS section:

 - Add 'reordering'
 - Add missing '[' before 'quickack'

Signed-off-by: Richard Godbee <richard@godbee.net>
2013-08-31 10:30:06 -07:00
Stefan Tomanek
b1d0525f9c ip rule: add route suppression options
When configuring a system with multiple network uplinks and default routes, it
is often convenient to reference a routing table multiple times - but reject
its routing decision if certain constraints are not met by it.

Consider this setup:

$ ip route add table secuplink default via 10.42.23.1

$ ip rule add pref 100            table main suppress_prefixlength 0
$ ip rule add pref 150 fwmark 0xA table secuplink

With this setup, packets marked 0xA will be processed by the additional routing
table "secuplink", but only if no suitable route in the main routing table can
be found. By suppressing entries with a prefixlength of 0 (or less), the
default route (/0) of the table "main" is hidden to packets processed by rule
100; packets traveling to destinations via more specific routes are processed
as usual.

It is also possible to suppress a routing entry if a device belonging to
a specific interface group is to be used:

$ ip rule add pref 150 table main suppress_group 1

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
2013-08-04 11:54:15 -07:00
Atzm Watanabe
7cfa3802ca vxlan: Allow setting destination to unicast address.
This patch allows setting VXLAN destination to unicast address.
It allows that VXLAN can be used as peer-to-peer tunnel without
multicast.

v6: change back to the v3 except for using new attribute because
    replacing command-line parameters breaks existing scripts,
    based by Cong Wang's comments.

v5: rebase on the latest.

v4: replace "group" with "remote" based by David Stevens's comments.

v3: move a new attribute REMOTE into the last of an enum list
    based by Stephen Hemminger's comments.
    fix the usage to show explicitly that both "remote" and "group"
    cannot be specified, based by Ben Hutchings's comments.

v2: use a new argument "remote" instead of "group" based by
    Stephen Hemminger's comments.

Signed-off-by: Atzm Watanabe <atzm@stratosphere.co.jp>
2013-07-26 14:25:42 -07:00
Stephen Hemminger
cc71ad3ddd Merge branch 'net-next-3.10' 2013-07-16 10:20:31 -07:00
Stephen Hemminger
09154ec15f ip: add batch mode to man page 2013-07-13 10:02:03 -07:00
esr@thyrsus.com
1284fd3a81 ip-rule.8: Fix presentational use of .SS. 2013-07-12 08:33:09 -07:00
esr@thyrsus.com
ee0b0a9ec9 In tc-ematch.8, remove no-op .ti requests to prevent translation warnings
These do nothing on an 80-column display. They were clearly somebody's
boilerplate way of setting up hanging indents, but the syntax lines
are way too short to require them. And since most were argumentless
they would have been no-ops on any sized display.
2013-07-12 08:33:08 -07:00
Thomas Richter
2816a56879 iproute2 vxlan documentation update for ip command
The ip link command line help and the ip-link.8.in
man page are outdated in regards to the vxlan support.
The patch updates both the command line help for the
ip command and its man page.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
2013-07-09 09:38:41 -07:00
Thomas Richter
7578ae8807 iproute2 vxlan documentation update for bridge command
The bridge fdb command line help and the bridge.8
man page are outdated in regards to the vxlan support.
The patch updates both the command line help for the
bridge command and its man page.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
2013-07-09 09:38:36 -07:00
esr@thyrsus.com
11eb939653 tc-stab.8: Fix synopsis errors, an invalid escape, and incorrect English usge.
The command synopsis is regularized and part of it split off into an
OPTIONS section.  This allows the page to lift to XML-DocBook.

An invalid \p escape was removed.

This page was written by someone who didn't understand the use of
definite and indefinite articles in English, nor its punctuation rules.
I've fixed these mistakes, and some glitches in punctuation and
capitalization.
2013-07-09 09:07:41 -07:00
esr@thyrsus.com
61f541fe12 First set of manpage markup fixes
Enclosed patch fixes inappropriate uses of the .SS macro.  Fuller explanation
in the change comment.

There are other problems in these pages that block lifting to
XML-DocBook, most notably in the command synopses.  They will take
some creativity to fix.  I'm working on it

>From 75745adba4b45b87577b61a2daa886dd444f44da Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond" <esr@thyrsus.com>
Date: Fri, 21 Jun 2013 15:27:38 -0400
Subject: [PATCH] Abolish presentation-level misuse of the .SS macro.

This change fixes most (but not all) fatal errors in attempts to lift
the iproute2 manual pages to XML-DocBook.  Where .SS is still used it
is a real subsection header, not just a way to outdent and bold text.
Presentation-level instances are turned into .TP calls and tables.
2013-06-24 17:00:54 -07:00
Cong Wang
b37f2c895d add quickack option to ip route
This patch adds quickack option to enable/disable TCP quick ack
mode for per-route.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <amwang@redhat.com>
2013-06-20 08:35:21 -07:00
Stephen Hemminger
45a3b3fcd6 man: get rid of useless reference to GNU style options
No need to state the obvious here.
2013-05-28 08:47:56 -07:00
Nicolas Dichtel
f3c2f91e22 man: describe --bpf option of ss
This option has been recently added to ss utility.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2013-05-24 08:11:59 -07:00
Daniel Borkmann
191b60bd73 ip: ipv6: add tokenized interface identifier support
This patch adds support for tokenized IIDs, that enable
administrators to assign well-known host-part addresses
to nodes whilst still obtaining global network prefix
from Router Advertisements. This is the iproute2 part for
the kernel patch f53adae4eae5 (``net: ipv6: add tokenized
interface identifier support'').

Example commands with iproute2:

Setting a device token:
  # ip token set ::1a:2b:3c:4d/64 dev eth1

Getting a device token:
  # ip token get dev eth1
  token ::1a:2b:3c:4d dev eth1

Listing all tokens:
  # ip token list  (or: ip token)
  token :: dev eth0
  token ::1a:2b:3c:4d dev eth1

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
2013-05-03 13:17:21 -07:00
Hubert Kario
ce93fffe82 add short description of batch mode in tc man page
The tc command is missing documentation of -batch and -force switches
that are returned by "tc -help".
Add short description on their syntax and usage.
2013-04-12 09:07:09 -07:00
Petr Sabata
6274b0b759 iproute2: Fix some manpage typos
This patch fixes some of the typos found in iproute2
documentation.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2013-04-05 09:30:05 -07:00
David Ward
29665f92c7 ip/xfrm: Improve usage text and documentation
Change ALGO-KEY to ALGO-KEYMAT to make it more obvious that the
keying material might need to contain more than just the key (such
as a salt or nonce value).

List the algorithm names that currently exist in the kernel.

Indicate that for IPComp, the Compression Parameter Index (CPI) is
used as the SPI.

Group the list of mode values by transform protocol.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2013-03-28 14:40:45 -07:00
David Ward
f3b9aa3df8 ip/xfrm: Command syntax should not expect a key for compression
Compression algorithms do not use a key.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2013-03-28 14:40:45 -07:00
James Chapman
9c064b5332 iproute2: update ip-l2tp man page
Add documentation about the new l2spec_type parameter for "ip l2tp add
session".

Signed-off-by: James Chapman <jchapman@katalix.com>
2013-03-27 13:20:59 -07:00
Stephen Hemminger
1b95cb8d6b tc-tbf: remove ancient references to Alpha
In older versions of traffic shaping the Alpha kernel was special
and had higher HZ. This no longer matters, TC is based on high
resoulution timers in kernel.
2013-03-22 11:18:25 -07:00
Vlad Yasevich
aa2f1335e9 man: Add documentation for the bridge link operation.
Bridge tool now supports setting and retrieving bridge port specific
link attributes.  Document what attributes are supported and what
they mean.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
2013-03-16 10:02:51 -07:00
Petr Šabata
4405123433 iproute2: Mention the 'up' argument in documentation
Both ip-link and ip-address support the 'up' argument, however this
isn't documented in neither their help outputs or ip-address' manpage.
This patch fixes that.

Signed-off-by: Petr Šabata <contyk@redhat.com>
Reported-by: Jiří Popelka <jpopelka@redhat.com>
2013-03-14 13:26:33 -07:00
Eric W. Biederman
f480917486 iproute2: Document the -D and -I options
While looking into a sysctl regression in decnet on old kernels I
discovered this omission in the iproute2 documentation.

I can't imagine anyone's muscle memory remembering the longer forms.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-03-11 16:53:37 -07:00
Vlad Yasevich
ab9387104c bridge: Update bridge man pages to include vlan command
Add the vlan command documentation to bridge man page.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
2013-03-06 11:03:10 -08:00
David Ward
daa45caddb ip/iptunnel: Fix incorrect syntax in man page
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: David Ward <david.ward@ll.mit.edu>
2013-03-06 10:45:26 -08:00
Kees van Reeuwijk
4957250166 iproute2: clarification of various man8 pages
Rephrasing for clarity.

Note that in ip-rule.8 I rephrased a sentence to "The RPDB is scanned
in order of decreasing priority." The original version talked about
*in*creasing priority, but from the context that didn't make sense.

Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
2013-02-11 09:22:06 -08:00
David Ward
e59fd3db2e ip/iptunnel: Extend TOS syntax
The 'inherit/STRING' or 'inherit/00..ff' syntax indicates that the
TOS field of tunneled packets should be copied from the original IP
header, but for non-IP packets the value STRING or 00..ff should be
used instead. (This syntax is already used by 'ip tunnel show'.)

Also clarify the man page and the command usage text (particularly
that the TOS is not specified as a decimal number).

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2013-02-04 08:56:45 -08:00
Eric W. Biederman
9a7b3d91b6 iproute2: Add "ip netns pids" and "ip netns identify"
Add command that go between network namespace names and process
identifiers.  The code builds and runs agains older kernels but
only works on Linux 3.8+ kernels where I have fixed stat to work
properly.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-02-04 08:35:07 -08:00
Eric W. Biederman
1e9014a7a6 iproute2: Fill in the ip-netns.8 manpage
Document ip netns monitor.

Add a few senteces describing each command.  The manpage was looking
very scrawny.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2013-02-04 08:34:00 -08:00
Nicolas Dichtel
cbe195dc6b ip: update man pages and usage() for 'ip monitor'
Sync with the current code.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-17 08:47:51 -08:00
Nicolas Dichtel
743a00a72b ip: add man pages for netconf
This patch add the documentation about 'ip netconf' command.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-17 08:47:51 -08:00
Nicolas Dichtel
e509fb1b68 ip: term OPTIONS was used twice in 'ip route' man pages
INFO_SPEC already uses the term 'OPTIONS' and describe it.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-14 10:00:31 -08:00
Nicolas Dichtel
77987911e5 ip: update man pages for 'ip link'
Now 'ip link' supports ipip, sit and ip6tnl.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-14 10:00:31 -08:00
Nicolas Dichtel
2a898320be ip: update mand pages and usage() for 'ip mroute'
Sync with the current code.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-14 09:56:47 -08:00
Andreas Henriksson
caadda9308 iproute2: fix tc ematch manpage section
The debian package checking tool, lintian, spotted that the
tc ematch manpage seems to have an error in the specified section.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2012-12-12 08:15:56 -08:00
Stephen Hemminger
cc57430206 man: fix incorrect use of "it's"
A couple of places were using "it's" where possive form "its"
should be used instead.
2012-11-12 08:05:45 -08:00
Andreas Henriksson
987e9d710a iproute2: avoid errors from double-installing manpages
Three manpages in man8 are listed twice in MAN8PAGES (both directly and
in TARGETS) which causes the install command to spit our a couple of
warnings as below and exiting with non-zero exit code....

make[3]: Entering directory `/tmp/buildd/iproute-20121001/man/man8'
install -m 0755 -d /tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8
install -m 0644 ip-address.8 ip-link.8 ip-route.8 ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 ss.8 tc.8 tc-bfifo.8 tc-cbq.8 tc-cbq-details.8 tc-choke.8 tc-codel.8 tc-drr.8 tc-ematch.8 tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-netem.8 tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfb.8 tc-sfq.8 tc-stab.8 tc-tbf.8 bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 ip-address.8 ip-addrlabel.8 ip-l2tp.8 ip-link.8 ip-maddress.8 ip-monitor.8 ip-mroute.8 ip-neighbour.8 ip-netns.8 ip-ntable.8 ip-route.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 /tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-address.8' with `ip-address.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-link.8' with `ip-link.8'
install: will not overwrite just-created `/tmp/buildd/iproute-20121001/debian/tmp/usr/share/man/man8/ip-route.8' with `ip-route.8'
make[3]: *** [install] Error 1
make[3]: Leaving directory `/tmp/buildd/iproute-20121001/man/man8'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/tmp/buildd/iproute-20121001/man'

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2012-11-11 16:22:31 -08:00
Stephen Hemminger
f1a6f4e985 iplink: add vxlan to man page
Also sort link types for clarity
2012-10-25 09:01:29 -07:00
Or Gerlitz
de0389935f iplink: Added support for the kernel IPoIB RTNL ops
Added support to ipoib rtnl ops through which one can create, configure,
query and delete IPoIB devices, for example

 $ ip link add link ib0.8001 name ib0.8001 type ipoib pkey 0x8001
 $ ip link add link ib0.1 name ib0.1 type ipoib mode connected
 $ ip --details link show dev ib0.1

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
2012-10-25 08:53:12 -07:00
Julian Anastasov
ea63a69b6d iproute2: add support for tcp_metrics
ip tcp_metrics/tcpmetrics

	We support get/del for single entry and dump for
show/flush.

v3:
 - fix rtt/rttvar shifts as suggested by Eric Dumazet
 - show rtt/rttvar usecs as suggested by David Laight

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-10-08 10:23:07 -07:00
Stephen Hemminger
ec72fd7380 l2tp: remove references to old bridge utils
Can no manage interfaces with ip no need to invoke old brctl
2012-10-03 08:45:32 -07:00
Stephen Hemminger
27bca61531 Add support for AF_BRIDGE
This can be useful when displaying neighbour table
2012-09-17 15:50:27 -07:00
Stephen Hemminger
bd899db39c man: make sure tc man page gets installed 2012-09-17 15:46:00 -07:00
John Fastabend
d611682a8c iproute2: bridge: finish removing replace option in man pages
This patch finishes removing the replace option from the bridge
man page which I missed in this commit

commit 57b9785de3
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Mon Aug 27 10:52:31 2012 -0700

    iproute2: bridge: remove replace and change options

Also add documentation for "{ self | embedded }" already shown on
the cmd line help msg.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
2012-09-14 10:05:00 -07:00
Li Wei
8325daf7de iproute2: tc.8: update UNITS section.
- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
2012-09-10 09:34:27 -07:00
Andreas Schwab
1b3c149b41 iproute2: Fix various manpage formatting nits
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
2012-09-07 09:01:51 -07:00
John Fastabend
059547c597 iproute2: build failure due to missing '\' in Makefile
After latest commit 'Install all tc and ip sub pages' this error
occurs on make.

make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/git/kernel.org/iproute2/man/man3'
make[2]: Entering directory `/home/git/kernel.org/iproute2/man/man8'
Makefile:8: *** commands commence before first target.  Stop.
make[2]: Leaving directory `/home/git/kernel.org/iproute2/man/man8'

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
2012-08-27 11:24:03 -07:00
Stephen Hemminger
5147af5acb Install all tc and ip sub pages
Add missing entries in Makefile
2012-08-25 08:39:30 -07:00
Oliver Hartkopp
6790dc84dd iproute2: Add missing tc-ematch.8 for man page installation
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2012-08-21 07:48:53 -07:00
Stephen Hemminger
d89fbf3223 Explain TC class id limits 2012-08-20 10:58:58 -07:00
Stephen Hemminger
c7f04f021c Fix formatting of ip.8 family man page
fix bad formatting in description of -f option
2012-08-17 15:28:59 -07:00
Florian Westphal
c487348a9c add ematch man page 2012-08-13 08:34:13 -07:00
Xose Vazquez Perez
6d10827c79 Fix Makefile's
Missing space in man8 Makefile and install bridge command with
correct name
2012-08-13 08:06:21 -07:00
Jiri Pirko
d992f3e611 iplink: add support for num[tr]xqueues 2012-08-01 16:19:55 -07:00