diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-09-13 16:37:43 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-09-13 11:14:29 +0200 |
commit | 484652c6322800b32510d6c74d8fc4c8027a106e (patch) | |
tree | f3e6d31485ecc79c51d440c600665d76b43da13e /contrib | |
parent | 6f2db0e34b5aeeba8d303b8bd82e947a2daa9303 (diff) | |
download | passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar.gz passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar.bz2 passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar.lz passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar.xz passt-484652c6322800b32510d6c74d8fc4c8027a106e.tar.zst passt-484652c6322800b32510d6c74d8fc4c8027a106e.zip |
udp: Don't pre-initialize msghdr array
In udp_tap_handler() the array of msghdr structures, mm[], is initialized
to zero. Since UIO_MAXIOV is 1024, this can be quite a large zero, which
is expensive if we only end up using a few of its entries. It also makes
it less obvious how we're setting all the control fields at the point we
actually invoke sendmmsg().
Rather than pre-initializing it, just initialize each element as we use it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions