On Wed, Jan 06, 2016 at 02:25:52PM +0200, Haggai Eran wrote:
> On 06/01/2016 13:03, Yuval Shaia wrote:
> > On Thu, Dec 31, 2015 at 05:34:03PM +0200, Haggai Eran wrote:
> >>> + sock = sockfd_lookup(fd, &rc);
> >>> + if (IS_ERR_OR_NULL(sock))
> >>> +         return -EINVAL;
> >>> +
> >>> + inetsock = inet_sk(sock->sk);
> >>> +
> >>> + neigh = neigh_lookup(&arp_tbl, &inetsock->inet_daddr, dev);
> >>
> >> Also, isn't inet_daddr the destination address? But the function claims 
> >> to return the SGID. I guess these can be ambiguous but still it seems 
> >> confusing.
> > Per description in include/net/inet_sock.h looks like that inet_daddr is
> > the address of source peer of the socket.
> > * @inet_daddr - Foreign IPv4 addr
> >>
> 
> I meant it was confusing to have the foreign address in the socket designated 
> by "daddr" while the function you proposed returned the foreign GID as SGID.
I see.
Function was meant to extract GID of source peer of the socket.
Anyway, i gave up this this patch so we only talking semantics here :)
> 
> Haggai
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to