1fa619a77SHal Rosenstock /*
2fa619a77SHal Rosenstock  * Copyright (c) 2005 Intel Inc. All rights reserved.
3fa619a77SHal Rosenstock  *
4fa619a77SHal Rosenstock  * This software is available to you under a choice of one of two
5fa619a77SHal Rosenstock  * licenses.  You may choose to be licensed under the terms of the GNU
6fa619a77SHal Rosenstock  * General Public License (GPL) Version 2, available from the file
7fa619a77SHal Rosenstock  * COPYING in the main directory of this source tree, or the
8fa619a77SHal Rosenstock  * OpenIB.org BSD license below:
9fa619a77SHal Rosenstock  *
10fa619a77SHal Rosenstock  *     Redistribution and use in source and binary forms, with or
11fa619a77SHal Rosenstock  *     without modification, are permitted provided that the following
12fa619a77SHal Rosenstock  *     conditions are met:
13fa619a77SHal Rosenstock  *
14fa619a77SHal Rosenstock  *      - Redistributions of source code must retain the above
15fa619a77SHal Rosenstock  *        copyright notice, this list of conditions and the following
16fa619a77SHal Rosenstock  *        disclaimer.
17fa619a77SHal Rosenstock  *
18fa619a77SHal Rosenstock  *      - Redistributions in binary form must reproduce the above
19fa619a77SHal Rosenstock  *        copyright notice, this list of conditions and the following
20fa619a77SHal Rosenstock  *        disclaimer in the documentation and/or other materials
21fa619a77SHal Rosenstock  *        provided with the distribution.
22fa619a77SHal Rosenstock  *
23fa619a77SHal Rosenstock  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24fa619a77SHal Rosenstock  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25fa619a77SHal Rosenstock  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26fa619a77SHal Rosenstock  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27fa619a77SHal Rosenstock  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28fa619a77SHal Rosenstock  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29fa619a77SHal Rosenstock  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30fa619a77SHal Rosenstock  * SOFTWARE.
31fa619a77SHal Rosenstock  */
32fa619a77SHal Rosenstock 
33fa619a77SHal Rosenstock #ifndef __MAD_RMPP_H__
34fa619a77SHal Rosenstock #define __MAD_RMPP_H__
35fa619a77SHal Rosenstock 
36fa619a77SHal Rosenstock enum {
37fa619a77SHal Rosenstock 	IB_RMPP_RESULT_PROCESSED,
38fa619a77SHal Rosenstock 	IB_RMPP_RESULT_CONSUMED,
39fa619a77SHal Rosenstock 	IB_RMPP_RESULT_INTERNAL,
40fa619a77SHal Rosenstock 	IB_RMPP_RESULT_UNHANDLED
41fa619a77SHal Rosenstock };
42fa619a77SHal Rosenstock 
43fa619a77SHal Rosenstock int ib_send_rmpp_mad(struct ib_mad_send_wr_private *mad_send_wr);
44fa619a77SHal Rosenstock 
45fa619a77SHal Rosenstock struct ib_mad_recv_wc *
46fa619a77SHal Rosenstock ib_process_rmpp_recv_wc(struct ib_mad_agent_private *agent,
47fa619a77SHal Rosenstock 			struct ib_mad_recv_wc *mad_recv_wc);
48fa619a77SHal Rosenstock 
49fa619a77SHal Rosenstock int ib_process_rmpp_send_wc(struct ib_mad_send_wr_private *mad_send_wr,
50fa619a77SHal Rosenstock 			    struct ib_mad_send_wc *mad_send_wc);
51fa619a77SHal Rosenstock 
5234816ad9SSean Hefty void ib_rmpp_send_handler(struct ib_mad_send_wc *mad_send_wc);
5334816ad9SSean Hefty 
54fa619a77SHal Rosenstock void ib_cancel_rmpp_recvs(struct ib_mad_agent_private *agent);
55fa619a77SHal Rosenstock 
56fa619a77SHal Rosenstock int ib_retry_rmpp(struct ib_mad_send_wr_private *mad_send_wr);
57fa619a77SHal Rosenstock 
58fa619a77SHal Rosenstock #endif	/* __MAD_RMPP_H__ */
59