From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
yevgenyp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH for-next 2/5] IB/core: Add support for extended query device caps
Date: Thu, 6 Nov 2014 10:54:05 +0200 [thread overview]
Message-ID: <20141106085405.GE742@mtldesk30> (raw)
In-Reply-To: <5458C7FD.7070400-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Tue, Nov 04, 2014 at 02:35:09PM +0200, Haggai Eran wrote:
> On 03/11/2014 10:02, Eli Cohen wrote:
> > +
> > + if (ucore->outlen < sizeof(resp))
> > + return -ENOSPC;
>
> This check may cause compatibility problems when running a newer kernel
> with old userspace. The userspace code will have a smaller
> ib_uverbs_ex_query_device_resp struct, so the verb will always fail. A
> possible solution is to drop this check, and modify ib_copy_to_udata so
> that it only copies up to ucore->outlen bytes.
>
Makes sense. Will fix that in V1.
> > +
> > + if (cmd.comp_mask)
> > + return -EINVAL;
>
> This check may make it difficult for userspace to use this verb. If
> running an older kernel with a newer userspace, the userspace will need
> to run the verb multiple times to find out which combination of
> comp_mask bits is actually supported. I think a better way would be to
> drop this check, and let userspace rely on the returned comp_mask in the
> ib_uverbs_ex_query_device_resp struct to determine which features are
> supported by the current kernel.
>
Agree - this should hold true for any extended query. Will fix in v1.
--
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
next prev parent reply other threads:[~2014-11-06 8:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 8:02 [PATCH for-next 0/5] Extended atomics enhancements Eli Cohen
[not found] ` <1415001766-8366-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-03 8:02 ` [PATCH for-next 1/5] IB/mlx5: Fix sparse warnings Eli Cohen
2014-11-03 8:02 ` [PATCH for-next 2/5] IB/core: Add support for extended query device caps Eli Cohen
[not found] ` <1415001766-8366-3-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-04 12:35 ` Haggai Eran
[not found] ` <5458C7FD.7070400-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-06 8:54 ` Eli Cohen [this message]
2014-11-03 8:02 ` [PATCH for-next 3/5] IB/core: Extend atomic operations Eli Cohen
2014-11-03 8:02 ` [PATCH for-next 4/5] IB/mlx5: Add extended atomic support Eli Cohen
2014-11-03 8:02 ` [PATCH for-next 5/5] IB/mlx4: Modify mlx4 to comply with extended atomic definitions Eli Cohen
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=20141106085405.GE742@mtldesk30 \
--to=eli-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=yevgenyp-VPRAkNaXOzVWk0Htik3J/w@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.