From: Michael Gur <michaelgur@nvidia.com>
To: David Ahern <dsahern@gmail.com>,
Chiara Meiohas <cmeiohas@nvidia.com>,
leon@kernel.org, stephen@networkplumber.org
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, Patrisious Haddad <phaddad@nvidia.com>
Subject: Re: [PATCH iproute2-next 2/4] rdma: Add resource FRMR pools show command
Date: Mon, 16 Mar 2026 19:17:59 +0200 [thread overview]
Message-ID: <459677a5-db84-4c62-9c44-41e59f1871ef@nvidia.com> (raw)
In-Reply-To: <d8e79d96-3dfd-4008-85a3-f2cb1da2845c@gmail.com>
On 3/7/2026 3:45 AM, David Ahern wrote:
> External email: Use caution opening links or attachments
>
>
> On 3/2/26 8:51 AM, Chiara Meiohas wrote:
>> diff --git a/rdma/res-frmr-pools.c b/rdma/res-frmr-pools.c
>> new file mode 100644
>> index 00000000..97d59705
>> --- /dev/null
>> +++ b/rdma/res-frmr-pools.c
>> @@ -0,0 +1,190 @@
>> +// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
>> +/*
>> + * res-frmr-pools.c RDMA tool
>> + * Authors: Michael Guralnik <michaelgur@nvidia.com>
>> + */
>> +
>> +#include "res.h"
>> +#include <inttypes.h>
>> +
>> +#define FRMR_POOL_KEY_SIZE 21
>> +#define FRMR_POOL_KEY_HEX_SIZE (FRMR_POOL_KEY_SIZE * 2)
>> +union frmr_pool_key {
>> + struct {
>> + uint8_t ats;
>> + uint32_t access_flags;
>> + uint64_t vendor_key;
>> + uint64_t num_dma_blocks;
>> + } __attribute__((packed)) fields;
> why is packed needed on this struct? why can't the fields be re-arranged
> to not require it and just let the extra 3B be at the end unused?
The reasoning was to keep fields that are more likely to be zeroes at
MSB to allow shortening the pool hex key in input and output.
Giving this another thought, I now think we're better dropping the logic
of variable length in the pool key encoding/decoding and keep the hex
pool key at fixed length.
I'll rearrange fields to drop the packed attribute and have the last 3B
reserved.
>> + uint8_t raw[FRMR_POOL_KEY_SIZE];
>> +};
>> +
next prev parent reply other threads:[~2026-03-16 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 15:51 [PATCH iproute2-next 0/4] Introduce FRMR pools Chiara Meiohas
2026-03-02 15:51 ` [PATCH iproute2-next 1/4] rdma: Update headers Chiara Meiohas
2026-03-02 15:51 ` [PATCH iproute2-next 2/4] rdma: Add resource FRMR pools show command Chiara Meiohas
2026-03-07 1:45 ` David Ahern
2026-03-16 17:17 ` Michael Gur [this message]
2026-03-02 15:51 ` [PATCH iproute2-next 3/4] rdma: Add FRMR pools set aging command Chiara Meiohas
2026-03-02 15:52 ` [PATCH iproute2-next 4/4] rdma: Add FRMR pools set pinned command Chiara Meiohas
2026-03-07 0:16 ` [PATCH iproute2-next 0/4] Introduce FRMR pools David Ahern
2026-03-09 15:48 ` Chiara Meiohas
2026-03-07 1:45 ` David Ahern
2026-03-16 21:37 ` Michael Gur
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=459677a5-db84-4c62-9c44-41e59f1871ef@nvidia.com \
--to=michaelgur@nvidia.com \
--cc=cmeiohas@nvidia.com \
--cc=dsahern@gmail.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=phaddad@nvidia.com \
--cc=stephen@networkplumber.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