From: Paul Blakey <[email protected]> Don't print frag parsing error if mask is zero, instead just don't print it.
Signed-off-by: Paul Blakey <[email protected]> Reviewed-by: Roi Dayan <[email protected]> --- lib/odp-util.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 9d95d53..981c437 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2864,20 +2864,17 @@ odp_ct_state_to_string(uint32_t flag) static void format_frag(struct ds *ds, const char *name, uint8_t key, - const uint8_t *mask, bool verbose) + const uint8_t *mask, bool verbose OVS_UNUSED) { bool mask_empty = mask && !*mask; + bool mask_full = !mask || *mask == UINT8_MAX; /* ODP frag is an enumeration field; partial masks are not meaningful. */ - if (verbose || !mask_empty) { - bool mask_full = !mask || *mask == UINT8_MAX; - - if (!mask_full) { /* Partially masked. */ + if (!mask_empty && !mask_full) { ds_put_format(ds, "error: partial mask not supported for frag (%#" PRIx8"),", *mask); - } else { - ds_put_format(ds, "%s=%s,", name, ovs_frag_type_to_string(key)); - } + } else if (!mask_empty) { + ds_put_format(ds, "%s=%s,", name, ovs_frag_type_to_string(key)); } } -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
