mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
tc: Move functions the create/parse handle to be static inline
Those functions are just wrappers to available macros for readability. Move them to tc.h to avoid function-call overhead. Signed-off-by: Roi Dayan <roid@mellanox.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
21
lib/tc.c
21
lib/tc.c
@@ -24,27 +24,6 @@
|
||||
|
||||
VLOG_DEFINE_THIS_MODULE(tc);
|
||||
|
||||
/* Returns tc handle 'major':'minor'. */
|
||||
unsigned int
|
||||
tc_make_handle(unsigned int major, unsigned int minor)
|
||||
{
|
||||
return TC_H_MAKE(major << 16, minor);
|
||||
}
|
||||
|
||||
/* Returns the major number from 'handle'. */
|
||||
unsigned int
|
||||
tc_get_major(unsigned int handle)
|
||||
{
|
||||
return TC_H_MAJ(handle) >> 16;
|
||||
}
|
||||
|
||||
/* Returns the minor number from 'handle'. */
|
||||
unsigned int
|
||||
tc_get_minor(unsigned int handle)
|
||||
{
|
||||
return TC_H_MIN(handle);
|
||||
}
|
||||
|
||||
struct tcmsg *
|
||||
tc_make_request(int ifindex, int type, unsigned int flags,
|
||||
struct ofpbuf *request)
|
||||
|
Reference in New Issue
Block a user