Lines Matching full:cfg

11 def _get_rx_ring_entries(cfg):  argument
12 output = ethtool(f"-g {cfg.ifname}", host=cfg.remote).stdout
17 def _get_combined_channels(cfg): argument
18 output = ethtool(f"-l {cfg.ifname}", host=cfg.remote).stdout
23 def _set_flow_rule(cfg, chan): argument
24 …output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port 9999 action {chan}", host=cfg.remote).s…
29 def test_zcrx(cfg) -> None: argument
30 cfg.require_ipver('6')
32 combined_chans = _get_combined_channels(cfg)
35 rx_ring = _get_rx_ring_entries(cfg)
38 ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)
39 ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote)
40 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote)
41 flow_rule_id = _set_flow_rule(cfg, combined_chans - 1)
43 rx_cmd = f"{cfg.bin_remote} -s -p 9999 -i {cfg.ifname} -q {combined_chans - 1}"
44 tx_cmd = f"{cfg.bin_local} -c -h {cfg.remote_addr_v['6']} -p 9999 -l 12840"
45 with bkg(rx_cmd, host=cfg.remote, exit_wait=True):
46 wait_port_listen(9999, proto="tcp", host=cfg.remote)
49 ethtool(f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote)
50 ethtool(f"-X {cfg.ifname} default", host=cfg.remote)
51 ethtool(f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote)
52 ethtool(f"-G {cfg.ifname} tcp-data-split auto", host=cfg.remote)
55 def test_zcrx_oneshot(cfg) -> None: argument
56 cfg.require_ipver('6')
58 combined_chans = _get_combined_channels(cfg)
61 rx_ring = _get_rx_ring_entries(cfg)
64 ethtool(f"-G {cfg.ifname} tcp-data-split on", host=cfg.remote)
65 ethtool(f"-G {cfg.ifname} rx 64", host=cfg.remote)
66 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}", host=cfg.remote)
67 flow_rule_id = _set_flow_rule(cfg, combined_chans - 1)
69 rx_cmd = f"{cfg.bin_remote} -s -p 9999 -i {cfg.ifname} -q {combined_chans - 1} -o 4"
70 tx_cmd = f"{cfg.bin_local} -c -h {cfg.remote_addr_v['6']} -p 9999 -l 4096 -z 16384"
71 with bkg(rx_cmd, host=cfg.remote, exit_wait=True):
72 wait_port_listen(9999, proto="tcp", host=cfg.remote)
75 ethtool(f"-N {cfg.ifname} delete {flow_rule_id}", host=cfg.remote)
76 ethtool(f"-X {cfg.ifname} default", host=cfg.remote)
77 ethtool(f"-G {cfg.ifname} rx {rx_ring}", host=cfg.remote)
78 ethtool(f"-G {cfg.ifname} tcp-data-split auto", host=cfg.remote)
82 with NetDrvEpEnv(__file__) as cfg:
83 cfg.bin_local = path.abspath(path.dirname(__file__) + "/../../../drivers/net/hw/iou-zcrx")
84 cfg.bin_remote = cfg.remote.deploy(cfg.bin_local)
86 ksft_run(globs=globals(), case_pfx={"test_"}, args=(cfg, ))