All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Uday Shankar <ushankar@purestorage.com>
Cc: Caleb Sander Mateos <csander@purestorage.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] selftests: ublk: kublk: simplify feat_map definition
Date: Wed, 17 Sep 2025 11:49:29 +0800	[thread overview]
Message-ID: <aMovycUcPR1mK1cg@fedora> (raw)
In-Reply-To: <20250916-ublk_features-v1-1-52014be9cde5@purestorage.com>

On Tue, Sep 16, 2025 at 04:05:55PM -0600, Uday Shankar wrote:
> Simplify the definition of feat_map by introducing a helper macro
> FEAT_NAME to avoid having to type the feature name twice. As a side
> effect, this changes the names in the feature list to be the full macro
> name instead of the abbreviated names that were used before, but this is
> a good change for clarity.
> 
> Using the full feature macro names ruins the alignment of the output, so
> change the output format to put each feature's hex value before its
> name, as this is easier to align nicely. The output now looks as
> follows:
> 
> # ./kublk features
> ublk_drv features: 0x7fff
> 0x1               : UBLK_F_SUPPORT_ZERO_COPY
> 0x2               : UBLK_F_URING_CMD_COMP_IN_TASK
> 0x4               : UBLK_F_NEED_GET_DATA
> 0x8               : UBLK_F_USER_RECOVERY
> 0x10              : UBLK_F_USER_RECOVERY_REISSUE
> 0x20              : UBLK_F_UNPRIVILEGED_DEV
> 0x40              : UBLK_F_CMD_IOCTL_ENCODE
> 0x80              : UBLK_F_USER_COPY
> 0x100             : UBLK_F_ZONED
> 0x200             : UBLK_F_USER_RECOVERY_FAIL_IO
> 0x400             : UBLK_F_UPDATE_SIZE
> 0x800             : UBLK_F_AUTO_BUF_REG
> 0x1000            : UBLK_F_QUIESCE
> 0x2000            : UBLK_F_PER_IO_DAEMON
> 0x4000            : unknown
> 
> Signed-off-by: Uday Shankar <ushankar@purestorage.com>

Reviewed-by: Ming Lei <ming.lei@redhat.com>


Thanks,
Ming


  reply	other threads:[~2025-09-17  3:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 22:05 [PATCH 0/3] selftests: ublk: kublk: fix feature list Uday Shankar
2025-09-16 22:05 ` [PATCH 1/3] selftests: ublk: kublk: simplify feat_map definition Uday Shankar
2025-09-17  3:49   ` Ming Lei [this message]
2025-09-16 22:05 ` [PATCH 2/3] selftests: ublk: kublk: add UBLK_F_BUF_REG_OFF_DAEMON to feat_map Uday Shankar
2025-09-17  3:50   ` Ming Lei
2025-09-16 22:05 ` [PATCH 3/3] selftests: ublk: add test to verify that feat_map is complete Uday Shankar
2025-09-17  3:52   ` Ming Lei
2025-09-17 19:12     ` Uday Shankar
2025-09-18  0:23       ` Ming Lei

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=aMovycUcPR1mK1cg@fedora \
    --to=ming.lei@redhat.com \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=ushankar@purestorage.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 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.