Skip to content

Commit

Permalink
Handle FatFlow configuration absence in requests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anandhk-juniper committed Nov 30, 2015
1 parent 9d275b8 commit 9b547da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion dp-core/vr_interface.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/vr_interface.h
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions utils/vif.c
Expand Up @@ -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(", ");
}
Expand Down

0 comments on commit 9b547da

Please sign in to comment.