Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
policer: use ip dscp
[vpp.git]
/
src
/
vat
/
api_format.c
diff --git
a/src/vat/api_format.c
b/src/vat/api_format.c
index
cf9c774
..
649737b
100644
(file)
--- a/
src/vat/api_format.c
+++ b/
src/vat/api_format.c
@@
-530,11
+530,10
@@
unformat_dscp (unformat_input_t * input, va_list * va)
u8 *r = va_arg (*va, u8 *);
if (0);
u8 *r = va_arg (*va, u8 *);
if (0);
-#define _(v,
f,str) else if (unformat (input, str)) *r = VNET
_DSCP_##f;
- foreach_
vnet
_dscp
+#define _(v,
f) else if (unformat (input, #f)) *r = IP
_DSCP_##f;
+ foreach_
ip
_dscp
#undef _
#undef _
- else
- return 0;
+ else return 0;
return 1;
}
return 1;
}
@@
-2751,14
+2750,14
@@
format_dscp (u8 * s, va_list * va)
switch (i)
{
switch (i)
{
-#define _(v,f,str) case VNET_DSCP_##f: t = str; break;
- foreach_vnet_dscp
+#define _(v, f) \
+ case IP_DSCP_##f: \
+ return (format (s, "%s", #f));
+ foreach_ip_dscp
#undef _
#undef _
- default:
- return format (s, "ILLEGAL");
}
s = format (s, "%s", t);
}
s = format (s, "%s", t);
- return
s
;
+ return
(format (s, "ILLEGAL"))
;
}
static void
}
static void