Lines Matching +full:4 +full:- +full:wire
2 # SPDX-License-Identifier: GPL-2.0
21 one = b'\0' * 4
40 listen_cmd = f"socat -{ipver} -t 2 -u TCP-LISTEN:{port},reuseport /dev/null,ignoreeof"
45 if ipver == "4":
56 # Send 4MB of data, record the LSO packet count.
58 buf = b"0" * 1024 * 1024 * 4
71 ksft_lt(tcp_sock_get_retrans(sock), total_lso_wire / 4)
76 ksft_ge(qstat_new['tx-hw-gso-packets'] -
77 qstat_old['tx-hw-gso-packets'],
79 comment="Number of LSO super-packets with LSO enabled")
81 ksft_ge(qstat_new['tx-hw-gso-wire-packets'] -
82 qstat_old['tx-hw-gso-wire-packets'],
84 comment="Number of LSO wire-packets with LSO enabled")
87 ksft_lt(qstat_new['tx-hw-gso-packets'] -
88 qstat_old['tx-hw-gso-packets'],
89 15, comment="Number of LSO super-packets with LSO disabled")
91 ksft_lt(qstat_new['tx-hw-gso-wire-packets'] -
92 qstat_old['tx-hw-gso-wire-packets'],
93 500, comment="Number of LSO wire-packets with LSO disabled")
107 ip(f"link add {tun_type}-ksft type {tun_type} {tun_arg} local {local_addr} remote {remote_addr} dev {cfg.ifname}")
108 defer(ip, f"link del {tun_type}-ksft")
109 ip(f"link set dev {tun_type}-ksft up")
110 ip(f"addr add {local_v4}/24 dev {tun_type}-ksft")
111 ip(f"addr add {local_v6}/64 dev {tun_type}-ksft")
113 ip(f"link add {tun_type}-ksft type {tun_type} {tun_arg} local {remote_addr} remote {local_addr} dev {cfg.remote_ifname}",
115 defer(ip, f"link del {tun_type}-ksft", host=cfg.remote)
116 ip(f"link set dev {tun_type}-ksft up", host=cfg.remote)
117 ip(f"addr add {remote_v4}/24 dev {tun_type}-ksft", host=cfg.remote)
118 ip(f"addr add {remote_v6}/64 dev {tun_type}-ksft", host=cfg.remote)
129 ethtool(f"-K {cfg.ifname} {features_cmd}")
152 remote_v4 = cfg.remote_addr_v["4"]
156 ethtool(f"-K {cfg.ifname} {feature} off")
159 ethtool(f"-K {cfg.ifname} tx-gso-partial off")
160 ethtool(f"-K {cfg.ifname} tx-tcp-mangleid-segmentation off")
162 ethtool(f"-K {cfg.ifname} tx-gso-partial on")
163 if ipver == "4":
165 ethtool(f"-K {cfg.ifname} tx-tcp-mangleid-segmentation on")
168 ethtool(f"-K {cfg.ifname} {feature} on")
175 def query_nic_features(cfg) -> None:
180 features = cfg.ethnl.features_get({"header": {"dev-index": cfg.ifindex}})
194 ethtool(f"-K {cfg.ifname} {hw_all_features_cmd}")
201 if 'tx-gso-partial' in cfg.hw_features:
202 ethtool(f"-K {cfg.ifname} tx-gso-partial off")
205 features = cfg.ethnl.features_get({"header": {"dev-index": cfg.ifindex}})
208 cfg.partial_features = cfg.hw_features - no_partial
209 ethtool(f"-K {cfg.ifname} tx-gso-partial on")
215 if 'tx-hw-gso-packets' in stats[0]:
216 ksft_pr("Detected qstat for LSO super-packets")
218 if 'tx-hw-gso-wire-packets' in stats[0]:
219 ksft_pr("Detected qstat for LSO wire-packets")
223 def main() -> None:
232 ("", "4", "tx-tcp-segmentation", None),
233 ("", "6", "tx-tcp6-segmentation", None),
234 ("vxlan", "4", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 noudpcsum", ("4", "6"))),
235 ("vxlan", "6", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 udp6zerocsumtx udp6zerocsumrx", ("4", "6"))),
236 ("vxlan_csum", "", "tx-udp_tnl-csum-segmentation", ("vxlan", "id 100 dstport 4789 udpcsum", ("4", "6"))),
237 ("gre", "4", "tx-gre-segmentation", ("gre", "", ("4", "6"))),
238 ("gre", "6", "tx-gre-segmentation", ("ip6gre","", ("4", "6"))),
242 for outer_ipver in ["4", "6"]: