netvsc: group all per-channel state together

Put all the per-channel state together in one data struct.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
stephen hemminger
2017-01-24 13:06:07 -08:00
committed by David S. Miller
parent ceaaea0483
commit b8b835a89b
4 changed files with 51 additions and 47 deletions

View File

@@ -135,7 +135,7 @@ static int netvsc_close(struct net_device *net)
while (true) {
aread = 0;
for (i = 0; i < nvdev->num_chn; i++) {
chn = nvdev->chn_table[i];
chn = nvdev->chan_table[i].channel;
if (!chn)
continue;
@@ -225,7 +225,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,
q_idx = new_idx;
}
if (unlikely(!nvsc_dev->chn_table[q_idx]))
if (unlikely(!nvsc_dev->chan_table[q_idx].channel))
q_idx = 0;
return q_idx;
@@ -545,7 +545,6 @@ no_memory:
++net_device_ctx->eth_stats.tx_no_memory;
goto drop;
}
/*
* netvsc_linkstatus_callback - Link up/down notification
*/