aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic.h
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-08-05 03:34:09 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 15:40:15 -0400
commitc1c00ab8626298ac784ea344bf10e94b5bd9bcb5 (patch)
tree49c6479ddaa4121b06cc762f1ee1e19fdfde3e65 /drivers/net/netxen/netxen_nic.h
parent06db58c0cd92e157a4ccf2b6836c9f4b931c7cda (diff)
netxen: add hardware LRO support
Add support to handle aggregate packets from firmware. Local TCP flows are automatically identified by firmware based on the dest IP hash added by driver for local IP addresses. The packets are sent down on the jumbo rx ring. Signed-off-by: Narender Kumar <narender.kumar@qlogic.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r--drivers/net/netxen/netxen_nic.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index bb4aa4f58676..ae81f7022d23 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -365,6 +365,7 @@ struct rcv_desc {
365#define NETXEN_NIC_RXPKT_DESC 0x04 365#define NETXEN_NIC_RXPKT_DESC 0x04
366#define NETXEN_OLD_RXPKT_DESC 0x3f 366#define NETXEN_OLD_RXPKT_DESC 0x3f
367#define NETXEN_NIC_RESPONSE_DESC 0x05 367#define NETXEN_NIC_RESPONSE_DESC 0x05
368#define NETXEN_NIC_LRO_DESC 0x12
368 369
369/* for status field in status_desc */ 370/* for status field in status_desc */
370#define STATUS_NEED_CKSUM (1) 371#define STATUS_NEED_CKSUM (1)
@@ -398,6 +399,24 @@ struct rcv_desc {
398#define netxen_get_sts_opcode(sts_data) \ 399#define netxen_get_sts_opcode(sts_data) \
399 (((sts_data) >> 58) & 0x03F) 400 (((sts_data) >> 58) & 0x03F)
400 401
402#define netxen_get_lro_sts_refhandle(sts_data) \
403 ((sts_data) & 0x0FFFF)
404#define netxen_get_lro_sts_length(sts_data) \
405 (((sts_data) >> 16) & 0x0FFFF)
406#define netxen_get_lro_sts_l2_hdr_offset(sts_data) \
407 (((sts_data) >> 32) & 0x0FF)
408#define netxen_get_lro_sts_l4_hdr_offset(sts_data) \
409 (((sts_data) >> 40) & 0x0FF)
410#define netxen_get_lro_sts_timestamp(sts_data) \
411 (((sts_data) >> 48) & 0x1)
412#define netxen_get_lro_sts_type(sts_data) \
413 (((sts_data) >> 49) & 0x7)
414#define netxen_get_lro_sts_push_flag(sts_data) \
415 (((sts_data) >> 52) & 0x1)
416#define netxen_get_lro_sts_seq_number(sts_data) \
417 ((sts_data) & 0x0FFFFFFFF)
418
419
401struct status_desc { 420struct status_desc {
402 __le64 status_desc_data[2]; 421 __le64 status_desc_data[2];
403} __attribute__ ((aligned(16))); 422} __attribute__ ((aligned(16)));
@@ -712,6 +731,7 @@ struct netxen_recv_context {
712#define NX_CAP0_LSO NX_CAP_BIT(0, 6) 731#define NX_CAP0_LSO NX_CAP_BIT(0, 6)
713#define NX_CAP0_JUMBO_CONTIGUOUS NX_CAP_BIT(0, 7) 732#define NX_CAP0_JUMBO_CONTIGUOUS NX_CAP_BIT(0, 7)
714#define NX_CAP0_LRO_CONTIGUOUS NX_CAP_BIT(0, 8) 733#define NX_CAP0_LRO_CONTIGUOUS NX_CAP_BIT(0, 8)
734#define NX_CAP0_HW_LRO NX_CAP_BIT(0, 10)
715 735
716/* 736/*
717 * Context state 737 * Context state
@@ -969,6 +989,7 @@ typedef struct {
969#define NX_FW_CAPABILITY_PEXQ (1 << 7) 989#define NX_FW_CAPABILITY_PEXQ (1 << 7)
970#define NX_FW_CAPABILITY_BDG (1 << 8) 990#define NX_FW_CAPABILITY_BDG (1 << 8)
971#define NX_FW_CAPABILITY_FVLANTX (1 << 9) 991#define NX_FW_CAPABILITY_FVLANTX (1 << 9)
992#define NX_FW_CAPABILITY_HW_LRO (1 << 10)
972 993
973/* module types */ 994/* module types */
974#define LINKEVENT_MODULE_NOT_PRESENT 1 995#define LINKEVENT_MODULE_NOT_PRESENT 1