Does trex has option to set TCP window scaling

111 views
Skip to first unread message

Rashi Krishna

unread,
Jul 28, 2022, 5:35:30 AM7/28/22
to TRex Traffic Generator
Hi All,

Does trex has option to set TCP window scaling? I checked the documentation for ASTF, I found tcp.initwnd, not sure if it is the same thing.

https://www.geeksforgeeks.org/what-is-tcp-window-scaling/

hanoh haim

unread,
Jul 28, 2022, 6:44:24 AM7/28/22
to Rashi Krishna, TRex Traffic Generator
Hi, 
You can set the CC and maximum window size, the TCP stack will handle the right value in tcp scaling 

Rashi Krishna

unread,
Aug 2, 2022, 7:00:11 AM8/2/22
to TRex Traffic Generator
Hi Hanoch,

Thanks for your reply!
Actually for our use case we want to manually set window scaling value.
Do you know how exactly the tcp stack calculates the window scaling based on the initial window value?
Then we can set the initial window to get the window scale we want.

Thanks !
Rashi

hanoh haim

unread,
Aug 3, 2022, 7:34:41 AM8/3/22
to Rashi Krishna, TRex Traffic Generator
Hi Rashi, 
You can set initwnd 

Thanks
Hanoh

Rashi Krishna

unread,
Aug 3, 2022, 9:25:24 AM8/3/22
to TRex Traffic Generator
Hey Hanoch,

Ok, so initwnd defines window scaling? When I tried doing pkt capture using trex-console, I saw the same value for window scaling, even for different tcp.initwnd value.

from trex.astf.api import *
import argparse

# IPV6 tunable example
#
# ipv6.src_msb
# ipv6.dst_msb
# ipv6.enable
#

class Prof1():
def __init__(self):
pass

def get_profile(self, tunables, **kwargs):
parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__file__)),
formatter_class=argparse.ArgumentDefaultsHelpFormatter)

args = parser.parse_args(tunables)

# ip generator
ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq")
ip_gen_s = ASTFIPGenDist(ip_range=["48.0.0.0", "48.0.255.255"], distribution="seq")
ip_gen = ASTFIPGen(glob=ASTFIPGenGlobal(ip_offset="1.0.0.0"),
dist_client=ip_gen_c,
dist_server=ip_gen_s)

c_glob_info = ASTFGlobalInfo()
c_glob_info.tcp.mss = 1400
c_glob_info.tcp.initwnd = 3
c_glob_info.tcp.wnd_scale = 4

s_glob_info = ASTFGlobalInfo()
s_glob_info.tcp.mss = 1100
s_glob_info.tcp.initwnd = 3
c_glob_info.tcp.wnd_scale = 4

return ASTFProfile(default_ip_gen=ip_gen,
# Defaults affects all files
default_c_glob_info=c_glob_info,
default_s_glob_info=s_glob_info,

cap_list=[
ASTFCapInfo(file="../avl/delay_10_http_browsing_0.pcap", cps=1)
]
)


def register():
return Prof1()



Thanks,
Rashi
wnd_scale_0.png

Justin

unread,
Aug 5, 2022, 7:41:53 AM8/5/22
to TRex Traffic Generator
Hi, it depends on size of socket receive buffer which can be set by tcp.rxbufsize.
please look into this source code to see how the scale value is identified.
Reply all
Reply to author
Forward
0 new messages