Determining Pause Packets - 1.3 English

Versal Devices Integrated 100G Multirate Ethernet MAC Subsystem Product Guide (PG314)

Document ID
PG314
Release Date
2021-02-05
Version
1.3 English

The following process is used to determine if a given frame is a Pause Frame:

  1. Checks are performed to see if a packet is a global or a priority control packet. Packets that pass step 1 are forwarded only if ctl_rx_forward_control field of the CONFIGURATION_RX_FLOW_CONTROL_REG1 is set to 1.
  2. If step 1 passes, the packet is checked to determine if it is a global pause packet.
  3. If step 2 fails, the packet is checked to determine if it is a priority pause packet.

In the following pseudo code, DA is the destination address, SA is the source address, OPCODE is the opcode, and ETYPE is the ethertype/length field that are extracted from the incoming packet.

For step 1, the pseudo code for the checking function is:

da_match_gcp = (!ctl_rx_check_mcast_gcp && !ctl_rx_check_ucast_gcp) || 
               ((DA == ctl_rx_pause_da_ucast) && ctl_rx_check_ucast_gcp) || 
               ((DA == 48'h0180c2000001) && ctl_rx_check_mcast_gcp);

sa_match_gcp = !ctl_rx_check_sa_gcp || (SA == ctl_rx_pause_sa);

etype_match_gcp =  !ctl_rx_check_etype_gcp || (ETYPE == ctl_rx_etype_gcp);

opcode_match_gcp = !ctl_rx_check_opcode_gcp || 
                   (OPCODE >= ctl_rx_opcode_min_gcp && OPCODE <= ctl_rx_opcode_max_gcp);

global_control_packet = da_match_gcp && sa_match_gcp && etype_match_gcp && 
						opcode_match_gcp && ctl_rx_enable_gcp;

da_match_pcp =  (!ctl_rx_check_mcast_pcp && !ctl_rx_check_ucast_pcp) || 
                ((DA == ctl_rx_pause_da_ucast) && ctl_rx_check_ucast_pcp) || 
                ((DA == ctl_rx_pause_da_mcast) && ctl_rx_check_mcast_pcp);

sa_match_pcp = 	!ctl_rx_check_sa_pcp || (SA == ctl_rx_pause_sa);

etype_match_pcp =  !ctl_rx_check_etype_pcp || (ETYPE == ctl_rx_etype_pcp);

opcode_match_pcp = !ctl_rx_check_opcode_pcp || 
                   (OPCODE >= ctl_rx_opcode_min_pcp && OPCODE <= ctl_rx_opcode_max_pcp);

priority_control_packet = da_match_pcp && sa_match_pcp && etype_match_pcp && 
						  opcode_match_pcp && ctl_rx_enable_pcp;

control_packet = global_control_packet || priority_control_packet;

For step 2, the following pseudo code shows the checking function:

da_match_gpp = 		  (!ctl_rx_check_mcast_gpp && !ctl_rx_check_ucast_gpp) || 
                      ((DA == ctl_rx_pause_da_ucast) && ctl_rx_check_ucast_gpp) || 
                      ((DA == 48'h0180c2000001) && ctl_rx_check_mcast_gpp);

sa_match_gpp = 	      !ctl_rx_check_sa_gpp || (SA == ctl_rx_pause_sa);

etype_match_gpp =     !ctl_rx_check_etype_gpp || (ETYPE == ctl_rx_etype_gpp);

opcode_match_gpp =    !ctl_rx_check_opcode_gpp || (OPCODE == ctl_rx_opcode_gpp);

global_pause_packet = da_match_gpp && sa_match_gpp && etype_match_gpp &&
                      opcode_match_gpp && ctl_rx_enable_gpp;

For step 3, the following pseudo code shows the checking function:

da_match_ppp = 			(!ctl_rx_check_mcast_ppp && !ctl_rx_check_ucast_ppp) || 
						((DA == ctl_rx_pause_da_ucast) && ctl_rx_check_ucast_ppp) || 
						((DA == ctl_rx_pause_da_mcast) && ctl_rx_check_mcast_ppp);

sa_match_ppp = 	        !ctl_rx_check_sa_ppp || (SA == ctl_rx_pause_sa);

etype_match_ppp =       !ctl_rx_check_etype_ppp || (ETYPE == ctl_rx_etype_ppp);

opcode_match_ppp =      !ctl_rx_check_opcode_ppp || (OPCODE == ctl_rx_opcode_ppp);

priority_pause_packet = da_match_ppp && sa_match_ppp && etype_match_ppp &&
                        opcode_match_ppp && ctl_rx_enable_ppp;