All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] IB/ipoib: Expose ioctl command to retrieve SGID of a given socket
Date: Wed, 6 Jan 2016 14:25:52 +0200	[thread overview]
Message-ID: <568D07D0.8080404@mellanox.com> (raw)
In-Reply-To: <20160106110344.GB5070@yuval-ThinkPad-X220>

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.

Haggai

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-01-06 12:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31 14:41 [PATCH] IB/ipoib: Expose ioctl command to retrieve SGID of a given socket Yuval Shaia
     [not found] ` <1451572875-24961-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-12-31 15:31   ` Or Gerlitz
     [not found]     ` <56854A60.6040202-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-03  7:53       ` Yuval Shaia
2015-12-31 15:34   ` Haggai Eran
     [not found]     ` <56854AEB.50802-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-03  7:52       ` Yuval Shaia
2016-01-06 11:03       ` Yuval Shaia
2016-01-06 12:25         ` Haggai Eran [this message]
     [not found]           ` <568D07D0.8080404-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-06 13:10             ` Yuval Shaia
2016-01-19 21:06               ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568D07D0.8080404@mellanox.com \
    --to=haggaie-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.