diff options
author | Shreyas Bhatewara <sbhatewara@vmware.com> | 2015-06-19 16:38:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-23 09:26:01 -0400 |
commit | 45dac1d6ea045ae56e4df8d9c70c92c7412bd4fc (patch) | |
tree | 6860f6148378c225f224139c30b41e1bbfd79fb8 /drivers/net/vmxnet3/vmxnet3_defs.h | |
parent | c41fcce997d2caa039a46495d40423348c51ad61 (diff) |
vmxnet3: Changes for vmxnet3 adapter version 2 (fwd)
Make the driver understand adapter version 2.
Cc: Rachel Lunnon <rachel_lunnon@stormagic.com>
Signed-off-by: Guolin Yang <gyang@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_defs.h')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_defs.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_defs.h b/drivers/net/vmxnet3/vmxnet3_defs.h index 3718d024f638..221a53025fd0 100644 --- a/drivers/net/vmxnet3/vmxnet3_defs.h +++ b/drivers/net/vmxnet3/vmxnet3_defs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Linux driver for VMware's vmxnet3 ethernet NIC. | 2 | * Linux driver for VMware's vmxnet3 ethernet NIC. |
3 | * | 3 | * |
4 | * Copyright (C) 2008-2009, VMware, Inc. All Rights Reserved. | 4 | * Copyright (C) 2008-2015, VMware, Inc. All Rights Reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -277,6 +277,40 @@ struct Vmxnet3_RxCompDesc { | |||
277 | #endif /* __BIG_ENDIAN_BITFIELD */ | 277 | #endif /* __BIG_ENDIAN_BITFIELD */ |
278 | }; | 278 | }; |
279 | 279 | ||
280 | struct Vmxnet3_RxCompDescExt { | ||
281 | __le32 dword1; | ||
282 | u8 segCnt; /* Number of aggregated packets */ | ||
283 | u8 dupAckCnt; /* Number of duplicate Acks */ | ||
284 | __le16 tsDelta; /* TCP timestamp difference */ | ||
285 | __le32 dword2; | ||
286 | #ifdef __BIG_ENDIAN_BITFIELD | ||
287 | u32 gen:1; /* generation bit */ | ||
288 | u32 type:7; /* completion type */ | ||
289 | u32 fcs:1; /* Frame CRC correct */ | ||
290 | u32 frg:1; /* IP Fragment */ | ||
291 | u32 v4:1; /* IPv4 */ | ||
292 | u32 v6:1; /* IPv6 */ | ||
293 | u32 ipc:1; /* IP Checksum Correct */ | ||
294 | u32 tcp:1; /* TCP packet */ | ||
295 | u32 udp:1; /* UDP packet */ | ||
296 | u32 tuc:1; /* TCP/UDP Checksum Correct */ | ||
297 | u32 mss:16; | ||
298 | #else | ||
299 | u32 mss:16; | ||
300 | u32 tuc:1; /* TCP/UDP Checksum Correct */ | ||
301 | u32 udp:1; /* UDP packet */ | ||
302 | u32 tcp:1; /* TCP packet */ | ||
303 | u32 ipc:1; /* IP Checksum Correct */ | ||
304 | u32 v6:1; /* IPv6 */ | ||
305 | u32 v4:1; /* IPv4 */ | ||
306 | u32 frg:1; /* IP Fragment */ | ||
307 | u32 fcs:1; /* Frame CRC correct */ | ||
308 | u32 type:7; /* completion type */ | ||
309 | u32 gen:1; /* generation bit */ | ||
310 | #endif /* __BIG_ENDIAN_BITFIELD */ | ||
311 | }; | ||
312 | |||
313 | |||
280 | /* fields in RxCompDesc we access via Vmxnet3_GenericDesc.dword[3] */ | 314 | /* fields in RxCompDesc we access via Vmxnet3_GenericDesc.dword[3] */ |
281 | #define VMXNET3_RCD_TUC_SHIFT 16 | 315 | #define VMXNET3_RCD_TUC_SHIFT 16 |
282 | #define VMXNET3_RCD_IPC_SHIFT 19 | 316 | #define VMXNET3_RCD_IPC_SHIFT 19 |
@@ -310,6 +344,7 @@ union Vmxnet3_GenericDesc { | |||
310 | struct Vmxnet3_RxDesc rxd; | 344 | struct Vmxnet3_RxDesc rxd; |
311 | struct Vmxnet3_TxCompDesc tcd; | 345 | struct Vmxnet3_TxCompDesc tcd; |
312 | struct Vmxnet3_RxCompDesc rcd; | 346 | struct Vmxnet3_RxCompDesc rcd; |
347 | struct Vmxnet3_RxCompDescExt rcdExt; | ||
313 | }; | 348 | }; |
314 | 349 | ||
315 | #define VMXNET3_INIT_GEN 1 | 350 | #define VMXNET3_INIT_GEN 1 |
@@ -361,6 +396,7 @@ enum { | |||
361 | /* completion descriptor types */ | 396 | /* completion descriptor types */ |
362 | #define VMXNET3_CDTYPE_TXCOMP 0 /* Tx Completion Descriptor */ | 397 | #define VMXNET3_CDTYPE_TXCOMP 0 /* Tx Completion Descriptor */ |
363 | #define VMXNET3_CDTYPE_RXCOMP 3 /* Rx Completion Descriptor */ | 398 | #define VMXNET3_CDTYPE_RXCOMP 3 /* Rx Completion Descriptor */ |
399 | #define VMXNET3_CDTYPE_RXCOMP_LRO 4 /* Rx Completion Descriptor for LRO */ | ||
364 | 400 | ||
365 | enum { | 401 | enum { |
366 | VMXNET3_GOS_BITS_UNK = 0, /* unknown */ | 402 | VMXNET3_GOS_BITS_UNK = 0, /* unknown */ |