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 Dec 15, 2015
1 parent 542d299 commit c8bffc8
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 @@ -2566,7 +2566,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 @@ -213,7 +213,7 @@ struct vr_interface {
unsigned char *(*vif_set_rewrite)(struct vr_interface *, struct vr_packet *,
struct vr_forwarding_md *, unsigned char *, unsigned short);
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 @@ -490,8 +490,8 @@ list_get_print(vr_interface_req *req)
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 c8bffc8

Please sign in to comment.