{"id":50335167,"url":"https://github.com/albrechtl/linux-dsa-list","last_synced_at":"2026-05-29T13:01:19.685Z","repository":{"id":353838651,"uuid":"1220622642","full_name":"AlbrechtL/linux-dsa-list","owner":"AlbrechtL","description":" A toolset for getting an overview of Linux DSA support","archived":false,"fork":false,"pushed_at":"2026-04-27T06:51:27.000Z","size":481,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T00:11:11.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlbrechtL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T05:40:27.000Z","updated_at":"2026-05-08T06:16:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AlbrechtL/linux-dsa-list","commit_stats":null,"previous_names":["albrechtl/linux-dsa-list"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlbrechtL/linux-dsa-list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbrechtL%2Flinux-dsa-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbrechtL%2Flinux-dsa-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbrechtL%2Flinux-dsa-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbrechtL%2Flinux-dsa-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlbrechtL","download_url":"https://codeload.github.com/AlbrechtL/linux-dsa-list/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbrechtL%2Flinux-dsa-list/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33652986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T13:01:18.709Z","updated_at":"2026-05-29T13:01:19.676Z","avatar_url":"https://github.com/AlbrechtL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linux-dsa-list\n\nThis repository provides a toolset for getting an overview of Linux DSA\nsupport: which DSA features are implemented by each driver, and which chips are\nhandled by those drivers. It includes the parser scripts used to build the\ndatasets, the generated versioned CSV reports, and a static browser viewer for\nexploring Linux and OpenWrt DSA support.\n\nHosted viewer: https://linux-dsa-list.albrechtloh.de/\n\n![Linux DSA List Web Page](screenshots/screenshot-web-page.png)\n\nThe feature-matrix generator builds the driver-feature overview by parsing:\n\n- `linux/include/net/dsa.h` for `struct dsa_switch_ops` feature definitions\n- `linux/drivers/net/dsa/**/*.c` for driver `dsa_switch_ops` initializers\n\nOptionally, include OpenWrt kernel patch-based DSA drivers and mark them with\nan `openwrt:` prefix in the matrix.\n\nMicrochip BSP tags from `microchip-ung/linux` are processed as full Linux\nkernel trees and generated into dedicated versioned files with a\n`microchip-ung` source label in the filename.\n\nThe generator marks a feature as supported (`x`) when a driver initializes the\ncorresponding callback in its `struct dsa_switch_ops` initializer.\n\nThe repository also includes a second generator that consumes the transposed\nfeature matrix and writes one chip-list row per driver, so the resulting data\nshows both driver capabilities and driver-to-chip coverage.\n\n## Generator\n\nScript:\n\n- `scripts/generate_dsa_feature_matrix.py`\n- `scripts/generate_dsa_driver_chip_list.py`\n\nThe script uses Python standard-library parsing only (no shell commands invoked\ninside the Python code).\n\n## Usage\n\nCreate and use a virtual environment in the repository root:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nFrom repository root:\n\n```bash\npython scripts/generate_dsa_feature_matrix.py \\\n\t--linux-root linux \\\n\t--out dsa_feature_matrix.csv \\\n\t--column-mode relative\n```\n\n### Default output (drivers as rows)\n\n```bash\npython scripts/generate_dsa_feature_matrix.py \\\n\t--linux-root linux \\\n\t--out dsa_feature_matrix.csv \\\n\t--column-mode relative\n```\n\n### Include OpenWrt-patched and OpenWrt-only DSA drivers\n\n```bash\npython scripts/generate_dsa_feature_matrix.py \\\n\t--linux-root linux \\\n\t--include-openwrt \\\n\t--openwrt-root openwrt \\\n\t--out dsa_feature_matrix_openwrt.csv \\\n\t--column-mode relative\n```\n\n### Generate a chip-list CSV per driver\n\nThe chip-list generator expects a transposed input CSV whose first column is\n`driver`, like `dsa_feature_matrix.csv` in this repository.\n\n```bash\npython scripts/generate_dsa_driver_chip_list.py \\\n\t--input-csv dsa_feature_matrix.csv \\\n\t--linux-root linux \\\n\t--openwrt-root openwrt \\\n\t--out dsa_driver_chip_list.csv\n```\n\nIt resolves each driver row back to Linux or OpenWrt source files and extracts\nchip names from chip tables, device-tree match tables, bus-specific device IDs,\nand chip-ID macros. The output schema is:\n\n```text\ndriver,chips\n```\n\nThe `chips` field is a single CSV cell containing a delimiter-separated list of\nchip names.\n\n### Generate per-version matrix and chip-list files (6.8 to 7.0)\n\nUse the wrapper script to download Linux source archives, generate one feature\nmatrix CSV and one driver chip-list CSV per minor line from 6.8 through 7.0,\nand clean up extracted source trees.\n\n```bash\nscripts/generate_dsa_versioned_reports.sh\n```\n\nBy default, generated files are written to:\n\n```text\ndata/dsa_feature_matrix_linux_\u003cversion\u003e.csv\ndata/dsa_driver_chip_list_linux_\u003cversion\u003e.csv\n```\n\nFor Microchip BSP tag mode, generated files are written to:\n\n```text\ndata/dsa_feature_matrix_microchip-ung_\u003ctag\u003e.csv\ndata/dsa_driver_chip_list_microchip-ung_\u003ctag\u003e.csv\n```\n\nExamples:\n\n```bash\n# Generate drivers-as-rows matrix output for each version\nscripts/generate_dsa_versioned_reports.sh --output-dir ./data\n\n# Process only a specific kernel version\nscripts/generate_dsa_versioned_reports.sh --version 6.8 --output-dir ./data\n\n# Process versions from 6.10 through 6.15\nscripts/generate_dsa_versioned_reports.sh --from 6.10 --to 6.15 --output-dir ./data\n\n# Keep output in a custom directory\nscripts/generate_dsa_versioned_reports.sh --output-dir ./data\n\n# Delete downloaded archives after each run\nscripts/generate_dsa_versioned_reports.sh --no-cache --output-dir ./data\n\n# Pass unresolved-row warnings to chip-list generation\nscripts/generate_dsa_versioned_reports.sh --warn-unresolved-chips --output-dir ./data\n```\n\n### Generate per-release-line files for OpenWrt stable versions (23.05 to latest)\n\nUse the same wrapper script in OpenWrt release mode. It discovers stable\nOpenWrt release lines from the official releases index, downloads the matching\n`openwrt-\u003crelease_line\u003e` source branch, detects its kernel line, and generates\ncombined Linux+OpenWrt reports.\n\n```bash\n# Process OpenWrt stable release lines from 23.05 to latest stable\nscripts/generate_dsa_versioned_reports.sh \\\n\t--openwrt-releases \\\n\t--openwrt-from 23.05 \\\n\t--openwrt-to latest \\\n\t--output-dir ./data\n\n# Process only one OpenWrt release line\nscripts/generate_dsa_versioned_reports.sh \\\n\t--openwrt-releases \\\n\t--openwrt-from 23.05 \\\n\t--openwrt-to 23.05 \\\n\t--output-dir ./data\n\n# Include unresolved-chip warnings in OpenWrt mode\nscripts/generate_dsa_versioned_reports.sh \\\n\t--openwrt-releases \\\n\t--openwrt-from 23.05 \\\n\t--openwrt-to latest \\\n\t--warn-unresolved-chips \\\n\t--output-dir ./data\n```\n\n### Generate per-tag files for Microchip BSP releases (bsp-6.6-2024.12 to latest)\n\nUse `--microchip-releases` to download and process tags from\n`microchip-ung/linux`. These archives are full Linux kernel trees, so the\nLinux parser path is used directly.\n\n```bash\n# Process Microchip BSP tags from bsp-6.6-2024.12 to latest\nscripts/generate_dsa_versioned_reports.sh \\\n\t--microchip-releases \\\n\t--output-dir ./data\n\n# Process an explicit Microchip BSP tag range\nscripts/generate_dsa_versioned_reports.sh \\\n\t--microchip-releases \\\n\t--microchip-from bsp-6.6-2024.12 \\\n\t--microchip-to bsp-6.18-2026.03 \\\n\t--output-dir ./data\n\n# Process exactly one Microchip BSP tag\nscripts/generate_dsa_versioned_reports.sh \\\n\t--microchip-releases \\\n\t--microchip-from bsp-6.12-2025.12 \\\n\t--microchip-to bsp-6.12-2025.12 \\\n\t--output-dir ./data\n```\n\n### Generate reports for OpenWrt main (unstable/snapshot) branch\n\nUse `--openwrt-snapshot` to download and process the `main` branch of the\nOpenWrt repository. Outputs are written with the `snapshot` suffix.\n\n```bash\n# Process OpenWrt main branch (drivers as rows)\nscripts/generate_dsa_versioned_reports.sh \\\n\t--openwrt-snapshot \\\n\t--output-dir ./data\n\n# Delete the downloaded snapshot archive after the run (always fresh on next run)\nscripts/generate_dsa_versioned_reports.sh \\\n\t--openwrt-snapshot \\\n\t--no-cache \\\n\t--output-dir ./data\n```\n\n## Browser Viewer\n\nThe repository includes a static browser-only viewer at `web/index.html`.\nIt loads both CSV files in the browser and renders a filterable driver-feature\nmatrix with an additional chips column.\n\n### What it does\n\n- consumes `dsa_feature_matrix.csv` (drivers as rows)\n- consumes `dsa_driver_chip_list.csv` (chips per driver)\n- joins both by the `driver` column\n- supports feature filters (multi-select, match all selected features)\n- keeps all data processing in client-side JavaScript (no backend)\n\n### Run locally\n\nFrom repository root:\n\n```bash\npython -m http.server 8000\n```\n\nThen open:\n\n- `http://localhost:8000/web/`\n\nThe viewer first tries to load CSV files from repository root:\n\n- `../dsa_feature_matrix.csv`\n- `../dsa_driver_chip_list.csv`\n\nFor versioned datasets, the viewer reads `data/datasets.json` first and only\nfalls back to HTML directory listing when no manifest is present. This avoids\nweb-server-specific directory index requirements such as nginx `autoindex on`.\n\n### Update workflow\n\n1. Regenerate or replace `dsa_feature_matrix.csv`.\n2. Regenerate or replace `dsa_driver_chip_list.csv`.\n3. Regenerate `data/datasets.json` if you changed versioned files manually:\n\n```bash\npython scripts/generate_web_dataset_manifest.py --data-dir ./data\n```\n\n4. Refresh the browser page.\n\nNo HTML/JavaScript code changes are required if the CSV schema remains:\n\n- feature matrix header starts with `driver`\n- chip list header is `driver,chips`\n- support cells are `x` (supported) or empty\n\n## Arguments\n\n- `--linux-root`: path to Linux source tree root (default: `./linux`)\n- `--out`: output CSV path (default: `./dsa_feature_matrix.csv`)\n- `--column-mode`: naming scheme for driver columns\n\t- `relative`: `drivers/net/dsa/...` path\n\t- `basename`: filename only\n\t- `ops-symbol`: `relative_path:ops_symbol`\n- `--warn-unknown-designators`: report initializer designators not found in\n\t`struct dsa_switch_ops`\n- `--include-openwrt`: include OpenWrt DSA drivers parsed from OpenWrt kernel\n\tpatches under `target/linux`\n- `--openwrt-root`: path to OpenWrt source tree root (default: `./openwrt`)\n- `--openwrt-exclude-do-not-submit`: exclude patch files containing\n\t`DO-NOT-SUBMIT` in filename\n\nChip-list generator arguments:\n\n- `--input-csv`: transposed driver-first feature matrix to consume\n- `--linux-root`: path to Linux source tree root (default: `./linux`)\n- `--openwrt-root`: path to OpenWrt source tree root (default: `./openwrt`)\n- `--out`: output CSV path (default: `./dsa_driver_chip_list.csv`)\n- `--chip-delimiter`: delimiter used inside the `chips` field\n- `--warn-unresolved`: print warnings for unresolved or ambiguous rows\n\nVersioned wrapper script arguments:\n\n- `--version`: process only one Linux kernel version\n- `--from`: Linux start version (e.g. `6.8`)\n- `--to`: Linux end version (e.g. `7.0`)\n- `--openwrt-releases`: switch to OpenWrt stable release-line mode\n- `--openwrt-from`: OpenWrt start release line (default: `23.05`)\n- `--openwrt-to`: OpenWrt end release line or `latest` (default: `latest`)\n- `--openwrt-snapshot`: process the OpenWrt `main` (unstable) branch\n- `--microchip-releases`: switch to Microchip BSP tag mode\n- `--microchip-from`: Microchip BSP start tag (default: `bsp-6.6-2024.12`)\n- `--microchip-to`: Microchip BSP end tag or `latest` (default: `latest`)\n- `--output-dir`: output directory for generated CSV files (default: `./data`)\n- `--cache-dir`: archive cache directory (default: `./.cache/kernel-archives`)\n- `--no-cache`: delete downloaded archives after each successful run\n- `--stop-on-error`: stop immediately after the first failed version\n- `--warn-unresolved-chips`: pass unresolved warnings to chip-list generation\n- `--chip-delimiter`: delimiter used inside the chip list cell\n\n## Disclaimer\n\nThis code was generated with AI assistance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbrechtl%2Flinux-dsa-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbrechtl%2Flinux-dsa-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbrechtl%2Flinux-dsa-list/lists"}