* 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
| 980 | * -1 on failure, 0 on success |
| 981 | */ |
| 982 | static int |
| 983 | add_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. |
no test coverage detected