Skip to content

Add support for VLAN 802.1q tagging/filtering#120

Open
danielinux wants to merge 3 commits into
wolfSSL:masterfrom
danielinux:802.1q
Open

Add support for VLAN 802.1q tagging/filtering#120
danielinux wants to merge 3 commits into
wolfSSL:masterfrom
danielinux:802.1q

Conversation

@danielinux
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 14, 2026 16:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds optional IEEE 802.1Q VLAN support to wolfIP by introducing VLAN “sub-interfaces” that sit on top of a physical Ethernet interface, inserting VLAN tags on transmit and stripping/matching tags on receive.

Changes:

  • Extend the link-layer device model and public API to create/delete/query VLAN sub-interfaces (WOLFIP_VLAN gated).
  • Add VLAN-aware TX/RX handling in wolfIP_ll_send_frame() and wolfIP_recv_on() (tag insertion, VID match + tag stripping).
  • Add a dedicated VLAN unit test suite and build/coverage targets, plus an STM32H563 integration path and CI job.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wolfip.h Adds VLAN fields to wolfIP_ll_dev and declares VLAN management APIs under #if WOLFIP_VLAN.
src/wolfip.c Implements VLAN create/delete/get APIs and adds VLAN tag insertion/stripping in TX/RX paths.
src/test/unit/unit.c Registers VLAN unit tests when WOLFIP_VLAN is enabled.
src/test/unit/unit_tests_vlan.c New unit test file covering VLAN API validation, TX tagging, RX dispatch/stripping, and MTU inheritance.
src/test/unit/unit_shared.c Increases WOLFIP_MAX_INTERFACES for unit tests when VLAN is enabled.
src/port/stm32h563/Makefile Adds build-time toggles for enabling VLAN and configuring VID/PCP/IP settings.
src/port/stm32h563/main.c Adds sample setup to create/configure a VLAN sub-interface when enabled.
src/port/stm32h563/config.h Adds VLAN compile-time configuration and capacity checks.
Makefile Adds unit-vlan and VLAN coverage targets; includes VLAN tests in unit test sources.
config.h Adds global VLAN compile-time configuration and capacity checks.
.github/workflows/stm32h563-m33mu.yml Adds a new VLAN integration test job for STM32H563 m33mu (TCP echo over VLAN).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wolfip.c Outdated
Comment thread src/wolfip.c
Comment thread .github/workflows/stm32h563-m33mu.yml
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #120

Scan targets checked: wolfip-bugs, wolfip-src

No new issues found in the changed files. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants