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

Function add_actions

dpdk/drivers/net/tap/tap_flow.c:982–997  ·  view source on GitHub ↗

* Helper function to send a series of TC actions to the kernel * * @param[in] flow * Pointer to rte flow containing the netlink message * * @param[in] nb_actions * Number of actions in an array of action structs * * @param[in] data * Pointer to an array of action structs * * @param[in] classifier_actions * The classifier on behave of which the actions are configured * * @retu

Source from the content-addressed store, hash-verified

980 * -1 on failure, 0 on success
981 */
982static int
983add_actions(struct rte_flow *flow, int nb_actions, struct action_data *data,
984 int classifier_action)
985{
986 struct nlmsg *msg = &flow->msg;
987 size_t act_index = 1;
988 int i;
989
990 if (tap_nlattr_nested_start(msg, classifier_action) < 0)
991 return -1;
992 for (i = 0; i < nb_actions; i++)
993 if (add_action(flow, &act_index, data + i) < 0)
994 return -1;
995 tap_nlattr_nested_finish(msg); /* nested TCA_FLOWER_ACT */
996 return 0;
997}
998
999/**
1000 * Validate a flow supported by TC.

Callers 3

priv_flow_processFunction · 0.85
rss_enableFunction · 0.85
rss_add_actionsFunction · 0.85

Calls 3

tap_nlattr_nested_startFunction · 0.85
add_actionFunction · 0.85
tap_nlattr_nested_finishFunction · 0.85

Tested by

no test coverage detected