linux/drivers/net/ethernet/intel/ice
Anirudh Venkataramanan 3a858ba392 ice: Add support for VSI allocation and deallocation
This patch introduces data structures and functions to alloc/free
VSIs. The driver represents a VSI using the ice_vsi structure.

Some noteworthy points about VSI allocation:

1) A VSI is allocated in the firmware using the "add VSI" admin queue
   command (implemented as ice_aq_add_vsi). The firmware returns an
   identifier for the allocated VSI. The VSI context is used to program
   certain aspects (loopback, queue map, etc.) of the VSI's configuration.

2) A VSI is deleted using the "free VSI" admin queue command (implemented
   as ice_aq_free_vsi).

3) The driver represents a VSI using struct ice_vsi. This is allocated
   and initialized as part of the ice_vsi_alloc flow, and deallocated
   as part of the ice_vsi_delete flow.

4) Once the VSI is created, a netdev is allocated and associated with it.
   The VSI's ring and vector related data structures are also allocated
   and initialized.

5) A VSI's queues can either be contiguous or scattered. To do this, the
   driver maintains a bitmap (vsi->avail_txqs) which is kept in sync with
   the firmware's VSI queue allocation imap. If the VSI can't get a
   contiguous queue allocation, it will fallback to scatter. This is
   implemented in ice_vsi_get_qs which is called as part of the VSI setup
   flow. In the release flow, the VSI's queues are released and the bitmap
   is updated to reflect this by ice_vsi_put_qs.

CC: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-03-26 10:44:27 -07:00
..
ice_adminq_cmd.h ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice_common.c ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_common.h ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_controlq.c ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_controlq.h ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_devids.h
ice_hw_autogen.h ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_main.c ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice_nvm.c ice: Start hardware initialization 2018-03-26 09:59:08 -07:00
ice_osdep.h ice: Start hardware initialization 2018-03-26 09:59:08 -07:00
ice_sched.c ice: Get MAC/PHY/link info and scheduler topology 2018-03-26 10:24:54 -07:00
ice_sched.h ice: Get MAC/PHY/link info and scheduler topology 2018-03-26 10:24:54 -07:00
ice_status.h ice: Get MAC/PHY/link info and scheduler topology 2018-03-26 10:24:54 -07:00
ice_switch.c ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice_switch.h ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice_txrx.h ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice_type.h ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
ice.h ice: Add support for VSI allocation and deallocation 2018-03-26 10:44:27 -07:00
Makefile ice: Get switch config, scheduler config and device capabilities 2018-03-26 10:14:57 -07:00