Lines Matching +full:- +full:2 +full:g

2 # SPDX-License-Identifier: GPL-2.0
12 output = ethtool(f"-g {cfg.ifname}", json=True)[0]
13 return (output['rx'], output['hds-thresh'])
17 output = ethtool(f"-l {cfg.ifname}").stdout
23 output = ethtool(f"-X {cfg.ifname} context new start {chan} equal 1").stdout
26 return (ctx_id, defer(ethtool, f"-X {cfg.ifname} delete context {ctx_id}"))
30 output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} action {chan}").stdout
36 output = ethtool(f"-N {cfg.ifname} flow-type tcp6 dst-port {port} context {ctx_id}").stdout
41 def test_zcrx(cfg) -> None:
45 if combined_chans < 2:
46 raise KsftSkipEx('at least 2 combined channels required')
50 ethtool(f"-G {cfg.ifname} tcp-data-split on")
51 defer(ethtool, f"-G {cfg.ifname} tcp-data-split auto")
53 ethtool(f"-G {cfg.ifname} hds-thresh 0")
54 defer(ethtool, f"-G {cfg.ifname} hds-thresh {hds_thresh}")
56 ethtool(f"-G {cfg.ifname} rx 64")
57 defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}")
59 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}")
60 defer(ethtool, f"-X {cfg.ifname} default")
62 flow_rule_id = _set_flow_rule(cfg, port, combined_chans - 1)
63 defer(ethtool, f"-N {cfg.ifname} delete {flow_rule_id}")
65 rx_cmd = f"{cfg.bin_local} -s -p {port} -i {cfg.ifname} -q {combined_chans - 1}"
66 tx_cmd = f"{cfg.bin_remote} -c -h {cfg.addr_v['6']} -p {port} -l 12840"
72 def test_zcrx_oneshot(cfg) -> None:
76 if combined_chans < 2:
77 raise KsftSkipEx('at least 2 combined channels required')
81 ethtool(f"-G {cfg.ifname} tcp-data-split on")
82 defer(ethtool, f"-G {cfg.ifname} tcp-data-split auto")
84 ethtool(f"-G {cfg.ifname} hds-thresh 0")
85 defer(ethtool, f"-G {cfg.ifname} hds-thresh {hds_thresh}")
87 ethtool(f"-G {cfg.ifname} rx 64")
88 defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}")
90 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}")
91 defer(ethtool, f"-X {cfg.ifname} default")
93 flow_rule_id = _set_flow_rule(cfg, port, combined_chans - 1)
94 defer(ethtool, f"-N {cfg.ifname} delete {flow_rule_id}")
96 rx_cmd = f"{cfg.bin_local} -s -p {port} -i {cfg.ifname} -q {combined_chans - 1} -o 4"
97 tx_cmd = f"{cfg.bin_remote} -c -h {cfg.addr_v['6']} -p {port} -l 4096 -z 16384"
103 def test_zcrx_rss(cfg) -> None:
107 if combined_chans < 2:
108 raise KsftSkipEx('at least 2 combined channels required')
112 ethtool(f"-G {cfg.ifname} tcp-data-split on")
113 defer(ethtool, f"-G {cfg.ifname} tcp-data-split auto")
115 ethtool(f"-G {cfg.ifname} hds-thresh 0")
116 defer(ethtool, f"-G {cfg.ifname} hds-thresh {hds_thresh}")
118 ethtool(f"-G {cfg.ifname} rx 64")
119 defer(ethtool, f"-G {cfg.ifname} rx {rx_ring}")
121 ethtool(f"-X {cfg.ifname} equal {combined_chans - 1}")
122 defer(ethtool, f"-X {cfg.ifname} default")
124 (ctx_id, delete_ctx) = _create_rss_ctx(cfg, combined_chans - 1)
126 defer(ethtool, f"-N {cfg.ifname} delete {flow_rule_id}")
128 rx_cmd = f"{cfg.bin_local} -s -p {port} -i {cfg.ifname} -q {combined_chans - 1}"
129 tx_cmd = f"{cfg.bin_remote} -c -h {cfg.addr_v['6']} -p {port} -l 12840"
135 def main() -> None:
137 cfg.bin_local = path.abspath(path.dirname(__file__) + "/../../../drivers/net/hw/iou-zcrx")