summaryrefslogtreecommitdiffstats
path: root/lib/route/cls/u32.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2010-10-26 10:54:33 (GMT)
committerThomas Graf <tgraf@suug.ch>2010-10-26 10:54:33 (GMT)
commit4c6d1c5dfb4f7e4a9392895f3da709b55c970e02 (patch)
tree9303851dcc87e2e3f9c25805ccf24f4a543fe23d /lib/route/cls/u32.c
parentb9d965b01b42103389b2a2c0cc3133293447a64d (diff)
downloadlibnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.zip
libnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.tar.gz
libnl-4c6d1c5dfb4f7e4a9392895f3da709b55c970e02.tar.bz2
Unified TC attributes interface
So far all common tc atttributes were accessed via specific functions, i.e. rtnl_class_set_parent(), rtnl_qdisc_set_parent(), rtnl_cls_set_parent() which implied a lot of code duplication. Since all tc objects are derived from struct rtnl_tc and these common attributes are already stored in there this patch removes all type specific functions and makes rtnl_tc_* attribute functions public. rtnl_qdisc_set_parent(qdisc, 10); becomes: rtnl_tc_set_parent((struct rtnl_tc *) qdisc, 10); This patch also adds the following new attributes to tc objects therefore removing them as tc specific attributes: - mtu - mpu - overhead This allows for the rate table calculations to be unified as well taking into account the new kernel behavior to take care of overhead automatically.
Diffstat (limited to 'lib/route/cls/u32.c')
-rw-r--r--lib/route/cls/u32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/route/cls/u32.c b/lib/route/cls/u32.c
index 80b8851..38214c9 100644
--- a/lib/route/cls/u32.c
+++ b/lib/route/cls/u32.c
@@ -70,7 +70,7 @@ static int u32_msg_parser(struct rtnl_cls *cls)
struct nlattr *tb[TCA_U32_MAX + 1];
int err;
- err = tca_parse(tb, TCA_U32_MAX, (struct rtnl_tca *) cls, u32_policy);
+ err = tca_parse(tb, TCA_U32_MAX, (struct rtnl_tc *) cls, u32_policy);
if (err < 0)
return err;
@@ -345,7 +345,7 @@ void rtnl_u32_set_handle(struct rtnl_cls *cls, int htid, int hash,
{
uint32_t handle = (htid << 20) | (hash << 12) | nodeid;
- tca_set_handle((struct rtnl_tca *) cls, handle );
+ rtnl_tc_set_handle((struct rtnl_tc *) cls, handle );
}
int rtnl_u32_set_classid(struct rtnl_cls *cls, uint32_t classid)