mbox series

[net-next,0/3] refactor irq allocation in ice

Message ID 20211222062201.36302-1-michal.swiatkowski@linux.intel.com
Headers show
Series refactor irq allocation in ice | expand

Message

Michal Swiatkowski Dec. 22, 2021, 6:21 a.m. UTC
The ice driver uses the old PCI irq reseveration API. Change the ice
driver to use the current API.

Implement a fallback mechanism where, if the driver can't reserve the
maximum number of interrupts, it will limit the number of queues or
disable capabilities.

First two patches add ability to turn on and off eswitch offload. This
is needed when driver can't reserve maximum number of interrupts. In
this case driver turns off eswitch offload as driver can work
without it. Additionally, the eswitch can be supported only if SRIOV is
available, so set eswitch capabilities only if SRIOV is supported.

Michal Swiatkowski (3):
  ice: add check for eswitch support
  ice: change mode only if eswitch is supported
  ice: use new alloc irqs API

 drivers/net/ethernet/intel/ice/Makefile      |   3 +-
 drivers/net/ethernet/intel/ice/ice.h         |   4 +-
 drivers/net/ethernet/intel/ice/ice_arfs.c    |   3 +-
 drivers/net/ethernet/intel/ice/ice_eswitch.c |  46 +++-
 drivers/net/ethernet/intel/ice/ice_eswitch.h |  12 +
 drivers/net/ethernet/intel/ice/ice_irq.c     | 213 ++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_irq.h     |  12 +
 drivers/net/ethernet/intel/ice/ice_lib.c     |   5 +-
 drivers/net/ethernet/intel/ice/ice_main.c    | 220 +------------------
 drivers/net/ethernet/intel/ice/ice_xsk.c     |   3 +-
 10 files changed, 300 insertions(+), 221 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ice/ice_irq.c
 create mode 100644 drivers/net/ethernet/intel/ice/ice_irq.h

Comments

Jonathan Toppins Dec. 22, 2021, 4:33 p.m. UTC | #1
On 12/22/21 01:21, Michal Swiatkowski wrote:
> The ice driver uses the old PCI irq reseveration API. Change the ice
> driver to use the current API.
> 
> Implement a fallback mechanism where, if the driver can't reserve the
> maximum number of interrupts, it will limit the number of queues or
> disable capabilities.
> 
> First two patches add ability to turn on and off eswitch offload. This
> is needed when driver can't reserve maximum number of interrupts. In
> this case driver turns off eswitch offload as driver can work
> without it. Additionally, the eswitch can be supported only if SRIOV is
> available, so set eswitch capabilities only if SRIOV is supported.
> 
> Michal Swiatkowski (3):
>    ice: add check for eswitch support
>    ice: change mode only if eswitch is supported
>    ice: use new alloc irqs API
> 
>   drivers/net/ethernet/intel/ice/Makefile      |   3 +-
>   drivers/net/ethernet/intel/ice/ice.h         |   4 +-
>   drivers/net/ethernet/intel/ice/ice_arfs.c    |   3 +-
>   drivers/net/ethernet/intel/ice/ice_eswitch.c |  46 +++-
>   drivers/net/ethernet/intel/ice/ice_eswitch.h |  12 +
>   drivers/net/ethernet/intel/ice/ice_irq.c     | 213 ++++++++++++++++++
>   drivers/net/ethernet/intel/ice/ice_irq.h     |  12 +
>   drivers/net/ethernet/intel/ice/ice_lib.c     |   5 +-
>   drivers/net/ethernet/intel/ice/ice_main.c    | 220 +------------------
>   drivers/net/ethernet/intel/ice/ice_xsk.c     |   3 +-
>   10 files changed, 300 insertions(+), 221 deletions(-)
>   create mode 100644 drivers/net/ethernet/intel/ice/ice_irq.c
>   create mode 100644 drivers/net/ethernet/intel/ice/ice_irq.h
> 

Reviewed-by: Jonathan Toppins <jtoppins@redhat.com>
Tony Nguyen April 27, 2022, 12:24 a.m. UTC | #2
On 12/21/2021 10:21 PM, Michal Swiatkowski wrote:
> The ice driver uses the old PCI irq reseveration API. Change the ice
> driver to use the current API.
>
> Implement a fallback mechanism where, if the driver can't reserve the
> maximum number of interrupts, it will limit the number of queues or
> disable capabilities.

A very similar implementation was already rejected by netdev [1]. I 
believe there's kernel work being done for dynamic MSIX allocations 
which is the route we should look to take on this (when it's completed).

Thanks,

Tony

[1] 
https://lore.kernel.org/netdev/20210113234226.3638426-1-anthony.l.nguyen@intel.com/