netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Steve Wise <swise@opengridcomputing.com>
Cc: rdreier@cisco.com, netdev@vger.kernel.org,
	openib-general@openib.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH  v2 04/13] Connection Manager
Date: Mon, 4 Dec 2006 14:08:26 +0300	[thread overview]
Message-ID: <20061204110825.GA26251@2ka.mipt.ru> (raw)
In-Reply-To: <20061202224958.27014.65970.stgit@dell3.ogc.int>

On Sat, Dec 02, 2006 at 04:49:58PM -0600, Steve Wise (swise@opengridcomputing.com) wrote:
> +static int send_halfclose(struct iwch_ep *ep, gfp_t gfp)
> +{
> +	struct cpl_close_con_req *req;
> +	struct sk_buff *skb;
> +
> +	PDBG("%s ep %p\n", __FUNCTION__, ep);
> +	skb = get_skb(NULL, sizeof(*req), gfp);
> +	if (!skb) {
> +		printk(KERN_ERR MOD "%s - failed to alloc skb\n", __FUNCTION__);
> +		return -ENOMEM;
> +	}
> +	skb->priority = CPL_PRIORITY_DATA;
> +	set_arp_failure_handler(skb, arp_failure_discard);
> +	req = (struct cpl_close_con_req *) skb_put(skb, sizeof(*req));
> +	req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_CLOSE_CON));
> +	req->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
> +	OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_CON_REQ, ep->hwtid));
> +	l2t_send(ep->com.tdev, skb, ep->l2t);
> +	return 0;
> +}
> +
> +static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
> +{
> +	struct cpl_abort_req *req;
> +
> +	PDBG("%s ep %p\n", __FUNCTION__, ep);
> +	skb = get_skb(skb, sizeof(*req), gfp);
> +	if (!skb) {
> +		printk(KERN_ERR MOD "%s - failed to alloc skb.\n",
> +		       __FUNCTION__);
> +		return -ENOMEM;
> +	}
> +	skb->priority = CPL_PRIORITY_DATA;
> +	set_arp_failure_handler(skb, abort_arp_failure);
> +	req = (struct cpl_abort_req *) skb_put(skb, sizeof(*req));
> +	req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_HOST_ABORT_CON_REQ));
> +	req->wr.wr_lo = htonl(V_WR_TID(ep->hwtid));
> +	OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ABORT_REQ, ep->hwtid));
> +	req->cmd = CPL_ABORT_SEND_RST;
> +	l2t_send(ep->com.tdev, skb, ep->l2t);
> +	return 0;
> +}
> +
> +static int send_connect(struct iwch_ep *ep)
> +{
> +	struct cpl_act_open_req *req;
> +	struct sk_buff *skb;
> +	u32 opt0h, opt0l, opt2;
> +	unsigned int mtu_idx;
> +	int wscale;
> +
> +	PDBG("%s ep %p\n", __FUNCTION__, ep);
> +
> +	skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
> +	if (!skb) {
> +		printk(KERN_ERR MOD "%s - failed to alloc skb.\n",
> +		       __FUNCTION__);
> +		return -ENOMEM;
> +	}
> +	mtu_idx = find_best_mtu(T3C_DATA(ep->com.tdev), dst_mtu(ep->dst));
> +	wscale = compute_wscale(rcv_win);
> +	opt0h = V_NAGLE(0) |
> +	    V_NO_CONG(nocong) |
> +	    V_KEEP_ALIVE(1) |
> +	    F_TCAM_BYPASS |
> +	    V_WND_SCALE(wscale) |
> +	    V_MSS_IDX(mtu_idx) |
> +	    V_L2T_IDX(ep->l2t->idx) | V_TX_CHANNEL(ep->l2t->smt_idx);
> +	opt0l = V_TOS((ep->tos >> 2) & M_TOS) | V_RCV_BUFSIZ(rcv_win>>10);
> +	opt2 = V_FLAVORS_VALID(0) | V_CONG_CONTROL_FLAVOR(0);
> +	skb->priority = CPL_PRIORITY_SETUP;
> +	set_arp_failure_handler(skb, act_open_req_arp_failure);
> +
> +	req = (struct cpl_act_open_req *) skb_put(skb, sizeof(*req));
> +	req->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD));
> +	OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, ep->atid));
> +	req->local_port = ep->com.local_addr.sin_port;
> +	req->peer_port = ep->com.remote_addr.sin_port;
> +	req->local_ip = ep->com.local_addr.sin_addr.s_addr;
> +	req->peer_ip = ep->com.remote_addr.sin_addr.s_addr;
> +	req->opt0h = htonl(opt0h);
> +	req->opt0l = htonl(opt0l);
> +	req->params = 0;
> +	req->opt2 = htonl(opt2);
> +	l2t_send(ep->com.tdev, skb, ep->l2t);
> +	return 0;
> +}

...

> +static int act_establish(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
> +{
> +	struct iwch_ep *ep = ctx;
> +	struct cpl_act_establish *req = cplhdr(skb);
> +	unsigned int tid = GET_TID(req);
> +
> +	PDBG("%s ep %p tid %d\n", __FUNCTION__, ep, tid);
> +
> +	dst_confirm(ep->dst);
> +
> +	/* setup the hwtid for this connection */
> +	ep->hwtid = tid;
> +	cxgb3_insert_tid(ep->com.tdev, &t3c_client, ep, tid);
> +
> +	ep->snd_seq = ntohl(req->snd_isn);
> +
> +	set_emss(ep, ntohs(req->tcp_opt));
> +
> +	/* dealloc the atid */
> +	cxgb3_free_atid(ep->com.tdev, ep->atid);
> +
> +	/* start MPA negotiation */
> +	send_mpa_req(ep, skb);
> +
> +	return 0;
> +}
> +
> +static void abort_connection(struct iwch_ep *ep, struct sk_buff *skb)
> +{
> +	PDBG("%s ep %p\n", __FILE__, ep);
> +	state_set(&ep->com, ABORTING);
> +	send_abort(ep, skb, GFP_KERNEL);
> +}

Could you convince network core developers that it is not own TCP
implementation which will mess with existing one?

This and a lot of other changes in this driver definitely says you
implement your own stack of protocols on top of infiniband hardware.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2006-12-04 11:12 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-02 22:49 [PATCH v2 00/13] 2.6.20 Chelsio T3 RDMA Driver Steve Wise
2006-12-02 22:49 ` [PATCH v2 01/13] Linux RDMA Core Changes Steve Wise
2006-12-02 22:49 ` [PATCH v2 02/13] Device Discovery and ULLD Linkage Steve Wise
2006-12-03 16:03   ` Jan Engelhardt
2006-12-02 22:49 ` [PATCH v2 03/13] Provider Methods and Data Structures Steve Wise
2006-12-03 12:07   ` Arjan van de Ven
2006-12-04 16:28     ` Steve Wise
2006-12-04 16:45       ` Roland Dreier
2006-12-04 16:50         ` Steve Wise
2006-12-02 22:49 ` [PATCH v2 04/13] Connection Manager Steve Wise
2006-12-04 11:08   ` Evgeniy Polyakov [this message]
2006-12-04 15:45     ` Roland Dreier
2006-12-04 16:20       ` Steve Wise
2006-12-05  5:13         ` Evgeniy Polyakov
2006-12-05 15:07           ` Steve Wise
2006-12-05 10:45         ` Brice Goglin
2006-12-05 16:02           ` Steve Wise
2006-12-05 16:27             ` [openib-general] " Steve Wise
2006-12-05 17:14           ` Roland Dreier
2006-12-05  5:07       ` Evgeniy Polyakov
2006-12-05  5:13         ` Roland Dreier
2006-12-05  5:16           ` Evgeniy Polyakov
2006-12-05  5:27             ` Roland Dreier
2006-12-05 15:14               ` Steve Wise
2006-12-05 15:27                 ` Evgeniy Polyakov
2006-12-05 15:46                   ` Steve Wise
2006-12-05 15:03           ` Steve Wise
2006-12-05 15:02         ` Steve Wise
2006-12-05 15:19           ` Evgeniy Polyakov
2006-12-05 15:39             ` Steve Wise
2006-12-05 15:59               ` Evgeniy Polyakov
2006-12-05 16:12                 ` Steve Wise
2006-12-05 16:17                   ` [openib-general] " Steve Wise
2006-12-05 16:31                   ` Evgeniy Polyakov
2006-12-05 16:47                     ` Steve Wise
2006-12-05 17:26                       ` Evgeniy Polyakov
2006-12-05 17:32                         ` Evgeniy Polyakov
2006-12-05 17:51                         ` Steve Wise
2006-12-05 18:09                           ` Evgeniy Polyakov
2006-12-06  1:27                             ` [openib-general] " Michael Krause
2006-12-02 22:50 ` [PATCH v2 05/13] Queue Pairs Steve Wise
2006-12-02 22:50 ` [PATCH v2 06/13] Completion Queues Steve Wise
2006-12-02 22:50 ` [PATCH v2 07/13] Async Event Handler Steve Wise
2006-12-02 22:50 ` [PATCH v2 08/13] Memory Registration Steve Wise
2006-12-02 22:50 ` [PATCH v2 09/13] Core WQE/CQE Types Steve Wise
2006-12-02 22:50 ` [PATCH v2 10/13] Core HAL Steve Wise
2006-12-02 22:51 ` [PATCH v2 11/13] Core Resource Allocation Steve Wise
2006-12-02 22:51 ` [PATCH v2 12/13] Core Debug functions Steve Wise
2006-12-02 22:51 ` [PATCH v2 13/13] Kconfig/Makefile Steve Wise
2006-12-02 23:13 ` [PATCH v2 00/13] 2.6.20 Chelsio T3 RDMA Driver Francois Romieu
2006-12-03  0:24   ` Stephen Hemminger
2006-12-04 16:24     ` Steve Wise

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=20061204110825.GA26251@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openib-general@openib.org \
    --cc=rdreier@cisco.com \
    --cc=swise@opengridcomputing.com \
    /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;
as well as URLs for NNTP newsgroup(s).