• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * lib/route/qdisc/mqprio.c             MQPRIO Qdisc/Class
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation version 2.1
7  * of the License.
8  *
9  * Copyright (c) 2018 Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
10  */
11 
12 #ifndef NETLINK_MQPRIO_H_
13 #define NETLINK_MQPRIO_H_
14 
15 #include <netlink/netlink.h>
16 #include <netlink/route/qdisc.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 extern int rtnl_qdisc_mqprio_set_num_tc(struct rtnl_qdisc *qdisc, int num_tc);
23 extern int rtnl_qdisc_mqprio_get_num_tc(struct rtnl_qdisc *qdisc);
24 extern int rtnl_qdisc_mqprio_set_priomap(struct rtnl_qdisc *qdisc, uint8_t priomap[],
25                                          int len);
26 extern uint8_t *rtnl_qdisc_mqprio_get_priomap(struct rtnl_qdisc *qdisc);
27 extern int rtnl_qdisc_mqprio_hw_offload(struct rtnl_qdisc *qdisc, int offload);
28 extern int rtnl_qdisc_mqprio_get_hw_offload(struct rtnl_qdisc *qdisc);
29 extern int rtnl_qdisc_mqprio_set_queue(struct rtnl_qdisc *qdisc, uint16_t count[],
30                                        uint16_t offset[], int len);
31 extern int rtnl_qdisc_mqprio_get_queue(struct rtnl_qdisc *qdisc, uint16_t *count,
32                                        uint16_t *offset);
33 extern int rtnl_qdisc_mqprio_set_mode(struct rtnl_qdisc *qdisc, uint16_t mode);
34 extern int rtnl_qdisc_mqprio_get_mode(struct rtnl_qdisc *qdisc);
35 extern int rtnl_qdisc_mqprio_set_shaper(struct rtnl_qdisc *qdisc, uint16_t shaper);
36 extern int rtnl_qdisc_mqprio_get_shaper(struct rtnl_qdisc *qdisc);
37 extern int rtnl_qdisc_mqprio_set_min_rate(struct rtnl_qdisc *qdisc, uint64_t min[],
38                                           int len);
39 extern int rtnl_qdisc_mqprio_get_min_rate(struct rtnl_qdisc *qdisc, uint64_t *min);
40 extern int rtnl_qdisc_mqprio_set_max_rate(struct rtnl_qdisc *qdisc, uint64_t max[],
41                                           int len);
42 extern int rtnl_qdisc_mqprio_get_max_rate(struct rtnl_qdisc *qdisc, uint64_t *max);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* NETLINK_MQPRIO_H_ */
49