From: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
To: Arnd Bergmann <arnd@arndb.de>, Leon Romanovsky <leon@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
Nathan Chancellor <nathan@kernel.org>,
Mike Marciniszyn <mike.marciniszyn@intel.com>,
"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
Doug Ledford <dledford@redhat.com>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Marco Crivellari <marco.crivellari@suse.com>,
Ingo Molnar <mingo@kernel.org>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH 2/3] RDMA/hfi1, rdmavt: open-code rvt_set_ibdev_name()
Date: Mon, 23 Mar 2026 17:54:20 -0400 [thread overview]
Message-ID: <54d04d85-79c0-41fb-9c33-4858cd4e6b2f@cornelisnetworks.com> (raw)
In-Reply-To: <5d5f25fc-e522-4131-ae4b-22db57b92d6e@app.fastmail.com>
On 3/23/26 4:48 AM, Arnd Bergmann wrote:
> I took a quick look at the hfi2 driver, and noticed a few things
> that that may be worth addressing before it gets merged, mostly
> stuff copied from hfi1:
>
> - A few global functions with questionable namespacing:
> user_event_ack, ctxt_reset, iowait_init, register_pinning_interface,
> sc_{alloc,free,enable,disable}, pio_copy, acquire_hw_mutex,
> load_firmware, cap_mask.
> It would make sense to prefix all global identifiers with 'hfi2_',
> both out of principle, and to allow building hfi1 and hfi2 into
> an allyesconfig kernel without link failures.
Will address that stuff.
> - The use of INFINIBAND_RDMAVT seems unnecessary: right now
> this is only used by hfi1, now shared with hfi2 but later to
> be exclusive to the latter. Since it is unlikely to ever
> be used by another driver again, this may be a good time
> to drop the abstraction again and integrate it all into
> hfi2, with the old version getting dropped along with hfi1.
Replied about RDMAVT stuff separately. Perhaps when we target removal of
hfi1 that would be the time to get RDMAVT re-incorporated into the main
hfi (hfi2) driver.
>
> - The pio_copy() function is particularly slow since it uses
> the full-barrier version of writeq() in a tight loop,
> this should probably use __iowrite64_copy() etc to make it
> work better on arm64 and other architectures
Will certainly look into this. Thanks for pointing it out.
> - The use of bitfields in drivers/infiniband/hw/hfi2/cport.h
> makes the structures nonportable especially for big-endian
> targets, if those describe device interfaces. Similarly
> the use of __packed attributes in the same file seems
> arbitrary and inconsistent, to the point where it
> is likely to cause more harm than it can help. E.g.
> in
Actually have a patch that addresses some of that. It's coming. We had
previously only built on x86_64 but have plans to change that.
> +struct ib_cc_table_entry_shadow {
> + u16 entry; /* shift:2, multiplier:14 */
> +};
> +
>>
> +struct ib_cc_table_attr_shadow {
> + u16 ccti_limit; /* max CCTI for cc table */
> + struct ib_cc_table_entry_shadow ccti_entries[IB_CCT_ENTRIES];
> +} __packed;
>
> the outer structure is unaligned while the inner one requires
> alignment.
>
Will take care of that one too.
-Denny
next prev parent reply other threads:[~2026-03-23 21:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 15:12 [PATCH 1/3] [RESEND] RDMA/hfi1: use a struct group to avoid warning Arnd Bergmann
2026-03-20 15:12 ` [PATCH 2/3] RDMA/hfi1, rdmavt: open-code rvt_set_ibdev_name() Arnd Bergmann
2026-03-20 15:53 ` Arnd Bergmann
2026-03-23 8:08 ` Leon Romanovsky
2026-03-23 8:48 ` Arnd Bergmann
2026-03-23 11:01 ` Leon Romanovsky
2026-03-23 21:47 ` Dennis Dalessandro
2026-03-24 7:27 ` Arnd Bergmann
2026-03-24 7:51 ` Leon Romanovsky
2026-03-24 7:53 ` Leon Romanovsky
2026-03-23 21:54 ` Dennis Dalessandro [this message]
2026-03-22 18:29 ` kernel test robot
2026-03-22 20:12 ` kernel test robot
2026-03-24 1:29 ` kernel test robot
2026-03-20 15:12 ` [PATCH 3/3] RDMA/hfi1: reduce namespace pollution Arnd Bergmann
2026-03-20 18:01 ` [PATCH 1/3] [RESEND] RDMA/hfi1: use a struct group to avoid warning Kees Cook
2026-03-20 21:49 ` yanjun.zhu
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=54d04d85-79c0-41fb-9c33-4858cd4e6b2f@cornelisnetworks.com \
--to=dennis.dalessandro@cornelisnetworks.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=justinstitt@google.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=marco.crivellari@suse.com \
--cc=michael.j.ruhl@intel.com \
--cc=mike.marciniszyn@intel.com \
--cc=mingo@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.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
all inboxes | Powered by JetHome®