diff options
| author | stephen hemminger <stephen@networkplumber.org> | 2017-01-24 13:06:07 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-01-24 16:28:59 -0500 |
| commit | b8b835a89b2f7a7fe681983dfe5c489cb9ad9500 (patch) | |
| tree | 156d3537cbf6ca51b7148690d868b38f6f37da7a /drivers/net/hyperv/hyperv_net.h | |
| parent | ceaaea0483cf82a2c817781f3cbacf29f2c5cc97 (diff) | |
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>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
| -rw-r--r-- | drivers/net/hyperv/hyperv_net.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index db11f7ab67a8..fb73caad0965 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -714,6 +714,14 @@ struct net_device_context { u32 vf_serial; }; +/* Per channel data */ +struct netvsc_channel { + struct vmbus_channel *channel; + struct multi_send_data msd; + struct multi_recv_comp mrc; + atomic_t queue_sends; +}; + /* Per netvsc device */ struct netvsc_device { u32 nvsp_version; @@ -744,27 +752,25 @@ struct netvsc_device { struct nvsp_message revoke_packet; - struct vmbus_channel *chn_table[VRSS_CHANNEL_MAX]; u32 send_table[VRSS_SEND_TAB_SIZE]; u32 max_chn; u32 num_chn; spinlock_t sc_lock; /* Protects num_sc_offered variable */ u32 num_sc_offered; - atomic_t queue_sends[VRSS_CHANNEL_MAX]; /* Holds rndis device info */ void *extension; int ring_size; - struct multi_send_data msd[VRSS_CHANNEL_MAX]; u32 max_pkt; /* max number of pkt in one send, e.g. 8 */ u32 pkt_align; /* alignment bytes, e.g. 8 */ - struct multi_recv_comp mrc[VRSS_CHANNEL_MAX]; atomic_t num_outstanding_recvs; atomic_t open_cnt; + + struct netvsc_channel chan_table[VRSS_CHANNEL_MAX]; }; static inline struct netvsc_device * |