mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
dpif-netdev: Return error code when no mark available.
The max number of mark is (UINT32_MAX - 1), that is
enough to be used. But theoretically, if there are no
mark available, the later different flows will shared
the mark INVALID_FLOW_MARK, that may break the function.
If there are no available mark to be used, return error
code.
Fixes: 02bb2824e5
("dpif-netdev: do hw flow offload in a thread")
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
058b80d3de
commit
fa31efd211
@@ -2549,6 +2549,7 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload)
|
||||
mark = flow_mark_alloc();
|
||||
if (mark == INVALID_FLOW_MARK) {
|
||||
VLOG_ERR("Failed to allocate flow mark!\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
info.flow_mark = mark;
|
||||
|
Reference in New Issue
Block a user