MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tc_init_msg

Function tc_init_msg

dpdk/drivers/net/tap/tap_tcmsgs.c:44–57  ·  view source on GitHub ↗

* Initialize a netlink message with a TC header. * * @param[in, out] msg * The netlink message to fill. * @param[in] ifindex * The netdevice ifindex where the rule will be applied. * @param[in] type * The type of TC message to create (RTM_NEWTFILTER, RTM_NEWQDISC, etc.). * @param[in] flags * Overrides the default netlink flags for this msg with those specified. */

Source from the content-addressed store, hash-verified

42 * Overrides the default netlink flags for this msg with those specified.
43 */
44void
45tc_init_msg(struct nlmsg *msg, unsigned int ifindex, uint16_t type, uint16_t flags)
46{
47 struct nlmsghdr *n = &msg->nh;
48
49 n->nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
50 n->nlmsg_type = type;
51 if (flags)
52 n->nlmsg_flags = flags;
53 else
54 n->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
55 msg->t.tcm_family = AF_UNSPEC;
56 msg->t.tcm_ifindex = ifindex;
57}
58
59/**
60 * Delete a specific QDISC identified by its iface, and it's handle and parent.

Callers 7

qdisc_delFunction · 0.85
qdisc_add_multiqFunction · 0.85
qdisc_add_ingressFunction · 0.85
qdisc_iterateFunction · 0.85
tap_flow_createFunction · 0.85
tap_flow_implicit_createFunction · 0.85
rss_enableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected