M: N/A
F: src/vnet/geneve/
+VNET FLOW
+I: flow
+M: Damjan Marion <damarion@cisco.com>
+F: src/vnet/flow/
+
Plugin - Access Control List (ACL) Based Forwarding
I: abf
M: Neale Ranns <nranns@cisco.com>
struct rte_flow_action_queue queue = { 0 };
struct rte_flow_item *item, *items = 0;
struct rte_flow_action *action, *actions = 0;
+ bool fate = false;
enum
{
item->type = RTE_FLOW_ITEM_TYPE_END;
/* Actions */
- vec_add2 (actions, action, 1);
- action->type = RTE_FLOW_ACTION_TYPE_PASSTHRU;
-
+ /* Only one 'fate' can be assigned */
if (f->actions & VNET_FLOW_ACTION_REDIRECT_TO_QUEUE)
{
vec_add2 (actions, action, 1);
queue.index = f->redirect_queue;
action->type = RTE_FLOW_ACTION_TYPE_QUEUE;
action->conf = &queue;
+ fate = true;
+ }
+ if (f->actions & VNET_FLOW_ACTION_DROP)
+ {
+ vec_add2 (actions, action, 1);
+ action->type = RTE_FLOW_ACTION_TYPE_DROP;
+ if (fate == true)
+ {
+ rv = VNET_FLOW_ERROR_INTERNAL;
+ goto done;
+ }
+ else
+ fate = true;
+ }
+ if (fate == false)
+ {
+ vec_add2 (actions, action, 1);
+ action->type = RTE_FLOW_ACTION_TYPE_PASSTHRU;
}
if (f->actions & VNET_FLOW_ACTION_MARK)
else if (unformat (line_input, "buffer-advance %d",
&flow.buffer_advance))
flow.actions |= VNET_FLOW_ACTION_BUFFER_ADVANCE;
+ else if (unformat (line_input, "redirect-to-queue %d",
+ &flow.redirect_queue))
+ flow.actions |= VNET_FLOW_ACTION_REDIRECT_TO_QUEUE;
+ else if (unformat (line_input, "drop"))
+ flow.actions |= VNET_FLOW_ACTION_DROP;
else if (unformat (line_input, "%U", unformat_vnet_hw_interface, vnm,
&hw_if_index))
;