Add support for VLAN 802.1q tagging/filtering#120
Open
danielinux wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_VLANgated). - Add VLAN-aware TX/RX handling in
wolfIP_ll_send_frame()andwolfIP_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.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #120
Scan targets checked: wolfip-bugs, wolfip-src
No new issues found in the changed files. ✅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.