]> git.droids-corp.org - dpdk.git/commitdiff
net/ice: support 256 queues
authorWenjun Wu <wenjun1.wu@intel.com>
Thu, 24 Mar 2022 05:12:32 +0000 (13:12 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Mon, 18 Apr 2022 05:47:18 +0000 (07:47 +0200)
256 queues can be allowed now. This patch improves the code
to support 256 queues for per PF.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.c
drivers/net/ice/ice_ethdev.h

index 13adcf90ed7a35efec8b364d3504acd1e79b5763..73e550f5fb3c4f4fc08e6eca49d3665692cdb26e 100644 (file)
@@ -808,7 +808,7 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,
                                struct ice_aqc_vsi_props *info,
                                uint8_t enabled_tcmap)
 {
-       uint16_t bsf, qp_idx;
+       uint16_t fls, qp_idx;
 
        /* default tc 0 now. Multi-TC supporting need to be done later.
         * Configure TC and queue mapping parameters, for enabled TC,
@@ -820,15 +820,15 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,
        }
 
        vsi->nb_qps = RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC);
-       bsf = rte_bsf32(vsi->nb_qps);
+       fls = (vsi->nb_qps == 0) ? 0 : rte_fls_u32(vsi->nb_qps) - 1;
        /* Adjust the queue number to actual queues that can be applied */
-       vsi->nb_qps = 0x1 << bsf;
+       vsi->nb_qps = (vsi->nb_qps == 0) ? 0 : 0x1 << fls;
 
        qp_idx = 0;
        /* Set tc and queue mapping with VSI */
        info->tc_mapping[0] = rte_cpu_to_le_16((qp_idx <<
                                                ICE_AQ_VSI_TC_Q_OFFSET_S) |
-                                              (bsf << ICE_AQ_VSI_TC_Q_NUM_S));
+                                              (fls << ICE_AQ_VSI_TC_Q_NUM_S));
 
        /* Associate queue number with VSI */
        info->mapping_flags |= rte_cpu_to_le_16(ICE_AQ_VSI_Q_MAP_CONTIG);
index 3ed580d438cbfb54ddbb85ab1ccfeb251e78cbf6..09cfb60b0f28708f9a1ddcae7476b013a038c8d1 100644 (file)
@@ -21,8 +21,8 @@
 #define ICE_ADMINQ_BUF_SZ            4096
 #define ICE_SBIOQ_BUF_SZ             4096
 #define ICE_MAILBOXQ_BUF_SZ          4096
-/* Number of queues per TC should be one of 1, 2, 4, 8, 16, 32, 64 */
-#define ICE_MAX_Q_PER_TC         64
+/* Number of queues per TC should be one of 1, 2, 4, 8, 16, 32, 64, 128, 256 */
+#define ICE_MAX_Q_PER_TC         256
 #define ICE_NUM_DESC_DEFAULT     512
 #define ICE_BUF_SIZE_MIN         1024
 #define ICE_FRAME_SIZE_MAX       9728