This patch is for the include files needed to support iWARP and is 
relative to the trunk. I added some new device capabilities bits that
could use some name tweaking -- 

Thanks,

Signed-off-by: Tom Tucker <[EMAIL PROTECTED]>


Index: rdma/ib_verbs.h
===================================================================
--- rdma/ib_verbs.h     (revision 4748)
+++ rdma/ib_verbs.h     (working copy)
@@ -67,7 +67,8 @@
 enum ib_node_type {
        IB_NODE_CA      = 1,
        IB_NODE_SWITCH,
-       IB_NODE_ROUTER
+       IB_NODE_ROUTER,
+       IB_NODE_RNIC
 };
 
 enum ib_device_cap_flags {
@@ -86,6 +87,14 @@
        IB_DEVICE_RC_RNR_NAK_GEN        = (1<<12),
        IB_DEVICE_SRQ_RESIZE            = (1<<13),
        IB_DEVICE_N_NOTIFY_CQ           = (1<<14),
+       IB_DEVICE_IN_ORD_PLCMNT         = (1<<15),
+       IB_DEVICE_ZERO_STAG             = (1<<16),
+       IB_DEVICE_SEND_W_INV            = (1<<17),
+       IB_DEVICE_MW                    = (1<<18),
+       IB_DEVICE_FMR                   = (1<<19),
+       IB_DEVICE_SRQ                   = (1<<20),
+       IB_DEVICE_ARP                   = (1<<21),
+       IB_DEVICE_LLP                   = (1<<22),
 };
 
 enum ib_atomic_cap {
@@ -824,6 +833,8 @@
 
        u32                           flags;
 
+       struct iw_cm_verbs            *iwcm;
+
        int                        (*query_device)(struct ib_device *device,
                                                   struct ib_device_attr 
*device_attr);
        int                        (*query_port)(struct ib_device *device,
Index: rdma/iw_cm.h
===================================================================
--- rdma/iw_cm.h        (revision 0)
+++ rdma/iw_cm.h        (revision 0)
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2005 Network Appliance, Inc. All rights reserved.
+ * Copyright (c) 2005 Open Grid Computing, 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.
+ */
+#if !defined(IW_CM_H)
+#define IW_CM_H
+
+#include <linux/in.h>
+#include <rdma/ib_cm.h>
+
+struct iw_cm_id;
+struct iw_cm_event;
+
+enum iw_cm_event_type {
+       IW_CM_EVENT_CONNECT_REQUEST = 1, /* connect request received */
+       IW_CM_EVENT_CONNECT_REPLY,       /* reply from active connect request */
+       IW_CM_EVENT_ESTABLISHED,
+       IW_CM_EVENT_LLP_DISCONNECT,
+       IW_CM_EVENT_LLP_RESET,
+       IW_CM_EVENT_LLP_TIMEOUT,
+       IW_CM_EVENT_CLOSE
+};
+
+struct iw_cm_event {
+       enum iw_cm_event_type event;
+       int status;
+       u32 provider_id;
+       struct sockaddr_in local_addr;
+       struct sockaddr_in remote_addr;
+       void *private_data;
+       u8  private_data_len;
+};
+
+typedef int (*iw_cm_handler)(struct iw_cm_id *cm_id,
+                            struct iw_cm_event *event);
+
+enum iw_cm_state {
+       IW_CM_STATE_IDLE,             /* unbound, inactive */
+       IW_CM_STATE_LISTEN,           /* listen waiting for connect */
+       IW_CM_STATE_CONN_SENT,        /* outbound waiting for peer accept */
+       IW_CM_STATE_CONN_RECV,        /* inbound waiting for user accept */
+       IW_CM_STATE_ESTABLISHED,      /* established */
+};
+
+typedef void (*iw_event_handler)(struct iw_cm_id* cm_id,
+                                struct iw_cm_event* event);
+struct iw_cm_id {
+       iw_cm_handler           cm_handler;      /* client callback function */
+       void                    *context;        /* context to provide to 
client cb */
+       enum iw_cm_state        state;
+       struct ib_device        *device;         
+       struct ib_qp            *qp;
+       struct sockaddr_in      local_addr;
+       struct sockaddr_in      remote_addr;
+       u64                     provider_id;     /* device handle for this 
conn. */
+       iw_event_handler        event_handler;   /* callback for IW CM Provider 
events */
+};
+
+/**
+ * iw_create_cm_id - Allocate a communication identifier.
+ * @device: Device associated with the cm_id.  All related communication will
+ * be associated with the specified device.
+ * @cm_handler: Callback invoked to notify the user of CM events.
+ * @context: User specified context associated with the communication
+ *   identifier.
+ *
+ * Communication identifiers are used to track connection states, 
+ * addr resolution requests, and listen requests.
+ */
+struct iw_cm_id *iw_create_cm_id(struct ib_device *device,
+                                iw_cm_handler cm_handler,
+                                void *context);
+
+/* This is provided in the event generated when 
+ * a remote peer accepts our connect request
+ */
+
+struct iw_cm_verbs {
+       int                        (*connect)(struct iw_cm_id* cm_id,
+                                             const void* private_data,
+                                             u8 private_data_len);
+       
+       int                        (*disconnect)(struct iw_cm_id* cm_id, 
+                                                int abrupt);
+
+       int                        (*accept)(struct iw_cm_id*,
+                                            const void *private_data, 
+                                            u8 pdata_data_len); 
+
+       int                        (*reject)(struct iw_cm_id* cm_id, 
+                                            const void* private_data, 
+                                            u8 private_data_len); 
+
+       int                        (*getpeername)(struct iw_cm_id* cm_id,
+                                                 struct sockaddr_in* 
local_addr,
+                                                 struct sockaddr_in* 
remote_addr);
+
+       int                        (*create_listen)(struct iw_cm_id* cm_id,
+                                                    int backlog);
+
+       int                        (*destroy_listen)(struct iw_cm_id* cm_id);
+
+};
+
+struct iw_cm_id *iw_create_cm_id(struct ib_device *device,
+                                iw_cm_handler cm_handler,
+                                void *context);
+void iw_destroy_cm_id(struct iw_cm_id *cm_id);
+int iw_cm_listen(struct iw_cm_id *cm_id, int backlog);
+int iw_cm_getpeername(struct iw_cm_id *cm_id,
+                     struct sockaddr_in* local_add,
+                     struct sockaddr_in* remote_addr);
+int iw_cm_reject(struct iw_cm_id *cm_id, 
+                const void *private_data,
+                u8 private_data_len);
+int iw_cm_accept(struct iw_cm_id *cm_id,
+                const void *private_data,
+                u8 private_data_len);
+int iw_cm_connect(struct iw_cm_id *cm_id, 
+                 const void* pdata, u8 pdata_len);
+int iw_cm_disconnect(struct iw_cm_id *cm_id); 
+int iw_cm_bind_qp(struct iw_cm_id* cm_id, struct ib_qp* qp);
+
+#endif /* IW_CM_H */

_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to