Linux NFS development
 help / color / mirror / Atom feed
From: Tom Tucker <tom@opengridcomputing.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: thomas.talpey@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 11/12] svcrdma: Add a message log string to indicate if FastReg is being used
Date: Sun, 12 Oct 2008 21:20:04 -0500	[thread overview]
Message-ID: <48F2B054.9040605@opengridcomputing.com> (raw)
In-Reply-To: <48F2AFDA.8000704@opengridcomputing.com>

Tom Tucker wrote:
> J. Bruce Fields wrote:
>> On Thu, Oct 09, 2008 at 01:46:43PM -0500, Tom Tucker wrote:
>>  
>>> Coming up with a name for the command is probably
>>> harder than writing it.
>>>
>>> Here it is...
>>>     
>>
>> Neat-o, thanks.
>>
>> Just for fun, I installed libibverbs from Fedora 9, modprobe'd
>> ib_uverbs, and tried running this, and got a "libibverbs: Warning:
>> couldn't open config directory '/etc/libibverbs.d'."  Is there a HOWTO
>> somewhere that I should know about?
>>   
> Hmm. Sounds like the Fedora RPM didn't do all the necessary bits. I 
> have a Fedora 9 system,
> I'll see what I get. I typically use the latest OFED distro.
>

I should qualify this. I use the OFED distro for the user-mode bits. For 
kernel bits, I use top of
tree.

Thanks,
Tom

> Tom
>> --b.
>>
>>  
>>> #include <stdlib.h>
>>> #include <stdio.h>
>>> #include <infiniband/verbs.h>
>>>
>>> #define FAST_REG (1<<21) /* This will be in infiniband/verbs.h in 
>>> the future */
>>>
>>> static char *safety_string(struct ibv_device_attr *a, struct 
>>> ibv_device *dev)
>>> {
>>>         if (a->device_cap_flags & FAST_REG
>>>             || dev->transport_type == IBV_TRANSPORT_IB)
>>>                 return "Safe. NFSRDMA exposes only RPC memory.\n";
>>>         else
>>>                 return "Unsafe. NFSRDMA exposes Server memory.\n";
>>> }
>>>
>>> int main(int argc, char *argv[])
>>> {
>>>         struct ibv_device **dev_list;
>>>         struct ibv_context *context;
>>>         struct ibv_device_attr attr;
>>>         int dev_count;
>>>         int i;
>>>
>>>         dev_list = ibv_get_device_list(&dev_count);
>>>         for (i = 0; dev_list && i < dev_count; i++) {
>>>                 printf("%-20s: ", ibv_get_device_name(dev_list[i]));
>>>                 context = ibv_open_device(dev_list[i]);
>>>                 if (!context) {
>>>                         printf("could not open device\n");
>>>                         continue;
>>>                 }
>>>                 if (!ibv_query_device(context, &attr))
>>>                         printf("%s\n", safety_string(&attr, 
>>> dev_list[i]));
>>>                 else
>>>                         printf("could not query device\n");
>>>
>>>                 ibv_close_device(context);
>>>         }
>>>         if (dev_list)
>>>                 ibv_free_device_list(dev_list);
>>>
>>>         exit(0);
>>> }
>>>
>>>    
>>>> The one drawback is that it wouldn't be able to tell whether the
>>>> currently running kernel actually supported fast registration.  Do you
>>>> think a guess based on kernel version would be good enough for that?
>>>>
>>>>       
>>> I do, yes.
>>>
>>>    
>>>>> This code makes devices more secure than they used to be. So there 
>>>>> is no  negative security regression here. This patchset simply 
>>>>> improves the security for newer devices that support the new 
>>>>> features.
>>>>>         
>>>> Yes, agreed.  Just to be clear, I *have* queued up all but these last
>>>> two patches (the printk and documentation patches) for 2.6.28. 
>>>>       
>>> Ok, thanks.
>>>
>>>    
>>>> --b.
>>>> -- 
>>>> To unsubscribe from this list: send the line "unsubscribe 
>>>> linux-nfs" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>       
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>   
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2008-10-13  2:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 21:33 [PATCH 00/12] svcrdma: Fast memory registration support Tom Tucker
2008-10-03 21:33 ` [PATCH 01/12] svcrdma: Add Fast Reg MR Data Types Tom Tucker
2008-10-03 21:33   ` [PATCH 02/12] svcrdma: Add FRMR get/put services Tom Tucker
2008-10-03 21:33     ` [PATCH 03/12] svcrdma: Query device for Fast Reg support during connection setup Tom Tucker
2008-10-03 21:33       ` [PATCH 04/12] svcrdma: Add a service to register a Fast Reg MR with the device Tom Tucker
2008-10-03 21:33         ` [PATCH 05/12] svcrdma: Modify post recv path to use local dma key Tom Tucker
2008-10-03 21:33           ` [PATCH 06/12] svcrdma: Add support to svc_rdma_send to handle chained WR Tom Tucker
2008-10-03 21:33             ` [PATCH 07/12] svcrdma: Modify the RPC recv path to use FRMR when available Tom Tucker
2008-10-03 21:33               ` [PATCH 08/12] svcrdma: Modify the RPC reply " Tom Tucker
2008-10-03 21:33                 ` [PATCH 09/12] svcrdma: Update svc_rdma_send_error to use DMA LKEY Tom Tucker
2008-10-03 21:33                   ` [PATCH 10/12] svcrdma: Fix IRD/ORD polarity Tom Tucker
2008-10-03 21:33                     ` [PATCH 11/12] svcrdma: Add a message log string to indicate if FastReg is being used Tom Tucker
2008-10-03 21:33                       ` [PATCH 12/12] svcrdma: Documentation update for the FastReg memory model Tom Tucker
2008-10-08 22:48                       ` [PATCH 11/12] svcrdma: Add a message log string to indicate if FastReg is being used J. Bruce Fields
2008-10-09  6:37                         ` Tom Tucker
2008-10-09 16:26                           ` J. Bruce Fields
2008-10-09 18:46                             ` Tom Tucker
2008-10-10 21:02                               ` J. Bruce Fields
2008-10-13  2:18                                 ` Tom Tucker
2008-10-13  2:20                                   ` Tom Tucker [this message]
2008-10-22 20:23                                     ` J. Bruce Fields
2008-10-22 21:37                                       ` Tom Tucker
2008-10-04  1:05     ` [PATCH 02/12] svcrdma: Add FRMR get/put services Tom Tucker
2008-10-06 20:02     ` Tom Tucker
2008-10-08 22:26 ` [PATCH 00/12] svcrdma: Fast memory registration support J. Bruce Fields

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=48F2B054.9040605@opengridcomputing.com \
    --to=tom@opengridcomputing.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=thomas.talpey@netapp.com \
    /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