Re: [Openvpn-devel] [PATCH v3] dco-freebsd: use m->instances[] instead of m->hash

2023-03-22 Thread Kristof Provost
On 23 Mar 2023, at 4:27, Antonio Quartulli wrote: > When retrieving the multi_instance of a specific peer, > there is no need to peform a linear search across the > whole m->hash list. We can directly access the needed > object via m->instances[peer-id] in constant time (and > just one line of code

[Openvpn-devel] [PATCH v3] dco-freebsd: use m->instances[] instead of m->hash

2023-03-22 Thread Antonio Quartulli
When retrieving the multi_instance of a specific peer, there is no need to peform a linear search across the whole m->hash list. We can directly access the needed object via m->instances[peer-id] in constant time (and just one line of code). Adapt the dco-freebsd code to do so. Cc: Kristof Provos