mirror of
https://github.com/openvswitch/ovs
synced 2025-10-27 15:18:06 +00:00
lib: Unify flags parsing and formatting.
Use the "+-" syntax more uniformly when printing masked flags, and use the syntax of delimited 1-flags also for formatting fully masked TCP flags. The "+-" syntax only deals with masked flags, but if there are many of those, the printout becomes long and confusing. Typically there are many flags only when flags are fully masked, but even then most of them are zeros, so it makes sense to print the flags that are set (ones) and omit the zero flags. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -62,6 +62,14 @@ enum slow_path_reason {
|
||||
#undef SPR
|
||||
};
|
||||
|
||||
/* Mask of all slow_path_reasons. */
|
||||
enum {
|
||||
SLOW_PATH_REASON_MASK = 0
|
||||
#define SPR(ENUM, STRING, EXPLANATION) | 1 << ENUM##_INDEX
|
||||
SLOW_PATH_REASONS
|
||||
#undef SPR
|
||||
};
|
||||
|
||||
const char *slow_path_reason_to_explanation(enum slow_path_reason);
|
||||
|
||||
#define ODPP_LOCAL ODP_PORT_C(OVSP_LOCAL)
|
||||
|
||||
Reference in New Issue
Block a user