- 21 May, 2015 10 commits
-
-
Stephen Hemminger authored
Also add tipc_netlink.h for later TIPC support
-
David Ward authored
In the GRED kernel source code, both of the terms "drop parameters" (DP) and "virtual queue" (VQ) are used to refer to the same thing. Each "DP" is better understood as a "set of drop parameters", since it has values for limit, min, max, avpkt, etc. This terminology can result in confusion when creating a GRED qdisc having multiple DPs. Netlink attributes and struct members with the DP name seem to have been left intact for compatibility, while the term VQ was otherwise adopted in the code, which is more intuitive. Use the VQ term in the tc command syntax and output (but maintain compatibility with the old syntax). Rewrite the usage text to be concise and similar to other qdiscs. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
DPs, def_DP, and DP are unsigned values that are sent and received in TCA_GRED_* netlink attributes; handle them properly when they are parsed or printed. Use MAX_DPs as the initial value for def_DP and DP, and fix the operator used for bounds checking them. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
Make the output more consistent with the RED qdisc, and only show details/statistics if the appropriate flag is set when calling tc. Show the parameters used with "gred setup". Add missing statistics "pdrop" and "other". Fix format specifiers for unsigned values. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
This is more helpful to the user, since the command takes two forms, and the message that would otherwise appear about missing parameters assumes one of those forms. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
The "bandwidth" parameter is optional, but ensure the user is aware of its default value, to proactively avoid configuration problems. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
burst is an unsigned value. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
David Ward authored
It is used when parsing three different parameters, only one of which is Wlog. Change the name to make the code less confusing. Signed-off-by: David Ward <david.ward@ll.mit.edu>
-
- 14 May, 2015 1 commit
-
-
Vadim Kochan authored
Remove double explanation of GROUP option from 'ip link set' section. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
- 11 May, 2015 7 commits
-
-
Lennert Buytenhek authored
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
-
Daniel Borkmann authored
Fix whitespacing and remove the unnecessary condition. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-
Eric Dumazet authored
Missing space before dctcp: markers. With dctcp, cwnd=2 is pretty common, just display cwnd value even if cwnd has this value, it makes parsing easier. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
-
Eric Dumazet authored
Kernel can give us smaller tcp_info than our. We copy the kernel provided structure and fill with 0 the remaining part. Lets clear only the missing part to save some cycles, as we intend to slightly increase tcp_info size in the future. Signed-off-by: Eric Dumazet <edumazet@google.com>
-
Thomas Graf authored
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-
WANG Cong authored
When deleting a specific basic filter with handle, tc command always ignores the 'handle' option, so tcm_handle is always 0 and kernel deletes all filters in the selected group. This is wrong, we should respect 'handle' in cmdline. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
-
Thomas Graf authored
Fixes a typo in get_prefix_1() which broke the prefix default names { default | any | all }. The most obvious fallout from this bug was: $ ip route add default via 1.1.1.1 Error: an inet prefix is expected rather than "default". Fixes: dacc5d41 ("add basic mpls support to iproute") Signed-off-by: Thomas Graf <tgraf@suug.ch>
-
- 07 May, 2015 4 commits
-
-
Stephen Hemminger authored
The exit code for ip label was not correct. The return from the command function is negated and turned into the exit code on failure.
-
Stephen Hemminger authored
If ip rule command fails talking to kernel, exit code should be 2. The sub-command is called by cmd loop and the exit code is negative of return value from the command callback.
-
Stephen Hemminger authored
If kernel complains about ip route request, exit status should be 2 not 1. This fixes regression introduced by: commit 42ecedd4 Author: Roopa Prabhu <roopa@cumulusnetworks.com> Date: Tue Mar 17 19:26:32 2015 -0700 fix ip -force -batch to continue on errors
-
Stephen Hemminger authored
The ip command has always had a consistent exit status document it so that developers see it.
-
- 04 May, 2015 6 commits
-
-
Vlad Zolotarov authored
Add a new option to toggle the ability of querying the RSS configuration of a specific VF. VF RSS information like RSS hash key may be considered sensitive on some devices where this information is shared between VF and PF and thus its querying may be prohibited by default. This new option allows a system administrator with privileges to modify a PF state to control if the above VF querying is allowed or not. For example: To enable RSS querying of VF[0] of ethX: >> ip link set dev ethX vf 0 query_rss on Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
-
Vadim Kochan authored
Show deleting by group in 'ip link help' output: ... ip link delete { DEVICE | dev DEVICE | group DEVGROUP } type TYPE [ ARGS ] ... Also show separately DEVICE option in { } list. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
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>
-
Vadim Kochan authored
Fixed applying family & socket type filters. It was not possible to select UDP & UNIX sockets together. Now selected families are ORed. The problem was that filters were combined by AND. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Reported-By: Mihai Moldovan <ionic@ionic.de>
-
Daniel Borkmann authored
Currently, only on error we get a log dump, but I found it useful when working with eBPF to have an option to also dump the log on success. Also spotted a typo in a header comment, which is fixed here as well. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
-
Mathias Nyman authored
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>
-
- 29 Apr, 2015 1 commit
-
-
Stephen Hemminger authored
Reclone sanitized headers from 4.1-rc
-
- 27 Apr, 2015 5 commits
-
-
Daniel Borkmann authored
Fix up the eBPF example program to match our kernel fix in a166151cbe33 ("bpf: fix bpf helpers to use skb->mac_header relative offsets"). Tested on ingress and egress paths. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Alexei Starovoitov <ast@plumgrid.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
-
Daniel Borkmann authored
This work follows upon commit 6256f8c9 ("tc, bpf: finalize eBPF support for cls and act front-end") and takes up the idea proposed by Hannes Frederic Sowa to spawn a shell (or any other command) that holds generated eBPF map file descriptors. File descriptors, based on their id, are being fetched from the same unix domain socket as demonstrated in the bpf_agent, the shell spawned via execvpe(2) and the map fds passed over the environment, and thus are made available to applications in the fashion of std{in,out,err} for read/write access, for example in case of iproute2's examples/bpf/: # env | grep BPF BPF_NUM_MAPS=3 BPF_MAP1=6 <- BPF_MAP_ID_QUEUE (id 1) BPF_MAP0=5 <- BPF_MAP_ID_PROTO (id 0) BPF_MAP2=7 <- BPF_MAP_ID_DROPS (id 2) # ls -la /proc/self/fd [...] lrwx------. 1 root root 64 Apr 14 16:46 0 -> /dev/pts/4 lrwx------. 1 root root 64 Apr 14 16:46 1 -> /dev/pts/4 lrwx------. 1 root root 64 Apr 14 16:46 2 -> /dev/pts/4 [...] lrwx------. 1 root root 64 Apr 14 16:46 5 -> anon_inode:bpf-map lrwx------. 1 root root 64 Apr 14 16:46 6 -> anon_inode:bpf-map lrwx------. 1 root root 64 Apr 14 16:46 7 -> anon_inode:bpf-map The advantage (as opposed to the direct/native usage) is that now the shell is map fd owner and applications can terminate and easily reattach to descriptors w/o any kernel changes. Moreover, multiple applications can easily read/write eBPF maps simultaneously. To further allow users for experimenting with that, next step is to add a small helper that can get along with simple data types, so that also shell scripts can make use of bpf syscall, f.e to read/write into maps. Generally, this allows for prepopulating maps, or any runtime altering which could influence eBPF program behaviour (f.e. different run-time classifications, skb modifications, ...), dumping of statistics, etc. Reference: http://thread.gmane.org/gmane.linux.network/357471/focus=357860Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
-
Nicolas Dichtel authored
This flag is only for the netlink protocol (multi-part messages), no reason to reject messages without it. Note that this flag was removed by the following kernel patches (v3.14) 65886f439ab0 ipmr: fix mfc notification flags f518338b1603 ip6mr: fix mfc notification flags Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
Nicolas Dichtel authored
The warning was: In file included from namespace.c:14:0: ../include/namespace.h: In function ‘setns’: ../include/namespace.h:37:2: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration] Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
Nicolas Dichtel authored
The warning was: m_simple.c: In function ‘parse_simple’: m_simple.c:142:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’ [-Wformat] Useful to be able to compile with -Werror. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
- 20 Apr, 2015 6 commits
-
-
Vadim Kochan authored
Use correct handle buffer length. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Nicolas Dichtel authored
XFRM netlink family is independent from the route netlink family. It's wrong to call rtnl_wilddump_request(), because it will add a 'struct ifinfomsg' into the header and the kernel will complain (at least for xfrm state): netlink: 24 bytes leftover after parsing attributes in process `ip'. Reported-by: Gregory Hoggarth <Gregory.Hoggarth@alliedtelesis.co.nz> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-
Nicolas Dichtel authored
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>
-
Pavel Šimerda authored
See also: * https://bugzilla.redhat.com/show_bug.cgi?id=736332Signed-off-by: Pavel Šimerda <psimerda@redhat.com>
-
Pavel Šimerda authored
See also: * https://bugzilla.redhat.com/show_bug.cgi?id=977845Signed-off-by: Pavel Šimerda <psimerda@redhat.com>
-
Pavel Šimerda authored
Without modification, using the example resulted in the following error: [root@localhost sbin]# cbq restart find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. **CBQ: failed to compile CBQ configuration! See also: * https://bugzilla.redhat.com/show_bug.cgi?id=539232Reported-by: Mads Kiilerich <mads@kiilerich.com> Signed-off-by: Pavel Šimerda <psimerda@redhat.com>
-