aboutsummaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/sg_mrq_dd.cpp71
-rw-r--r--testing/sgh_dd.cpp39
-rw-r--r--testing/sgs_dd.c51
-rw-r--r--testing/uapi_sg.h3
4 files changed, 88 insertions, 76 deletions
diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index 821f2555..01b38e79 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -30,7 +30,7 @@
*
*/
-static const char * version_str = "1.43 20220910";
+static const char * version_str = "1.44 20221020";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -122,8 +122,8 @@ using namespace std;
// #endif
-#ifndef SGV4_FLAG_HIPRI
-#define SGV4_FLAG_HIPRI 0x800
+#ifndef SGV4_FLAG_POLLED
+#define SGV4_FLAG_POLLED 0x800
#endif
#define MAX_SGL_NUM_VAL (INT32_MAX - 1) /* should reduce for testing */
@@ -190,7 +190,6 @@ struct flags_t {
bool excl;
bool ff;
bool fua;
- bool hipri;
bool masync; /* more async sg v4 driver fd flag */
bool mout_if; /* META_OUT_IF flag at mrq level */
bool nocreat;
@@ -198,6 +197,7 @@ struct flags_t {
bool no_thresh;
bool no_waitq; /* dummy, no longer supported, just warn */
bool order_wr;
+ bool polled; /* was previously 'hipri' */
bool qhead;
bool qtail;
bool random;
@@ -299,7 +299,7 @@ struct global_collection /* one instance visible to all threads */
bool count_given;
bool ese;
bool flexible;
- bool mrq_hipri;
+ bool mrq_polled;
bool ofile_given;
bool unit_nanosec; /* default duration unit is millisecond */
bool verify; /* don't copy, verify like Unix: cmp */
@@ -477,7 +477,7 @@ usage(int pg_num)
pr2serr(" [bpt=BPT] [cdbsz=6|10|12|16] [cdl=CDL] "
"[dio=0|1]\n"
" [elemsz_kb=EKB] [ese=0|1] [fua=0|1|2|3] "
- "[hipri=NRQS]\n"
+ "[polled=NRQS]\n"
" [mrq=NRQS] [ofreg=OFREG] [sdt=SDT] "
"[sync=0|1]\n"
" [thr=THR] [time=0|1|2[,TO]] [verbose=VERB] "
@@ -544,8 +544,7 @@ page2:
" 3->OFILE+IFILE\n"
" ibs IFILE logical block size, cannot differ from "
"obs or bs\n"
- " hipri similar to mrq=NRQS operand but also sets "
- "hipri flag\n"
+ " hipri same as polled=NRQS; name 'hipri' is deprecated\n"
" mrq NRQS is number of cmds placed in each sg "
"ioctl\n"
" (def: 16). Does not set mrq hipri flag.\n"
@@ -555,6 +554,8 @@ page2:
"ibs or bs\n"
" ofreg OFREG is regular file or pipe to send what is "
"read from\n"
+ " polled similar to mrq=NRQS operand but also sets "
+ "polled flag\n"
" IFILE in the first half of each shared element\n"
" sdt stall detection times: CRT[,ICT]. CRT: check "
"repetition\n"
@@ -598,8 +599,7 @@ page3:
"iflag)\n"
" fua sets the FUA (force unit access) in SCSI READs "
"and WRITEs\n"
- " hipri set HIPRI flag and use blk_poll() for "
- "completions\n"
+ " hipri same as 'polled'; name 'hipri' is deprecated\n"
" masync set 'more async' flag on this sg device\n"
" mmap setup mmap IO on IFILE or OFILE\n"
" mmap,mmap when used twice, doesn't call munmap()\n"
@@ -609,6 +609,8 @@ page3:
" no_thresh skip checking per fd max data xfer size\n"
" order require write ordering on sg->sg copy; only "
"for oflag\n"
+ " polled set POLLED flag and use blk_poll() for "
+ "completions\n"
" qhead queue new request at head of block queue\n"
" qtail queue new request at tail of block queue (def: "
"q at head)\n"
@@ -800,8 +802,8 @@ sg_flags_str(int flags, int b_len, char * b)
if (n >= b_len)
goto fini;
}
- if (SGV4_FLAG_HIPRI & flags) { /* 0x800 */
- n += sg_scnpr(b + n, b_len - n, "HIPRI|");
+ if (SGV4_FLAG_POLLED & flags) { /* 0x800 */
+ n += sg_scnpr(b + n, b_len - n, "POLLED|");
if (n >= b_len)
goto fini;
}
@@ -2327,8 +2329,8 @@ sg_half_segment_mrq0(Rq_elem * rep, scat_gath_iter & sg_it, bool is_wr,
rflags |= SGV4_FLAG_Q_AT_HEAD;
if (flagsp->qtail)
rflags |= SGV4_FLAG_Q_AT_TAIL;
- if (flagsp->hipri)
- rflags |= SGV4_FLAG_HIPRI;
+ if (flagsp->polled)
+ rflags |= SGV4_FLAG_POLLED;
for (k = 0, num = 0; seg_blks > 0; ++k, seg_blks -= num) {
kk = min<int>(seg_blks, clp->bpt);
@@ -2449,8 +2451,8 @@ sg_half_segment(Rq_elem * rep, scat_gath_iter & sg_it, bool is_wr,
rflags |= SGV4_FLAG_Q_AT_HEAD;
if (flagsp->qtail)
rflags |= SGV4_FLAG_Q_AT_TAIL;
- if (flagsp->hipri)
- rflags |= SGV4_FLAG_HIPRI;
+ if (flagsp->polled)
+ rflags |= SGV4_FLAG_POLLED;
for (k = 0, num = 0; seg_blks > 0; ++k, seg_blks -= num) {
kk = min<int>(seg_blks, clp->bpt);
@@ -2520,8 +2522,8 @@ sg_half_segment(Rq_elem * rep, scat_gath_iter & sg_it, bool is_wr,
ctl_v4.flags = SGV4_FLAG_MULTIPLE_REQS;
if (! flagsp->coe)
ctl_v4.flags |= SGV4_FLAG_STOP_IF;
- if (clp->mrq_hipri)
- ctl_v4.flags |= SGV4_FLAG_HIPRI;
+ if (clp->mrq_polled)
+ ctl_v4.flags |= SGV4_FLAG_POLLED;
if (clp->in_flags.mout_if || clp->out_flags.mout_if) {
ctl_v4.flags |= SGV4_FLAG_META_OUT_IF;
if (num_mrq > 0)
@@ -2870,8 +2872,8 @@ do_both_sg_segment_mrq0(Rq_elem * rep, scat_gath_iter & i_sg_it,
iflags |= SGV4_FLAG_Q_AT_HEAD;
if (iflagsp->qtail)
iflags |= SGV4_FLAG_Q_AT_TAIL;
- if (iflagsp->hipri)
- iflags |= SGV4_FLAG_HIPRI;
+ if (iflagsp->polled)
+ iflags |= SGV4_FLAG_POLLED;
oflags = SGV4_FLAG_SHARE | SGV4_FLAG_NO_DXFER;
if (oflagsp->dio)
@@ -2880,8 +2882,8 @@ do_both_sg_segment_mrq0(Rq_elem * rep, scat_gath_iter & i_sg_it,
oflags |= SGV4_FLAG_Q_AT_HEAD;
if (oflagsp->qtail)
oflags |= SGV4_FLAG_Q_AT_TAIL;
- if (oflagsp->hipri)
- oflags |= SGV4_FLAG_HIPRI;
+ if (oflagsp->polled)
+ oflags |= SGV4_FLAG_POLLED;
for (k = 0; seg_blks > 0; ++k, seg_blks -= num) {
kk = min<int>(seg_blks, clp->bpt);
@@ -3053,8 +3055,8 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
iflags |= SGV4_FLAG_Q_AT_HEAD;
if (iflagsp->qtail)
iflags |= SGV4_FLAG_Q_AT_TAIL;
- if (iflagsp->hipri)
- iflags |= SGV4_FLAG_HIPRI;
+ if (iflagsp->polled)
+ iflags |= SGV4_FLAG_POLLED;
oflags = SGV4_FLAG_SHARE | SGV4_FLAG_NO_DXFER;
if (oflagsp->dio)
@@ -3063,8 +3065,8 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
oflags |= SGV4_FLAG_Q_AT_HEAD;
if (oflagsp->qtail)
oflags |= SGV4_FLAG_Q_AT_TAIL;
- if (oflagsp->hipri)
- oflags |= SGV4_FLAG_HIPRI;
+ if (oflagsp->polled)
+ oflags |= SGV4_FLAG_POLLED;
oflags |= SGV4_FLAG_DO_ON_OTHER;
for (k = 0; seg_blks > 0; ++k, seg_blks -= num) {
@@ -3164,8 +3166,8 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
ctl_v4.flags |= SGV4_FLAG_STOP_IF;
if ((! clp->verify) && clp->out_flags.order_wr)
ctl_v4.flags |= SGV4_FLAG_ORDERED_WR;
- if (clp->mrq_hipri)
- ctl_v4.flags |= SGV4_FLAG_HIPRI;
+ if (clp->mrq_polled)
+ ctl_v4.flags |= SGV4_FLAG_POLLED;
if (clp->in_flags.mout_if || clp->out_flags.mout_if) {
ctl_v4.flags |= SGV4_FLAG_META_OUT_IF;
if (num_mrq > 0)
@@ -3417,7 +3419,7 @@ process_flags(const char * arg, struct flags_t * fp)
else if (0 == strcmp(cp, "fua"))
fp->fua = true;
else if (0 == strcmp(cp, "hipri"))
- fp->hipri = true;
+ fp->polled = true;
else if (0 == strcmp(cp, "masync"))
fp->masync = true;
else if (0 == strcmp(cp, "mmap"))
@@ -3444,6 +3446,8 @@ process_flags(const char * arg, struct flags_t * fp)
fp->order_wr = true;
else if (0 == strcmp(cp, "order"))
fp->order_wr = true;
+ else if (0 == strcmp(cp, "polled"))
+ fp->polled = true;
else if (0 == strcmp(cp, "qhead"))
fp->qhead = true;
else if (0 == strcmp(cp, "qtail"))
@@ -3673,11 +3677,12 @@ parse_cmdline_sanity(int argc, char * argv[], struct global_collection * clp,
goto syn_err;
}
} else if ((0 == strcmp(key, "hipri")) ||
- (0 == strcmp(key, "mrq"))) {
+ (0 == strcmp(key, "mrq")) ||
+ (0 == strcmp(key, "polled"))) {
if (isdigit(buf[0]))
cp = buf;
else {
- pr2serr("%sonly mrq=NRQS or hipri=NRQS which is a number "
+ pr2serr("%sonly mrq=NRQS or polled=NRQS which is a number "
"allowed here\n", my_name);
goto syn_err;
}
@@ -3691,8 +3696,8 @@ parse_cmdline_sanity(int argc, char * argv[], struct global_collection * clp,
clp->mrq_num = 1;
pr2serr("note: send single, non-mrq commands\n");
}
- if ('h' == key[0])
- clp->mrq_hipri = true;
+ if ('m' != key[0])
+ clp->mrq_polled = true;
} else if ((0 == strcmp(key, "no_waitq")) ||
(0 == strcmp(key, "no-waitq"))) {
n = sg_get_num(buf);
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index dd72ffa9..b0704ffa 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -36,7 +36,7 @@
* renamed [20181221]
*/
-static const char * version_str = "2.21 20220911";
+static const char * version_str = "2.22 20221020";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -124,8 +124,8 @@ using namespace std;
/* comment out following line to stop ioctl(SG_CTL_FLAGM_SNAP_DEV) */
#define SGH_DD_SNAP_DEV 1
-#ifndef SGV4_FLAG_HIPRI
-#define SGV4_FLAG_HIPRI 0x800
+#ifndef SGV4_FLAG_POLLED
+#define SGV4_FLAG_POLLED 0x800
#endif
#define DEF_BLOCK_SIZE 512
@@ -183,7 +183,7 @@ struct flags_t {
bool excl;
bool ff;
bool fua;
- bool hipri;
+ bool polled; /* formerly called 'hipri' */
bool masync; /* more async sg v4 driver flag */
bool mrq_immed; /* mrq submit non-blocking */
bool mrq_svb; /* mrq shared_variable_block, for sg->sg copy */
@@ -498,9 +498,9 @@ usage(int pg_num)
" if file or device to read from (def: stdin)\n"
" iflag comma separated list from: [00,coe,defres,dio,"
"direct,dpo,\n"
- " dsync,excl,ff,fua,hipri,masync,mmap,mout_if,"
- "mrq_immed,\n"
- " mrq_svb,nocreat,nodur,noxfer,null,qhead,"
+ " dsync,excl,ff,fua,masync,mmap,mout_if,"
+ "mrq_immed,mrq_svb,\n"
+ " nocreat,nodur,noxfer,null,polled,qhead,"
"qtail,\n"
" random,same_fds,v3,v4,wq_excl]\n"
" of file or device to write to (def: /dev/null "
@@ -613,8 +613,7 @@ page3:
"iflags)\n"
" fua sets the FUA (force unit access) in SCSI READs "
"and WRITEs\n"
- " hipri set HIPRI flag on command, uses blk_poll() to "
- "complete\n"
+ " hipri same as 'polled'; 'hipri' name is deprecated\n"
" masync set 'more async' flag on this sg device\n"
" mmap setup mmap IO on IFILE or OFILE; OFILE only "
"with noshare\n"
@@ -630,6 +629,8 @@ page3:
" noxfer no transfer to/from the user space\n"
" no_thresh skip checking per fd max data xfer\n"
" null does nothing, placeholder\n"
+ " polled set POLLED flag on command, uses blk_poll() to "
+ "complete\n"
" qhead queue new request at head of block queue\n"
" qtail queue new request at tail of block queue (def: "
"q at head)\n"
@@ -797,8 +798,8 @@ sg_flags_str(int flags, int b_len, char * b)
if (n >= b_len)
goto fini;
}
- if (SGV4_FLAG_HIPRI & flags) { /* 0x800 */
- n += sg_scnpr(b + n, b_len - n, "HIPRI|");
+ if (SGV4_FLAG_POLLED & flags) { /* 0x800 */
+ n += sg_scnpr(b + n, b_len - n, "POLLED|");
if (n >= b_len)
goto fini;
}
@@ -2633,9 +2634,9 @@ sgh_do_async_mrq(Rq_elem * rep, mrq_arr_t & def_arr, int fd,
b_len = sizeof(b);
a_v4p = def_arr.first.data();
ctlop->flags = SGV4_FLAG_MULTIPLE_REQS;
- if (clp->in_flags.hipri || clp->out_flags.hipri) {
- /* submit of full non-blocking with HIPRI */
- ctlop->flags |= (SGV4_FLAG_IMMED | SGV4_FLAG_HIPRI);
+ if (clp->in_flags.polled || clp->out_flags.polled) {
+ /* submit of full non-blocking with POLLED */
+ ctlop->flags |= (SGV4_FLAG_IMMED | SGV4_FLAG_POLLED);
if (!after1 && (clp->verbose > 1)) {
after1 = true;
pr2serr_lk("%s: %s\n", __func__, mrq_s_nb_s);
@@ -3143,7 +3144,7 @@ sg_start_io(Rq_elem * rep, mrq_arr_t & def_arr, int & pack_id,
bool v4 = wr ? clp->out_flags.v4 : clp->in_flags.v4;
bool qhead = wr ? clp->out_flags.qhead : clp->in_flags.qhead;
bool qtail = wr ? clp->out_flags.qtail : clp->in_flags.qtail;
- bool hipri = wr ? clp->out_flags.hipri : clp->in_flags.hipri;
+ bool polled = wr ? clp->out_flags.polled : clp->in_flags.polled;
bool mout_if = wr ? clp->out_flags.mout_if : clp->in_flags.mout_if;
bool prefetch = xtrp ? xtrp->prefetch : false;
bool is_wr2 = xtrp ? xtrp->is_wr2 : false;
@@ -3203,8 +3204,8 @@ sg_start_io(Rq_elem * rep, mrq_arr_t & def_arr, int & pack_id,
flags |= SG_FLAG_NO_DXFER;
if (dio)
flags |= SG_FLAG_DIRECT_IO;
- if (hipri)
- flags |= SGV4_FLAG_HIPRI;
+ if (polled)
+ flags |= SGV4_FLAG_POLLED;
if (qhead)
flags |= SG_FLAG_Q_AT_HEAD;
if (qtail)
@@ -3802,7 +3803,7 @@ process_flags(const char * arg, struct flags_t * fp)
else if (0 == strcmp(cp, "fua"))
fp->fua = true;
else if (0 == strcmp(cp, "hipri"))
- fp->hipri = true;
+ fp->polled = true;
else if (0 == strcmp(cp, "masync"))
fp->masync = true;
else if (0 == strcmp(cp, "mmap"))
@@ -3845,6 +3846,8 @@ process_flags(const char * arg, struct flags_t * fp)
fp->noxfer = true;
else if (0 == strcmp(cp, "null"))
;
+ else if (0 == strcmp(cp, "polled"))
+ fp->polled = true;
else if (0 == strcmp(cp, "qhead"))
fp->qhead = true;
else if (0 == strcmp(cp, "qtail"))
diff --git a/testing/sgs_dd.c b/testing/sgs_dd.c
index 0d7d2e1b..c139a178 100644
--- a/testing/sgs_dd.c
+++ b/testing/sgs_dd.c
@@ -84,11 +84,11 @@
#include "sg_unaligned.h"
-static const char * version_str = "4.23 20220815";
+static const char * version_str = "4.24 20221020";
static const char * my_name = "sgs_dd";
-#ifndef SGV4_FLAG_HIPRI
-#define SGV4_FLAG_HIPRI 0x800
+#ifndef SGV4_FLAG_POLLED
+#define SGV4_FLAG_POLLED 0x800
#endif
#define DEF_BLOCK_SIZE 512
@@ -125,11 +125,11 @@ struct flags_t {
bool dio;
bool evfd;
bool excl;
- bool hipri;
bool immed;
bool mmap;
bool noxfer;
bool pack;
+ bool polled;
bool tag;
bool v3;
bool v4;
@@ -223,12 +223,12 @@ usage(int pg_num)
" bs must be the logical block size of device (def: 512)\n"
" deb debug: 0->no debug (def); > 0 -> more debug\n"
" -v (up to -vvvvv) sets deb value to number of 'v's\n"
- " iflag comma separated list from: dio,evfd,excl,hipri,immed,"
- "mmap\n"
- " noxfer,null,pack,tag,v3,v4 bound to IFILE\n"
+ " iflag comma separated list from: dio,evfd,excl,immed,mmap,"
+ "noxfer,\n"
+ " null,pack,polled,tag,v3,v4 bound to IFILE\n"
" no_sig 0-> use signals; 1-> no signals, hard polling "
"instead;\n"
- " default 0, unless hipri flag(s) given then it's 1\n"
+ " default 0, unless polled flag(s) given then it's 1\n"
" oflag same flags as iflag but bound to OFILE\n"
" poll_ms number of milliseconds to wait on poll (def: 0)\n"
" rt_sig 0->use SIGIO (def); 1->use RT sig (SIGRTMIN + 1)\n"
@@ -244,7 +244,7 @@ second_page:
" evfd when poll() gives POLLIN, use eventfd to find "
"out how many\n"
" excl open IFILE or OFILE with O_EXCL\n"
- " hipri set HIPRI flag and use blk_poll() for completion\n"
+ " hipri same as 'polled'; name 'hipri' is deprecated\n"
" immed use SGV4_FLAG_IMMED flag on each request\n"
" mmap use mmap()-ed IO on IFILE or OFILE\n"
" noxfer no transfer between user space and kernel IO "
@@ -252,6 +252,7 @@ second_page:
" null does nothing, placeholder\n"
" pack submit with rising pack_id, complete matching "
"each pack_id\n"
+ " polled set POLLED flag and use blk_poll() for completion\n"
" tag use tag (from block layer) rather than "
"pack_id\n"
" v3 use sg v3 interface (default)\n"
@@ -350,12 +351,12 @@ sg_start_io(Rq_coll * clp, Rq_elem * rep)
hp->pack_id = rep->blk;
if (flagp->dio)
hp->flags |= SG_FLAG_DIRECT_IO;
- if (flagp->hipri)
- hp->flags |= SGV4_FLAG_HIPRI;
if (flagp->noxfer)
hp->flags |= SG_FLAG_NO_DXFER;
if (flagp->immed)
hp->flags |= SGV4_FLAG_IMMED;
+ if (flagp->polled)
+ hp->flags |= SGV4_FLAG_POLLED;
if (flagp->mmap) {
hp->flags |= SG_FLAG_MMAP_IO;
hp->dxferp = is_wr ? clp->out_mmapp : clp->in_mmapp;
@@ -407,10 +408,10 @@ do_v4:
h4p->flags |= SG_FLAG_DIRECT_IO;
if (flagp->noxfer)
h4p->flags |= SG_FLAG_NO_DXFER;
- if (flagp->hipri)
- h4p->flags |= SGV4_FLAG_HIPRI;
if (flagp->immed)
h4p->flags |= SGV4_FLAG_IMMED;
+ if (flagp->polled)
+ h4p->flags |= SGV4_FLAG_POLLED;
if (flagp->mmap) {
h4p->flags |= SG_FLAG_MMAP_IO;
hp->dxferp = is_wr ? clp->out_mmapp : clp->in_mmapp;
@@ -500,7 +501,7 @@ sg_finish_io(Rq_coll * clp, bool wr, Rq_elem ** repp)
rep = (Rq_elem *)io_hdr.usr_ptr;
if (rep) {
dio = flagsp->dio;
- if (rep->io_hdr.flags & SGV4_FLAG_HIPRI)
+ if (rep->io_hdr.flags & SGV4_FLAG_POLLED)
++clp->blk_poll_count;
}
if (res < 0) {
@@ -588,7 +589,7 @@ do_v4:
return res;
}
if (rep) {
- if (rep->io_v4.flags & SGV4_FLAG_HIPRI)
+ if (rep->io_v4.flags & SGV4_FLAG_POLLED)
++clp->blk_poll_count;
}
if (! (rep && (SGQ_IO_STARTED == rep->state))) {
@@ -1188,7 +1189,7 @@ process_flags(const char * arg, struct flags_t * fp)
else if (0 == strcmp(cp, "excl"))
fp->excl = true;
else if (0 == strcmp(cp, "hipri"))
- fp->hipri = true;
+ fp->polled = true;
else if (0 == strcmp(cp, "immed"))
fp->immed = true;
else if (0 == strcmp(cp, "mmap"))
@@ -1199,6 +1200,8 @@ process_flags(const char * arg, struct flags_t * fp)
;
else if (0 == strcmp(cp, "pack"))
fp->pack = true;
+ else if (0 == strcmp(cp, "polled"))
+ fp->polled = true;
else if (0 == strcmp(cp, "tag"))
fp->tag = true;
else if (0 == strcmp(cp, "v3")) {
@@ -1232,7 +1235,7 @@ main(int argc, char * argv[])
{
bool bs_given = false;
bool no_sig_given = false;
- bool hipri_present;
+ bool polled_present;
int skip = 0;
int seek = 0;
int ibs = 0;
@@ -1388,12 +1391,12 @@ main(int argc, char * argv[])
return 0;
}
- hipri_present = (clp->iflag.hipri || clp->oflag.hipri);
+ polled_present = (clp->iflag.polled || clp->oflag.polled);
if (no_sig_given) {
- if ((0 == clp->no_sig) && hipri_present)
- pr2serr("Warning: signalling doesn't work with hipri\n");
- } else /* no_sig default varies: 0 normally and 1 if hipri present */
- clp->no_sig = hipri_present ? 1 : 0;
+ if ((0 == clp->no_sig) && polled_present)
+ pr2serr("Warning: signalling doesn't work with polled flag\n");
+ } else /* no_sig default varies: 0 normally and 1 if polled present */
+ clp->no_sig = polled_present ? 1 : 0;
if ((ibs && (ibs != clp->bs)) || (obs && (obs != clp->bs))) {
pr2serr("If 'ibs' or 'obs' given must be same as 'bs'\n");
@@ -1652,8 +1655,8 @@ main(int argc, char * argv[])
if (! clp->no_sig)
pr2serr("SIGIO/SIGPOLL signals received: %d, RT sigs: %d\n",
clp->sigs_io_received, clp->sigs_rt_received);
- if (hipri_present)
- pr2serr("HIPRI (blk_poll) used to complete %d commands\n",
+ if (polled_present)
+ pr2serr("POLLED (blk_poll) used to complete %d commands\n",
clp->blk_poll_count);
}
if (clp->pollerr_count > 0)
diff --git a/testing/uapi_sg.h b/testing/uapi_sg.h
index 9cc51dc0..41377c6a 100644
--- a/testing/uapi_sg.h
+++ b/testing/uapi_sg.h
@@ -119,7 +119,8 @@ typedef struct sg_io_hdr {
#define SGV4_FLAG_COMPLETE_B4 0x100 /* mrq: complete this rq before next */
#define SGV4_FLAG_SIGNAL 0x200 /* v3: ignored; v4 signal on completion */
#define SGV4_FLAG_IMMED 0x400 /* issue request and return immediately ... */
-#define SGV4_FLAG_HIPRI 0x800 /* request will use blk_poll to complete */
+#define SGV4_FLAG_HIPRI 0x800 /* use blk_poll (deprecated name, use POLLED) */
+#define SGV4_FLAG_POLLED 0x800 /* request will use blk_poll to complete */
#define SGV4_FLAG_STOP_IF 0x1000 /* Stops sync mrq if error or warning */
#define SGV4_FLAG_DEV_SCOPE 0x2000 /* permit SG_IOABORT to have wider scope */
#define SGV4_FLAG_SHARE 0x4000 /* share IO buffer; needs SG_SEIM_SHARE_FD */