From: Andy Grover <andy.grover@oracle.com>
To: netdev@vger.kernel.org
Cc: rds-devel@oss.oracle.com
Subject: [PATCH 06/12] RDS: Establish connection before parsing CMSGs
Date: Thu, 9 Apr 2009 17:09:41 -0700 [thread overview]
Message-ID: <1239322187-3764-7-git-send-email-andy.grover@oracle.com> (raw)
In-Reply-To: <1239322187-3764-1-git-send-email-andy.grover@oracle.com>
The first message to a remote node should prompt a new connection.
Even an RDMA op via CMSG. Therefore move CMSG parsing to after
connection establishment.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
---
net/rds/send.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index 104fe03..a4a7f42 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -854,11 +854,6 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
rm->m_daddr = daddr;
- /* Parse any control messages the user may have included. */
- ret = rds_cmsg_send(rs, rm, msg, &allocated_mr);
- if (ret)
- goto out;
-
/* rds_conn_create has a spinlock that runs with IRQ off.
* Caching the conn in the socket helps a lot. */
if (rs->rs_conn && rs->rs_conn->c_faddr == daddr)
@@ -874,6 +869,11 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
rs->rs_conn = conn;
}
+ /* Parse any control messages the user may have included. */
+ ret = rds_cmsg_send(rs, rm, msg, &allocated_mr);
+ if (ret)
+ goto out;
+
if ((rm->m_rdma_cookie || rm->m_rdma_op)
&& conn->c_trans->xmit_rdma == NULL) {
if (printk_ratelimit())
--
1.5.6.3
next prev parent reply other threads:[~2009-04-10 0:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 0:09 [PATCH net-next 0/12] RDS: updates for net-next Andy Grover
2009-04-10 0:09 ` [PATCH 01/12] RDS/IW+IB: Set recv ring low water mark to 1/2 full Andy Grover
2009-04-10 0:09 ` [PATCH 02/12] RDS: Correct some iw references in rdma_transport.c Andy Grover
2009-04-10 0:09 ` [PATCH 03/12] RDS/IW+IB: Set the RDS_LL_SEND_FULL bit when we're throttled Andy Grover
2009-04-10 0:09 ` [PATCH 04/12] RDS/IW+IB: Allow max credit advertise window Andy Grover
2009-04-10 0:09 ` [PATCH 05/12] RDS: Fix ordering in a conditional Andy Grover
2009-04-10 0:09 ` Andy Grover [this message]
2009-04-10 0:09 ` [PATCH 07/12] RDS: use get_user_pages_fast() Andy Grover
2009-04-10 0:09 ` [PATCH 08/12] RDS: remove unused #include <version.h> Andy Grover
2009-04-10 0:09 ` [PATCH 09/12] rds: use kmem_cache_zalloc instead of kmem_cache_alloc/memset Andy Grover
2009-04-10 0:09 ` [PATCH 10/12] ERR_PTR() dereference in net/rds/iw.c Andy Grover
2009-04-10 0:09 ` [PATCH 11/12] ERR_PTR() dereference in net/rds/ib.c Andy Grover
2009-04-10 0:09 ` [PATCH 12/12] MAINTAINERS: rds list is moderated Andy Grover
2009-04-10 0:21 ` [PATCH net-next 0/12] RDS: updates for net-next David Miller
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=1239322187-3764-7-git-send-email-andy.grover@oracle.com \
--to=andy.grover@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.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).