#[repr(transparent)]pub struct MacVlanTag(pub u32);Expand description
F70RM Rev. 1 section 51.7.1.6; manual text line 149146.
Tuple Fields§
§0: u32Implementations§
Source§impl MacVlanTag
impl MacVlanTag
Sourcepub const fn vl(&self) -> u16
pub const fn vl(&self) -> u16
VLAN Tag Identifier for Receive Packets. This field contains the 802.1Q VLAN tag to identify the VLAN packets. This VLAN tag identifier is compared to the 15th and 16th bytes of the packets being received for VLAN packets. The following list describes the bits of this field: - Bits[15:13]: User Priority - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI) - Bits[11:0]: VLAN Identifier (VID) field of VLAN tag When the ETV bit is set, only the VID is used for comparison. If this field ([11:0] if ETV is set) is all zeros, the MAC does not check the 15th and 16th bytes for VLAN tag comparison and declares all packets with Type field value of 0x8100 or 0x88a8 as VLAN packets.
Sourcepub const fn set_vl(&mut self, val: u16)
pub const fn set_vl(&mut self, val: u16)
VLAN Tag Identifier for Receive Packets. This field contains the 802.1Q VLAN tag to identify the VLAN packets. This VLAN tag identifier is compared to the 15th and 16th bytes of the packets being received for VLAN packets. The following list describes the bits of this field: - Bits[15:13]: User Priority - Bit 12: Canonical Format Indicator (CFI) or Drop Eligible Indicator (DEI) - Bits[11:0]: VLAN Identifier (VID) field of VLAN tag When the ETV bit is set, only the VID is used for comparison. If this field ([11:0] if ETV is set) is all zeros, the MAC does not check the 15th and 16th bytes for VLAN tag comparison and declares all packets with Type field value of 0x8100 or 0x88a8 as VLAN packets.
Sourcepub const fn etv(&self) -> bool
pub const fn etv(&self) -> bool
Enable 12-Bit VLAN Tag Comparison. - 1: A 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag. Bits[11:0] of the VLAN tag are compared with the corresponding field in the received VLAN-tagged packet. Similarly, when enabled, only 12 bits of the VLAN tag in the received packet are used for hash-based VLAN filtering. - 0: All 16 bits of the 15th and 16th bytes of the received VLAN packet are used for comparison and VLAN hash filtering. 0b - 12-Bit VLAN Tag Comparison is disabled 1b - 12-Bit VLAN Tag Comparison is enabled
Sourcepub const fn set_etv(&mut self, val: bool)
pub const fn set_etv(&mut self, val: bool)
Enable 12-Bit VLAN Tag Comparison. - 1: A 12-bit VLAN identifier is used for comparing and filtering instead of the complete 16-bit VLAN tag. Bits[11:0] of the VLAN tag are compared with the corresponding field in the received VLAN-tagged packet. Similarly, when enabled, only 12 bits of the VLAN tag in the received packet are used for hash-based VLAN filtering. - 0: All 16 bits of the 15th and 16th bytes of the received VLAN packet are used for comparison and VLAN hash filtering. 0b - 12-Bit VLAN Tag Comparison is disabled 1b - 12-Bit VLAN Tag Comparison is enabled
Sourcepub const fn vtim(&self) -> bool
pub const fn vtim(&self) -> bool
VLAN Tag Inverse Match Enable. - 1: Enables the VLAN Tag inverse matching. The packets without matching VLAN Tag are marked as matched. - 0: Enables the VLAN Tag perfect matching. The packets with matched VLAN Tag are marked as matched. 0b - VLAN Tag Inverse Match is disabled 1b - VLAN Tag Inverse Match is enabled
Sourcepub const fn set_vtim(&mut self, val: bool)
pub const fn set_vtim(&mut self, val: bool)
VLAN Tag Inverse Match Enable. - 1: Enables the VLAN Tag inverse matching. The packets without matching VLAN Tag are marked as matched. - 0: Enables the VLAN Tag perfect matching. The packets with matched VLAN Tag are marked as matched. 0b - VLAN Tag Inverse Match is disabled 1b - VLAN Tag Inverse Match is enabled
Sourcepub const fn esvl(&self) -> bool
pub const fn esvl(&self) -> bool
Enable S-VLAN. - 1: MAC transmitter and receiver consider the S-VLAN packets (Type = 0x88A8) as valid VLAN tagged packets. 0b - S-VLAN is disabled 1b - S-VLAN is enabled
Sourcepub const fn set_esvl(&mut self, val: bool)
pub const fn set_esvl(&mut self, val: bool)
Enable S-VLAN. - 1: MAC transmitter and receiver consider the S-VLAN packets (Type = 0x88A8) as valid VLAN tagged packets. 0b - S-VLAN is disabled 1b - S-VLAN is enabled
Sourcepub const fn ersvlm(&self) -> bool
pub const fn ersvlm(&self) -> bool
Enable Receive S-VLAN Match. - 1: MAC receiver enables filtering or matching for S-VLAN (Type = 0x88A8) packets. - 0: MAC receiver enables filtering or matching for C-VLAN (Type = 0x8100) packets. The ERIVLT bit determines the VLAN tag position considered for filtering or matching. 0b - Receive S-VLAN Match is disabled 1b - Receive S-VLAN Match is enabled
Sourcepub const fn set_ersvlm(&mut self, val: bool)
pub const fn set_ersvlm(&mut self, val: bool)
Enable Receive S-VLAN Match. - 1: MAC receiver enables filtering or matching for S-VLAN (Type = 0x88A8) packets. - 0: MAC receiver enables filtering or matching for C-VLAN (Type = 0x8100) packets. The ERIVLT bit determines the VLAN tag position considered for filtering or matching. 0b - Receive S-VLAN Match is disabled 1b - Receive S-VLAN Match is enabled
Sourcepub const fn dovltc(&self) -> bool
pub const fn dovltc(&self) -> bool
Disable VLAN Type Check. - 1: MAC does not check whether the VLAN Tag specified by the ERIVLT bit is of type S-VLAN or C-VLAN. - 0: MAC filters or matches the VLAN Tag specified by the ERIVLT bit only when VLAN Tag type is similar to the one specified by the ERSVLM bit. The VLAN filter is bypassed when VLAN Type of received packet do not match the programmed VLAN Type in the VLAN filter. 0b - VLAN Type Check is enabled 1b - VLAN Type Check is disabled
Sourcepub const fn set_dovltc(&mut self, val: bool)
pub const fn set_dovltc(&mut self, val: bool)
Disable VLAN Type Check. - 1: MAC does not check whether the VLAN Tag specified by the ERIVLT bit is of type S-VLAN or C-VLAN. - 0: MAC filters or matches the VLAN Tag specified by the ERIVLT bit only when VLAN Tag type is similar to the one specified by the ERSVLM bit. The VLAN filter is bypassed when VLAN Type of received packet do not match the programmed VLAN Type in the VLAN filter. 0b - VLAN Type Check is enabled 1b - VLAN Type Check is disabled
Sourcepub const fn evls(&self) -> u8
pub const fn evls(&self) -> u8
Enable VLAN Tag Stripping on Receive. This field indicates the stripping operation on the outer VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip
Sourcepub const fn set_evls(&mut self, val: u8)
pub const fn set_evls(&mut self, val: u8)
Enable VLAN Tag Stripping on Receive. This field indicates the stripping operation on the outer VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip
Sourcepub const fn evlrxs(&self) -> bool
pub const fn evlrxs(&self) -> bool
Enable VLAN Tag in Rx status. - 1: MAC provides the outer VLAN Tag in the Rx status. - 0: MAC does not provide the outer VLAN Tag in Rx status. 0b - VLAN Tag in Rx status is disabled 1b - VLAN Tag in Rx status is enabled
Sourcepub const fn set_evlrxs(&mut self, val: bool)
pub const fn set_evlrxs(&mut self, val: bool)
Enable VLAN Tag in Rx status. - 1: MAC provides the outer VLAN Tag in the Rx status. - 0: MAC does not provide the outer VLAN Tag in Rx status. 0b - VLAN Tag in Rx status is disabled 1b - VLAN Tag in Rx status is enabled
Sourcepub const fn edvlp(&self) -> bool
pub const fn edvlp(&self) -> bool
Enable Double VLAN Processing. - 1: MAC enables processing of up to two VLAN Tags on Tx and Rx (if present). - 0: MAC enables processing of up to one VLAN Tag on Tx and Rx (if present). 0b - Double VLAN Processing is disabled 1b - Double VLAN Processing is enabled
Sourcepub const fn set_edvlp(&mut self, val: bool)
pub const fn set_edvlp(&mut self, val: bool)
Enable Double VLAN Processing. - 1: MAC enables processing of up to two VLAN Tags on Tx and Rx (if present). - 0: MAC enables processing of up to one VLAN Tag on Tx and Rx (if present). 0b - Double VLAN Processing is disabled 1b - Double VLAN Processing is enabled
Sourcepub const fn erivlt(&self) -> bool
pub const fn erivlt(&self) -> bool
Enable Inner VLAN Tag. When this bit and the EDVLP field are set, the MAC receiver enables operation on the inner VLAN Tag (if present). When this bit is reset, the MAC receiver enables operation on the outer VLAN Tag (if present). The ERSVLM bit determines which VLAN type is enabled for filtering or matching. 0b - Inner VLAN tag is disabled 1b - Inner VLAN tag is enabled
Sourcepub const fn set_erivlt(&mut self, val: bool)
pub const fn set_erivlt(&mut self, val: bool)
Enable Inner VLAN Tag. When this bit and the EDVLP field are set, the MAC receiver enables operation on the inner VLAN Tag (if present). When this bit is reset, the MAC receiver enables operation on the outer VLAN Tag (if present). The ERSVLM bit determines which VLAN type is enabled for filtering or matching. 0b - Inner VLAN tag is disabled 1b - Inner VLAN tag is enabled
Sourcepub const fn eivls(&self) -> u8
pub const fn eivls(&self) -> u8
Enable Inner VLAN Tag Stripping on Receive. This field indicates the stripping operation on inner VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip
Sourcepub const fn set_eivls(&mut self, val: u8)
pub const fn set_eivls(&mut self, val: u8)
Enable Inner VLAN Tag Stripping on Receive. This field indicates the stripping operation on inner VLAN Tag in the received packet. 00b - Do not strip 01b - Strip if VLAN filter passes 10b - Strip if VLAN filter fails 11b - Always strip
Sourcepub const fn eivlrxs(&self) -> bool
pub const fn eivlrxs(&self) -> bool
Enable Inner VLAN Tag in Rx Status. - 1: MAC provides the inner VLAN Tag in the Rx status. - 0: MAC does not provide the inner VLAN Tag in the Rx status. 0b - Inner VLAN Tag in Rx status is disabled 1b - Inner VLAN Tag in Rx status is enabled
Sourcepub const fn set_eivlrxs(&mut self, val: bool)
pub const fn set_eivlrxs(&mut self, val: bool)
Enable Inner VLAN Tag in Rx Status. - 1: MAC provides the inner VLAN Tag in the Rx status. - 0: MAC does not provide the inner VLAN Tag in the Rx status. 0b - Inner VLAN Tag in Rx status is disabled 1b - Inner VLAN Tag in Rx status is enabled
Trait Implementations§
Source§impl Clone for MacVlanTag
impl Clone for MacVlanTag
Source§fn clone(&self) -> MacVlanTag
fn clone(&self) -> MacVlanTag
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more