From 9b547da068bdefacaafa8b310b895d295f736912 Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Mon, 30 Nov 2015 10:29:30 +0530 Subject: [PATCH] Handle FatFlow configuration absence in requests If FatFlow configuration is present in vif, but no configuration is present in the interface request, all the existing configuration in the interface should be removed. Change-Id: Ieb74ed5a3955773fd39d70727cd5f095ad266c0a Partial-BUG: 1518234 --- dp-core/vr_interface.c | 5 ++++- include/vr_interface.h | 2 +- utils/vif.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dp-core/vr_interface.c b/dp-core/vr_interface.c index 92cd70bbd..a94c0a623 100644 --- a/dp-core/vr_interface.c +++ b/dp-core/vr_interface.c @@ -2424,7 +2424,10 @@ vif_fat_flow_add(struct vr_interface *vif, vr_interface_req *req) bool add; if (!req->vifr_fat_flow_protocol_port_size) { - return 0; + if (!memcmp(vif->vif_fat_flow_config_size, old_fat_flow_config_sizes, + sizeof(old_fat_flow_config_sizes))) { + return 0; + } } else { if (!req->vifr_fat_flow_protocol_port) return -EINVAL; diff --git a/include/vr_interface.h b/include/vr_interface.h index 76ce651c1..60bda68ba 100644 --- a/include/vr_interface.h +++ b/include/vr_interface.h @@ -183,7 +183,7 @@ struct vr_interface { */ struct vr_vrf_assign *vif_vrf_table; uint8_t **vif_fat_flow_ports[VIF_FAT_FLOW_MAXPROTO_INDEX]; - /* + /* * one for tcp, another for udp, one for sctp and one for * everything else */ diff --git a/utils/vif.c b/utils/vif.c index 4ae42b7f1..074f37c51 100644 --- a/utils/vif.c +++ b/utils/vif.c @@ -347,8 +347,8 @@ vr_interface_req_process(void *s) printf("\n"); printed = 0; vr_interface_print_head_space(); - /* %12 corresponds to "ComboFlows: " */ - printed += printf("%12c", ' '); + /* %10 corresponds to "FatFlows: " */ + printed += printf("%10c", ' '); } else { printf(", "); }