From: Simon Horman <simon.horman@corigine.com>
To: sharmaajay@linuxonhyperv.com
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Dexuan Cui <decui@microsoft.com>, Wei Liu <wei.liu@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ajay Sharma <sharmaajay@microsoft.com>
Subject: Re: [Patch v2 5/5] RDMA/mana_ib : Query adapter capabilities
Date: Wed, 26 Jul 2023 14:31:41 +0200 [thread overview]
Message-ID: <ZMESLQsNgTGnD2j/@corigine.com> (raw)
In-Reply-To: <1690343820-20188-6-git-send-email-sharmaajay@linuxonhyperv.com>
On Tue, Jul 25, 2023 at 08:57:00PM -0700, sharmaajay@linuxonhyperv.com wrote:
...
> diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
...
> +int mana_ib_query_adapter_caps(struct mana_ib_dev *mib_dev)
> +{
> + struct mana_ib_query_adapter_caps_resp resp = {};
> + struct mana_ib_query_adapter_caps_req req = {};
> + int err;
> +
> + mana_gd_init_req_hdr(&req.hdr, MANA_IB_GET_ADAPTER_CAP, sizeof(req),
> + sizeof(resp));
> + req.hdr.resp.msg_version = MANA_IB__GET_ADAPTER_CAP_RESPONSE_V3;
> + req.hdr.dev_id = mib_dev->gc->mana_ib.dev_id;
> +
> + err = mana_gd_send_request(mib_dev->gc, sizeof(req), &req,
> + sizeof(resp), &resp);
> +
> + if (err) {
> + ibdev_err(&mib_dev->ib_dev, "Failed to query adapter caps err %d", err);
> + return err;
> + }
> +
> + memcpy(&mib_dev->adapter_caps, &resp.max_sq_id,
> + sizeof(mib_dev->adapter_caps));
Hi Ajay,
The indentation of the line above is off.
memcpy(&mib_dev->adapter_caps, &resp.max_sq_id,
sizeof(mib_dev->adapter_caps));
But, perhaps more importantly, an x86_64 allmodconfig W=1 build with gcc-12
yields:
In file included from ./include/linux/string.h:254,
from ./include/linux/bitmap.h:11,
from ./include/linux/ethtool.h:16,
from ./include/rdma/ib_verbs.h:15,
from drivers/infiniband/hw/mana/mana_ib.h:9,
from drivers/infiniband/hw/mana/main.c:6:
In function 'fortify_memcpy_chk',
inlined from 'mana_ib_query_adapter_caps' at drivers/infiniband/hw/mana/main.c:626:2:
./include/linux/fortify-string.h:592:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
592 | __read_overflow2_field(q_size_field, size);
|
> + return 0;
> +}
...
prev parent reply other threads:[~2023-07-26 12:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 3:56 [Patch v2 0/5] RDMA/mana_ib Read Capabilities sharmaajay
2023-07-26 3:56 ` [Patch v2 1/5] RDMA/mana-ib : Rename all mana_ib_dev type variables to mib_dev sharmaajay
2023-07-26 3:56 ` [Patch v2 2/5] RDMA/mana_ib : Register Mana IB device with Management SW sharmaajay
2023-07-26 3:56 ` [Patch v2 3/5] RDMA/mana_ib : Add error eq and notification from SoC sharmaajay
2023-07-26 12:25 ` Simon Horman
2023-07-26 15:11 ` kernel test robot
2023-07-26 3:56 ` [Patch v2 4/5] RDMA/mana_ib : Create Adapter - each vf bound to adapter object sharmaajay
2023-07-26 12:26 ` Simon Horman
2023-07-26 3:57 ` [Patch v2 5/5] RDMA/mana_ib : Query adapter capabilities sharmaajay
2023-07-26 12:31 ` Simon Horman [this message]
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=ZMESLQsNgTGnD2j/@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@linuxonhyperv.com \
--cc=sharmaajay@microsoft.com \
--cc=wei.liu@kernel.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