public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	target-devel
	<target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 5/9] ib_srpt: Fix sport->port_guid formatting code
Date: Wed, 26 Oct 2011 17:37:10 -0700	[thread overview]
Message-ID: <1319675830.21607.99.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <CAO+b5-qjOT2rqeLn=DJi5ogk+KTV8_Fi0tYwj4gECtcSNNhHRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, 2011-10-26 at 20:23 +0200, Bart Van Assche wrote:
> On Mon, Oct 24, 2011 at 10:25 PM, Nicholas A. Bellinger
> <nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org> wrote:
> > On Mon, 2011-10-24 at 21:57 +0200, Bart Van Assche wrote:
> >> On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger
> >> <nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org> wrote:
> >> > +               snprintf(sport->port_guid, sizeof(sport->port_guid),
> >> > +                               "0x0000000000000000%016llx",
> >> > +                               be64_to_cpu(sport->gid.global.interface_id));
> >>
> >> If I interpret Roland's e-mail correctly Roland asked to use GID table
> >> entry 0 (http://www.spinics.net/lists/linux-rdma/msg09751.html) ?
> >>
> >
> > I'll defer to Roland on this, as the port->gid.global.interface_id you
> > recommended does exactly what we need.  I'm happy to test another code
> > snippet if you have one handy.
> 
> Something like this should generate GID 0 in ASCII format (not tested
> in any way, and using separators will help to make the output easier
> to read):
> 
> snprintf(sport->port_gid, sizeof(sport->port_gid),
>             "0x%016llx%016llx",
>              be64_to_cpu(sport->gid.global.subnet_prefix),
>              be64_to_cpu(sport->gid.global.interface_id));
> 

So adding the subnet_prefix here works as expected, and as previously
mentioned I'm OK to change the /var/target/fabric/ib_srpt.spec
formatting in rtslib for SRP target ports to accommodate this..

But the bit that now looks kinda odd with this change is that NodeACLs
would still not be using the subnet_prefix.  Here's a bit of targetcli
output to demonstrate:

/ib_srpt> info
Fabric module name: ib_srpt
ConfigFS path: /sys/kernel/config/target/srpt
Allowed WWNs list (free type): 0xfe800000000000000002c903000e8ace, 0xfe800000000000000002c903000e8acd
Fabric module specfile: /var/target/fabric/ib_srpt.spec
Fabric module features: acls
Corresponding kernel module: ib_srpt
/ib_srpt> ls
o- ib_srpt ......................................................... [2 Targets]
  o- 0xfe800000000000000002c903000e8acd .............................. [enabled]
  | o- acls ............................................................ [1 ACL]
  | | o- 0x00000000000000000002c903000e8be9 .................... [1 Mapped LUNs]
  | |   o- mapped_lun0 ............................................. [lun0 (rw)]
  | o- luns ........................................................... [1 LUNs]
  |   o- lun0 ................................... [iblock/scsi_debug (/dev/sdb)]
  o- 0xfe800000000000000002c903000e8ace .............................. [enabled]
    o- acls ............................................................ [1 ACL]
    | o- 0x00000000000000000002c903000e8bea .................... [1 Mapped LUNs]
    |   o- mapped_lun0 ............................................. [lun0 (rw)]
    o- luns ........................................................... [1 LUNs]
      o- lun0 .................................. [iblock/scsi_debug2 (/dev/sdc)]
/ib_srpt> 

So I don't see an easy way to get subnet_prefix for the incoming
initiator port in srpt_cm_req_recv(), as what's being passed in from
srp_login_req->initiator_port_id seems to have subnet_prefix already
stripped off..?

So the two question here for Roland and yourself are:  Is using a real
subnet prefix for target ports, but not the explict NodeACLs for
initiator ports acceptable for an initial merge..?  If not, how is it
possible to obtain the remote initiator port's subnet_prefix during
login in srpt_cm_req_recv() so we can keep subnet_prefix usage
consistent between target ports and explict NodeACL initiator ports
in /sys/kernel/config/target/srpt/

Thank you,
.
--nab


--
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

  parent reply	other threads:[~2011-10-27  0:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24  5:33 [PATCH 0/9] ib_srpt: Changes from RFC for v3.2-rc1 mainline merge Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 1/9] ib_srpt: Fix potential out-of-bounds array access Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 2/9] ib_srpt: Avoid failed multipart RDMA transfers Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 3/9] ib_srpt: Fix srpt_alloc_fabric_acl failure case return value Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 4/9] ib_srpt: Update comments to reference $driver/$port layout Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 5/9] ib_srpt: Fix sport->port_guid formatting code Nicholas A. Bellinger
     [not found]   ` <1319434422-15354-6-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2011-10-24 19:57     ` Bart Van Assche
2011-10-24 20:25       ` Nicholas A. Bellinger
     [not found]         ` <1319487952.17450.72.camel-Y1+j5t8j3WgjMeEPmliV8E/sVC8ogwMJ@public.gmane.org>
2011-10-26 18:23           ` Bart Van Assche
     [not found]             ` <CAO+b5-qjOT2rqeLn=DJi5ogk+KTV8_Fi0tYwj4gECtcSNNhHRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-27  0:37               ` Nicholas A. Bellinger [this message]
2011-10-24  5:33 ` [PATCH 6/9] ib_srpt: Remove legacy use_port_guid_in_session_name module parameter Nicholas A. Bellinger
     [not found]   ` <1319434422-15354-7-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2011-10-24 18:24     ` Bart Van Assche
2011-10-24  5:33 ` [PATCH 7/9] ib_srpt: Convert srp_max_rdma_size into per port configfs attribute Nicholas A. Bellinger
     [not found]   ` <1319434422-15354-8-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2011-10-24 16:34     ` Bart Van Assche
2011-10-24 18:27       ` Nicholas A. Bellinger
2011-10-24 20:29   ` Nicholas A. Bellinger
     [not found]     ` <1319488195.17450.73.camel-Y1+j5t8j3WgjMeEPmliV8E/sVC8ogwMJ@public.gmane.org>
2011-10-25  6:22       ` Nicholas A. Bellinger
2011-10-25 10:32       ` Bart Van Assche
     [not found]         ` <CAO+b5-p9xXB_sWes=uet6skkFn=xWD+vKuoOeuGwjbxYhE-ctg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-25 10:35           ` Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size " Nicholas A. Bellinger
     [not found]   ` <1319434422-15354-9-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2011-10-24 19:44     ` Bart Van Assche
     [not found]       ` <CAO+b5-p24uYKbwqCRWVik63gL-ZABgcJrqAi7ULJZEP+CK1WEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-24 19:49         ` Nicholas A. Bellinger
     [not found]           ` <1319485752.17450.57.camel-Y1+j5t8j3WgjMeEPmliV8E/sVC8ogwMJ@public.gmane.org>
2011-10-24 19:58             ` Bart Van Assche
2011-10-24 20:05               ` Nicholas A. Bellinger
     [not found]                 ` <1319486723.17450.59.camel-Y1+j5t8j3WgjMeEPmliV8E/sVC8ogwMJ@public.gmane.org>
2011-10-24 20:11                   ` Bart Van Assche
2011-10-24 20:19                     ` Nicholas A. Bellinger
2011-10-24 20:16             ` Bart Van Assche
     [not found]               ` <CAO+b5-rzo478a07CuaYS2itAdV9dK65+GHj2Si4PZFM6qkmL3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-24 20:22                 ` Nicholas A. Bellinger
2011-10-24  5:33 ` [PATCH 9/9] ib_srpt: Convert srpt_sq_size " Nicholas A. Bellinger
     [not found]   ` <1319434422-15354-10-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2011-10-24 18:32     ` Bart Van Assche
2011-10-24 18:39       ` Nicholas A. Bellinger

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=1319675830.21607.99.camel@haakon2.linux-iscsi.org \
    --to=nab-izhhd5pylfbp7fqvkimdcq@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=target-devel-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox