public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Bernard Metzler' <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: [PATCH v3 06/13] SoftiWarp connection management
Date: Tue, 30 Jan 2018 15:27:38 -0600	[thread overview]
Message-ID: <047b01d39a11$27609940$7621cbc0$@opengridcomputing.com> (raw)
In-Reply-To: <20180114223603.19961-7-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>

> 
> Signed-off-by: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
> ---
>  drivers/infiniband/sw/siw/siw_cm.c | 2184
> ++++++++++++++++++++++++++++++++++++
>  drivers/infiniband/sw/siw/siw_cm.h |  156 +++
>  2 files changed, 2340 insertions(+)
>  create mode 100644 drivers/infiniband/sw/siw/siw_cm.c
>  create mode 100644 drivers/infiniband/sw/siw/siw_cm.h

<snip>

> diff --git a/drivers/infiniband/sw/siw/siw_cm.h
> b/drivers/infiniband/sw/siw/siw_cm.h
> new file mode 100644
> index 000000000000..36a8d15d793a
> --- /dev/null
> +++ b/drivers/infiniband/sw/siw/siw_cm.h
> @@ -0,0 +1,156 @@
> +/*
> + * Software iWARP device driver
> + *
> + * Authors: Bernard Metzler <bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
> + *          Greg Joyce <greg-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> + *
> + * Copyright (c) 2008-2017, IBM Corporation
> + * Copyright (c) 2017, Open Grid Computing, Inc.
> + *
> + * 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_CM_H
> +#define _SIW_CM_H
> +
> +#include <net/sock.h>
> +#include <linux/tcp.h>
> +
> +#include <rdma/iw_cm.h>
> +
> +
> +enum siw_cep_state {
> +	SIW_EPSTATE_IDLE = 1,
> +	SIW_EPSTATE_LISTENING,
> +	SIW_EPSTATE_CONNECTING,
> +	SIW_EPSTATE_AWAIT_MPAREQ,
> +	SIW_EPSTATE_RECVD_MPAREQ,
> +	SIW_EPSTATE_AWAIT_MPAREP,
> +	SIW_EPSTATE_RDMA_MODE,
> +	SIW_EPSTATE_CLOSED
> +};
> +
> +struct siw_mpa_info {
> +	struct mpa_rr		hdr;	/* peer mpa hdr in host byte order
*/
> +	struct mpa_v2_data	v2_ctrl;
> +	struct mpa_v2_data	v2_ctrl_req;
> +	char			*pdata;
> +	int			bytes_rcvd;
> +};
> +
> +struct siw_llp_info {
> +	struct socket		*sock;
> +	struct sockaddr_in	laddr;	/* redundant with socket info above
*/
> +	struct sockaddr_in	raddr;	/* dito, consider removal */
> +	struct siw_sk_upcalls	sk_def_upcalls;
> +};
> +
> +struct siw_device;
> +
> +struct siw_cep {
> +	struct iw_cm_id		*cm_id;
> +	struct siw_device	*sdev;
> +
> +	struct list_head	devq;
> +	/*
> +	 * The provider_data element of a listener IWCM ID
> +	 * refers to a list of one or more listener CEPs
> +	 */
> +	struct list_head	listenq;
> +	struct siw_cep		*listen_cep;
> +	struct siw_qp		*qp;
> +	spinlock_t		lock;
> +	wait_queue_head_t	waitq;
> +	struct kref		ref;
> +	enum siw_cep_state	state;
> +	short			in_use;
> +	struct siw_cm_work	*mpa_timer;
> +	struct list_head	work_freelist;
> +	struct siw_llp_info	llp;
> +	struct siw_mpa_info	mpa;
> +	int			ord;
> +	int			ird;
> +	bool			enhanced_rdma_conn_est;
> +	int			sk_error; /* not (yet) used XXX */
> +
> +	/* Saved upcalls of socket llp.sock */
> +	void	(*sk_state_change)(struct sock *sk);
> +	void	(*sk_data_ready)(struct sock *sk);
> +	void	(*sk_write_space)(struct sock *sk);
> +	void	(*sk_error_report)(struct sock *sk);
> +};
> +
> +/*
> + * Connection initiator waits 10 seconds to receive an
> + * MPA reply after sending out MPA request. Reponder waits for
> + * 5 seconds for MPA request to arrive if new TCP connection
> + * was set up.
> + */
> +#define MPAREQ_TIMEOUT	(HZ*10)
> +#define MPAREP_TIMEOUT	(HZ*5)
> +

These timeout times seem pretty low for a WAN link or even a brief network
down event during MPA negotiation connection.   Any particular reason for 10
and 5?


