summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc_diag.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2024-09-09 16:05:43 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2024-11-13 10:30:21 -0800
commit8cca16be5efc6a481487e34a0fe542cc480fc720 (patch)
treec66caec97676fdef76ae990ad86c4bfcb3e1cc94 /drivers/net/ethernet/intel/igc/igc_diag.c
parent2a52984c53f3df46db58d50557fda4580aa2aad6 (diff)
downloadlinux-8cca16be5efc6a481487e34a0fe542cc480fc720.tar.gz
linux-8cca16be5efc6a481487e34a0fe542cc480fc720.tar.bz2
linux-8cca16be5efc6a481487e34a0fe542cc480fc720.zip
ice: initialize pf->supported_rxdids immediately after loading DDP
The pf->supported_rxdids field is used to populate the list of valid RXDIDs that a VF may use when negotiating VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC. The set of supported RXDIDs is dependent on the DDP, and can be read from the GLXFLXP_RXDID_FLAGS register. The PF needs to send this list to the VF upon receiving the VIRTCHNL_OP_GET_SUPPORTED_RXDIDs. It also needs to use this list to validate the requested descriptor ID from the VF when programming the Rx queues. A future update to support VF live migration will also want to validate that the target VF can support the same descriptor ID when migrating. Currently, pf->supported_rxdids is initialized inside the ice_vc_query_rxdid() function. This means that it is only ever initialized if at least one VF actually tries to negotiate VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC. It is also unnecessarily re-initialized every time the VF loads and requests the descriptor list. This worked before because the PF only checks pf->suppported_rxdids when programming the Rx queue if the VF actually negotiates the VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC feature. This will be problematic for VF live migration. We need the list of supported Rx descriptor IDs when migrating. It is possible that no VF on the target PF has ever actually issued a VIRTCHNL_OP_GET_SUPPORTED_RXDIDs. Refactor the driver to initialize pf->supported_rxdids during driver initialization after the DDP is loaded. This is simpler, avoids unnecessary duplicate work, and avoids issues with the live migration process. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_diag.c')
0 files changed, 0 insertions, 0 deletions