Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define table size per scaling test #644

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dash-pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ sai-submodule:
# P4 Source code compile TARGETS
######################################

P4_SRC=$(wildcard bmv2/**/*.p4)
P4_SRC=$(wildcard bmv2/**/*.p4) $(wildcard bmv2/*.h)
P4_MAIN=bmv2/dash_pipeline.p4
P4_OUTDIR=bmv2/dash_pipeline.bmv2
P4_ARTIFACTS=$(P4_OUTDIR)/dash_pipeline.json $(P4_OUTDIR)/dash_pipeline_p4rt.txt
Expand Down
19 changes: 19 additions & 0 deletions dash-pipeline/bmv2/defines.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef _DASH_DEFINES_H_
#define _DASH_DEFINES_H_

#if defined(TABLE_HERO_SCALE)
#define TABLE_CA_TO_PA_SIZE (8 * 1024 * 1024)
#define TABLE_ROUTING_SIZE (4 * 1024 * 1024)

#elif defined(TABLE_BABY_HERO_SCALE)
#define TABLE_CA_TO_PA_SIZE (8 * 1024 * 10)
#define TABLE_ROUTING_SIZE (4 * 1024 * 10)

#else /* default/minimum size */
#define TABLE_CA_TO_PA_SIZE 1024
#define TABLE_ROUTING_SIZE 1024

#endif


#endif /* _DASH_DEFINES_H_ */
3 changes: 2 additions & 1 deletion dash-pipeline/bmv2/stages/outbound_mapping.p4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _DASH_STAGE_OUTBOUND_MAPPING_P4_

#include "../dash_routing_types.p4"
#include "../defines.h"

control outbound_mapping_stage(
inout headers_t hdr,
Expand All @@ -23,7 +24,7 @@ control outbound_mapping_stage(
set_private_link_mapping(hdr, meta);
@defaultonly drop(meta);
}
size = 8 * 1024 * 1024;
size = TABLE_CA_TO_PA_SIZE;
const default_action = drop(meta);

ATTACH_TABLE_COUNTER(ca_to_pa_counter)
Expand Down
3 changes: 2 additions & 1 deletion dash-pipeline/bmv2/stages/outbound_routing.p4
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _DASH_STAGE_OUTBOUND_ROUTING_P4_

#include "../dash_routing_types.p4"
#include "../defines.h"

control outbound_routing_stage(
inout headers_t hdr,
Expand Down Expand Up @@ -40,7 +41,7 @@ control outbound_routing_stage(
route_service_tunnel(hdr, meta);
drop(meta);
}
size = 4 * 1024 * 1024;
size = TABLE_ROUTING_SIZE;
const default_action = drop(meta);

ATTACH_TABLE_COUNTER(routing_counter)
Expand Down
Loading