diff options
author | Stanislav Zaikin <stanislav.zaikin@46labs.com> | 2023-03-09 19:35:11 +0100 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2024-09-06 14:09:48 +0000 |
commit | 2a5bb3b5ab3e05cee0da6a78b77e67fbc3bdca75 (patch) | |
tree | da9a3268216897725b13c9fe5c410abb9f4e644a /src/plugins/linux-cp | |
parent | 4779154a266626544eba2bfeac1e7ac1de7cb440 (diff) |
linux-cp: auto select tap id when creating lcp pair
Now when lcp pair is created, tap instance is based on hw_id. But tap
interface with such instance can already exist. Introduce an offset and
auto-selection based on it.
Type: fix
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I9db39106b0b0d5bf95c445b03e5b7ff52f946dd2
Diffstat (limited to 'src/plugins/linux-cp')
-rw-r--r-- | src/plugins/linux-cp/lcp_interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/linux-cp/lcp_interface.c b/src/plugins/linux-cp/lcp_interface.c index b1c0ad5a022..61665ad4146 100644 --- a/src/plugins/linux-cp/lcp_interface.c +++ b/src/plugins/linux-cp/lcp_interface.c @@ -1001,7 +1001,8 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, clib_max (1, lcp_get_default_num_queues (0 /* is_tx */)), .num_tx_queues = clib_max (1, lcp_get_default_num_queues (1 /* is_tx */)), - .id = hw->hw_if_index, + .id = ~0, + .auto_id_offset = 4096, .sw_if_index = ~0, .rx_ring_sz = 256, .tx_ring_sz = 256, |