TEST-VLAN-001: VLAN Tagging and Filtering Verification
🔗 Traceability
📋 Test Objective
Validate IEEE 802.1Q VLAN tagging, filtering, and PCP mapping for AVB stream isolation and QoS enforcement.
Scope: VLAN tag insertion (TPID 0x8100, VID, PCP, DEI), VLAN filtering (accept registered/drop unregistered), PCP→TC mapping, double tagging (802.1ad QinQ), VLAN membership, AVB stream isolation.
Success Criteria: ✅ VLAN tags 100% accurate | ✅ VLAN filtering 100% | ✅ PCP→TC mapping correct (0-7) | ✅ QinQ support | ✅ Zero VLAN leakage
🧪 Test Coverage (15 Tests)
10 Unit Tests
UT-VLAN-001: Tag Insertion (TPID=0x8100, VID=100, PCP=6, DEI=0, wire capture)
UT-VLAN-002: Filtering Accept (register 100/200, receive VID=100, accept)
UT-VLAN-003: Filtering Drop (register 100/200, receive VID=300, drop + counter)
UT-VLAN-004: PCP→TC Mapping (PCP 7→TC7...PCP 0→TC0, verify queueing)
UT-VLAN-005: Priority Override (PCP=6, override→TC0, disable→normal)
UT-VLAN-006: Untagged Handling (PVID=100, assign to untagged frames)
UT-VLAN-007: Double Tagging QinQ (S-Tag: 0x88A8/VID 4000, C-Tag: 0x8100/VID 100)
UT-VLAN-008: Membership Table (add/read/remove VLANs 100/200/300)
UT-VLAN-009: Max VLANs (4094 VLANs, boundary VID=1/4094, reject VID=0/4095)
UT-VLAN-010: Statistics (100 TX, 50 RX tagged, 10 RX untagged, 5 dropped)
3 Integration Tests
IT-VLAN-001: AVB Stream Isolation (2 streams: VLAN 100/200, Class A, no cross-contamination)
IT-VLAN-002: PCP QoS Enforcement (PCP 6→75% CBS, PCP 5→25% CBS, PCP 0→best effort, latency ≤2ms/≤50ms)
IT-VLAN-003: Multi-VLAN gPTP (3 domains on VLAN 100/200/300, independent sync, no interference)
2 V&V Tests
VV-VLAN-001: 24-Hour Stability (10 VLANs, zero tag errors, 100% filtering, stable PCP mapping)
VV-VLAN-002: Production Network (VLAN 100 audio, 200 video, 300 control, 400 management, 1-hour, zero leakage, QoS enforced)
🔧 Implementation Highlights
VLAN Tag Structure: TPID (0x8100/0x88A8), TCI (PCP[15:13], DEI[12], VID[11:0]), QinQ (S-Tag + C-Tag)
Tag Insertion: Shift payload +4 bytes, insert between MAC SA and EtherType
VLAN Filtering: 4096-bit membership table (bit vector), hardware lookup <100ns
PCP→TC Mapping: Configurable 8-entry table (default 1:1), hardware mapping register
Statistics: TX/RX tagged, RX untagged, dropped frames counters
📊 Performance Targets
| Metric |
Target |
| Tag Insertion Overhead |
<1µs per frame |
| VLAN Filtering Latency |
<100ns hardware lookup |
| Max VLANs |
4094 per adapter |
| PCP→TC Accuracy |
100% |
| Multi-VLAN Throughput |
Line rate (no degradation) |
📈 Acceptance Criteria
✅ All 15 tests pass (10 unit + 3 integration + 2 V&V)
✅ VLAN tags inserted 100% correctly (TPID, VID, PCP, DEI)
✅ VLAN filtering 100% accurate (accept registered, drop unregistered)
✅ PCP→TC mapping correct for all PCPs (0-7)
✅ 24-hour stability test passes (zero errors)
✅ Production network: zero VLAN leakage, QoS enforced
Full Specification: See ISSUE-213-VLAN-ORIGINAL.md for complete code examples (tag structure, insertion, filtering, PCP mapping, QinQ).
Standards: IEEE 802.1Q (VLAN), IEEE 802.1ad (QinQ), IEEE 1012-2016, ISO/IEC/IEEE 12207:2017
XP Practice: TDD - Tests defined before implementation
Estimated Effort: 8-10 days
Dependencies: PCP mapping, Traffic Class support, Hardware VLAN filter
TEST-VLAN-001: VLAN Tagging and Filtering Verification
🔗 Traceability
📋 Test Objective
Validate IEEE 802.1Q VLAN tagging, filtering, and PCP mapping for AVB stream isolation and QoS enforcement.
Scope: VLAN tag insertion (TPID 0x8100, VID, PCP, DEI), VLAN filtering (accept registered/drop unregistered), PCP→TC mapping, double tagging (802.1ad QinQ), VLAN membership, AVB stream isolation.
Success Criteria: ✅ VLAN tags 100% accurate | ✅ VLAN filtering 100% | ✅ PCP→TC mapping correct (0-7) | ✅ QinQ support | ✅ Zero VLAN leakage
🧪 Test Coverage (15 Tests)
10 Unit Tests
UT-VLAN-001: Tag Insertion (TPID=0x8100, VID=100, PCP=6, DEI=0, wire capture)
UT-VLAN-002: Filtering Accept (register 100/200, receive VID=100, accept)
UT-VLAN-003: Filtering Drop (register 100/200, receive VID=300, drop + counter)
UT-VLAN-004: PCP→TC Mapping (PCP 7→TC7...PCP 0→TC0, verify queueing)
UT-VLAN-005: Priority Override (PCP=6, override→TC0, disable→normal)
UT-VLAN-006: Untagged Handling (PVID=100, assign to untagged frames)
UT-VLAN-007: Double Tagging QinQ (S-Tag: 0x88A8/VID 4000, C-Tag: 0x8100/VID 100)
UT-VLAN-008: Membership Table (add/read/remove VLANs 100/200/300)
UT-VLAN-009: Max VLANs (4094 VLANs, boundary VID=1/4094, reject VID=0/4095)
UT-VLAN-010: Statistics (100 TX, 50 RX tagged, 10 RX untagged, 5 dropped)
3 Integration Tests
IT-VLAN-001: AVB Stream Isolation (2 streams: VLAN 100/200, Class A, no cross-contamination)
IT-VLAN-002: PCP QoS Enforcement (PCP 6→75% CBS, PCP 5→25% CBS, PCP 0→best effort, latency ≤2ms/≤50ms)
IT-VLAN-003: Multi-VLAN gPTP (3 domains on VLAN 100/200/300, independent sync, no interference)
2 V&V Tests
VV-VLAN-001: 24-Hour Stability (10 VLANs, zero tag errors, 100% filtering, stable PCP mapping)
VV-VLAN-002: Production Network (VLAN 100 audio, 200 video, 300 control, 400 management, 1-hour, zero leakage, QoS enforced)
🔧 Implementation Highlights
VLAN Tag Structure: TPID (0x8100/0x88A8), TCI (PCP[15:13], DEI[12], VID[11:0]), QinQ (S-Tag + C-Tag)
Tag Insertion: Shift payload +4 bytes, insert between MAC SA and EtherType
VLAN Filtering: 4096-bit membership table (bit vector), hardware lookup <100ns
PCP→TC Mapping: Configurable 8-entry table (default 1:1), hardware mapping register
Statistics: TX/RX tagged, RX untagged, dropped frames counters
📊 Performance Targets
📈 Acceptance Criteria
✅ All 15 tests pass (10 unit + 3 integration + 2 V&V)
✅ VLAN tags inserted 100% correctly (TPID, VID, PCP, DEI)
✅ VLAN filtering 100% accurate (accept registered, drop unregistered)
✅ PCP→TC mapping correct for all PCPs (0-7)
✅ 24-hour stability test passes (zero errors)
✅ Production network: zero VLAN leakage, QoS enforced
Full Specification: See ISSUE-213-VLAN-ORIGINAL.md for complete code examples (tag structure, insertion, filtering, PCP mapping, QinQ).
Standards: IEEE 802.1Q (VLAN), IEEE 802.1ad (QinQ), IEEE 1012-2016, ISO/IEC/IEEE 12207:2017
XP Practice: TDD - Tests defined before implementation
Estimated Effort: 8-10 days
Dependencies: PCP mapping, Traffic Class support, Hardware VLAN filter