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===========================
4*1d4f8dfeSMauro Carvalho ChehabOperating FCoE using bnx2fc
5*1d4f8dfeSMauro Carvalho Chehab===========================
6*1d4f8dfeSMauro Carvalho ChehabBroadcom FCoE offload through bnx2fc is full stateful hardware offload that
7*1d4f8dfeSMauro Carvalho Chehabcooperates with all interfaces provided by the Linux ecosystem for FC/FCoE and
8*1d4f8dfeSMauro Carvalho ChehabSCSI controllers.  As such, FCoE functionality, once enabled is largely
9*1d4f8dfeSMauro Carvalho Chehabtransparent. Devices discovered on the SAN will be registered and unregistered
10*1d4f8dfeSMauro Carvalho Chehabautomatically with the upper storage layers.
11*1d4f8dfeSMauro Carvalho Chehab
12*1d4f8dfeSMauro Carvalho ChehabDespite the fact that the Broadcom's FCoE offload is fully offloaded, it does
13*1d4f8dfeSMauro Carvalho Chehabdepend on the state of the network interfaces to operate. As such, the network
14*1d4f8dfeSMauro Carvalho Chehabinterface (e.g. eth0) associated with the FCoE offload initiator must be 'up'.
15*1d4f8dfeSMauro Carvalho ChehabIt is recommended that the network interfaces be configured to be brought up
16*1d4f8dfeSMauro Carvalho Chehabautomatically at boot time.
17*1d4f8dfeSMauro Carvalho Chehab
18*1d4f8dfeSMauro Carvalho ChehabFurthermore, the Broadcom FCoE offload solution creates VLAN interfaces to
19*1d4f8dfeSMauro Carvalho Chehabsupport the VLANs that have been discovered for FCoE operation (e.g.
20*1d4f8dfeSMauro Carvalho Chehabeth0.1001-fcoe).  Do not delete or disable these interfaces or FCoE operation
21*1d4f8dfeSMauro Carvalho Chehabwill be disrupted.
22*1d4f8dfeSMauro Carvalho Chehab
23*1d4f8dfeSMauro Carvalho ChehabDriver Usage Model:
24*1d4f8dfeSMauro Carvalho Chehab===================
25*1d4f8dfeSMauro Carvalho Chehab
26*1d4f8dfeSMauro Carvalho Chehab1. Ensure that fcoe-utils package is installed.
27*1d4f8dfeSMauro Carvalho Chehab
28*1d4f8dfeSMauro Carvalho Chehab2. Configure the interfaces on which bnx2fc driver has to operate on.
29*1d4f8dfeSMauro Carvalho ChehabHere are the steps to configure:
30*1d4f8dfeSMauro Carvalho Chehab
31*1d4f8dfeSMauro Carvalho Chehab	a. cd /etc/fcoe
32*1d4f8dfeSMauro Carvalho Chehab	b. copy cfg-ethx to cfg-eth5 if FCoE has to be enabled on eth5.
33*1d4f8dfeSMauro Carvalho Chehab	c. Repeat this for all the interfaces where FCoE has to be enabled.
34*1d4f8dfeSMauro Carvalho Chehab	d. Edit all the cfg-eth files to set "no" for DCB_REQUIRED** field, and
35*1d4f8dfeSMauro Carvalho Chehab	   "yes" for AUTO_VLAN.
36*1d4f8dfeSMauro Carvalho Chehab	e. Other configuration parameters should be left as default
37*1d4f8dfeSMauro Carvalho Chehab
38*1d4f8dfeSMauro Carvalho Chehab3. Ensure that "bnx2fc" is in SUPPORTED_DRIVERS list in /etc/fcoe/config.
39*1d4f8dfeSMauro Carvalho Chehab
40*1d4f8dfeSMauro Carvalho Chehab4. Start fcoe service. (service fcoe start). If Broadcom devices are present in
41*1d4f8dfeSMauro Carvalho Chehabthe system, bnx2fc driver would automatically claim the interfaces, starts vlan
42*1d4f8dfeSMauro Carvalho Chehabdiscovery and log into the targets.
43*1d4f8dfeSMauro Carvalho Chehab
44*1d4f8dfeSMauro Carvalho Chehab5. "Symbolic Name" in 'fcoeadm -i' output would display if bnx2fc has claimed
45*1d4f8dfeSMauro Carvalho Chehabthe interface.
46*1d4f8dfeSMauro Carvalho Chehab
47*1d4f8dfeSMauro Carvalho ChehabEg::
48*1d4f8dfeSMauro Carvalho Chehab
49*1d4f8dfeSMauro Carvalho Chehab [root@bh2 ~]# fcoeadm -i
50*1d4f8dfeSMauro Carvalho Chehab    Description:      NetXtreme II BCM57712 10 Gigabit Ethernet
51*1d4f8dfeSMauro Carvalho Chehab    Revision:         01
52*1d4f8dfeSMauro Carvalho Chehab    Manufacturer:     Broadcom Corporation
53*1d4f8dfeSMauro Carvalho Chehab    Serial Number:    0010186FD558
54*1d4f8dfeSMauro Carvalho Chehab    Driver:           bnx2x 1.70.00-0
55*1d4f8dfeSMauro Carvalho Chehab    Number of Ports:  2
56*1d4f8dfeSMauro Carvalho Chehab
57*1d4f8dfeSMauro Carvalho Chehab        Symbolic Name:     bnx2fc v1.0.5 over eth5.4
58*1d4f8dfeSMauro Carvalho Chehab        OS Device Name:    host11
59*1d4f8dfeSMauro Carvalho Chehab        Node Name:         0x10000010186FD559
60*1d4f8dfeSMauro Carvalho Chehab        Port Name:         0x20000010186FD559
61*1d4f8dfeSMauro Carvalho Chehab        FabricName:        0x2001000DECB3B681
62*1d4f8dfeSMauro Carvalho Chehab        Speed:             10 Gbit
63*1d4f8dfeSMauro Carvalho Chehab        Supported Speed:   10 Gbit
64*1d4f8dfeSMauro Carvalho Chehab        MaxFrameSize:      2048
65*1d4f8dfeSMauro Carvalho Chehab        FC-ID (Port ID):   0x0F0377
66*1d4f8dfeSMauro Carvalho Chehab        State:             Online
67*1d4f8dfeSMauro Carvalho Chehab
68*1d4f8dfeSMauro Carvalho Chehab6. Verify the vlan discovery is performed by running ifconfig and notice
69*1d4f8dfeSMauro Carvalho Chehab   <INTERFACE>.<VLAN>-fcoe interfaces are automatically created.
70*1d4f8dfeSMauro Carvalho Chehab
71*1d4f8dfeSMauro Carvalho ChehabRefer to fcoeadm manpage for more information on fcoeadm operations to
72*1d4f8dfeSMauro Carvalho Chehabcreate/destroy interfaces or to display lun/target information.
73*1d4f8dfeSMauro Carvalho Chehab
74*1d4f8dfeSMauro Carvalho ChehabNOTE
75*1d4f8dfeSMauro Carvalho Chehab====
76*1d4f8dfeSMauro Carvalho Chehab** Broadcom FCoE capable devices implement a DCBX/LLDP client on-chip. Only one
77*1d4f8dfeSMauro Carvalho ChehabLLDP client is allowed per interface. For proper operation all host software
78*1d4f8dfeSMauro Carvalho Chehabbased DCBX/LLDP clients (e.g. lldpad) must be disabled. To disable lldpad on a
79*1d4f8dfeSMauro Carvalho Chehabgiven interface, run the following command::
80*1d4f8dfeSMauro Carvalho Chehab
81*1d4f8dfeSMauro Carvalho Chehab	lldptool set-lldp -i <interface_name> adminStatus=disabled
82