From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Matan Barak <matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Somnath Kotur
<Somnath.Kotur-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>,
Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v4 for-next 07/14] IB/core: GID attribute should be returned from verbs API and cache API
Date: Wed, 20 May 2015 12:17:18 -0600 [thread overview]
Message-ID: <20150520181718.GD28496@obsidianresearch.com> (raw)
In-Reply-To: <CAAKD3BAifeMcHbDwcaK7F6cjj=mAn3W0Ms2mOmoXDhaquFqKTA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, May 20, 2015 at 07:27:15PM +0300, Matan Barak wrote:
> On Tue, May 19, 2015 at 9:06 PM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> > On Tue, May 19, 2015 at 05:27:10PM +0300, Matan Barak wrote:
> >
> >> +#define __IB_ONLY
> >
> > What is this?
> >
>
> I annotated functions that should be called with IB link layer only as
> __IB_ONLY. I think it's make the code more readable and it could be
> verified by tools/scripts (like coccinelle) that we're calling those
> functions under an IB link layer if statement.
Why not add:
BUG_ON(!rdma_is_ib(...))
[or whatever the name ended up as]
To the function prolog?
Then it actually does something..
> >> + * @gid_type: The GID type to search for.
> >> + * @net: In RoCE, the namespace of the device.
> >> + * @if_index: In RoCE, the if_index of the device. Zero means ignore.
> >> * @port_num: The port number of the device where the GID value was found.
> >> * @index: The index into the cached GID table where the GID was found. This
> >> * parameter may be NULL.
> >> @@ -66,10 +82,36 @@ int ib_get_cached_gid(struct ib_device *device,
> >> */
> >> int ib_find_cached_gid(struct ib_device *device,
> >> union ib_gid *gid,
> >> + enum ib_gid_type gid_type,
> >> + struct net *net,
> >> + int if_index,
> >> u8 *port_num,
> >> u16 *index);
> >
> > Why are we adding net namespace stuff here? We don't even have a
> > proposal for roce net namespaces. Same comment for all net adds.
> >
>
> In order to get a netdev, you need to have if_index and namespace.
> I prefer to introduce a correct API from the beginning than to assume
> we only use &init_net and changing the API afterwards.
> roce_gid_table and ib_cache should present a clean API no matter
> if their consumers use a custom namespace or init_net.
No, this needs to be a cleanup series - get to the point where we are
sharing the gid table code between the drivers that need it.
Don't change the APIs speculatively for rocev2 or namespaces, those
series can deal with it on their own.
To be more clear, the goal of this series should only be to get
patches 11,12,13,14 merged, and the minimum set of other patches to
get there.
That means we don't need these API changes. We don't need ib_gid_attr.
Drop patch 8 and 9.
I'm also not sure about patch 10, that looks like a functional
change? It should not be in a cleanup series.
Is 6 new functionality? Are drivers already handling bonding?
A cleanup series should have *no functional change*.
So, it looks roughly like 7,8,9,10 can be dropped?
Jason
--
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:[~2015-05-20 18:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 14:27 [PATCH v4 for-next 00/14] RoCE GID management Matan Barak
[not found] ` <1432045637-9090-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-19 14:27 ` [PATCH v4 for-next 01/14] IB/core: Add RoCE GID table Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 02/14] IB/core: Replace device_mutex with rwsem Matan Barak
[not found] ` <1432045637-9090-3-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-19 17:36 ` Jason Gunthorpe
[not found] ` <20150519173647.GA18675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 16:07 ` Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 03/14] IB/core: Add RoCE GID population Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 04/14] IB/core: Add default GID for RoCE GID table Matan Barak
[not found] ` <1432045637-9090-5-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-19 17:41 ` Jason Gunthorpe
[not found] ` <20150519174159.GB18675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 16:09 ` Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 05/14] net: Add info for NETDEV_CHANGEUPPER event Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 06/14] IB/core: Add RoCE table bonding support Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 07/14] IB/core: GID attribute should be returned from verbs API and cache API Matan Barak
[not found] ` <1432045637-9090-8-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-19 18:06 ` Jason Gunthorpe
[not found] ` <20150519180649.GC18675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 16:27 ` Matan Barak
[not found] ` <CAAKD3BAifeMcHbDwcaK7F6cjj=mAn3W0Ms2mOmoXDhaquFqKTA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-20 18:17 ` Jason Gunthorpe [this message]
[not found] ` <20150520181718.GD28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-28 13:50 ` Matan Barak
[not found] ` <CAAKD3BDJtpEhfhsB=o4hc=ARWMt7JgpqvbjXJVvsL_vLZRn8yQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-28 16:07 ` Jason Gunthorpe
[not found] ` <20150528160748.GC2962-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-28 16:34 ` Or Gerlitz
[not found] ` <5567439C.7080700-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-05-28 17:07 ` Jason Gunthorpe
[not found] ` <20150528170711.GA4345-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-06-02 16:13 ` Matan Barak
[not found] ` <CAAKD3BALO6ts66Q0n-BVFz4Niu7L6jX0N-GHLXGp0DQ7Z7c9HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-02 17:39 ` Jason Gunthorpe
2015-05-19 14:27 ` [PATCH v4 for-next 08/14] IB/core: Report gid_type and gid_ndev through sysfs Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 09/14] IB/core: Support find sgid index using a filter function Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 10/14] IB/core: Modify ib_verbs and cma in order to use roce_gid_table Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 11/14] RDMA/ocrdma: Changes in driver to incorporate the moving of GID Table mgmt to IB/Core Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 12/14] net/mlx4: Postpone the registration of net_device Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 13/14] IB/mlx4: Implement ib_device callbacks Matan Barak
2015-05-19 14:27 ` [PATCH v4 for-next 14/14] IB/mlx4: Replace mechanism for RoCE GID management Matan Barak
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=20150520181718.GD28496@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=Somnath.Kotur-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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