mbox series

[v8,net-next,0/8] sfc: devlink support for ef100

Message ID 20230215090828.11697-1-alejandro.lucero-palau@amd.com (mailing list archive)
Headers show
Series sfc: devlink support for ef100 | expand

Message

Lucero Palau, Alejandro Feb. 15, 2023, 9:08 a.m. UTC
From: Alejandro Lucero <alejandro.lucero-palau@amd.com>

v8 changes:
 - using preprocessor conditional approach instead of ifdef for
   fixing Microblaze build error.

v7 changes:
 - Fix Microblaze build error based on checking RTC_LIB instead of
   SFC_SRIOV.

v6 changes:
 - add file headers at its due time
 - fix sfc.rst warnings
 - add sfc.rst to the index.rst file
 - avoid microblaze build error
 - simplify devlink info errors reported

v5 changes
 - add extack error report for devlink info
 - Rename devlink functions stating locking
 - Check functions return through a variable
 - Remove unnecessary non related changes
 - put SRIOV dependent code inside #ifdefs (is ia64 still alive?)

v4 changes:
 - Add new doc file to MAINTAINERS
 - nvram metadata call independent of MTD config
 - add more useful info with extack

v3 changes:
 - fix compilation warnings/errors reported by checkpatch

v2 changes:
 - splitting up devlink info from basic devlink support
 - using devlink lock/unlock during initialization and removal
 - fix devlink registration order
 - splitting up efx_devlink_info_running_versions
 - Add sfc.rst with specifics about sfc info
 - embedding dl_port in mports
 - using extack for error reports to user space

This patchset adds devlink port support for ef100 allowing setting VFs
mac addresses through the VF representor devlink ports.

Basic devlink infrastructure is first introduced, then support for info
command. Next changes for enumerating MAE ports which will be used for
devlink port creation when netdevs are registered.

Adding support for devlink port_function_hw_addr_get requires changes in
the ef100 driver for getting the mac address based on a client handle.
This allows to obtain VFs mac addresses during netdev initialization as
well what is included in patch 6.

Such client handle is used in patches 7 and 8 for getting and setting
devlink port addresses.

Alejandro Lucero (8):
  sfc: add devlink support for ef100
  sfc: add devlink info support for ef100
  sfc: enumerate mports in ef100
  sfc: add mport lookup based on driver's mport data
  sfc: add devlink port support for ef100
  sfc: obtain device mac address based on firmware handle for ef100
  sfc: add support for devlink port_function_hw_addr_get in ef100
  sfc: add support for devlink port_function_hw_addr_set in ef100

 Documentation/networking/devlink/index.rst |   1 +
 Documentation/networking/devlink/sfc.rst   |  57 ++
 MAINTAINERS                                |   1 +
 drivers/net/ethernet/sfc/Kconfig           |   1 +
 drivers/net/ethernet/sfc/Makefile          |   3 +-
 drivers/net/ethernet/sfc/ef100_netdev.c    |  30 +
 drivers/net/ethernet/sfc/ef100_nic.c       |  93 ++-
 drivers/net/ethernet/sfc/ef100_nic.h       |   7 +
 drivers/net/ethernet/sfc/ef100_rep.c       |  57 +-
 drivers/net/ethernet/sfc/ef100_rep.h       |  10 +
 drivers/net/ethernet/sfc/efx_devlink.c     | 731 +++++++++++++++++++++
 drivers/net/ethernet/sfc/efx_devlink.h     |  47 ++
 drivers/net/ethernet/sfc/mae.c             | 218 +++++-
 drivers/net/ethernet/sfc/mae.h             |  40 ++
 drivers/net/ethernet/sfc/mcdi.c            |  72 ++
 drivers/net/ethernet/sfc/mcdi.h            |   8 +
 drivers/net/ethernet/sfc/net_driver.h      |   8 +
 17 files changed, 1359 insertions(+), 25 deletions(-)
 create mode 100644 Documentation/networking/devlink/sfc.rst
 create mode 100644 drivers/net/ethernet/sfc/efx_devlink.c
 create mode 100644 drivers/net/ethernet/sfc/efx_devlink.h

Comments

Jakub Kicinski Feb. 16, 2023, 5:57 a.m. UTC | #1
On Wed, 15 Feb 2023 09:08:20 +0000 alejandro.lucero-palau@amd.com wrote:
> This patchset adds devlink port support for ef100 allowing setting VFs
> mac addresses through the VF representor devlink ports.
> 
> Basic devlink infrastructure is first introduced, then support for info
> command. Next changes for enumerating MAE ports which will be used for
> devlink port creation when netdevs are registered.
> 
> Adding support for devlink port_function_hw_addr_get requires changes in
> the ef100 driver for getting the mac address based on a client handle.
> This allows to obtain VFs mac addresses during netdev initialization as
> well what is included in patch 6.
> 
> Such client handle is used in patches 7 and 8 for getting and setting
> devlink port addresses.

LGTM
patchwork-bot+netdevbpf@kernel.org Feb. 16, 2023, 11:20 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 15 Feb 2023 09:08:20 +0000 you wrote:
> From: Alejandro Lucero <alejandro.lucero-palau@amd.com>
> 
> v8 changes:
>  - using preprocessor conditional approach instead of ifdef for
>    fixing Microblaze build error.
> 
> v7 changes:
>  - Fix Microblaze build error based on checking RTC_LIB instead of
>    SFC_SRIOV.
> 
> [...]

Here is the summary with links:
  - [v8,net-next,1/8] sfc: add devlink support for ef100
    https://git.kernel.org/netdev/net-next/c/fa34a5140a8e
  - [v8,net-next,2/8] sfc: add devlink info support for ef100
    https://git.kernel.org/netdev/net-next/c/14743ddd2495
  - [v8,net-next,3/8] sfc: enumerate mports in ef100
    https://git.kernel.org/netdev/net-next/c/a6a15aca4207
  - [v8,net-next,4/8] sfc: add mport lookup based on driver's mport data
    https://git.kernel.org/netdev/net-next/c/5227adff37af
  - [v8,net-next,5/8] sfc: add devlink port support for ef100
    https://git.kernel.org/netdev/net-next/c/25414b2a64ae
  - [v8,net-next,6/8] sfc: obtain device mac address based on firmware handle for ef100
    https://git.kernel.org/netdev/net-next/c/7e056e2360d9
  - [v8,net-next,7/8] sfc: add support for devlink port_function_hw_addr_get in ef100
    https://git.kernel.org/netdev/net-next/c/fa78b01718d2
  - [v8,net-next,8/8] sfc: add support for devlink port_function_hw_addr_set in ef100
    https://git.kernel.org/netdev/net-next/c/3b6096c9b30b

You are awesome, thank you!