aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/error.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-07 19:12:38 -0700
committerDave Barach <openvpp@barachs.net>2019-08-09 11:50:04 +0000
commita678974cc52ac61dd6094c3f6649f9e3202be1cb (patch)
tree71d83607448a2668c9fb4fa6b7d624b717ff85f3 /src/plugins/quic/error.c
parentd09236d17d86a5d50166b2017f8f30a560c6e1b8 (diff)
session: allow closed transports to send
Type:fix Transports like tcp may notify session layer of a close but they may defer the connection's deletion (e.g., tcp time-wait). During that time, transports may still want to send packets. So, unless the session has no transport (transport-deleted state), allow the transport to send. Change-Id: I3ae335c7b951ff64be8529a5e3f3ad790feddc84 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/plugins/quic/error.c')
0 files changed, 0 insertions, 0 deletions
ame.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
from trex_stl_lib.api import *

# Tunable example 
#
#trex>profile -f stl/udp_for_benchmarks.py
#
#Profile Information:
#
#
#General Information:
#Filename:         stl/udp_for_benchmarks.py
#Stream count:          1      
#
#Specific Information:
#Type:             Python Module
#Tunables:         ['stream_count = 1', 'direction = 0', 'packet_len = 64']
#
#trex>start -f stl/udp_for_benchmarks.py -t  packet_len=128 --port 0
#

class STLS1(object):
    '''
    Generalization of udp_1pkt_simple, can specify number of streams and packet length
    '''
    def create_stream (self, packet_len, stream_count):
        base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
        base_pkt_len = len(base_pkt)
        base_pkt /= 'x' * max(0, packet_len - base_pkt_len)
        packets = []
        for i in range(stream_count):
            packets.append(STLStream(
                packet = STLPktBuilder(pkt = base_pkt),
                mode = STLTXCont()
                ))
        return packets

    def get_streams (self, direction = 0, packet_len = 64, stream_count = 1, **kwargs):
        # create 1 stream 
        return self.create_stream(packet_len - 4, stream_count)


# dynamic load - used for trex console or simulator
def register():
    return STLS1()