Fiber Channel Buffer to Buffer credit explained & Configuration

Fiber Channel Buffer to Buffer credit explained & Configuration
  • Why do we need B-B Credit:

To prevent frame loss due to a lack of frame buffers. Fibre Channel Buffer to Buffer flow control is implemented on every link (between FC switch and hosts, between FC switches …)

  • How it works:
  1. During link initialization, the number of buffer credits allocated for each device is established.
  2. During fabric login (FLOGI), each side of the link tells the other side of the link how many buffer credits it has.
  3. After receiving information on the number of credits available on the remote peer, the local device initializes its transmit credit count (BBC_TRC) to that number. The BBC_TRC represents the number of frames that the port can transmit without overrunning its peer’s buffer When the device transmits a frame, it decrements the BBC_TRC count by one.
  4. The remote port sends a Receiver Ready (R_RDY) back to the local device once it has received a frame and processed it. (freeing up the buffer)
  5. The local device increments its transmit credit count by one when it receives the R_RDY (Replay Ready) signal. If the transmit credit count reaches zero, the port cannot transmit and must wait until it receives an R_RDY to replenish its BBC_TRC.

  • FC Buffer to Buffer Mechanism step by step:

The step below occurs on both sides (in both directions).

Each port (of the list between the host or FC switch) have a B-B credit count assigned to it from its peer and if the B-B credit is equal to 0, the next frame will wait in a queue, until the peer send and R_READY and that will increment the B-B Buffer again.

Step-1- A frame is ready to be transmitted to the receiving port, and B-B credit is available:

Step-2- The frame is transmitted, and the credit count of the transmitting port is decremented. The next frame is waiting in queue for a credit from the receiving port before it can be transmitted.

Step-3- The frame is received:

Step-4- The frame is processed:

Step-5- Receiver Ready (R_RDY) is returned:

Step-6- The credit count is incremented (reset the B-B Credit count), and the next frame can be transmitted:

Step-7-The frame is transmitted, and the credit count of the transmitting port is decremented. The next frame is waiting in queue for a credit from the receiving port before it can be transmitted.

  • B-B Credit configuration Cisco switches:

Buffer-to-buffer credits (BB_credits) are a flow-control mechanism to ensure that Fibre Channel switches do not run out of buffers so that switches do not drop frames. Buffer-to-buffer credits are negotiated on a per-hop basis.

The receive buffer-to-buffer credit (fcrxbbcredit) value may be configured for each Fibre Channel interface. In most cases, you do not need to modify the default configuration.

The receive buffer-to-buffer credit values depend on the module type and the port mode.

* Configuration on Cisco MDS switches:

Step 1– Enter configuration mode:
switch# configure terminal
Step 2– Select a Fibre Channel interface and enter interface configuration submode:
switch(config)# interface fc slot/port
Step 3– Set the buffer-to-buffer credits as a single pool on an interface:
switch(config-if)# switchport fcrxbbcredit credits mode {E | Fx }(Optional)
– Reset the buffer-to-buffer credits on the interface to the default value:
switch(config-if)# switchport fcrxbbcredit default
  • This example shows how to configure 50 receive buffer credits on an interface:

switch# configure terminal
switch(config)# interface fc 1/1
switch(config-if)# switchport fcrxbbcredit 50
  • If you need to go back to the default B-B Credit value, this example shows how to configure default credits on an interface:

switch# configure terminal
switch(config)# interface fc 1/1
switch(config-if)# switchport fcrxbbcredit default


  • References:

Brocade Fabric Congestion Troubleshooting Guide (Fabric-Con-Trbl-UG101): www.broadcom.com.

https://docplayer.net/136208339-Brocade-fabric-congestion-troubleshooting-guide.html

Cisco MDS 9000 Series NX-OS Interfaces Configuration guide: cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/7_3/configuration/interfaces/cisco_mds9000_interfaces_config_guide_7x/configuring_interface_buffers.html

Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x