aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/iseries_veth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/iseries_veth.c')
-rw-r--r--drivers/net/iseries_veth.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 9536962f5cd2..2e54c85bc099 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -81,12 +81,50 @@
81 81
82#undef DEBUG 82#undef DEBUG
83 83
84#include "iseries_veth.h"
85
86MODULE_AUTHOR("Kyle Lucke <klucke@us.ibm.com>"); 84MODULE_AUTHOR("Kyle Lucke <klucke@us.ibm.com>");
87MODULE_DESCRIPTION("iSeries Virtual ethernet driver"); 85MODULE_DESCRIPTION("iSeries Virtual ethernet driver");
88MODULE_LICENSE("GPL"); 86MODULE_LICENSE("GPL");
89 87
88#define VethEventTypeCap (0)
89#define VethEventTypeFrames (1)
90#define VethEventTypeMonitor (2)
91#define VethEventTypeFramesAck (3)
92
93#define VETH_MAX_ACKS_PER_MSG (20)
94#define VETH_MAX_FRAMES_PER_MSG (6)
95
96struct VethFramesData {
97 u32 addr[VETH_MAX_FRAMES_PER_MSG];
98 u16 len[VETH_MAX_FRAMES_PER_MSG];
99 u32 eofmask;
100};
101#define VETH_EOF_SHIFT (32-VETH_MAX_FRAMES_PER_MSG)
102
103struct VethFramesAckData {
104 u16 token[VETH_MAX_ACKS_PER_MSG];
105};
106
107struct VethCapData {
108 u8 caps_version;
109 u8 rsvd1;
110 u16 num_buffers;
111 u16 ack_threshold;
112 u16 rsvd2;
113 u32 ack_timeout;
114 u32 rsvd3;
115 u64 rsvd4[3];
116};
117
118struct VethLpEvent {
119 struct HvLpEvent base_event;
120 union {
121 struct VethCapData caps_data;
122 struct VethFramesData frames_data;
123 struct VethFramesAckData frames_ack_data;
124 } u;
125
126};
127
90#define VETH_NUMBUFFERS (120) 128#define VETH_NUMBUFFERS (120)
91#define VETH_ACKTIMEOUT (1000000) /* microseconds */ 129#define VETH_ACKTIMEOUT (1000000) /* microseconds */
92#define VETH_MAX_MCAST (12) 130#define VETH_MAX_MCAST (12)