Visible to Intel only — GUID: emy1673393517739
Ixiasoft
Visible to Intel only — GUID: emy1673393517739
Ixiasoft
5.1.6.6.2. VLAN Filtering
- VLAN tag perfect filtering
- VLAN tag hash filtering
VLAN Tag Perfect Filtering
In VLAN tag perfect filtering, the MAC compares the VLAN tag of received packet and provides the VLAN packet status to the application. Based on the programmed mode, the MAC compares the lower 12 bits or all 16 bits of received VLAN tag to determine the perfect match.
VLAN Tag Hash Filtering
- The 16 or 12 bits of VLAN tag are considered for CRC-32 computation based on the ETV bit in MAC_VLAN_Tag register.
- When ETV bit is reset, most significant four bits of CRC-32 of VLAN tag are inverted and used to index the content of MAC_VLAN_Hash_Table register in the MAC.
- When ETV bit is set, most significant four bits of CRC-32 of VLAN tag are directly used to index the content of MAC_VLAN_Hash_Table register in the MAC.
The MAC also supports the inverse matching for VLAN packets. In the inverse matching mode, when the VLAN tag of a packet matches the perfect or hash filter, the packet must be dropped. If the VLAN perfect and VLAN hash match are enabled, a packet is considered as matched if either the VLAN hash or the VLAN perfect filter matches. When inverse match is set, a packet is forwarded only when both perfect and hash filters indicate mismatch.
The table below shows the various possibilities for VLAN matching and the final VLAN match status. When the RA field of the MAC_Packet_Filter register is set, all packets are received and the VLAN match status is indicated in the VF bit of the receive normal descriptor (write-back format). When the RA bit is not set and the VTFE field is 1 in the MAC_Packet_Filter register, the packet is dropped if the final VLAN match status fails.
VID | VLAN Perfect Filter Match Result | VTHM Bit | VLAN Hash Filter Match Result | VTIM Bit | Final VLAN Match Status |
---|---|---|---|---|---|
VID = 0 | Pass | 0 | Xa | X | Pass |
Pass | 1 | X | 0 | Pass | |
Pass | 1 | Fail | 1 | Pass | |
Pass | 1 | Pass | 1 | Fail | |
VID != 0 | Pass | X | X | 0 | Pass |
Fail | 0 | X | 0 | Fail | |
Fail | 1 | Fail | 0 | Fail | |
Fail | 1 | Pass | 0 | Pass | |
Fail | 0 | X | 1 | Pass | |
Pass | X | X | 1 | Fail | |
Fail | 1 | Pass | 1 | Fail | |
Fail | 1 | Fail | 1 | Pass |