X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=GPL%2Ftraffic_profiles%2Ftrex%2Fprofile_trex_stateless_base_class.py;h=5cae6bfb7912f13837d50ec784b854deb3325901;hb=53e516bc0056d3905d5c9a430506f5fc3d3975c0;hp=a3736796eb9defd298504f77d69822e4ba14b6c9;hpb=79f5ba9bf7656972dd988508eff9465562dde42c;p=csit.git diff --git a/GPL/traffic_profiles/trex/profile_trex_stateless_base_class.py b/GPL/traffic_profiles/trex/profile_trex_stateless_base_class.py index a3736796eb..5cae6bfb79 100644 --- a/GPL/traffic_profiles/trex/profile_trex_stateless_base_class.py +++ b/GPL/traffic_profiles/trex/profile_trex_stateless_base_class.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, @@ -119,7 +129,6 @@ class TrafficStreamsBaseClass: # Frame size is defined as an integer, e.g. 64, 1518: if isinstance(self.framesize, int): - # Create a base packet and pad it to size payload_len = max(0, self.framesize - len(base_pkt_a) - 4) # No FCS @@ -213,5 +222,6 @@ class TrafficStreamsBaseClass: :rtype: list """ self.framesize = kwargs[u"framesize"] + self.rate = kwargs[u"rate"] return self.create_streams()