From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-next 5/8] IB/{core,ulp} Support above 32 possible device capability flags
Date: Sun, 21 Feb 2016 10:00:53 +0200 [thread overview]
Message-ID: <20160221080053.GL30450@leon.nu> (raw)
In-Reply-To: <56C969B5.5080802-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Sun, Feb 21, 2016 at 09:39:33AM +0200, Haggai Eran wrote:
> On 20/02/2016 09:47, Leon Romanovsky wrote:
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > @@ -1762,7 +1762,7 @@ int ipoib_add_pkey_attr(struct net_device *dev)
> >
> > int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> > {
> > - priv->hca_caps = hca->attrs.device_cap_flags;
> > + priv->hca_caps = (int)hca->attrs.device_cap_flags;
>
> Won't it be better to increase the size of priv->hca_caps? Someone in the
> future will probably attempt to check one of the new device caps through
> this field and will be surprised to see it is only partial.
My changes were intended to minimize the impact on the existing code base. The future
developer will be expected to check his code when he adds new device
capability above 32 bit limit. In this change, he will update the ipoib
properly expose it.
Current implementation doesn't change ipoib behavior and easy for
review without extra knowledge of ipoib internals, so let's stay this
change as is.
Thanks.
--
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:[~2016-02-21 8:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 7:47 [PATCH rdma-next 0/8] Introduce vector CALC support Leon Romanovsky
[not found] ` <1455954465-15141-1-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-20 7:47 ` [PATCH rdma-next 1/8] net/mlx5_core: Fix caching ATOMIC endian mode capability Leon Romanovsky
2016-02-20 7:47 ` [PATCH rdma-next 2/8] net/mlx5_core: Refactor device capability function Leon Romanovsky
2016-02-20 7:47 ` [PATCH rdma-next 3/8] net/mlx5_core: Introduce offload arithmetic hardware capabilities Leon Romanovsky
[not found] ` <1455954465-15141-4-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-20 15:13 ` Leon Romanovsky
2016-02-28 22:05 ` Max Gurtovoy
2016-02-20 7:47 ` [PATCH rdma-next 4/8] IB/core: Replace setting the zero values in ib_uverbs_ex_query_device Leon Romanovsky
2016-02-20 7:47 ` [PATCH rdma-next 5/8] IB/{core,ulp} Support above 32 possible device capability flags Leon Romanovsky
[not found] ` <1455954465-15141-6-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-21 7:39 ` Haggai Eran
[not found] ` <56C969B5.5080802-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-02-21 8:00 ` Leon Romanovsky [this message]
[not found] ` <20160221080053.GL30450-2ukJVAZIZ/Y@public.gmane.org>
2016-02-22 20:02 ` Jason Gunthorpe
2016-02-20 7:47 ` [PATCH rdma-next 6/8] IB/core: Add offload arithmetic operations support Leon Romanovsky
[not found] ` <1455954465-15141-7-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-28 22:22 ` Max Gurtovoy
2016-02-20 7:47 ` [PATCH rdma-next 7/8] IB/core: Exposure supported CALC capabilities Leon Romanovsky
[not found] ` <1455954465-15141-8-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-22 20:04 ` Jason Gunthorpe
2016-02-20 7:47 ` [PATCH rdma-next 8/8] IB/mlx5: Exposure offload arithmetic operations Leon Romanovsky
[not found] ` <1455954465-15141-9-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2016-02-28 22:40 ` Max Gurtovoy
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=20160221080053.GL30450@leon.nu \
--to=leon-2ukjvaziz/y@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=saeedm-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox