]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: quic: improve slightly qc_snd_buf() internal
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Feb 2024 10:23:17 +0000 (11:23 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Feb 2024 15:42:05 +0000 (16:42 +0100)
commit107d6d75465419a09d90c790edb617091a04468a
treef38db3d8217dfd461bbc335f4fdc97771b1a60e0
parent9b806550b79f7b8ec1f1e11a74472a6fa3379162
OPTIM: quic: improve slightly qc_snd_buf() internal

qc_snd_buf() is a wrapper for sendmsg() syscall (or its derivatives)
used for all QUIC emissions. This patch aims at removing several
non-optimal code sections :

* fd_send_ready() for connected sockets is only checked on the function
  preambule instead of inside the emission loop

* zero-ing msghdr structure for unconnected sockets is removed. This is
  unnecessary as all fields are properly initialized then.

* extra memcpy/memset invocations when using IP_PKTINFO/IPV6_RECVPKTINFO
  are removed by setting directly the address value into cmsg buffer
src/quic_sock.c