diff options
| author | Jacob Keller <[email protected]> | 2025-06-18 22:24:38 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2025-07-10 21:36:58 +0000 |
| commit | 5ff8d956235725b1fa455375dcdad33046c3e3be (patch) | |
| tree | 66c33b2e89896bb28552fc32ddc665fca697496d /drivers/net/ethernet/intel/ice/ice_vf_lib.c | |
| parent | ice: add functions to get and set Tx queue context (diff) | |
| download | kernel-5ff8d956235725b1fa455375dcdad33046c3e3be.tar.gz kernel-5ff8d956235725b1fa455375dcdad33046c3e3be.zip | |
ice: save RSS hash configuration for migration
The VF can program the RSS hash configuration over virtchnl. It does this
by sending a u64 bitmask which represents the current hash configuration.
It is not trivial to reverse the hardware configuration back to this hash
set for migration. Instead, save the value to the ice_vf structure when its
modified by the VF.
The rss_hashcfg value is an 8-byte field. Make room for it in ice_vf by
re-arranging some of the existing fields. There is a 4-byte gap after the
first_vector_idx, and a 4-byte gap between max_tx_rate and vf_states. Move
first_vector_idx into the later 4-byte gap, creating an 8 byte area where
rss_hashcfg can be placed. Also move the num_msix field near min_tx_rate,
filling 2 bytes of a 3 byte hole.
The end result of these changes enables placing the rss_hashcfg field into
the structure while also saving 8 bytes in size. It looks like there are a
handful of more possible cleanups to reduce the size even further, but
those have been left as a future cleanup.
Signed-off-by: Jacob Keller <[email protected]>
Reviewed-by: Przemek Kitszel <[email protected]>
Reviewed-by: Madhu Chittim <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_vf_lib.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_vf_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c index 48cd533e93b7..c639ce716d32 100644 --- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c @@ -1022,6 +1022,9 @@ void ice_initialize_vf_entry(struct ice_vf *vf) vf->num_msix = vfs->num_msix_per; vf->num_vf_qs = vfs->num_qps_per; + /* set default RSS hash configuration */ + vf->rss_hashcfg = ICE_DEFAULT_RSS_HASHCFG; + /* ctrl_vsi_idx will be set to a valid value only when iAVF * creates its first fdir rule. */ |
