Commit 09e8a28b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add an extra '_' to identify SLT__Bogus and SLT__Reserved as magic

parent 10590c10
......@@ -60,7 +60,8 @@ vsl_tag_is_masked(enum VSL_tag_e tag)
volatile uint8_t *bm = &cache_param->vsl_mask[0];
uint8_t b;
assert(tag < SLT_Reserved);
assert(tag > SLT__Bogus);
assert(tag < SLT__Reserved);
bm += ((unsigned)tag >> 3);
b = (0x80 >> ((unsigned)tag & 7));
return (*bm & b);
......@@ -75,8 +76,8 @@ vsl_hdr(enum VSL_tag_e tag, uint32_t *p, unsigned len, uint32_t vxid)
{
assert(((uintptr_t)p & 0x3) == 0);
assert(tag > SLT_Bogus);
assert(tag < SLT_Reserved);
assert(tag > SLT__Bogus);
assert(tag < SLT__Reserved);
AZ(len & ~VSL_LENMASK);
p[1] = vxid;
......
......@@ -137,12 +137,12 @@ tweak_vsl_mask(struct cli *cli, const struct parspec *par, const char *arg)
(void)bit(mgt_param.vsl_mask, SLT_Hash, BSET);
} else {
bit_tweak(cli, mgt_param.vsl_mask,
SLT_Reserved, arg, VSL_tags,
SLT__Reserved, arg, VSL_tags,
"VSL tag", "-");
}
} else {
s = "";
for (j = 0; j < (unsigned)SLT_Reserved; j++) {
for (j = 0; j < (unsigned)SLT__Reserved; j++) {
if (bit(mgt_param.vsl_mask, j, BTST)) {
VCLI_Out(cli, "%s-%s", s, VSL_tags[j]);
s = ",";
......
......@@ -68,19 +68,19 @@
#define VSL_BACKEND(ptr) (((ptr)[1]) & VSL_BACKENDMARKER)
#define VSL_DATA(ptr) ((char*)((ptr)+2))
#define VSL_ENDMARKER (((uint32_t)SLT_Reserved << 24) | 0x454545) /* "EEE" */
#define VSL_WRAPMARKER (((uint32_t)SLT_Reserved << 24) | 0x575757) /* "WWW" */
#define VSL_ENDMARKER (((uint32_t)SLT__Reserved << 24) | 0x454545) /* "EEE" */
#define VSL_WRAPMARKER (((uint32_t)SLT__Reserved << 24) | 0x575757) /* "WWW" */
/*
* The identifiers in shmlogtag are "SLT_" + XML tag. A script may be run
* on this file to extract the table rather than handcode it
*/
enum VSL_tag_e {
SLT_Bogus = 0,
SLT__Bogus = 0,
#define SLTM(foo,sdesc,ldesc) SLT_##foo,
#include "tbl/vsl_tags.h"
#undef SLTM
SLT_Reserved = 255
SLT__Reserved = 255
};
#endif /* VAPI_VSL_FMT_H_INCLUDED */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment