Commit 8862541d authored by Nathan Fontenot's avatar Nathan Fontenot Committed by David S. Miller

ibmvnic: Rename active queue count variables

Rename the tx/rx active pool variables to be tx/rx active scrq
counts. The tx/rx pools are per sub-crq so this is a more appropriate
name. This also is a preparatory step for using thiese variables
for handling updates to sub-crqs and napi based on the active
count.
Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9053113
...@@ -461,7 +461,7 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter) ...@@ -461,7 +461,7 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter)
if (!adapter->rx_pool) if (!adapter->rx_pool)
return; return;
for (i = 0; i < adapter->num_active_rx_pools; i++) { for (i = 0; i < adapter->num_active_rx_scrqs; i++) {
rx_pool = &adapter->rx_pool[i]; rx_pool = &adapter->rx_pool[i];
netdev_dbg(adapter->netdev, "Releasing rx_pool[%d]\n", i); netdev_dbg(adapter->netdev, "Releasing rx_pool[%d]\n", i);
...@@ -484,7 +484,7 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter) ...@@ -484,7 +484,7 @@ static void release_rx_pools(struct ibmvnic_adapter *adapter)
kfree(adapter->rx_pool); kfree(adapter->rx_pool);
adapter->rx_pool = NULL; adapter->rx_pool = NULL;
adapter->num_active_rx_pools = 0; adapter->num_active_rx_scrqs = 0;
} }
static int init_rx_pools(struct net_device *netdev) static int init_rx_pools(struct net_device *netdev)
...@@ -509,7 +509,7 @@ static int init_rx_pools(struct net_device *netdev) ...@@ -509,7 +509,7 @@ static int init_rx_pools(struct net_device *netdev)
return -1; return -1;
} }
adapter->num_active_rx_pools = 0; adapter->num_active_rx_scrqs = 0;
for (i = 0; i < rxadd_subcrqs; i++) { for (i = 0; i < rxadd_subcrqs; i++) {
rx_pool = &adapter->rx_pool[i]; rx_pool = &adapter->rx_pool[i];
...@@ -554,7 +554,7 @@ static int init_rx_pools(struct net_device *netdev) ...@@ -554,7 +554,7 @@ static int init_rx_pools(struct net_device *netdev)
rx_pool->next_free = 0; rx_pool->next_free = 0;
} }
adapter->num_active_rx_pools = rxadd_subcrqs; adapter->num_active_rx_scrqs = rxadd_subcrqs;
return 0; return 0;
} }
...@@ -613,7 +613,7 @@ static void release_tx_pools(struct ibmvnic_adapter *adapter) ...@@ -613,7 +613,7 @@ static void release_tx_pools(struct ibmvnic_adapter *adapter)
if (!adapter->tx_pool) if (!adapter->tx_pool)
return; return;
for (i = 0; i < adapter->num_active_tx_pools; i++) { for (i = 0; i < adapter->num_active_tx_scrqs; i++) {
netdev_dbg(adapter->netdev, "Releasing tx_pool[%d]\n", i); netdev_dbg(adapter->netdev, "Releasing tx_pool[%d]\n", i);
tx_pool = &adapter->tx_pool[i]; tx_pool = &adapter->tx_pool[i];
kfree(tx_pool->tx_buff); kfree(tx_pool->tx_buff);
...@@ -624,7 +624,7 @@ static void release_tx_pools(struct ibmvnic_adapter *adapter) ...@@ -624,7 +624,7 @@ static void release_tx_pools(struct ibmvnic_adapter *adapter)
kfree(adapter->tx_pool); kfree(adapter->tx_pool);
adapter->tx_pool = NULL; adapter->tx_pool = NULL;
adapter->num_active_tx_pools = 0; adapter->num_active_tx_scrqs = 0;
} }
static int init_tx_pools(struct net_device *netdev) static int init_tx_pools(struct net_device *netdev)
...@@ -641,7 +641,7 @@ static int init_tx_pools(struct net_device *netdev) ...@@ -641,7 +641,7 @@ static int init_tx_pools(struct net_device *netdev)
if (!adapter->tx_pool) if (!adapter->tx_pool)
return -1; return -1;
adapter->num_active_tx_pools = 0; adapter->num_active_tx_scrqs = 0;
for (i = 0; i < tx_subcrqs; i++) { for (i = 0; i < tx_subcrqs; i++) {
tx_pool = &adapter->tx_pool[i]; tx_pool = &adapter->tx_pool[i];
...@@ -690,7 +690,7 @@ static int init_tx_pools(struct net_device *netdev) ...@@ -690,7 +690,7 @@ static int init_tx_pools(struct net_device *netdev)
tx_pool->producer_index = 0; tx_pool->producer_index = 0;
} }
adapter->num_active_tx_pools = tx_subcrqs; adapter->num_active_tx_scrqs = tx_subcrqs;
return 0; return 0;
} }
......
...@@ -1092,8 +1092,8 @@ struct ibmvnic_adapter { ...@@ -1092,8 +1092,8 @@ struct ibmvnic_adapter {
u64 opt_rxba_entries_per_subcrq; u64 opt_rxba_entries_per_subcrq;
__be64 tx_rx_desc_req; __be64 tx_rx_desc_req;
u8 map_id; u8 map_id;
u64 num_active_rx_pools; u64 num_active_rx_scrqs;
u64 num_active_tx_pools; u64 num_active_tx_scrqs;
struct tasklet_struct tasklet; struct tasklet_struct tasklet;
enum vnic_state state; enum vnic_state state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment