From 75cbc211fb4b2b712d2bb2081e7c8034a15e5697 Mon Sep 17 00:00:00 2001 From: r12f Date: Wed, 2 Oct 2024 21:02:45 -0700 Subject: [PATCH] Fix dpdk build. --- dash-pipeline/bmv2/stages/tunnel_stage.p4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dash-pipeline/bmv2/stages/tunnel_stage.p4 b/dash-pipeline/bmv2/stages/tunnel_stage.p4 index 6b383d780..4bde1a900 100644 --- a/dash-pipeline/bmv2/stages/tunnel_stage.p4 +++ b/dash-pipeline/bmv2/stages/tunnel_stage.p4 @@ -107,6 +107,7 @@ control tunnel_stage( // If max member size is greater than 1, the tunnel is programmed with multiple members. if (meta.dash_tunnel_max_member_size > 1) { +#if defined(TARGET_BMV2_V1MODEL) // Select tunnel member based on the hash of the packet tuples. hash(meta.dash_tunnel_member_index, HashAlgorithm.crc32, (bit<32>)0, { meta.dst_ip_addr, @@ -114,6 +115,9 @@ control tunnel_stage( meta.src_l4_port, meta.dst_l4_port }, meta.dash_tunnel_max_member_size); +#else + meta.dash_tunnel_member_index = 0; +#endif tunnel_member_select.apply(); tunnel_member.apply();