xref: /linux/Documentation/scsi/bnx2fc.rst (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*1d4f8dfeSMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0
2*1d4f8dfeSMauro Carvalho Chehab
3*1d4f8dfeSMauro Carvalho Chehab===========================
412b8fc10SBhanu Prakash GollapudiOperating FCoE using bnx2fc
512b8fc10SBhanu Prakash Gollapudi===========================
612b8fc10SBhanu Prakash GollapudiBroadcom FCoE offload through bnx2fc is full stateful hardware offload that
712b8fc10SBhanu Prakash Gollapudicooperates with all interfaces provided by the Linux ecosystem for FC/FCoE and
812b8fc10SBhanu Prakash GollapudiSCSI controllers.  As such, FCoE functionality, once enabled is largely
912b8fc10SBhanu Prakash Gollapuditransparent. Devices discovered on the SAN will be registered and unregistered
1012b8fc10SBhanu Prakash Gollapudiautomatically with the upper storage layers.
1112b8fc10SBhanu Prakash Gollapudi
1212b8fc10SBhanu Prakash GollapudiDespite the fact that the Broadcom's FCoE offload is fully offloaded, it does
1312b8fc10SBhanu Prakash Gollapudidepend on the state of the network interfaces to operate. As such, the network
1412b8fc10SBhanu Prakash Gollapudiinterface (e.g. eth0) associated with the FCoE offload initiator must be 'up'.
1512b8fc10SBhanu Prakash GollapudiIt is recommended that the network interfaces be configured to be brought up
1612b8fc10SBhanu Prakash Gollapudiautomatically at boot time.
1712b8fc10SBhanu Prakash Gollapudi
1812b8fc10SBhanu Prakash GollapudiFurthermore, the Broadcom FCoE offload solution creates VLAN interfaces to
1912b8fc10SBhanu Prakash Gollapudisupport the VLANs that have been discovered for FCoE operation (e.g.
2012b8fc10SBhanu Prakash Gollapudieth0.1001-fcoe).  Do not delete or disable these interfaces or FCoE operation
2112b8fc10SBhanu Prakash Gollapudiwill be disrupted.
2212b8fc10SBhanu Prakash Gollapudi
2312b8fc10SBhanu Prakash GollapudiDriver Usage Model:
2412b8fc10SBhanu Prakash Gollapudi===================
2512b8fc10SBhanu Prakash Gollapudi
2612b8fc10SBhanu Prakash Gollapudi1. Ensure that fcoe-utils package is installed.
2712b8fc10SBhanu Prakash Gollapudi
2812b8fc10SBhanu Prakash Gollapudi2. Configure the interfaces on which bnx2fc driver has to operate on.
2912b8fc10SBhanu Prakash GollapudiHere are the steps to configure:
30*1d4f8dfeSMauro Carvalho Chehab
3112b8fc10SBhanu Prakash Gollapudi	a. cd /etc/fcoe
3212b8fc10SBhanu Prakash Gollapudi	b. copy cfg-ethx to cfg-eth5 if FCoE has to be enabled on eth5.
3312b8fc10SBhanu Prakash Gollapudi	c. Repeat this for all the interfaces where FCoE has to be enabled.
3412b8fc10SBhanu Prakash Gollapudi	d. Edit all the cfg-eth files to set "no" for DCB_REQUIRED** field, and
3512b8fc10SBhanu Prakash Gollapudi	   "yes" for AUTO_VLAN.
3612b8fc10SBhanu Prakash Gollapudi	e. Other configuration parameters should be left as default
3712b8fc10SBhanu Prakash Gollapudi
3812b8fc10SBhanu Prakash Gollapudi3. Ensure that "bnx2fc" is in SUPPORTED_DRIVERS list in /etc/fcoe/config.
3912b8fc10SBhanu Prakash Gollapudi
4012b8fc10SBhanu Prakash Gollapudi4. Start fcoe service. (service fcoe start). If Broadcom devices are present in
4112b8fc10SBhanu Prakash Gollapudithe system, bnx2fc driver would automatically claim the interfaces, starts vlan
4212b8fc10SBhanu Prakash Gollapudidiscovery and log into the targets.
4312b8fc10SBhanu Prakash Gollapudi
4412b8fc10SBhanu Prakash Gollapudi5. "Symbolic Name" in 'fcoeadm -i' output would display if bnx2fc has claimed
4512b8fc10SBhanu Prakash Gollapudithe interface.
46*1d4f8dfeSMauro Carvalho Chehab
47*1d4f8dfeSMauro Carvalho ChehabEg::
48*1d4f8dfeSMauro Carvalho Chehab
4912b8fc10SBhanu Prakash Gollapudi [root@bh2 ~]# fcoeadm -i
5012b8fc10SBhanu Prakash Gollapudi    Description:      NetXtreme II BCM57712 10 Gigabit Ethernet
5112b8fc10SBhanu Prakash Gollapudi    Revision:         01
5212b8fc10SBhanu Prakash Gollapudi    Manufacturer:     Broadcom Corporation
5312b8fc10SBhanu Prakash Gollapudi    Serial Number:    0010186FD558
5412b8fc10SBhanu Prakash Gollapudi    Driver:           bnx2x 1.70.00-0
5512b8fc10SBhanu Prakash Gollapudi    Number of Ports:  2
5612b8fc10SBhanu Prakash Gollapudi
5712b8fc10SBhanu Prakash Gollapudi        Symbolic Name:     bnx2fc v1.0.5 over eth5.4
5812b8fc10SBhanu Prakash Gollapudi        OS Device Name:    host11
5912b8fc10SBhanu Prakash Gollapudi        Node Name:         0x10000010186FD559
6012b8fc10SBhanu Prakash Gollapudi        Port Name:         0x20000010186FD559
6112b8fc10SBhanu Prakash Gollapudi        FabricName:        0x2001000DECB3B681
6212b8fc10SBhanu Prakash Gollapudi        Speed:             10 Gbit
6312b8fc10SBhanu Prakash Gollapudi        Supported Speed:   10 Gbit
6412b8fc10SBhanu Prakash Gollapudi        MaxFrameSize:      2048
6512b8fc10SBhanu Prakash Gollapudi        FC-ID (Port ID):   0x0F0377
6612b8fc10SBhanu Prakash Gollapudi        State:             Online
6712b8fc10SBhanu Prakash Gollapudi
6812b8fc10SBhanu Prakash Gollapudi6. Verify the vlan discovery is performed by running ifconfig and notice
6912b8fc10SBhanu Prakash Gollapudi   <INTERFACE>.<VLAN>-fcoe interfaces are automatically created.
7012b8fc10SBhanu Prakash Gollapudi
7112b8fc10SBhanu Prakash GollapudiRefer to fcoeadm manpage for more information on fcoeadm operations to
7212b8fc10SBhanu Prakash Gollapudicreate/destroy interfaces or to display lun/target information.
7312b8fc10SBhanu Prakash Gollapudi
74*1d4f8dfeSMauro Carvalho ChehabNOTE
7512b8fc10SBhanu Prakash Gollapudi====
7612b8fc10SBhanu Prakash Gollapudi** Broadcom FCoE capable devices implement a DCBX/LLDP client on-chip. Only one
7712b8fc10SBhanu Prakash GollapudiLLDP client is allowed per interface. For proper operation all host software
7812b8fc10SBhanu Prakash Gollapudibased DCBX/LLDP clients (e.g. lldpad) must be disabled. To disable lldpad on a
79*1d4f8dfeSMauro Carvalho Chehabgiven interface, run the following command::
8012b8fc10SBhanu Prakash Gollapudi
8112b8fc10SBhanu Prakash Gollapudi	lldptool set-lldp -i <interface_name> adminStatus=disabled
82