Check FW flags for status of Resource Limits. If bit
FUNC_QCAPS_RESP_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED
is set, that means FW set the resource limit for L2 and RoCE.
We'll then do the following:
- L2 driver would allocate context memory based on what FW reported.
- RoCE driver uses FW reported values without capping. These values are the total FW reported value minus L2 and other components shares.
For example:
FW reported max_qps = 137217 in L2 query, this includes: 5120 for L2 1025 for QP1 131072 for RoCE L2 will allocate backing store memory for the total. In RoCE query, we'll get max_qp = 131072 and use it without further capping.