Skip to content

Commit 742c60e

Browse files
Nick Childkuba-moo
authored andcommitted
ibmveth: Reduce default tx queues to 8
Previously, the default number of transmit queues was 16. Due to resource concerns, set to 8 queues instead. Still allow the user to set more queues (max 16) if they like. Since the driver is virtualized away from the physical NIC, the purpose of multiple queues is purely to allow for parallel calls to the hypervisor. Therefore, there is no noticeable effect on performance by reducing queue count to 8. Fixes: d926793 ("ibmveth: Implement multi queue on xmit") Reported-by: Dave Taht <dave.taht@gmail.com> Signed-off-by: Nick Child <nnac123@linux.ibm.com> Link: https://lore.kernel.org/r/20221107203215.58206-1-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b063349 commit 742c60e

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/net/ethernet/ibm/ibmveth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,8 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
17571757
kobject_uevent(kobj, KOBJ_ADD);
17581758
}
17591759

1760-
rc = netif_set_real_num_tx_queues(netdev, ibmveth_real_max_tx_queues());
1760+
rc = netif_set_real_num_tx_queues(netdev, min(num_online_cpus(),
1761+
IBMVETH_DEFAULT_QUEUES));
17611762
if (rc) {
17621763
netdev_dbg(netdev, "failed to set number of tx queues rc=%d\n",
17631764
rc);

drivers/net/ethernet/ibm/ibmveth.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static inline long h_illan_attributes(unsigned long unit_address,
100100
#define IBMVETH_MAX_BUF_SIZE (1024 * 128)
101101
#define IBMVETH_MAX_TX_BUF_SIZE (1024 * 64)
102102
#define IBMVETH_MAX_QUEUES 16U
103+
#define IBMVETH_DEFAULT_QUEUES 8U
103104

104105
static int pool_size[] = { 512, 1024 * 2, 1024 * 16, 1024 * 32, 1024 * 64 };
105106
static int pool_count[] = { 256, 512, 256, 256, 256 };

0 commit comments

Comments
 (0)