Skip to content

rtnl_flower_set_vlan_id - not work  #408

@lIkesimba9

Description

@lIkesimba9

I call rtnl_flower_set_vlan_id , but it doesn't have any effect
I should get the following output

filter parent ffff: protocol 802.1Q pref 4 flower chain 0 
filter parent ffff: protocol 802.1Q pref 4 flower chain 0 handle 0x1 
  vlan_id 101
  not_in_hw
	action order 1: skbedit  mark 11 pipe
	 index 1 ref 1 bind 1

but I get this output

filter parent ffff: protocol 802.1Q pref 1 flower chain 0 
filter parent ffff: protocol 802.1Q pref 1 flower chain 0 handle 0x1 
  not_in_hw
	action order 1: skbedit  mark 11 pipe
	 index 1 ref 1 bind 1
void add_flower_filter(struct rtnl_link *link, uint32_t parent_handle, struct nl_sock* sock, int prio, struct rtnl_act* act, uint16_t vlan_id) {
    struct rtnl_cls *filter;
    int err;
    filter = rtnl_cls_alloc();
    rtnl_tc_set_link(TC_CAST(filter), link);

    rtnl_tc_set_parent(TC_CAST(filter), parent_handle);
    err = rtnl_tc_set_kind(TC_CAST(filter), "flower");
    throw_err(err);

    rtnl_cls_set_prio(filter, prio);
    rtnl_cls_set_protocol(filter, ETH_P_8021Q);
    err = rtnl_flower_set_vlan_id(filter, vlan_id);

    throw_err(err);

    err = rtnl_flower_append_action(filter, act);
    throw_err(err);

    err = rtnl_cls_add(sock, filter, NLM_F_CREATE);
    throw_err(err);
    rtnl_cls_put(filter);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions