Lines Matching full:xdp
5 This file contains tests to verify native XDP support in network drivers.
7 directory, with each test focusing on a specific aspect of XDP functionality.
21 """Enum for XDP configuration options."""
29 """Enum for XDP actions."""
38 """Enum for XDP statistics."""
51 xdp_sec: str = "xdp" # XDP section name (e.g., "xdp" or "xdp.frags")
99 Loads an XDP program onto a network interface.
106 dict: A dictionary containing the XDP program ID, name, and associated map IDs.
115 f"ip link set dev {cfg.ifname} mtu {bpf_info.mtu} xdp obj {abs_path} sec {bpf_info.xdp_sec}",
118 defer(ip, f"link set dev {cfg.ifname} mtu 1500 xdp off")
121 prog_info["id"] = xdp_info["xdp"]["prog"]["id"]
122 prog_info["name"] = xdp_info["xdp"]["prog"]["name"]
150 Updates an XDP map with a given key-value pair using bpftool.
153 map_name: The name of the XDP map to update.
166 Retrieves and formats statistics from an XDP map.
169 xdp_map_id: The ID of the XDP map from which to retrieve statistics.
172 A dictionary containing formatted packet statistics for various XDP actions.
229 bpf_info = BPFProgInfo("xdp_prog", "xdp_native.bpf.o", "xdp", 1500)
241 bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o", "xdp.frags", 9000)
276 bpf_info = BPFProgInfo("xdp_prog", "xdp_native.bpf.o", "xdp", 1500)
288 bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o", "xdp.frags", 9000)
302 bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o", "xdp.frags", 9000)
364 stats: A dictionary containing formatted packet statistics for various XDP actions.
389 Tests the XDP tail adjustment functionality.
391 This function loads the appropriate XDP program based on the provided
392 program name and configures the XDP map for tail adjustment. It then
398 prog: Name of the XDP program to load.
406 bpf_info = BPFProgInfo("xdp_prog_frags", "xdp_native.bpf.o", "xdp.frags", 9000)
410 # Configure the XDP map for tail adjustment
455 Tests the XDP tail adjustment by growing packet data.
473 Tests the XDP tail adjustment by shrinking packet data.
517 Tests the XDP head adjustment action for a multi-buffer case.
528 prog_info = _load_xdp_prog(cfg, BPFProgInfo(prog, "xdp_native.bpf.o", "xdp.frags", 9000))
590 Tests the XDP headroom growth support.
611 Tests the XDP headroom shrinking support.
632 Main function to execute the XDP tests.
634 This function runs a series of tests to validate the XDP support for