net/mlx5: limit flow API rules to one tunnel
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
83fef46a22
commit
c2c6ddd51d
@ -457,6 +457,16 @@ priv_flow_validate(struct priv *priv,
|
||||
flow);
|
||||
if (err)
|
||||
goto exit_item_not_supported;
|
||||
} else if (items->type == RTE_FLOW_ITEM_TYPE_VXLAN) {
|
||||
if (flow->inner) {
|
||||
rte_flow_error_set(error, ENOTSUP,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
items,
|
||||
"cannot recognize multiple"
|
||||
" VXLAN encapsulations");
|
||||
return -rte_errno;
|
||||
}
|
||||
flow->inner = 1;
|
||||
}
|
||||
flow->offset += cur_item->dst_sz;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user