-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Description
I am using rtnl_link_vlan_set_egress_map() to update the qos map for an existing VLAN link/interface in the kernel. The code shown below executes without any failures but qos mapping on the interface in the kernel remain the same.
/* Let's find the link we are interested in. */
link = rtnl_link_get_by_name (link_cache, ifname);
if (link == NULL) {
printf ("Link not found in cache.\n");
return -1;
}
/* Alloc a new vlan link and make the change to it. */
change = rtnl_link_vlan_alloc();
rval = rtnl_link_vlan_set_egress_map (change, qos_from, qos_to);
if (rval < 0) {
printf ("Error: rtnl_vlan_set_egress_map() call failed. rval=%d\n", rval);
return -1;
}
/* Now apply the change to the actual link. */
rval = rtnl_link_change (sk, link, change, 0);
if (rval < 0) {
printf ("Error: rtnl_link_change() call failed. rval=%d\n", rval);
return -1;
}
To confirm that "change" is getting applied to "link", I also tried calling rtnl_link_vlan_get_egress_map() after the call to rtnl_link_change(). That confirmed that qos map "change" is making it on to the "link". But the update is not making it to the kernel.
What am I missing or doing wrong here ? Do rtnl_link_vlan_set_*() APIs not work on existing VLAN links ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels