Skip to content

Commit

Permalink
Add flow gen id info to agent header
Browse files Browse the repository at this point in the history
Adding flow gen id info to agent header for vrouter
agent to identify the latest transistion

Partial-Bug: 1554423
Change-Id: I0c0d0ca5b5a5ee2edd1ed5c7a45852cbfd7663b2
(cherry picked from commit b81f978)
  • Loading branch information
Prabhjot Singh Sethi committed Mar 18, 2016
1 parent dcc9184 commit 712de81
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dp-core/vr_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,8 @@ vr_trap_flow(struct vrouter *router, struct vr_flow_entry *fe,
ta.vfta_stats = fe->fe_stats;
}

ta.vfta_gen_id = fe->fe_gen_id;

break;
}

Expand Down
1 change: 1 addition & 0 deletions dp-core/vr_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ agent_send(struct vr_interface *vif, struct vr_packet *pkt,
hdr->hdr_cmd_param_3 = htonl(fta->vfta_stats.flow_packets);
hdr->hdr_cmd_param_4 = htonl((fta->vfta_stats.flow_bytes_oflow |
(fta->vfta_stats.flow_packets_oflow << 16)));
hdr->hdr_cmd_param_5 = fta->vfta_gen_id;
}
break;

Expand Down
2 changes: 2 additions & 0 deletions include/vr_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ struct agent_hdr {
unsigned int hdr_cmd_param_2;
unsigned int hdr_cmd_param_3;
unsigned int hdr_cmd_param_4;
uint8_t hdr_cmd_param_5;
uint8_t hdr_cmd_param_5_pack[3];
} __attribute__((packed));

#define CMD_PARAM_PACKET_CTRL 0x1
Expand Down
1 change: 1 addition & 0 deletions include/vr_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct vr_flow_trap_arg {
unsigned int vfta_index;
unsigned int vfta_nh_index;
struct vr_flow_stats vfta_stats;
uint8_t vfta_gen_id;
};

typedef enum {
Expand Down

0 comments on commit 712de81

Please sign in to comment.