ionic: Use cached VF attributes
authorBrett Creeley <brett.creeley@amd.com>
Mon, 4 Dec 2023 21:09:32 +0000 (13:09 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Dec 2023 04:49:50 +0000 (20:49 -0800)
commit15e54faa5d5e4840974de7fb5cd737c2179a309a
tree3fed44656a93f87e9654143c3323ce6bf89b221d
parent2f57dd94bdef083855366138646b26b05f410d99
ionic: Use cached VF attributes

Each time a VF attribute is set via iproute a call to get the VF
configuration is also made. This is currently problematic because for
each VF configuration call there are multiple commands sent to the
device. Unfortunately, this doesn't scale well. Fix this by reporting
the cached VF attributes.

The original change to query the device for getting the VF attributes
    f16f5be31009 ("ionic: Query FW when getting VF info via ndo_get_vf_config")
was made to remain consistent with device set VF attributes. However,
after further investigation there is no need to query the device.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Link: https://lore.kernel.org/r/20231204210936.16587-2-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic.h
drivers/net/ethernet/pensando/ionic/ionic_dev.c
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_main.c