From 36139cf1f044b2631f425d4ceb7333bc9a3facd3 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Tue, 9 Oct 2012 21:37:31 +0200 Subject: [PATCH] doc: Provide documentation for link promis counter and rx/tx queues Signed-off-by: Thomas Graf --- doc/route.txt | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/doc/route.txt b/doc/route.txt index 33f58d0..a01f6d9 100644 --- a/doc/route.txt +++ b/doc/route.txt @@ -570,18 +570,51 @@ link objects to be used for comparison. For more information on how to modify the qdisc of a link, see section <>. -[[link_attr_weight]] -==== Weight -This attribute is unused and obsoleted in all recent kernels. +[source,c] +----- +#include + +void rtnl_link_set_qdisc(struct rtnl_link *link, const char *name); +char *rtnl_link_get_qdisc(struct rtnl_link *link); +----- + +[[link_attr_promiscuity]] +==== Promiscuity +The number of subsystem currently depending on the link being promiscuous mode. +A value of 0 indicates that the link is not in promiscuous mode. It is a +read-only attribute provided by the kernel and cannot be modified. The set +function is provided solely for the purpose of creating link objects to be +used for comparison. [source,c] ----- #include -extern void rtnl_link_set_qdisc(struct rtnl_link *link, const char *name); -extern char *rtnl_link_get_qdisc(struct rtnl_link *link); +void rtnl_link_set_promiscuity(struct rtnl_link *link, uint32_t count); +uint32_t rtnl_link_get_promiscuity(struct rtnl_link *link); ----- +[[link_num_rxtx_queues]] +==== RX/TX Queues +The number of RX/TX queues the link provides. The attribute is writable but +will only be considered when creating a new network device via netlink. + +[source,c] +----- +#include + +void rtnl_link_set_num_tx_queues(struct rtnl_link *link, uint32_t nqueues); +uint32_t rtnl_link_get_num_tx_queues(struct rtnl_link *link); + +void rtnl_link_set_num_rx_queues(struct rtnl_link *link, uint32_t nqueues); +uint32_t rtnl_link_get_num_rx_queues(struct rtnl_link *link); +----- + +[[link_attr_weight]] +==== Weight +This attribute is unused and obsoleted in all recent kernels. + + [[link_modules]] === Modules