• Alexander Duyck's avatar
    ixgbe: Make FCoE allocation and configuration closer to how rings work · 7c8ae65a
    Alexander Duyck authored
    This patch changes the behavior of the FCoE configuration so that it is
    much closer to how the main body of the ixgbe driver works for ring
    allocation.
    
    The first piece is the ixgbe_fcoe_ddp_enable/disable calls.  These allocate
    the percpu values and if successful set the fcoe_ddp_xid value indicating
    that we can support DDP.
    
    The next piece is the ixgbe_setup/free_ddp_resources calls.  These are
    called on open/close and will allocate and free the DMA pools.
    
    Finally ixgbe_configure_fcoe is now just register configuration.  It can go
    through and enable the registers for the FCoE redirection offload, and FIP
    configuration without any interference from the DDP pool allocation.
    
    The net result of all this is two fold.  First it adds a certain amount of
    exception handling.  So for example if ixgbe_setup_fcoe_resources fails we
    will actually generate an error in open and refuse to bring up the
    interface.
    
    Secondly it provides a much more graceful failure case than the previous
    model which would skip setting up the registers for FCoE on failure to
    allocate DDP resources leaving no Rx functionality enabled instead of just
    disabling DDP.
    Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
    Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
    Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    7c8ae65a
ixgbe_fcoe.c 26.6 KB