From 37e0f8e45abc6fd66543b3792b49bbb06e8a65d2 Mon Sep 17 00:00:00 2001 From: fruffy Date: Tue, 12 Sep 2023 10:22:08 -0400 Subject: [PATCH] Do not use equ for mandating a minimum size. --- .../p4tools/modules/testgen/core/small_step/cmd_stepper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/p4tools/modules/testgen/core/small_step/cmd_stepper.cpp b/backends/p4tools/modules/testgen/core/small_step/cmd_stepper.cpp index 012addb430c..c8a36ce4daf 100644 --- a/backends/p4tools/modules/testgen/core/small_step/cmd_stepper.cpp +++ b/backends/p4tools/modules/testgen/core/small_step/cmd_stepper.cpp @@ -318,11 +318,11 @@ bool CmdStepper::preorder(const IR::P4Program * /*program*/) { } } - // If this option is active, mandate that all packets conform to a fixed size. + // If this option is active, mandate that all packets must be larger than a minimum size. auto pktSize = TestgenOptions::get().minPktSize; if (pktSize != 0) { const auto *fixedSizeEqu = - new IR::Equ(ExecutionState::getInputPacketSizeVar(), + new IR::Geq(ExecutionState::getInputPacketSizeVar(), IR::getConstant(&PacketVars::PACKET_SIZE_VAR_TYPE, pktSize)); if (cond == std::nullopt) { cond = fixedSizeEqu;