This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simplify sendmmsg code


On 05/09/2017 10:58 PM, Adhemerval Zanella wrote:

So if I understood correctly, the idea is to *remove* sendmmsg on resolv code then?
Because now with __ASSUME_SENDMMSG being used as default for Linux this code will
be used on all architectures.

Yes, once we have two sockets, we need to call sendmsg for each one separately. But that's an *algorithmic* change, it's not simply about replacing one call to sendmmsg with two to sendmsg. But that would be fine as an intermediate step as well if you want to simplify things in this way.

In any case, my understanding for sendmmsg is it is a GNU extension (similar to
pwritev), so the idea is to have a fallback usable code on sysdeps/{posix,unix}
to we do not need to actually tests its usability in the rest of glibc code.

As far as I understand things, both sendmmsg and pwritev cannot be emulated in userspace because the fallback implementation would not have the atomicity guarantees provided by the kernel implementation. IMHO, the generic versions should just return ENOSYS (or not linked in at all, so that configure scripts can note their absence).

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]