]> git.baikalelectronics.ru Git - kernel.git/commit
ice: enable initial devlink support
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 12 Mar 2020 01:58:15 +0000 (18:58 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Mar 2020 07:55:42 +0000 (00:55 -0700)
commit95a9e2713869d149265d7db8e699b976d6a3b4e0
tree3142f75f69d836923ea00d3b71d944bccc6b4a4a
parent3a6aced24fad49240aadc249bb537321b9e76b41
ice: enable initial devlink support

Begin implementing support for the devlink interface with the ice
driver.

The pf structure is currently memory managed through devres, via
a devm_alloc. To mimic this behavior, after allocating the devlink
pointer, use devm_add_action to add a teardown action for releasing the
devlink memory on exit.

The ice hardware is a multi-function PCIe device. Thus, each physical
function will get its own devlink instance. This means that each
function will be treated independently, with its own parameters and
configuration. This is done because the ice driver loads a separate
instance for each function.

Due to this, the implementation does not enable devlink to manage
device-wide resources or configuration, as each physical function will
be treated independently. This is done for simplicity, as managing
a devlink instance across multiple driver instances would significantly
increase the complexity for minimal gain.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/Kconfig
drivers/net/ethernet/intel/ice/Makefile
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_devlink.c [new file with mode: 0644]
drivers/net/ethernet/intel/ice/ice_devlink.h [new file with mode: 0644]
drivers/net/ethernet/intel/ice/ice_main.c