From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 05/13] SoftiWarp application interface
Date: Sun, 8 Oct 2017 16:17:46 +0300 [thread overview]
Message-ID: <20171008131746.GY25829@mtr-leonro.local> (raw)
In-Reply-To: <20171006122853.16310-6-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 6978 bytes --]
On Fri, Oct 06, 2017 at 08:28:45AM -0400, Bernard Metzler wrote:
> Signed-off-by: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
> ---
> drivers/infiniband/sw/siw/siw_ae.c | 113 ++
> drivers/infiniband/sw/siw/siw_verbs.c | 1929 +++++++++++++++++++++++++++++++++
> drivers/infiniband/sw/siw/siw_verbs.h | 119 ++
> include/uapi/rdma/siw_user.h | 220 ++++
> 4 files changed, 2381 insertions(+)
> create mode 100644 drivers/infiniband/sw/siw/siw_ae.c
> create mode 100644 drivers/infiniband/sw/siw/siw_verbs.c
> create mode 100644 drivers/infiniband/sw/siw/siw_verbs.h
> create mode 100644 include/uapi/rdma/siw_user.h
>
<..>
> +#endif
> diff --git a/include/uapi/rdma/siw_user.h b/include/uapi/rdma/siw_user.h
> new file mode 100644
> index 000000000000..9bf1448d54e7
> --- /dev/null
> +++ b/include/uapi/rdma/siw_user.h
> @@ -0,0 +1,220 @@
> +/*
> + * Software iWARP device driver for Linux
> + *
> + * Authors: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
> + *
> + * Copyright (c) 2008-2017, IBM Corporation
> + *
> + * 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
> + * 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.
> + *
> + * - Neither the name of IBM nor the names of its contributors may be
> + * used to endorse or promote products derived from this software without
> + * specific prior written permission.
> + *
> + * 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 _SIW_USER_H
> +#define _SIW_USER_H
> +
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
> +
> +/*Common string that is matched to accept the device by the user library*/
> +#define SIW_NODE_DESC_COMMON "Software iWARP stack"
> +
> +#define SIW_IBDEV_PREFIX "siw_"
NACK to whole this file, no "#ifdef __KERNEL__" magic and wrong data types.
> +
> +#define VERSION_ID_SOFTIWARP 2
> +
> +#define SIW_MAX_SGE 6
> +#define SIW_MAX_UOBJ_KEY 0xffffff
> +#define SIW_INVAL_UOBJ_KEY (SIW_MAX_UOBJ_KEY + 1)
> +
> +struct siw_uresp_create_cq {
> + uint32_t cq_id;
> + uint32_t num_cqe;
> + uint32_t cq_key;
> +};
> +
> +struct siw_uresp_create_qp {
> + uint32_t qp_id;
> + uint32_t num_sqe;
> + uint32_t num_rqe;
> + uint32_t sq_key;
> + uint32_t rq_key;
> +};
> +
> +struct siw_ureq_reg_mr {
> + uint8_t stag_key;
> + uint8_t reserved[3];
> +};
> +
> +struct siw_uresp_reg_mr {
> + uint32_t stag;
> +};
> +
> +struct siw_uresp_create_srq {
> + uint32_t num_rqe;
> + uint32_t srq_key;
> +};
> +
> +struct siw_uresp_alloc_ctx {
> + uint32_t dev_id;
> +};
> +
> +enum siw_opcode {
> + SIW_OP_WRITE = 0,
> + SIW_OP_READ = 1,
> + SIW_OP_READ_LOCAL_INV = 2,
> + SIW_OP_SEND = 3,
> + SIW_OP_SEND_WITH_IMM = 4,
> + SIW_OP_SEND_REMOTE_INV = 5,
> +
> + /* Unsupported */
> + SIW_OP_FETCH_AND_ADD = 6,
> + SIW_OP_COMP_AND_SWAP = 7,
> +
> + SIW_OP_RECEIVE = 8,
> + /* provider internal SQE */
> + SIW_OP_READ_RESPONSE = 9,
> + /*
> + * below opcodes valid for
> + * in-kernel clients only
> + */
> + SIW_OP_INVAL_STAG = 10,
> + SIW_OP_REG_MR = 11,
> + SIW_NUM_OPCODES = 12
> +};
> +
> +/* Keep it same as ibv_sge to allow for memcpy */
> +struct siw_sge {
> + uint64_t laddr;
> + uint32_t length;
> + uint32_t lkey;
> +};
> +
> +/*
> + * Inline data are kept within the work request itself occupying
> + * the space of sge[1] .. sge[n]. Therefore, inline data cannot be
> + * supported if SIW_MAX_SGE is below 2 elements.
> + */
> +#define SIW_MAX_INLINE (sizeof(struct siw_sge) * (SIW_MAX_SGE - 1))
> +
> +#if SIW_MAX_SGE < 2
> +#error "SIW_MAX_SGE must be at least 2"
> +#endif
> +
> +enum siw_wqe_flags {
> + SIW_WQE_VALID = 1,
> + SIW_WQE_INLINE = (1 << 1),
> + SIW_WQE_SIGNALLED = (1 << 2),
> + SIW_WQE_SOLICITED = (1 << 3),
> + SIW_WQE_READ_FENCE = (1 << 4),
> + SIW_WQE_COMPLETED = (1 << 5)
> +};
> +
> +/* Send Queue Element */
> +struct siw_sqe {
> + uint64_t id;
> + uint16_t flags;
> + uint8_t num_sge;
> + /* Contains enum siw_opcode values */
> + uint8_t opcode;
> + uint32_t rkey;
> + union {
> + uint64_t raddr;
> + uint64_t ofa_mr;
> + };
> + union {
> + struct siw_sge sge[SIW_MAX_SGE];
> + uint32_t access;
> + };
> +};
> +
> +/* Receive Queue Element */
> +struct siw_rqe {
> + uint64_t id;
> + uint16_t flags;
> + uint8_t num_sge;
> + /*
> + * only used by kernel driver,
> + * ignored if set by user
> + */
> + uint8_t opcode;
> + uint32_t imm_data;
> + struct siw_sge sge[SIW_MAX_SGE];
> +};
> +
> +enum siw_notify_flags {
> + SIW_NOTIFY_NOT = (0),
> + SIW_NOTIFY_SOLICITED = (1 << 0),
> + SIW_NOTIFY_NEXT_COMPLETION = (1 << 1),
> + SIW_NOTIFY_MISSED_EVENTS = (1 << 2),
> + SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED |
> + SIW_NOTIFY_NEXT_COMPLETION |
> + SIW_NOTIFY_MISSED_EVENTS
> +};
> +
> +enum siw_wc_status {
> + SIW_WC_SUCCESS = 0,
> + SIW_WC_LOC_LEN_ERR = 1,
> + SIW_WC_LOC_PROT_ERR = 2,
> + SIW_WC_LOC_QP_OP_ERR = 3,
> + SIW_WC_WR_FLUSH_ERR = 4,
> + SIW_WC_BAD_RESP_ERR = 5,
> + SIW_WC_LOC_ACCESS_ERR = 6,
> + SIW_WC_REM_ACCESS_ERR = 7,
> + SIW_WC_REM_INV_REQ_ERR = 8,
> + SIW_WC_GENERAL_ERR = 9,
> + SIW_NUM_WC_STATUS = 10
> +};
> +
> +struct siw_cqe {
> + uint64_t id;
> + uint8_t flags;
> + uint8_t opcode;
> + uint16_t status;
> + uint32_t bytes;
> + uint64_t imm_data;
> + /* QP number or QP pointer */
> + union {
> + void *qp;
> + uint64_t qp_id;
> + };
> +};
> +
> +/*
> + * Shared structure between user and kernel
> + * to control CQ arming.
> + */
> +struct siw_cq_ctrl {
> + enum siw_notify_flags notify;
> +};
> +
> +#endif
> --
> 2.13.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-10-08 13:17 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 12:28 [PATCH v2 00/13] Request for Comments on SoftiWarp Bernard Metzler
[not found] ` <20171006122853.16310-1-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-06 12:28 ` [PATCH v2 01/13] iWARP wire packet format definition Bernard Metzler
[not found] ` <20171006122853.16310-2-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-06 15:28 ` Bart Van Assche
2017-10-08 12:35 ` Leon Romanovsky
2017-10-12 14:16 ` Dennis Dalessandro
2017-10-19 16:34 ` Steve Wise
2017-10-06 12:28 ` [PATCH v2 02/13] Main SoftiWarp include file Bernard Metzler
[not found] ` <20171006122853.16310-3-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-19 16:39 ` Steve Wise
2017-10-06 12:28 ` [PATCH v2 03/13] Attach/detach SoftiWarp to/from network and RDMA subsystem Bernard Metzler
[not found] ` <20171006122853.16310-4-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 13:03 ` Leon Romanovsky
2017-10-12 14:33 ` Dennis Dalessandro
2017-10-19 16:53 ` Steve Wise
2017-10-23 15:42 ` Jason Gunthorpe
[not found] ` <20171008130342.GV25829-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-14 1:28 ` Bernard Metzler
[not found] ` <OF406E95F8.33CF80BB-ON002581B9.00073D6F-002581B9.00081F69-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2017-10-14 6:41 ` Leon Romanovsky
[not found] ` <20171014064132.GT2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-14 8:21 ` Leon Romanovsky
2017-12-22 11:29 ` Bernard Metzler
[not found] ` <OF663C0801.8471532E-ON002581FE.003B73D6-002581FE.003F2369-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2017-12-25 10:12 ` Leon Romanovsky
2018-01-02 21:37 ` Jason Gunthorpe
[not found] ` <20180102213706.GB19027-uk2M96/98Pc@public.gmane.org>
2018-01-03 5:25 ` Leon Romanovsky
[not found] ` <20180103052529.GI10145-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-03 15:52 ` Jason Gunthorpe
[not found] ` <20180103155225.GA11348-uk2M96/98Pc@public.gmane.org>
2018-01-03 17:31 ` Leon Romanovsky
[not found] ` <20180103173105.GX10145-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-03 17:36 ` Jason Gunthorpe
[not found] ` <20180103173658.GE11348-uk2M96/98Pc@public.gmane.org>
2018-01-04 15:05 ` Bernard Metzler
[not found] ` <OF156C6886.C5A736C2-ON0025820B.005235C2-0025820B.0052EF8F-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-04 18:21 ` Jason Gunthorpe
[not found] ` <20180104182108.GR11348-uk2M96/98Pc@public.gmane.org>
2018-01-09 16:58 ` Bernard Metzler
[not found] ` <OF38355950.8A86F33F-ON00258210.005B3539-00258210.005D4AA4-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-09 17:08 ` Jason Gunthorpe
2017-11-08 16:46 ` Bernard Metzler
[not found] ` <OF14995472.9A0A4CF8-ON002581D2.005950C6-002581D2.005C2475-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2017-11-09 8:46 ` Leon Romanovsky
[not found] ` <20171109084610.GB18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-09 14:43 ` Bernard Metzler
[not found] ` <OFCB0BDB52.EB9864CE-ON002581D3.004282CC-002581D3.0050E7A2-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2017-11-09 17:47 ` Leon Romanovsky
2017-10-06 12:28 ` [PATCH v2 04/13] SoftiWarp object management Bernard Metzler
[not found] ` <20171006122853.16310-5-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 12:28 ` Leon Romanovsky
[not found] ` <a82cc3b1-af27-c1de-afb1-a8edea4baed2-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-14 0:34 ` Bernard Metzler
[not found] ` <20171008122839.GS25829-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-13 1:01 ` Doug Ledford
2017-10-14 1:07 ` Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 05/13] SoftiWarp application interface Bernard Metzler
[not found] ` <20171006122853.16310-6-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 13:17 ` Leon Romanovsky [this message]
2017-10-09 7:51 ` Yanjun Zhu
[not found] ` <108c5ddc-1390-c28e-d97e-68d4d0f49e1c-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-10-09 8:05 ` Yanjun Zhu
2017-10-12 14:42 ` Dennis Dalessandro
2017-10-19 17:22 ` Steve Wise
2017-10-20 13:30 ` Shiraz Saleem
[not found] ` <20171020133013.GC11604-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-10-25 14:17 ` Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 06/13] SoftiWarp connection management Bernard Metzler
[not found] ` <20171006122853.16310-7-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-06 14:59 ` Parav Pandit
[not found] ` <VI1PR0502MB300889B173AC42BD1ADF6F92D1710-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-06 15:32 ` Bart Van Assche
[not found] ` <1507303945.2602.9.camel-Sjgp3cTcYWE@public.gmane.org>
2017-10-06 16:04 ` Parav Pandit
[not found] ` <VI1PR0502MB3008D5916D814D77776C395ED1710-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-10-14 0:56 ` Bernard Metzler
2017-10-12 15:27 ` Dennis Dalessandro
2017-10-19 17:28 ` Steve Wise
2017-10-20 12:49 ` Shiraz Saleem
[not found] ` <20171020124944.GA11604-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-10-25 14:01 ` Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 07/13] SoftiWarp application buffer management Bernard Metzler
[not found] ` <20171006122853.16310-8-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-12 17:40 ` Dennis Dalessandro
2017-10-06 12:28 ` [PATCH v2 08/13] SoftiWarp Queue Pair methods Bernard Metzler
[not found] ` <20171006122853.16310-9-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 13:11 ` Leon Romanovsky
2017-10-09 8:58 ` Yanjun Zhu
2017-10-19 17:40 ` Steve Wise
2017-10-06 12:28 ` [PATCH v2 09/13] SoftiWarp transmit path Bernard Metzler
[not found] ` <20171006122853.16310-10-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 13:06 ` Leon Romanovsky
2017-10-11 12:54 ` Sagi Grimberg
2017-10-19 17:46 ` Steve Wise
2017-10-06 12:28 ` [PATCH v2 10/13] SoftiWarp receive path Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 11/13] SoftiWarp Completion Queue methods Bernard Metzler
[not found] ` <20171006122853.16310-12-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-20 12:58 ` Shiraz Saleem
[not found] ` <20171020125836.GB11604-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-10-25 13:51 ` Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 12/13] SoftiWarp debugging code Bernard Metzler
[not found] ` <20171006122853.16310-13-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2017-10-08 12:39 ` Leon Romanovsky
[not found] ` <20171008123950.GU25829-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-14 1:08 ` Bernard Metzler
2017-10-06 12:28 ` [PATCH v2 13/13] Add SoftiWarp to kernel build environment Bernard Metzler
2017-10-08 12:31 ` [PATCH v2 00/13] Request for Comments on SoftiWarp Christoph Hellwig
[not found] ` <20171008123128.GA28815-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-10-08 12:32 ` Christoph Hellwig
[not found] ` <20171008123240.GA31066-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-10-12 22:27 ` Bernard Metzler
2017-10-12 18:05 ` Dennis Dalessandro
[not found] ` <dd0e915d-2ab7-9912-b000-bcca1acee256-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-12 18:35 ` Bart Van Assche
2017-10-20 13:45 ` Shiraz Saleem
[not found] ` <20171020134501.GD11604-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-10-20 16:25 ` Leon Romanovsky
[not found] ` <20171020162521.GA2106-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-25 15:43 ` Bernard Metzler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171008131746.GY25829@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.