From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Eran Ben Elisha <eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
Somnath Kotur
<Somnath.Kotur-idTK6quXuVSLFuii7jzJGg@public.gmane.org>,
Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next V3 01/11] IB/core: Add gid_type to gid attribute
Date: Wed, 23 Dec 2015 15:40:53 +0200 [thread overview]
Message-ID: <20151223134053.GB3599@leon.nu> (raw)
In-Reply-To: <1450875417-19262-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Wed, Dec 23, 2015 at 02:56:47PM +0200, Matan Barak wrote:
> In order to support multiple GID types, we need to store the gid_type
> with each GID. This is also aligned with the RoCE v2 annex "RoCEv2 PORT
> GID table entries shall have a "GID type" attribute that denotes the L3
> Address type". The currently supported GID is IB_GID_TYPE_IB which is
> also RoCE v1 GID type.
>
> This implies that gid_type should be added to roce_gid_table meta-data.
>
> Signed-off-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/core/cache.c | 144 +++++++++++++++++++---------
> drivers/infiniband/core/cm.c | 2 +-
> drivers/infiniband/core/cma.c | 3 +-
> drivers/infiniband/core/core_priv.h | 4 +
> drivers/infiniband/core/device.c | 9 ++-
> drivers/infiniband/core/multicast.c | 2 +-
> drivers/infiniband/core/roce_gid_mgmt.c | 60 ++++++++++--
> drivers/infiniband/core/sa_query.c | 5 +-
> drivers/infiniband/core/uverbs_marshall.c | 1 +
> drivers/infiniband/core/verbs.c | 1 +
> include/rdma/ib_cache.h | 4 +
> include/rdma/ib_sa.h | 1 +
> include/rdma/ib_verbs.h | 11 ++-
> 13 files changed, 185 insertions(+), 62 deletions(-)
>
> diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
> index 097e9df..566fd8f 100644
> --- a/drivers/infiniband/core/cache.c
> +++ b/drivers/infiniband/core/cache.c
> @@ -64,6 +64,7 @@ enum gid_attr_find_mask {
> GID_ATTR_FIND_MASK_GID = 1UL << 0,
> GID_ATTR_FIND_MASK_NETDEV = 1UL << 1,
> GID_ATTR_FIND_MASK_DEFAULT = 1UL << 2,
> + GID_ATTR_FIND_MASK_GID_TYPE = 1UL << 3,
> };
>
> enum gid_table_entry_props {
> @@ -125,6 +126,19 @@ static void dispatch_gid_change_event(struct ib_device *ib_dev, u8 port)
> }
> }
>
> +static const char * const gid_type_str[] = {
^^ ^^
IMHO, The white spaces can be a little bit confusing to understand.
> + [IB_GID_TYPE_IB] = "IB/RoCE v1",
> +};
> +
> +const char *ib_cache_gid_type_str(enum ib_gid_type gid_type)
> +{
> + if (gid_type < ARRAY_SIZE(gid_type_str) && gid_type_str[gid_type])
Why do you need to check second condition?
> + return gid_type_str[gid_type];
> +
> + return "Invalid GID type";
> +}
> +EXPORT_SYMBOL(ib_cache_gid_type_str);
> +
--
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-12-23 13:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 12:56 [PATCH for-next V3 00/11] Add RoCE v2 support Matan Barak
[not found] ` <1450875417-19262-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-23 12:56 ` [PATCH for-next V3 01/11] IB/core: Add gid_type to gid attribute Matan Barak
[not found] ` <1450875417-19262-2-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-23 13:40 ` Leon Romanovsky [this message]
[not found] ` <20151223134053.GB3599-2ukJVAZIZ/Y@public.gmane.org>
2015-12-23 15:21 ` Matan Barak
[not found] ` <CAAKD3BBipJ_2vr2=UYnUZhRqFhfp=23i+rG4FRx089cZ=6rTVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-23 15:38 ` Sagi Grimberg
2015-12-23 12:56 ` [PATCH for-next V3 02/11] IB/cm: Use the source GID index type Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 03/11] IB/core: Add gid attributes to sysfs Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 04/11] IB/core: Add ROCE_UDP_ENCAP (RoCE V2) type Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 05/11] IB/core: Add rdma_network_type to wc Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 06/11] IB/core: Move rdma_is_upper_dev_rcu to header file Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 07/11] IB/core: Validate route in ib_init_ah_from_wc and ib_init_ah_from_path Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 08/11] IB/rdma_cm: Add wrapper for cma reference count Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 09/11] IB/cma: Add configfs for rdma_cm Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers Matan Barak
[not found] ` <1450875417-19262-11-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-30 5:57 ` Or Gerlitz
[not found] ` <56837252.70705-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-30 10:35 ` Matan Barak
2015-12-23 12:56 ` [PATCH for-next V3 11/11] IB/cma: Join and leave multicast groups with IGMP Matan Barak
2015-12-23 13:25 ` [PATCH for-next V3 00/11] Add RoCE v2 support Matan Barak
2015-12-23 15:48 ` Doug Ledford
2015-12-23 15:51 ` Doug Ledford
2015-12-30 6:04 ` Or Gerlitz
[not found] ` <568373E4.2080409-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-30 10:48 ` Matan Barak
[not found] ` <5683B662.4070609-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-30 11:05 ` Or Gerlitz
[not found] ` <5683BA79.2000406-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-12-30 11:14 ` 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=20151223134053.GB3599@leon.nu \
--to=leon-2ukjvaziz/y@public.gmane.org \
--cc=Somnath.Kotur-idTK6quXuVSLFuii7jzJGg@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=eranbe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-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.