X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=GPL%2Ftraffic_profiles%2Ftrex%2Ftrex-astf-ethip4udp-65536h.py;h=327cc36e015aa44f428c5f167f49c25e9bd0c664;hb=ad98ea70cf435d104b6a4f0090575e137660da77;hp=9aba56a3e4a772ab45e55028df24d1fca4795467;hpb=023fa41e51c966a1956bda6b915ffd894ff10e84;p=csit.git diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py index 9aba56a3e4..327cc36e01 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py @@ -1,9 +1,19 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: +# Copyright (c) 2021 Cisco and/or its affiliates. +# +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later +# +# Licensed under the Apache License 2.0 or +# GNU General Public License v2.0 or later; you may not use this file +# except in compliance with one of these Licenses. You +# may obtain a copy of the Licenses at: # # http://www.apache.org/licenses/LICENSE-2.0 +# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html +# +# Note: If this file is linked with Scapy, which is GPLv2+, your use of it +# must be under GPLv2+. If at any point in the future it is no longer linked +# with Scapy (or other GPLv2+ licensed software), you are free to choose +# Apache 2. # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -57,8 +67,7 @@ class TrafficProfile(TrafficProfileBaseClass): # Headers length self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp - # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) + # No need to set keepalive, both programs end just after start&send. def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -74,19 +83,18 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) - # receive RES message - prog_c.recv_msg(1) + # No need to process the response, seeing L2 counter is enough. + # Client program can end here. # server commands prog_s = ASTFProgram(stream=False) - prog_c.set_keepalive_msg(self.udp_keepalive) - # receive REQ message - prog_s.recv_msg(1) + # When server instance is created means REQ is visible in L2 counter. + # No need to receive explicitly? # send RES message prog_s.send_msg(self.udp_res) + # Server program can end here. # ip generators ip_gen_c = ASTFIPGenDist(