[PATCH 01/11] RDMA/nes: change MAX_CM_BUFFER define

2009-12-09 Thread Faisal Latif
 Changed MAX_CM_BUFFER for MPA frame to be conformant to RFC 5044.
 This will change it to 512 + 20 instead of 512.
 Signed-off-by: Faisal Latif faisal.la...@intel.com


diff --git a/drivers/infiniband/hw/nes/nes_cm.h 
b/drivers/infiniband/hw/nes/nes_cm.h
index 90e8e4d..2d867a6 100644
--- a/drivers/infiniband/hw/nes/nes_cm.h
+++ b/drivers/infiniband/hw/nes/nes_cm.h
@@ -47,6 +47,8 @@
 #define IEFT_MPA_KEY_REP  MPA ID Rep Frame
 #define IETF_MPA_KEY_SIZE 16
 #define IETF_MPA_VERSION  1
+#define IETF_MAX_PRIV_DATA_LEN 512
+#define IETF_MPA_FRAME_SIZE 20
 
 enum ietf_mpa_flags {
IETF_MPA_FLAGS_MARKERS = 0x80,  /* receive Markers */
@@ -169,7 +171,7 @@ struct nes_timer_entry {
 
 #define NES_CM_DEF_SEQ2  0x18ed5740
 #define NES_CM_DEF_LOCAL_ID2 0xb807
-#defineMAX_CM_BUFFER   512
+#defineMAX_CM_BUFFER   (IETF_MPA_FRAME_SIZE + IETF_MAX_PRIV_DATA_LEN)
 
 
 typedef u32 nes_addr_t;
diff --git a/drivers/infiniband/hw/nes/nes_context.h 
b/drivers/infiniband/hw/nes/nes_context.h
deleted file mode 100644
index 0fb8d81..000
--- a/drivers/infiniband/hw/nes/nes_context.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2006 - 2009 Intel-NE, Inc.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- *  - Redistributions of source code must retain the above
- *copyright notice, this list of conditions and the following
- *disclaimer.
- *
- *  - Redistributions in binary form must reproduce the above
- *copyright notice, this list of conditions and the following
- *disclaimer in the documentation and/or other materials
- *provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef NES_CONTEXT_H
-#define NES_CONTEXT_H
-
-struct nes_qp_context {
-   __le32   misc;
-   __le32   cqs;
-   __le32   sq_addr_low;
-   __le32   sq_addr_high;
-   __le32   rq_addr_low;
-   __le32   rq_addr_high;
-   __le32   misc2;
-   __le16   tcpPorts[2];
-   __le32   ip0;
-   __le32   ip1;
-   __le32   ip2;
-   __le32   ip3;
-   __le32   mss;
-   __le32   arp_index_vlan;
-   __le32   tcp_state_flow_label;
-   __le32   pd_index_wscale;
-   __le32   keepalive;
-   u32   ts_recent;
-   u32   ts_age;
-   __le32   snd_nxt;
-   __le32   snd_wnd;
-   __le32   rcv_nxt;
-   __le32   rcv_wnd;
-   __le32   snd_max;
-   __le32   snd_una;
-   u32   srtt;
-   __le32   rttvar;
-   __le32   ssthresh;
-   __le32   cwnd;
-   __le32   snd_wl1;
-   __le32   snd_wl2;
-   __le32   max_snd_wnd;
-   __le32   ts_val_delta;
-   u32   retransmit;
-   u32   probe_cnt;
-   u32   hte_index;
-   __le32   q2_addr_low;
-   __le32   q2_addr_high;
-   __le32   ird_index;
-   u32   Rsvd3;
-   __le32   ird_ord_sizes;
-   u32   mrkr_offset;
-   __le32   aeq_token_low;
-   __le32   aeq_token_high;
-};
-
-/* QP Context Misc Field */
-
-#define NES_QPCONTEXT_MISC_IWARP_VER_MASK0x0003
-#define NES_QPCONTEXT_MISC_IWARP_VER_SHIFT   0
-#define NES_QPCONTEXT_MISC_EFB_SIZE_MASK 0x00C0
-#define NES_QPCONTEXT_MISC_EFB_SIZE_SHIFT6
-#define NES_QPCONTEXT_MISC_RQ_SIZE_MASK  0x0300
-#define NES_QPCONTEXT_MISC_RQ_SIZE_SHIFT 8
-#define NES_QPCONTEXT_MISC_SQ_SIZE_MASK  0x0c00
-#define NES_QPCONTEXT_MISC_SQ_SIZE_SHIFT 10
-#define NES_QPCONTEXT_MISC_PCI_FCN_MASK  0x7000
-#define NES_QPCONTEXT_MISC_PCI_FCN_SHIFT 12
-#define NES_QPCONTEXT_MISC_DUP_ACKS_MASK 0x0007
-#define NES_QPCONTEXT_MISC_DUP_ACKS_SHIFT16
-
-enum nes_qp_context_misc_bits {
-   NES_QPCONTEXT_MISC_RX_WQE_SIZE = 0x0004,
-   NES_QPCONTEXT_MISC_IPV4= 0x0008,
-   NES_QPCONTEXT_MISC_DO_NOT_FRAG = 0x0010,
-   NES_QPCONTEXT_MISC_INSERT_VLAN = 0x0020,
-   NES_QPCONTEXT_MISC_DROS= 0x8000,
-   NES_QPCONTEXT_MISC_WSCALE  = 0x0008,
-   NES_QPCONTEXT_MISC_KEEPALIVE   = 0x0010,
-

[PATCH 01/11] RDMA/nes: change MAX_CM_BUFFER define

2009-12-09 Thread Faisal Latif
Changed MAX_CM_BUFFER for MPA frame to be conformant to RFC 5044.
This will change it to 512 + 20 instead of 512.

Signed-off-by: Faisal Latif faisal.la...@intel.com
---
 drivers/infiniband/hw/nes/nes_cm.h |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_cm.h 
b/drivers/infiniband/hw/nes/nes_cm.h
index 90e8e4d..118c7c8 100644
--- a/drivers/infiniband/hw/nes/nes_cm.h
+++ b/drivers/infiniband/hw/nes/nes_cm.h
@@ -47,6 +47,8 @@
 #define IEFT_MPA_KEY_REP  MPA ID Rep Frame
 #define IETF_MPA_KEY_SIZE 16
 #define IETF_MPA_VERSION  1
+#define IETF_MAX_PRIV_DATA_LEN 512
+#define IETF_MPA_FRAME_SIZE 20
 
 enum ietf_mpa_flags {
IETF_MPA_FLAGS_MARKERS = 0x80,  /* receive Markers */
@@ -169,7 +171,7 @@ struct nes_timer_entry {
 
 #define NES_CM_DEF_SEQ2  0x18ed5740
 #define NES_CM_DEF_LOCAL_ID2 0xb807
-#defineMAX_CM_BUFFER   512
+#defineMAX_CM_BUFFER   (IETF_MPA_FRAME_SIZE + IETF_MAX_PRIV_DATA_LEN)
 
 
 typedef u32 nes_addr_t;
-- 
1.5.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html