summaryrefslogtreecommitdiffstats
path: root/include/netlink/route/qdisc
Commit message (Collapse)AuthorAgeFilesLines
* include: add missing "extern "C"" specifier to public headersThomas Haller2023-08-071-0/+8
|
* include: fix headers "include/netlink/route/{netconf.h,route/qdisc/red.h}" ↵Thomas Haller2023-08-071-0/+1
| | | | to be self-contained
* license: fix and add SPDX license identifiers and drop license commentsThomas Haller2020-04-1613-91/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a few wrong SPDX license identifiers, where the original license comment indicates GPL-2.0-only. This is not done manually, but by running the following script: --- #!/bin/bash # Tool to drop license comments, adding SPDX license identifiers, while preserving # copyright comments. The point is not to manually do this task, but perform some # hacked up string replacement. _cp() { /bin/cp "$@" } _cat() { /bin/cat "$@" } in_file() { local T=$(mktemp) _cp -f "$1" "$T" _cat "$T" rm -f "$T" } out_file() { local T=$(mktemp) _cat - > "$T" _cp -f "$T" "$1" rm -f "$T" } join() { _cat "$@" | awk '{ printf("%s#x#", $0)}' } unjoin() { _cat - | sed 's/#x#/\n/g' } files_all() { git ls-files | grep -v '\.png$' | grep -v '^include/linux-private/' } adjust() { NEWLINES='\(#x#\)\+' COPYRIGHTS='\(\( \* Copyright (c) 20..\(-20..\|, 20..\)\? [^#]\+#x#\)\+\( \*#x# \* \(Stolen[^#]*\|Based on [^#]*\)#x#\)\?\)' _cat - | \ sed '1s%^\(/\* SPDX-License-Identifier: LGPL-2.1-only \*/\|\)#x#/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x#/*#x#\2 */#x##x#%' | \ sed '1s%^/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x##x#%' | \ sed '1s%^\(\)/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x#/*#x#\2 */#x##x#%' | \ sed '1s%^\(/\* SPDX-License-Identifier: LGPL-2.1-only \*/\|\)#x#/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU General Public License as#x# \*[ ]\+published by the Free Software Foundation version 2 of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: GPL-2.0-only \*/#x#/*#x#\2 */#x##x#%' } FILES=( $(files_all) ) for f in "${FILES[@]}"; do echo "processing \"$f\"..." in_file "$f" | join | adjust | unjoin | out_file "$f" done
* route/qdisc: adjust API for 64 bit rate/ceil support for htb classThomas Haller2019-09-011-4/+11
| | | | | | | | | | | | | | | | - existing API/ABI must stay unchanged. We cannot change parameter types. Ad most we can add new variants that support 64 bit integers. - rtnl_tc_calc_txtime64() and rtnl_tc_calc_bufsize64() are trivial. We should not blow up the public API of libnl for such a thing. If the users needs it, they can just reimplement it. - getters should return an error code. Especially if the return type does not support encoding an error there. - don't add separate rs_rate64/rs_ceil64 field. Instead, extend the "rs_rate" field of "struct rtnl_ratespec" to 64 bits. It's internal API.
* Add 64bit rate/ceil support for htb classd0u92019-09-011-4/+4
| | | | | Htb class has already supported 64bit rate and ceil settings for times. Now, in this patch, we grant this ability to libnl library.
* lib/qdisc: avoid BUG() in "lib/route/qdisc/mqprio.c"Thomas Haller2018-10-091-1/+1
| | | | | | | | | | BUG() raises an assertion. It seems overly harsh. For example, rtnl_tc_data() can fail if we fail to allocate memory. Asserting against that, makes libnl3 not out-of-memory safe. Just return a regular error.
* lib/qdisc: style fixes in "lib/route/qdisc/mqprio.c"Thomas Haller2018-10-091-11/+11
|
* route:qdisc: add MQPRIO QdiscVolodymyr Bendiuga2018-07-261-0/+48
| | | | | | | More about Qdisc mqprio can be found at: http://man7.org/linux/man-pages/man8/tc-mqprio.8.html Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
* route: mark data argument for rtnl_netem_set_delay_distribution_data() as constThomas Haller2018-01-161-1/+1
|
* route: add separate function to set netem qdisc delay distributionSteffen Vogel2017-12-201-0/+1
| | | | | | | | | A new function rtnl_netem_set_delay_distribution_data() has been added to allow the user to pass the delay distribution directly without loading it from a file. In conjunction with the maketable code (see iproute2 / NISTnet) this can be used to generate and load custom delay distributions on the fly.
* include: don't include kernel headers in public libnl3 headersThomas Haller2017-03-021-0/+2
| | | | | | | | | | | | | | | | | It would be desirable not to include kernel headers in our public libnl3 headers. As a test, remove all those includes, and fix compilation by explicitly including the kernel headers where needed. In some cases, that requires forward declaration for kernel structures, as we use them as part of our own headers. Realistically, we cannot drop those includes as it probalby breaks compilation for users that expect to get a certain kernel header when including a libnl3 header. So, this will not be done and the includes will be restored in the next commit. Do this step to show how it would be and to verify that we could build with such a change. The reason not to do this is backward compatibility (at compile-time).
* qdisc/red: Add missing prototypes for rtnl_red_set_limit() and ↵Tobias Klauser2017-01-201-0/+3
| | | | | | | | | | | | rtnl_red_get_limit() This fixes the following GCC warnings when compiling with -Wmissing-prototypes: route/qdisc/red.c:136:6: warning: no previous prototype for ‘rtnl_red_set_limit’ [-Wmissing-prototypes] route/qdisc/red.c:152:5: warning: no previous prototype for ‘rtnl_red_get_limit’ [-Wmissing-prototypes] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* build: fixup headers for C++ inclusionCraig Gallek2016-08-121-6/+6
| | | | | | | | | | | | | - Fix typos in extern "C" wrappers. - 'class' is a reserved word, change to cls. - int -> enum casts are not automatic. - Static strings must be of type const char* - Add a few implicit header dependencies explicitly. http://lists.infradead.org/pipermail/libnl/2016-July/002165.html Signed-off-by: Craig Gallek <kraig@google.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* qdisc: add hfsc qdisc supportCong Wang2014-07-301-0/+37
| | | | | | | | Cc: Thomas Graf <tgraf@suug.ch> Cc: Thomas Haller <thaller@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* htb: Declare rtnl_htb_set_level()Thomas Graf2014-07-271-0/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* add fq_codel qdiscCong Wang2013-11-221-0/+44
| | | | | | Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* tc: fix included headersThomas Graf2012-05-168-0/+10
| | | | Reported-by: Adrian Ban <adrian.ban@mantech.ro>
* Support plug qdisc - queue traffic until explicit releaseShriram Rajagopalan2012-02-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | | The plug qdisc supports two operations - plug and unplug. When the qdisc receives a plug ("buffer") command via netlink request, packets arriving henceforth are buffered until a corresponding unplug command is received. Depending on the type of unplug ("release_one" or "release_indefinite"), the queue can be unplugged indefinitely or selectively. The plug qdisc allows a user to implement network output buffering (aka output commit), used commonly in checkpoint based fault tolerance systems. It also supports a general purpose queue plug/unplug functionality. The associated kernel module is available in David Miller's net-next tree, commit: c3059be16c9ef29c05f0876a9df5fea21f29724f This patch introduces userspace tools and API, to control the qdisc via netlink messages. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Signed-off-by: Thomas Graf <tgraf@redhat.com>
* dsmark: Add missing declarations for rtnl_class_dsmark_(get|set)_bitmask()Thomas Graf2011-11-251-3/+3
| | | | | | | The existing declarations refered to non-existing functions so removing them is safe. Signed-off-by: Thomas Graf <tgraf@redhat.com>
* HTB: Add support for level and direct pkt stats, complete access functionsThomas Graf2011-06-091-10/+18
| | | | | | | | - Adds support for htb class level and direct packet statistics - Complete all get/set access functions - Complete error handling - Documentation
* rename sch -> qdiscThomas Graf2011-03-219-0/+359