summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-30 17:16:20 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-12-01 13:30:39 +0000
commit9ec6f59d94089eef2ba0c6ac06d3e71abf785102 (patch)
tree5da586a469a9e55a7423c0bc2adc0dc4a93e1c66 /src
parent3a9c3ebcc1a818031efdf83d552bfb21206d2eae (diff)
iavf: limit maximum number of queues to 32
First genaration of AVF APIs we currently use doesn't support more... Type: improvement Change-Id: I1ae27f322403a2b455fcad8b028fa2004b449789 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dev_iavf/iavf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/dev_iavf/iavf.c b/src/plugins/dev_iavf/iavf.c
index 1a17f46fb52..3bf11201a3e 100644
--- a/src/plugins/dev_iavf/iavf.c
+++ b/src/plugins/dev_iavf/iavf.c
@@ -19,6 +19,8 @@ VLIB_REGISTER_LOG_CLASS (iavf_log, static) = {
.subclass_name = "init",
};
+#define IAVF_MAX_QPAIRS 32
+
static const u32 driver_cap_flags =
/**/ VIRTCHNL_VF_CAP_ADV_LINK_SPEED |
/**/ VIRTCHNL_VF_LARGE_NUM_QPAIRS |
@@ -151,15 +153,15 @@ iavf_init (vlib_main_t *vm, vnet_dev_t *dev)
.rss_lut_size = res.rss_lut_size,
.max_vectors = res.max_vectors,
.vsi_id = res.vsi_res[0].vsi_id,
- .num_qp = res.vsi_res[0].num_queue_pairs,
+ .num_qp = clib_min (IAVF_MAX_QPAIRS, res.vsi_res[0].num_queue_pairs),
};
vnet_dev_port_add_args_t port_add_args = {
.port = {
.attr = {
.type = VNET_DEV_PORT_TYPE_ETHERNET,
- .max_rx_queues = res.num_queue_pairs,
- .max_tx_queues = res.num_queue_pairs,
+ .max_rx_queues = clib_min (IAVF_MAX_QPAIRS, res.num_queue_pairs),
+ .max_tx_queues = clib_min (IAVF_MAX_QPAIRS, res.num_queue_pairs),
.max_supported_rx_frame_size = res.max_mtu,
.caps.change_max_rx_frame_size = 1,
},