To follow uppercase letter guide of environment variables, rename
use_rxe to USE_RXE.
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
./check srp/
To use the rdma_rxe driver:
./check srp/
To use the rdma_rxe driver:
-use_rxe=1 NVMET_TRTYPES=rdma ./check nvme/
-use_rxe=1 ./check srp/
+USE_RXE=1 NVMET_TRTYPES=rdma ./check nvme/
+USE_RXE=1 ./check srp/
+'USE_RXE' had the old name 'use_rxe'. The old name is still usable but not
+recommended.
fio_aux_path=/tmp/fio-state-files
memtotal=$(sed -n 's/^MemTotal:[[:blank:]]*\([0-9]*\)[[:blank:]]*kB$/\1/p' /proc/meminfo)
max_ramdisk_size=$((1<<25))
fio_aux_path=/tmp/fio-state-files
memtotal=$(sed -n 's/^MemTotal:[[:blank:]]*\([0-9]*\)[[:blank:]]*kB$/\1/p' /proc/meminfo)
max_ramdisk_size=$((1<<25))
ramdisk_size=$((memtotal*(1024/16))) # in bytes
if [ $ramdisk_size -gt $max_ramdisk_size ]; then
ramdisk_size=$max_ramdisk_size
fi
ramdisk_size=$((memtotal*(1024/16))) # in bytes
if [ $ramdisk_size -gt $max_ramdisk_size ]; then
ramdisk_size=$max_ramdisk_size
fi
+_check_conflict_and_set_default USE_RXE use_rxe ""
+
_have_legacy_dm() {
_have_kernel_config_file || return
if ! _check_kernel_option DM_MQ_DEFAULT; then
_have_legacy_dm() {
_have_kernel_config_file || return
if ! _check_kernel_option DM_MQ_DEFAULT; then
- if [ -z "$use_rxe" ]; then
+ if [ -z "$USE_RXE" ]; then
modprobe siw || return $?
type=siw
else
modprobe siw || return $?
type=siw
else
_have_driver nvmet-rdma
_have_configfs
_have_program rdma
_have_driver nvmet-rdma
_have_configfs
_have_program rdma
- if [ -n "$use_rxe" ]; then
+ if [ -n "$USE_RXE" ]; then
_have_driver rdma_rxe
else
_have_driver siw
_have_driver rdma_rxe
else
_have_driver siw
_have_module ib_uverbs
_have_module null_blk
_have_module rdma_cm
_have_module ib_uverbs
_have_module null_blk
_have_module rdma_cm
- if [ -n "$use_rxe" ]; then
+ if [ -n "$USE_RXE" ]; then
_have_module rdma_rxe
else
_have_module siw
_have_module rdma_rxe
else
_have_module siw