summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ibmveth.c
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2015-04-29 16:25:44 -0500
committerDavid S. Miller <davem@davemloft.net>2015-04-30 16:33:45 -0400
commitcd7c7ec3687986c71b48848637066d4460c92b95 (patch)
tree1996647d4a1c1308fcd51fd347a20036d5470338 /drivers/net/ethernet/ibm/ibmveth.c
parent79c9cc3cd08cf784fce252378290d9f171d00947 (diff)
downloadlwn-cd7c7ec3687986c71b48848637066d4460c92b95.tar.gz
lwn-cd7c7ec3687986c71b48848637066d4460c92b95.zip
ibmveth: change rx buffer default allocation for CMO
This patch enables 64k rx buffer pools by default. If Cooperative Memory Overcommitment (CMO) is enabled, the number of 64k buffers is reduced to save memory. Cc: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmveth.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmveth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 18134766a114..0956ab9f7582 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1424,6 +1424,9 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
memcpy(netdev->dev_addr, mac_addr_p, ETH_ALEN);
+ if (firmware_has_feature(FW_FEATURE_CMO))
+ memcpy(pool_count, pool_count_cmo, sizeof(pool_count));
+
for (i = 0; i < IBMVETH_NUM_BUFF_POOLS; i++) {
struct kobject *kobj = &adapter->rx_buff_pool[i].kobj;
int error;