From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next 09/14] IB/mlx5: Add support for resize CQ
Date: Thu, 16 Jan 2014 10:58:07 +0100 [thread overview]
Message-ID: <1389866287.572.32.camel@localhost.localdomain> (raw)
In-Reply-To: <20140115112416.GD31664@mtldesk30>
Hi,
Le mercredi 15 janvier 2014 à 13:24 +0200, Eli Cohen a écrit :
> On Wed, Jan 15, 2014 at 11:02:55AM +0100, Yann Droneaud wrote:
> >
> > Is libmlx5/libibverbs the ABI ?
> >
> > Unfortunately, anybody is allowed to access the kernel uverbs API
> > directly, so we must take care of the kernel ABI, just in case.
> >
>
> I am not sure I understand the question but libibverbs to libmlx5
> relation is somehow like the relationship between ib_core and mlx5_ib.
> e.g. libibverbs sets the API and libmlx5 implements it.
It's a theoretical question:
where to draw the line of the kernel ABI when it comes to uverbs ?
Is it write() + all the data structures for request and response ?
Or is it libibverbs + provider specific library ?
In second case, we can change the behavor of the uverbs provided that it
doesn't interfere with libibverbs: modifying corner case behavors which
were never hit by libibverbs is then safe: it won't break userspace
application.
But in the first case, we cannot for sure attest that modifying behavor
will not break hypothetical userspace application issuing uverbs command
without going through libibverbs: such specific/specialized application
might call uverbs in a way different that libibverbs which could break.
I'm not aware of such unknown application, but I believe it could exists
in the "proprietary" world.
> >
> > For code not yet part of a released kernel version, we can fix that.
> > But for all other, it would require proper checking/thinking before
> > rejecting reserved field not set to 0 since it might theoterically break
> > existing userspace program: it will be a departure from previous ABI.
> >
>
> Yes, this needs to be done carefully for each driver. We need to check
> if either libibverbs or any other provider library clears the struct
> before sending. If this is the case then it should be safe to fix the
> kernel part.
>
> >
> > I would found more readable to have the two locks held next each other.
> > YMMV.
> >
> I am not following you here. Please be more specific.
I thought that reworking the code to move mutex_lock(&cq->resize_mutex)
and spin_lock_irqsave(&cq->lock, flags); next to each other
could show that the first one would not be needed: perhaps is it
possible doing:
- prepare everything,
- take the lock,
- swap,
- release the lock,
- clean up.
(oh, that remind me RCU).
I agree that resizing the CQ is not a frequent operation, so trying to
rewrite the code as I suggest won't give a lot of advantages.
Regards.
--
Yann Droneaud
OPTEYA
--
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-01-16 9:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 15:45 [PATCH for-next 00/14] Patch set for 3.14 Eli Cohen
[not found] ` <1389714323-20130-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-01-14 15:45 ` [PATCH for-next 01/14] IB/mlx5: Remove unused coded in mr.c Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 02/14] mlx5_core: Remove dead code Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 03/14] IB/mlx5: Fix micro UAR allocator Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 04/14] net/mlx5_core: Fix out arg size in access_register command Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 05/14] IB/mlx5: Clear out struct before create QP command Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 06/14] net/mlx5_core: Use mlx5 core style warning Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 07/14] IB/mlx5: Make sure doorbell record is visible before doorbell Eli Cohen
[not found] ` <1389714323-20130-8-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-01-14 16:36 ` Yann Droneaud
[not found] ` <1389717393.1585.66.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-01-15 6:47 ` Eli Cohen
2014-01-15 10:19 ` Yann Droneaud
2014-01-14 15:45 ` [PATCH for-next 08/14] IB/mlx5: Implement modify CQ Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 09/14] IB/mlx5: Add support for resize CQ Eli Cohen
[not found] ` <1389714323-20130-10-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-01-14 16:36 ` Yann Droneaud
[not found] ` <1389717410.1585.67.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-01-15 7:33 ` Eli Cohen
2014-01-15 10:02 ` Yann Droneaud
[not found] ` <1389780175.572.10.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-01-15 11:24 ` Eli Cohen
2014-01-16 9:58 ` Yann Droneaud [this message]
2014-01-14 15:45 ` [PATCH for-next 10/14] net/mlx5_core: Improve debugfs readability Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 11/14] mlx5_core: Fix PowerPC support Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 12/14] IB/mlx5: Allow creation of QPs with zero length work queues Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 13/14] IB/mlx5: Abort driver cleanup if teardown hca fails Eli Cohen
2014-01-14 15:45 ` [PATCH for-next 14/14] IB/mlx5: Remove old field for create mkey mailbox Eli Cohen
[not found] ` <1389714323-20130-15-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-01-14 16:37 ` Yann Droneaud
[not found] ` <1389717437.1585.68.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-01-15 7:38 ` 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=1389866287.572.32.camel@localhost.localdomain \
--to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=eli-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 \
/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.