--
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

  parent reply	other threads:[~2018-01-30 21:27 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-14 22:35 [PATCH v3 00/13] Request for Comments on SoftiWarp Bernard Metzler
     [not found] ` <20180114223603.19961-1-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2018-01-14 22:35   ` [PATCH v3 01/13] iWARP wire packet format definition Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 02/13] Main SoftiWarp include file Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 03/13] Attach/detach SoftiWarp to/from network and RDMA subsystem Bernard Metzler
     [not found]     ` <20180114223603.19961-4-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2018-01-23 16:33       ` Steve Wise
2018-01-23 16:43         ` Jason Gunthorpe
     [not found]           ` <20180123164316.GC30670-uk2M96/98Pc@public.gmane.org>
2018-01-23 16:58             ` Steve Wise
2018-01-23 17:05               ` Jason Gunthorpe
     [not found]                 ` <20180123170517.GE30670-uk2M96/98Pc@public.gmane.org>
2018-01-23 17:24                   ` Steve Wise
2018-01-23 17:28                     ` Jason Gunthorpe
     [not found]                     ` <20180123172830.GF30670-uk2M96/98Pc@public.gmane.org>
2018-01-23 17:39                       ` Bernard Metzler
2018-01-23 17:42                       ` Steve Wise
2018-01-23 17:47                         ` Jason Gunthorpe
     [not found]                           ` <20180123174758.GH30670-uk2M96/98Pc@public.gmane.org>
2018-01-23 17:55                             ` Steve Wise
2018-01-23 18:21                               ` Bernard Metzler
2018-01-23 17:23               ` Bernard Metzler
     [not found]                 ` <OF34749881.4216E578-ON0025821E.005F897C-0025821E.005F8983-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-23 17:43                   ` Steve Wise
2018-01-23 17:21             ` Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 04/13] SoftiWarp object management Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 05/13] SoftiWarp application interface Bernard Metzler
     [not found]     ` <20180114223603.19961-6-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2018-01-23 17:18       ` Steve Wise
2018-01-23 18:07         ` Bernard Metzler
     [not found]           ` <OF7390EC15.6C2741F2-ON0025821E.0062D222-0025821E.00639402-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-23 18:12             ` Steve Wise
2018-01-14 22:35   ` [PATCH v3 06/13] SoftiWarp connection management Bernard Metzler
     [not found]     ` <20180114223603.19961-7-bmt-OA+xvbQnYDHMbYB6QlFGEg@public.gmane.org>
2018-01-30 21:27       ` Steve Wise [this message]
2018-01-31 17:28         ` Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 07/13] SoftiWarp application buffer management Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 08/13] SoftiWarp Queue Pair methods Bernard Metzler
2018-01-14 22:35   ` [PATCH v3 09/13] SoftiWarp transmit path Bernard Metzler
2018-01-14 22:36   ` [PATCH v3 10/13] SoftiWarp receive path Bernard Metzler
2018-01-14 22:36   ` [PATCH v3 11/13] SoftiWarp Completion Queue methods Bernard Metzler
2018-01-14 22:36   ` [PATCH v3 12/13] SoftiWarp debugging code Bernard Metzler
2018-01-14 22:36   ` [PATCH v3 13/13] Add SoftiWarp to kernel build environment Bernard Metzler
2018-01-17 16:07   ` [PATCH v3 00/13] Request for Comments on SoftiWarp Steve Wise
2018-01-18  7:29     ` Leon Romanovsky
     [not found]     ` <20180118072958.GW13639-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-18 17:03       ` Bernard Metzler
     [not found]         ` <OFC86A1EC5.60F00E9A-ON00258219.005DA6A4-00258219.005DBBB9-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-01-18 21:52           ` Steve Wise
2018-01-23 17:31     ` Bernard Metzler
2018-02-02 14:37     ` Bernard Metzler
     [not found]       ` <OFD1018BEE.35589194-ON00258228.00505F2B-00258228.00505F31-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-02-02 18:56         ` Jason Gunthorpe
     [not found]       ` <20180202185640.GC9080-uk2M96/98Pc@public.gmane.org>
2018-02-04 20:08         ` Bernard Metzler
     [not found]           ` <OFEF72EEE6.7E5C3FA5-ON0025822A.005B18E4-0025822A.006EA4BB-8eTO7WVQ4XIsd+ienQ86orlN3bxYEBpz@public.gmane.org>
2018-02-04 20:39             ` Jason Gunthorpe
2018-01-23 16:31   ` Steve Wise
2018-01-23 16:44     ` Jason Gunthorpe

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='047b01d39a11$27609940$7621cbc0$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox