• Vasu Dev's avatar
    fcoe: adds spma mode support · 184dd345
    Vasu Dev authored
    If we can find a type NETDEV_HW_ADDR_T_SAN mac address from the
    corresponding netdev for a fcoe interface then sets up added the
    fc->ctlr.spma flag and stores spma mode address in ctl_src_addr.
    
    In case the spma flag is set then:-
    
     1. Adds spma mode MAC address in ctl_src_addr as secondary
        MAC address, the FLOGI for FIP and pre-FIP will go out
        using this address.
     2. Cleans up stored spma MAC address in ctl_src_addr in
        fcoe_netdev_cleanup.
     3. Sets up spma bit in fip_flags for FIP solicitations along
        with exiting FPMA bit setting.
     4. Initialize the FLOGI FIP MAC descriptor to stored spma
        MAC address in ctl_src_addr. This is used as proposed
        FCoE MAC address from initiator along with both SPMA
        and FPMA bit set in FIP solicitation, in response the
        switch may grant any FPMA or SPMA mode MAC address to
        initiator.
    
    Removes FIP descriptor type checking against ELS type
    ELS_FLOGI in fcoe_ctlr_encaps to update a FIP MAC descriptor,
    instead now checks against FIP_DT_FLOGI.
    
    I've tested this with available FPMA-only FCoE switch but
    since data_src_addr is updated using same old code for
    both FPMA and SPMA modes with FIP or pre-FIP links, so added
    SPMA mode will work with SPMA-only switch also provided that
    switch grants a valid MAC address.
    Signed-off-by: default avatarVasu Dev <vasu.dev@intel.com>
    Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    184dd345
libfcoe.h 5.62 KB