                          Installation Notes

		QLogic's Linux FCoE Offload Driver

                Copyright (c) 2015-2018 Cavium Inc.
                All rights reserved

Table of Contents
=================

  Introduction
  Distros Supported
  Differences from bnx2fc
  Core Module
  QEDF Dependencies
  QEDF Module Parameters
  Build and Load
  Module Install
  Limitations

Introduction
============

This file describes the qedf Linux offload driver.

Distros Supported
=================

RedHat Enterprise Linux 6.5 and above
RedHat Enterprise Linux 7.0 and above
SLES 11 SP3 and above
SLES 12

Differences from bnx2fc
=======================

There are some signficant differences between qedf and the previous generation
QLogic FCoE offload driver, bnx2fc:

1. qedf directly binds to a PCI function exposed by the adapter.
2. qedf does not need the open-fcoe user space tools to initiate discovery.
3. qedf issue FIP VLAN requests directly and does not need the fipvlan utility.
4. qedf does not need a FCoE interface created by fipvlan for fcoemon.
5. qedf does not sit on top of the net_device.
6. qedf is not dependent on a network driver like bnx2x.
7. qedf is not dependent on cnic.
8. qedf will start the discovery automatically on link up.

Having said that, qedf is still dependent on libfc and libfcoe kernel modules
for non-offloaded discovery and framing.  While there is not direct net_device
used by qedf, skb's are sent over a Light L2 interface exposed by the core
module, qed.

Core Module
===========

qedf does required the that eCore core module, qed, be loaded.

QEDF Dependencies
=================

qedf is dependent on the following kernel modules:

- scsi_transport_fc
- libfcoe
- libfc
- qed

QEDF Module Parameters
======================

dev_loss_tmo - The port timeout for remote ports attached via qed.
debug - Addition kernel logging for trouble shooting exception conditions.
fipvlan_retries - Number of FIP vlan requests to send before giving up.
fallback_vlan - The VLAN to use if none of the FIP VLAN requests do not get a
                response.
default_prio - 802.1q priority group to use if DCBX offload is not enabled.
dump_frames - Prints the contents of FIP and FCoE frames to the kernel log.
queue_depth - Sets the per LUN queue depth for each device discovered via qedf.
io_tracing - Capture attributes for each request and response in a circular
             buffer which can be dumped via sysfs.  Only enable this for
             debugging purposes as there is a slight performance hit when
             enabled.
max_lun - Set the maximum number of LUNs supported per target.

Build and Load
==============

To build the qedf module, issue the make command from the top level qeds
directory:

     # cd qeds
     # make 

To load the qedf module, first load the qed.ko module:

     # insmod <qed dir>src/qed.ko

Then load qedf.ko itself:

     # insmod <qedf dir>/qedf.ko

Module Install
==============

The Makefile 'install' target needs to run so that the OS tools can correctly
load and unload the qedf module.  Also this needs to be done to build the qedf
module into initrd/initramfs so it can be loaded at boot.

Since the qedf is not currently inbox in all distros, a kernel cmdline needs
to be added to the grub configuration file so the driver loads at boot:

o RHEL 6 - rdloaddriver=qedf
o RHEL 7/SLES 12 - rd.driver.pre=qedf

Limitations
===========

- Only 64 NPIV ports per physical port are supported.
- Only MSI-X is currently supported. 
- For CNA port configured at 25G on SLES11SP4, speed is displayed as “unknown”
  under /sys/class interface. This is a cosmetic limitation of /sys/class
  interface display on SLES11SP4 and does not affect 25G functionality.
