mbox series

[net-next,0/8] sfc: remove nic_data usage in common code

Message ID 8154dba6-b312-7dcf-7d49-cd6c6801ffc2@solarflare.com
Headers show
Series sfc: remove nic_data usage in common code | expand

Message

Edward Cree May 11, 2020, 12:23 p.m. UTC
efx->nic_data should only be used from NIC-specific code (i.e. nic_type
 functions and things they call), in files like ef10[_sriov].c and
 siena.c.  This series refactors several nic_data usages from common
 code (mainly in mcdi_filters.c) into nic_type functions, in preparation
 for the upcoming ef100 driver which will use those functions but have
 its own struct layout for efx->nic_data distinct from ef10's.
After this series, one nic_data usage (in ptp.c) remains; it wasn't
 clear to me how to fix it, and ef100 devices don't yet have PTP support
 (so the initial ef100 driver will not call that code).

Edward Cree (7):
  sfc: move vport_id to struct efx_nic
  sfc: use efx_has_cap for capability checks outside of NIC-specific
    code
  sfc: move 'must restore' flags out of ef10-specific nic_data
  sfc: rework handling of (firmware) multicast chaining state
  sfc: move rx_rss_context_exclusive into struct efx_mcdi_filter_table
  sfc: make filter table probe caller responsible for adding VLANs
  sfc: make firmware-variant printing a nic_type function

Tom Zhao (1):
  sfc: make capability checking a nic_type function

 drivers/net/ethernet/sfc/ef10.c           | 214 +++++++++++++---------
 drivers/net/ethernet/sfc/ef10_sriov.c     |  27 ++-
 drivers/net/ethernet/sfc/mcdi.c           |  25 +--
 drivers/net/ethernet/sfc/mcdi.h           |  12 ++
 drivers/net/ethernet/sfc/mcdi_filters.c   |  79 ++++----
 drivers/net/ethernet/sfc/mcdi_filters.h   |  17 +-
 drivers/net/ethernet/sfc/mcdi_functions.c |   8 +-
 drivers/net/ethernet/sfc/mcdi_port.c      |   7 +-
 drivers/net/ethernet/sfc/net_driver.h     |  10 +
 drivers/net/ethernet/sfc/nic.h            |  11 --
 drivers/net/ethernet/sfc/ptp.c            |   7 +-
 drivers/net/ethernet/sfc/siena.c          |   7 +
 12 files changed, 238 insertions(+), 186 deletions(-)

Comments

David Miller May 11, 2020, 8:32 p.m. UTC | #1
From: Edward Cree <ecree@solarflare.com>
Date: Mon, 11 May 2020 13:23:55 +0100

> efx->nic_data should only be used from NIC-specific code (i.e. nic_type
>  functions and things they call), in files like ef10[_sriov].c and
>  siena.c.  This series refactors several nic_data usages from common
>  code (mainly in mcdi_filters.c) into nic_type functions, in preparation
>  for the upcoming ef100 driver which will use those functions but have
>  its own struct layout for efx->nic_data distinct from ef10's.
> After this series, one nic_data usage (in ptp.c) remains; it wasn't
>  clear to me how to fix it, and ef100 devices don't yet have PTP support
>  (so the initial ef100 driver will not call that code).

Series applied, thanks.