[Bug 281990] offset of sa_family in sockaddr_ib inconsistent with sockaddr

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281990

--- Comment #5 from Mark Johnston <[email protected]> ---
(In reply to Konstantin Belousov from comment #4)
In general, our generic system calls do not require userspace to fill out
sa_len.  Consumers should use getsockaddr(), which fills it in.

The kernel's use of sockaddr_ib appears to be mostly contained within the rdma
connection manager, where the sockaddr length can be inferred from sa_family. 
So it may not even be necessary to fill out the length anywhere, just reserve
the first byte of the struct as a pad byte.  I do not see why it would be
source-incompatible with Linux, all of the references to sib_family in the tree
are just assignments.  It shouldn't matter whether the field is a uint8_t vs. a
uint16_t, so I don't see code changes are required.

Alternately, OFED code could be compiled with a sockaddr definition that is
compatible with Linux.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.