[ofa-general] [PATCH/RFC] RDMA/cma: Remove padding arrays by using struct sockaddr_storage
Or Gerlitz
ogerlitz at voltaire.com
Thu Jul 31 00:24:03 PDT 2008
Roland Dreier wrote:
> There are a few places that the RDMA CM code handles IPv6 by doing
>
> struct sockaddr addr;
> u8 pad[sizeof(struct sockaddr_in6) -
> sizeof(struct sockaddr)];
>
> This is fragile and ugly; handle this in a better way with just
>
> struct sockaddr_storage addr;
Looks good to me. There's one more pad usage in ucma.c which I think you
want to add into your patch. Also there are few in addr.c which lack the
pad but could be handled through Aleksey's patches for IPv6 support.
Or
More information about the general
mailing list