From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Doug Ledford <dledford@redhat.com>,
Avihai Horon <avihaih@nvidia.com>,
Ariel Elior <aelior@marvell.com>,
linux-rdma@vger.kernel.org,
Michal Kalderon <mkalderon@marvell.com>
Subject: Re: [PATCH rdma-next 2/4] RDMA/core: Modify enum ib_gid_type and enum rdma_network_type
Date: Sun, 13 Sep 2020 10:42:04 +0300 [thread overview]
Message-ID: <20200913074204.GD35718@unreal> (raw)
In-Reply-To: <20200911191116.GR904879@nvidia.com>
On Fri, Sep 11, 2020 at 04:11:16PM -0300, Jason Gunthorpe wrote:
> On Thu, Sep 10, 2020 at 05:22:02PM +0300, Leon Romanovsky wrote:
>
> > diff --git a/drivers/infiniband/core/cma_configfs.c b/drivers/infiniband/core/cma_configfs.c
> > index 3c1e2ca564fe..f1b277793980 100644
> > +++ b/drivers/infiniband/core/cma_configfs.c
> > @@ -123,16 +123,21 @@ static ssize_t default_roce_mode_store(struct config_item *item,
> > {
> > struct cma_device *cma_dev;
> > struct cma_dev_port_group *group;
> > - int gid_type = ib_cache_gid_parse_type_str(buf);
> > + int gid_type;
> > ssize_t ret;
> >
> > - if (gid_type < 0)
> > - return -EINVAL;
> > -
> > ret = cma_configfs_params_get(item, &cma_dev, &group);
> > if (ret)
> > return ret;
> >
> > + gid_type = ib_cache_gid_parse_type_str(buf);
> > + if (gid_type < 0)
> > + return -EINVAL;
> > +
> > + if (gid_type == IB_GID_TYPE_IB &&
> > + rdma_protocol_roce_eth_encap(cma_dev->device, group->port_num))
> > + gid_type = IB_GID_TYPE_ROCE;
>
> This logic should be in cma_set_default_gid_type() so as not to move
> struct cma_device
We wanted to keep "this hack of git type" as close as possible to the
actual needed place.
I'll fix.
Thanks
>
> Jason
next prev parent reply other threads:[~2020-09-13 7:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 14:22 [PATCH rdma-next 0/4] Query GID table API Leon Romanovsky
2020-09-10 14:22 ` [PATCH rdma-next 1/4] RDMA/core: Change rdma_get_gid_attr returned error code Leon Romanovsky
2020-09-10 14:22 ` [PATCH rdma-next 2/4] RDMA/core: Modify enum ib_gid_type and enum rdma_network_type Leon Romanovsky
2020-09-11 19:11 ` Jason Gunthorpe
2020-09-13 7:42 ` Leon Romanovsky [this message]
2020-09-10 14:22 ` [PATCH rdma-next 3/4] RDMA/core: Introduce new GID table query API Leon Romanovsky
2020-09-11 19:52 ` Jason Gunthorpe
2020-09-13 8:02 ` Leon Romanovsky
2020-09-14 15:50 ` Jason Gunthorpe
2020-09-10 14:22 ` [PATCH rdma-next 4/4] RDMA/uverbs: Expose the new GID query API to user space Leon Romanovsky
2020-09-11 19:59 ` Jason Gunthorpe
2020-09-13 9:13 ` Leon Romanovsky
2020-09-14 15:55 ` Jason Gunthorpe
2020-09-15 11:47 ` Leon Romanovsky
2020-09-15 19:06 ` Jason Gunthorpe
2020-09-16 10:37 ` Leon Romanovsky
2020-09-16 12:04 ` Jason Gunthorpe
2020-09-16 12:44 ` Leon Romanovsky
2020-09-16 14:12 ` Jason Gunthorpe
2020-09-16 14:34 ` Leon Romanovsky
2020-09-16 14:36 ` Jason Gunthorpe
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=20200913074204.GD35718@unreal \
--to=leon@kernel.org \
--cc=aelior@marvell.com \
--cc=avihaih@nvidia.com \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=mkalderon@marvell.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