Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tc flower, set flowid #394

Open
lIkesimba9 opened this issue Jul 14, 2024 · 0 comments
Open

tc flower, set flowid #394

lIkesimba9 opened this issue Jul 14, 2024 · 0 comments

Comments

@lIkesimba9
Copy link

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);
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant