From bugzilla at dpdk.org Thu Jun 4 01:10:42 2026 From: bugzilla at dpdk.org (bugzilla at dpdk.org) Date: Wed, 03 Jun 2026 23:10:42 +0000 Subject: [DTS/framework Bug 1951] doc build causes scapy to access network Message-ID: http://bugs.dpdk.org/show_bug.cgi?id=1951 Bug ID: 1951 Summary: doc build causes scapy to access network Product: DTS Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: framework Assignee: dts at dpdk.org Reporter: stephen at networkplumber.org Target Milestone: --- Saw this warning when build docs: WARNING: MAC address to reach destination not found. Using broadcast. A little AI analysis turned up: doc: DTS API doc build imports live Scapy, leaking runtime warning and reading host network state Description (paste into the comment field): Building the documentation prints a Scapy runtime warning: WARNING: Mac address to reach destination not found. Using broadcast. The message does not come from meson, ninja, or the C compiler. The DTS API docs are generated by Sphinx autodoc, which imports the DTS framework to harvest docstrings; the framework imports scapy.all. Importing Scapy triggers next-hop resolution against the host routing table (ARP/ND, falling back to broadcast), which emits the warning. doc/api/dts/conf.py sets autodoc_mock_imports to only the missing runtime dependencies, via get_missing_imports(). That mocking was added so DPDK docs could be built without DTS dependencies installed -- not to isolate import side effects. As a result, when Scapy is installed on the build host it is not mocked, the real module is imported by autodoc, and its runtime side effects leak into the doc build. The output is therefore environment-dependent: silent on a host without Scapy (mocked), noisy on a host with Scapy (real import). Steps to reproduce: Install DTS runtime deps (Scapy) on the build host. meson setup -Denable_docs=true build ninja -C build doc Actual result: Scapy runtime warning printed during the doc build. The build is non-hermetic -- it reads live host routing state during docstring extraction. Expected result: Doc generation must not import or execute runtime network code, and output must not depend on which optional runtime deps happen to be installed. Suggested fix: Mock the DTS runtime dependencies unconditionally in doc/api/dts/conf.py (force scapy, and ideally the full runtime-deps set, into autodoc_mock_imports regardless of what is installed). autodoc only needs the modules importable for docstring extraction, never their runtime behavior. Knocking down the Scapy logger level would hide the message but would not fix the underlying non-hermetic import. Fields: Product: DPDK Component: doc Version: (set to the release where you reproduced it, e.g. 25.11 / main) Severity: minor Claude is AI and can make mistakes. Pl -- You are receiving this mail because: You are the assignee for the bug.