Skip to content

Commit

Permalink
fpga/common: Limit queue count based on port count in testbench
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Forencich <[email protected]>
  • Loading branch information
alexforencich committed Feb 29, 2024
1 parent 8e35ee8 commit da29aa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fpga/common/tb/mqnic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,8 +1427,8 @@ def __init__(self, interface, port):
self.port = port
self.sched_port = None

self.txq_count = min(interface.txq_res.get_count(), 4)
self.rxq_count = min(interface.rxq_res.get_count(), 4)
self.txq_count = min(interface.txq_res.get_count() // interface.port_count, 4)
self.rxq_count = min(interface.rxq_res.get_count() // interface.port_count, 4)

self.rx_queue_map_indir_table_size = interface.rx_queue_map_indir_table_size
self.rx_queue_map_indir_table = [k % self.rxq_count for k in range(self.rx_queue_map_indir_table_size)]
Expand Down

0 comments on commit da29aa7

Please sign in to comment.