linux/drivers/scsi/fcoe
Robert Love ef60f67434 libfcoe: Save some memory and optimize name lookups
Instead of creating a structure with an enum and a pointer
to a string, simply allocate an array of strings and use
the enum values for the indicies.

This means that we do not need to iterate through the list
of entries when looking up a string name by its enum key.

This will also help with a latter patch that will add
more fcoe_sysfs attributes that will also use the
fcoe_enum_name_search macro. One attribute will also do
a reverse lookup which requires less code when the
enum-to-string mappings are organized as this patch makes
them to be.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
2012-12-04 10:16:38 -08:00
..
fcoe_ctlr.c [SCSI] libfc, fcoe, bnx2fc: cleanup fcoe_dev_stats 2012-07-20 08:31:47 +01:00
fcoe_sysfs.c libfcoe: Save some memory and optimize name lookups 2012-12-04 10:16:38 -08:00
fcoe_transport.c [SCSI] libfcoe: Fix section mismatch 2012-07-20 08:58:20 +01:00
fcoe.c [SCSI] fcoe: Fix write errors on NPIV ports 2012-10-07 11:49:34 +01:00
fcoe.h [SCSI] fcoe: Fix write errors on NPIV ports 2012-10-07 11:49:34 +01:00
libfcoe.h [SCSI] libfcoe: add implementation to support fcoe transport 2011-02-12 11:06:06 -06:00
Makefile [SCSI] libfcoe: Add fcoe_sysfs 2012-05-23 09:40:09 +01:00