All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@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: Tue, 19 Jan 2016 16:06:46 -0500	[thread overview]
Message-ID: <569EA566.2000401@redhat.com> (raw)
In-Reply-To: <20160106131019.GC5070@yuval-ThinkPad-X220>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

On 01/06/2016 08:10 AM, Yuval Shaia wrote:
> 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 :)

Per your comment, I've dropped this patch from any consideration.


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

      reply	other threads:[~2016-01-19 21:06 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
     [not found]           ` <568D07D0.8080404-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-01-06 13:10             ` Yuval Shaia
2016-01-19 21:06               ` Doug Ledford [this message]

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=569EA566.2000401@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=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.