Skip to content

Commit 2cf4047

Browse files
committed
flow sync state is not in flow_data
1 parent 590d9fb commit 2cf4047

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dash-pipeline/bmv2/dash_headers.p4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ const bit<16> FLOW_KEY_HDR_SIZE=flow_key_t.minSizeInBytes();
236236
header flow_data_t {
237237
bit<7> reserved;
238238
bit<1> is_unidirectional;
239-
dash_flow_sync_state_t sync_state;
240239
dash_direction_t direction;
241240
bit<32> version;
242241
dash_flow_action_t actions;

dash-pipeline/bmv2/dash_metadata.p4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ struct metadata_t {
210210
#else
211211
flow_data_t flow_data;
212212
#endif // TARGET_DPDK_PNA
213+
dash_flow_sync_state_t flow_sync_state;
213214
flow_table_data_t flow_table;
214215
bit<16> bulk_get_session_id;
215216
bit<16> bulk_get_session_filter_id;

dash-pipeline/bmv2/dash_pipeline.p4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ control dash_ingress(
275275
ha_stage.apply(hdr, meta);
276276

277277
if (!meta.flow_enabled ||
278-
(meta.flow_data.sync_state == dash_flow_sync_state_t.FLOW_MISS &&
278+
(meta.flow_sync_state == dash_flow_sync_state_t.FLOW_MISS &&
279279
hdr.packet_meta.packet_source == dash_packet_source_t.EXTERNAL))
280280
{
281281
dash_match_stage.apply(hdr, meta);

dash-pipeline/bmv2/stages/conntrack_lookup.p4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ control conntrack_flow_created_handle(inout headers_t hdr, inout metadata_t meta
173173
control conntrack_flow_handle(inout headers_t hdr, inout metadata_t meta)
174174
{
175175
apply {
176-
switch (meta.flow_data.sync_state) {
176+
switch (meta.flow_sync_state) {
177177
dash_flow_sync_state_t.FLOW_MISS: {
178178
conntrack_flow_miss_handle.apply(hdr, meta);
179179
}
@@ -269,9 +269,9 @@ control conntrack_lookup_stage(inout headers_t hdr, inout metadata_t meta) {
269269
meta.flow_data.actions = dash_flow_action;
270270
meta.flow_data.meter_class = meter_class;
271271
meta.flow_data.is_unidirectional= is_unidirectional_flow;
272-
meta.flow_data.sync_state = dash_flow_sync_state;
273272

274273
/* Also set basic metadata */
274+
meta.flow_sync_state = dash_flow_sync_state;
275275
meta.direction = dash_direction;
276276
meta.routing_actions = dash_flow_action;
277277
meta.meter_class = meter_class;
@@ -304,7 +304,7 @@ control conntrack_lookup_stage(inout headers_t hdr, inout metadata_t meta) {
304304
}
305305

306306
action flow_miss() {
307-
meta.flow_data.sync_state = dash_flow_sync_state_t.FLOW_MISS;
307+
meta.flow_sync_state = dash_flow_sync_state_t.FLOW_MISS;
308308
}
309309

310310
@SaiTable[name = "flow", api = "dash_flow", order = 1, enable_bulk_get_api = "true", enable_bulk_get_server = "true"]

0 commit comments

Comments
 (0)