* [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes
@ 2017-03-31 22:56 Sowmini Varadhan
2017-03-31 22:56 ` [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN Sowmini Varadhan
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sowmini Varadhan @ 2017-03-31 22:56 UTC (permalink / raw)
To: netdev; +Cc: davem, santosh.shilimkar, sowmini.varadhan
A couple of minor bugfixes that showed up during testing
Sowmini Varadhan (2):
rds: tcp: allow progress of rds_conn_shutdown if the rds_connection
is marked ERROR by an intervening FIN
rds: tcp: canonical connection order for all paths with index > 0
net/rds/connection.c | 10 +++++++++-
net/rds/threads.c | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN
2017-03-31 22:56 [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes Sowmini Varadhan
@ 2017-03-31 22:56 ` Sowmini Varadhan
2017-04-01 18:53 ` santosh.shilimkar
2017-03-31 22:56 ` [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0 Sowmini Varadhan
2017-04-03 2:41 ` [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Sowmini Varadhan @ 2017-03-31 22:56 UTC (permalink / raw)
To: netdev; +Cc: davem, santosh.shilimkar, sowmini.varadhan
rds_conn_shutdown() runs in workq context, and marks the rds_connection
as DISCONNECTING before quiescing Tx/Rx paths. However, after all I/O
has quiesced, we may still find the rds_connection state to be
RDS_CONN_ERROR if an intervening FIN was processed in softirq context.
This is not a fatal error: rds_conn_shutdown() should continue the
shutdown, and there is no need to log noisy messages about this event.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
net/rds/connection.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 1fa75ab..6a5ebde 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -333,11 +333,19 @@ void rds_conn_shutdown(struct rds_conn_path *cp)
rds_conn_path_reset(cp);
if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING,
+ RDS_CONN_DOWN) &&
+ !rds_conn_path_transition(cp, RDS_CONN_ERROR,
RDS_CONN_DOWN)) {
/* This can happen - eg when we're in the middle of tearing
* down the connection, and someone unloads the rds module.
- * Quite reproduceable with loopback connections.
+ * Quite reproducible with loopback connections.
* Mostly harmless.
+ *
+ * Note that this also happens with rds-tcp because
+ * we could have triggered rds_conn_path_drop in irq
+ * mode from rds_tcp_state change on the receipt of
+ * a FIN, thus we need to recheck for RDS_CONN_ERROR
+ * here.
*/
rds_conn_path_error(cp, "%s: failed to transition "
"to state DOWN, current state "
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0
2017-03-31 22:56 [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes Sowmini Varadhan
2017-03-31 22:56 ` [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN Sowmini Varadhan
@ 2017-03-31 22:56 ` Sowmini Varadhan
2017-04-01 18:54 ` santosh.shilimkar
2017-04-03 2:41 ` [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Sowmini Varadhan @ 2017-03-31 22:56 UTC (permalink / raw)
To: netdev; +Cc: davem, santosh.shilimkar, sowmini.varadhan
The rds_connect_worker() has a bug in the check that enforces the
canonical connection order described in the comments of
rds_tcp_state_change(). The intention is to make sure that all
the multipath connections are always initiated by the smaller IP
address via rds_start_mprds. To achieve this, rds_connection_worker
should check that cp_index > 0.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
net/rds/threads.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/rds/threads.c b/net/rds/threads.c
index e36e333..3e447d0 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -156,7 +156,7 @@ void rds_connect_worker(struct work_struct *work)
struct rds_connection *conn = cp->cp_conn;
int ret;
- if (cp->cp_index > 1 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
+ if (cp->cp_index > 0 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
return;
clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags);
ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING);
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN
2017-03-31 22:56 ` [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN Sowmini Varadhan
@ 2017-04-01 18:53 ` santosh.shilimkar
0 siblings, 0 replies; 6+ messages in thread
From: santosh.shilimkar @ 2017-04-01 18:53 UTC (permalink / raw)
To: Sowmini Varadhan, netdev; +Cc: davem
On 3/31/17 3:56 PM, Sowmini Varadhan wrote:
> rds_conn_shutdown() runs in workq context, and marks the rds_connection
> as DISCONNECTING before quiescing Tx/Rx paths. However, after all I/O
> has quiesced, we may still find the rds_connection state to be
> RDS_CONN_ERROR if an intervening FIN was processed in softirq context.
>
> This is not a fatal error: rds_conn_shutdown() should continue the
> shutdown, and there is no need to log noisy messages about this event.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0
2017-03-31 22:56 ` [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0 Sowmini Varadhan
@ 2017-04-01 18:54 ` santosh.shilimkar
0 siblings, 0 replies; 6+ messages in thread
From: santosh.shilimkar @ 2017-04-01 18:54 UTC (permalink / raw)
To: Sowmini Varadhan, netdev; +Cc: davem
On 3/31/17 3:56 PM, Sowmini Varadhan wrote:
> The rds_connect_worker() has a bug in the check that enforces the
> canonical connection order described in the comments of
> rds_tcp_state_change(). The intention is to make sure that all
> the multipath connections are always initiated by the smaller IP
> address via rds_start_mprds. To achieve this, rds_connection_worker
> should check that cp_index > 0.
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes
2017-03-31 22:56 [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes Sowmini Varadhan
2017-03-31 22:56 ` [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN Sowmini Varadhan
2017-03-31 22:56 ` [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0 Sowmini Varadhan
@ 2017-04-03 2:41 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2017-04-03 2:41 UTC (permalink / raw)
To: sowmini.varadhan; +Cc: netdev, santosh.shilimkar
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Fri, 31 Mar 2017 15:56:29 -0700
> A couple of minor bugfixes that showed up during testing
Series applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-03 2:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-31 22:56 [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes Sowmini Varadhan
2017-03-31 22:56 ` [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN Sowmini Varadhan
2017-04-01 18:53 ` santosh.shilimkar
2017-03-31 22:56 ` [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0 Sowmini Varadhan
2017-04-01 18:54 ` santosh.shilimkar
2017-04-03 2:41 ` [PATCH net-next 0/2] rds: tcp: couple of minor bug fixes David Miller
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).