commit | 31e4b6c160aa53ed416b9f4121e54c159b7b0003 | [log] [tgz] |
---|---|---|
author | Ryan Savitski <rsavitski@google.com> | Wed Nov 21 19:41:57 2018 +0000 |
committer | Ryan Savitski <rsavitski@google.com> | Wed Nov 21 21:43:20 2018 +0000 |
tree | 92fd2b6a9d51447baef268bff9b3b2c103993601 | |
parent | 2da0d123402a3b93b5f08fdf2fa9ce3d690cdf75 [diff] |
SockSend: remove extraneous msg_controllen assignment + micro nit fixups. My understanding is that: CMSG_SPACE macro accounts for the possible trailing padding in the case of multiple ancillary messages (cmsghdr + cmsg_data) within the same msghdr. And msghdr.msg_controllen is the sum of individual iteration step sizes - i.e. sum of CMSG_SPACE of each contained ancillary message. To clarify, as the current code is only sending a single ancillary message, the "wrong" length given to the outer msg_controllen is fine in practice, but I think it's still cleaner to use the correct (general case) macro. Extra refs: * kernel macros: https://elixir.bootlin.com/linux/v4.19/source/include/linux/socket.h#L97 * ascii diagram from elsewhere in the kernel: https://elixir.bootlin.com/linux/v4.19/source/net/sctp/socket.c#L8082 Change-Id: I8c66d8cb7b412e4b53fe83b41ca7bba9b341d739
Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.
See www.perfetto.dev for docs.