Skip to content

tc flower, set flowid #394

@lIkesimba9

Description

@lIkesimba9

Good afternoon, I have the following filter, via tc-flower tc filter add dev eth1 protocol all parent 1: prio 1 flower vlan_id 100 flowid 1:11. How a can set flowid 1:11 ?

    struct rtnl_cls *filter;
    int err;
    filter = rtnl_cls_alloc();

    rtnl_tc_set_ifindex(TC_CAST(filter), interface_index);
    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); // vlan
    rtnl_flower_set_vlan_id(filter, 100);
    uint32_t  flowid = get_tc_classid_wrap("1:11");
    


    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