[PATCH blktests] common/nvme: reset def_adrfam for ipv4 case

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Sat Jan 24 04:31:36 PST 2026


On Jan 17, 2026 / 14:04, Shin'ichiro Kawasaki wrote:
> From: Daniel Wagner <wagi at kernel.org>
> 
> When NVMET_TRTYPES specifies multiple transport types, blktests runs
> each test case in the nvme group for each of the specified transport
> types. When a test case is run for "fc" transport, it succeeds. However,
> when following transport is "tcp" or "rdma", the test case fails.
> 
> This failure happens because the run for "fc" transport overrides the
> global variable 'def_adrfam' with the value "fc". 'def_adrfam' is
> initialized with "ipv4" when "common/nvme" is loaded, and it was assumed
> that this value was not reused after the overwrite. However, since the
> commit a16ac8e052d4 ("nvme/{002-031,033-038,040-045,047,048}: support
> NMVET_TRTYPES"), the overwritten 'def_adrfam' is reused for other
> transport types and the value "fc" causes failure for "tcp" or "rdma"
> transports.
> 
> To ensure that 'def_adrfam' has correct values for "tcp" and "rdma"
> transports even after test case runs for "fc" transport, initialize
> the 'def_adrfam' with the value "ipv4". For the completeness, set "ipv4"
> to 'def_adrfam' also when "nvme_adrfam" is specified.
> 
> Fixes: a16ac8e052d4 ("nvme/{002-031,033-038,040-045,047,048}: support NMVET_TRTYPES")
> Link: https://github.com/linux-blktests/blktests/issues/217
> Signed-off-by: Daniel Wagner <wagi at kernel.org>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>

FYI, I applied this patch.


More information about the Linux-nvme mailing list