libhbalinux: Add VLAN interface support
libhbalinux: Add VLAN interface support

This patch is to add support to libhbalinux for
VLAN interfaces.

The sysfs has entries for VLAN interfaces in /sys/class/net
as symbolic links, for example,
/sys/class/net/<ifname> --> ../../devices/virtual/net/<ifname>
where <ifname> is the interface name of the VLAN interface.
Given an interface name, this link allows us to determine if it
is a VLAN interface or not. Notice that the link does not have
PCI location information.

The port information (HBA_PORTATTRIBUTES) of the VLAN interface
can be found with the same way as the other regular interfaces,
for example, in /sys/class/fc_host/host<n>, where <n> is a
positive integer.

The HBA information (HBA_ADAPTERATTRIBUTES) including the PCI
information has to be found from a regular interface that has
the same MAC address as the VLAN interface.

Signed-off-by: Steve Ma <612489cf8abf061c6c56e41e68c6a79aef67016e@intel.com>
Signed-off-by: Robert Love <ae32029cc3b561e3768d1db8669e99f5bdf25e4b@intel.com>

cleech/libhbalinux,cleech/libhbalinux