Commit fa619a77 authored by Hal Rosenstock's avatar Hal Rosenstock Committed by Linus Torvalds

[PATCH] IB: Add RMPP implementation

Add RMPP implementation.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarHal Rosenstock <halr@voltaire.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d2082ee5
...@@ -6,7 +6,7 @@ obj-$(CONFIG_INFINIBAND_USER_VERBS) += ib_uverbs.o ...@@ -6,7 +6,7 @@ obj-$(CONFIG_INFINIBAND_USER_VERBS) += ib_uverbs.o
ib_core-y := packer.o ud_header.o verbs.o sysfs.o \ ib_core-y := packer.o ud_header.o verbs.o sysfs.o \
device.o fmr_pool.o cache.o device.o fmr_pool.o cache.o
ib_mad-y := mad.o smi.o agent.o ib_mad-y := mad.o smi.o agent.o mad_rmpp.o
ib_sa-y := sa_query.o ib_sa-y := sa_query.o
......
This diff is collapsed.
/* /*
* Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved. * Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved.
* Copyright (c) 2005 Intel Corporation. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
...@@ -29,7 +31,7 @@ ...@@ -29,7 +31,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
* *
* $Id: mad_priv.h 1980 2005-03-11 22:33:53Z sean.hefty $ * $Id: mad_priv.h 2730 2005-06-28 16:43:03Z sean.hefty $
*/ */
#ifndef __IB_MAD_PRIV_H__ #ifndef __IB_MAD_PRIV_H__
...@@ -97,10 +99,10 @@ struct ib_mad_agent_private { ...@@ -97,10 +99,10 @@ struct ib_mad_agent_private {
unsigned long timeout; unsigned long timeout;
struct list_head local_list; struct list_head local_list;
struct work_struct local_work; struct work_struct local_work;
struct list_head rmpp_list;
atomic_t refcount; atomic_t refcount;
wait_queue_head_t wait; wait_queue_head_t wait;
u8 rmpp_version;
}; };
struct ib_mad_snoop_private { struct ib_mad_snoop_private {
...@@ -125,6 +127,14 @@ struct ib_mad_send_wr_private { ...@@ -125,6 +127,14 @@ struct ib_mad_send_wr_private {
int retry; int retry;
int refcount; int refcount;
enum ib_wc_status status; enum ib_wc_status status;
/* RMPP control */
int last_ack;
int seg_num;
int newwin;
int total_seg;
int data_offset;
int pad;
}; };
struct ib_mad_local_private { struct ib_mad_local_private {
...@@ -135,7 +145,6 @@ struct ib_mad_local_private { ...@@ -135,7 +145,6 @@ struct ib_mad_local_private {
struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG]; struct ib_sge sg_list[IB_MAD_SEND_REQ_MAX_SG];
u64 wr_id; /* client WR ID */ u64 wr_id; /* client WR ID */
u64 tid; u64 tid;
int retries;
}; };
struct ib_mad_mgmt_method_table { struct ib_mad_mgmt_method_table {
...@@ -198,4 +207,17 @@ struct ib_mad_port_private { ...@@ -198,4 +207,17 @@ struct ib_mad_port_private {
extern kmem_cache_t *ib_mad_cache; extern kmem_cache_t *ib_mad_cache;
int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr);
struct ib_mad_send_wr_private *
ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv, u64 tid);
void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
struct ib_mad_send_wc *mad_send_wc);
void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr);
void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr,
int timeout_ms);
#endif /* __IB_MAD_PRIV_H__ */ #endif /* __IB_MAD_PRIV_H__ */
This diff is collapsed.
/*
* Copyright (c) 2005 Intel 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.
*
* $Id: mad_rmpp.h 1921 2005-02-25 22:58:44Z sean.hefty $
*/
#ifndef __MAD_RMPP_H__
#define __MAD_RMPP_H__
enum {
IB_RMPP_RESULT_PROCESSED,
IB_RMPP_RESULT_CONSUMED,
IB_RMPP_RESULT_INTERNAL,
IB_RMPP_RESULT_UNHANDLED
};
int ib_send_rmpp_mad(struct ib_mad_send_wr_private *mad_send_wr);
struct ib_mad_recv_wc *
ib_process_rmpp_recv_wc(struct ib_mad_agent_private *agent,
struct ib_mad_recv_wc *mad_recv_wc);
int ib_process_rmpp_send_wc(struct ib_mad_send_wr_private *mad_send_wr,
struct ib_mad_send_wc *mad_send_wc);
void ib_cancel_rmpp_recvs(struct ib_mad_agent_private *agent);
int ib_retry_rmpp(struct ib_mad_send_wr_private *mad_send_wr);
#endif /* __MAD_RMPP_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment