public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Chuck Lever <chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Anna Schumaker
	<Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org>,
	santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH rdma-next V1 0/7] dev attr cleanup (less is more)
Date: Fri, 18 Dec 2015 15:06:37 +0100	[thread overview]
Message-ID: <567412ED.9070200@sandisk.com> (raw)
In-Reply-To: <1450429190-5898-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On 12/18/2015 09:59 AM, Or Gerlitz wrote:
> OK, Doug, this is my suggestion for the dev attr cleanup -- it
> has the advantages of leaving the attrs on a well defined location,
> a field in the IB device, the ability to  get that through smaller
> patches, avoid touching any of the HW drivers, etc.

Hello Or,

This version of the dev attr cleanup patches (just like the previous 
version) makes kernel code access the attrs member of struct ib_device 
while user space code keeps calling the query_device function. If there 
would be a bug in one of the query_device implementations, e.g. that the 
correct data is only returned some time after device initialization has 
finished, then user space code will see other attribute values than 
kernel code. I think we should avoid such subtle and hard to debug 
behavior. Hence my proposal to modify ib_uverbs_ex_query_device() such 
that it fetches attribute information from the ib_device structure 
instead of by calling query_device().

Bart.
--
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:[~2015-12-18 14:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  8:59 [PATCH rdma-next V1 0/7] dev attr cleanup (less is more) Or Gerlitz
     [not found] ` <1450429190-5898-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-18  8:59   ` [PATCH rdma-next V1 1/7] IB/core: Save the device attributes on the device structure Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 2/7] IB/core: Avoid calling ib_query_device Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 3/7] IB/ulps: " Or Gerlitz
     [not found]     ` <1450429190-5898-4-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-18 14:10       ` Bart Van Assche
     [not found]         ` <567413C7.5040907-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-12-20 16:58           ` Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 4/7] net/rds: " Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 5/7] xprtrdma: " Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 6/7] staging/o2iblnd: " Or Gerlitz
2015-12-18  8:59   ` [PATCH rdma-next V1 7/7] IB/core: Remove ib_query_device Or Gerlitz
2015-12-18 14:06   ` Bart Van Assche [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=567412ED.9070200@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=Anna.Schumaker-ZwjVKphTwtPQT0dZR+AlfA@public.gmane.org \
    --cc=chuck.lever-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=santosh.shilimkar-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox