From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Ka-Cheong Poon <ka-cheong.poon@oracle.com>
Cc: netdev@vger.kernel.org, santosh.shilimkar@oracle.com,
davem@davemloft.net, rds-devel@oss.oracle.com
Subject: Re: [PATCH net-next 2/3] rds: Enable RDS IPv6 support
Date: Mon, 25 Jun 2018 13:03:17 -0400 [thread overview]
Message-ID: <20180625170317.GA28578@oracle.com> (raw)
In-Reply-To: <7f4f460079d3d78a18f7d759488048798e99c4db.1529922794.git.ka-cheong.poon@oracle.com>
On (06/25/18 03:38), Ka-Cheong Poon wrote:
> @@ -1105,8 +1105,27 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
> break;
>
> case sizeof(*sin6): {
> - ret = -EPROTONOSUPPORT;
> - goto out;
> + int addr_type;
:
:
> + daddr = sin6->sin6_addr;
> + dport = sin6->sin6_port;
> + scope_id = sin6->sin6_scope_id;
> + break;
> }
In rds_sendmsg, the scopeid passed to rds_conn_create_outgoing
may come from the msg_name (if msg_name is a link-local) or
may come from the rs_bound_scope_id (for connected socket, change
made in Patch 1 of the series).
This sounds inconsistent.
If I bind to scopeid if1 and then send to fe80::1%if2 (without connect()),
we'd create an rds_connection with dev_if set to if2.
(first off, its a bit unexpected to be sending to fe80::1%if2 when you
are bound to a link-local on if1!)
But then, if we got back a response from fe80::1%if2, I think we would
not find a matching conn in rds_recv_incoming?
And this is even more confusing because the fastpath in rds_sendmsg
does not take the bound_scope_id into consideration at all:
1213 if (rs->rs_conn && ipv6_addr_equal(&rs->rs_conn->c_faddr, &daddr))
1214 conn = rs->rs_conn;
1215 else {
1216 conn = rds_conn_create_outgoing( /* .. */, scope_id)
so if I erroneously passed a msg_name on a connected rds socket, what
would happen? (see also question about rds_connect() itself, below)
Should we always use rs_bound_scope_id for creating the outgoing
rds_connection? (you may need something deterministic for this,
like "if bound addr is linklocal, return error if daddr has a different
scopeid, else use the bound addr's scopeid", plus, "if bound addr is
not global, and daddr is link-local, we need a conn with the daddr's
scopeid")
Also, why is there no IPv6 support in rds_connect?
(still looking through the rds-tcp changes, but wanted to get these
questions clarified first).
--Sowmini
next prev parent reply other threads:[~2018-06-25 17:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 10:38 [PATCH net-next 0/3] rds: IPv6 support Ka-Cheong Poon
2018-06-25 10:38 ` [PATCH net-next 1/3] rds: Changing IP address internal representation to struct in6_addr Ka-Cheong Poon
2018-06-25 13:39 ` [RFC PATCH] rds: rds_rdma_cm_event_handler_cmn() can be static kbuild test robot
2018-06-25 13:39 ` [PATCH net-next 1/3] rds: Changing IP address internal representation to struct in6_addr kbuild test robot
2018-06-25 10:38 ` [PATCH net-next 2/3] rds: Enable RDS IPv6 support Ka-Cheong Poon
2018-06-25 14:52 ` kbuild test robot
2018-06-25 17:03 ` Sowmini Varadhan [this message]
2018-06-25 17:43 ` Ka-Cheong Poon
2018-06-25 17:50 ` Sowmini Varadhan
2018-06-25 18:44 ` Santosh Shilimkar
2018-06-26 5:30 ` Ka-Cheong Poon
2018-06-26 10:16 ` Sowmini Varadhan
2018-06-26 13:02 ` Ka-Cheong Poon
2018-06-26 13:08 ` Sowmini Varadhan
2018-06-27 10:07 ` Ka-Cheong Poon
2018-06-27 10:29 ` Sowmini Varadhan
2018-06-27 20:45 ` Santosh Shilimkar
2018-06-25 10:38 ` [PATCH net-next 3/3] rds: Extend RDS API for " Ka-Cheong Poon
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=20180625170317.GA28578@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=ka-cheong.poon@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@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 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.