From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754662AbbI3QN6 (ORCPT ); Wed, 30 Sep 2015 12:13:58 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:33843 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754032AbbI3QNx (ORCPT ); Wed, 30 Sep 2015 12:13:53 -0400 Subject: Re: [PATCH net-next 1/3] net/rds: Use a single TCP socket for both send and receive. To: Sowmini Varadhan References: <603874beb1dedd0a989d84740d22565bfc568c97.1443569239.git.sowmini.varadhan@oracle.com> <560C04AA.4050201@oracle.com> <20150930160908.GC8111@oracle.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, rds-devel@oss.oracle.com, ajaykumar.hotchandani@oracle.com, igor.maximov@oracle.com From: santosh shilimkar Organization: Oracle Corporation Message-ID: <560C0A3B.80803@oracle.com> Date: Wed, 30 Sep 2015 09:13:47 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150930160908.GC8111@oracle.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/30/2015 9:09 AM, Sowmini Varadhan wrote: > On (09/30/15 08:50), santosh shilimkar wrote: >>> rs_tcp = (struct rds_tcp_connection *)conn->c_transport_data; >>> - WARN_ON(!rs_tcp || rs_tcp->t_sock); >>> + if (rs_tcp->t_sock && inet->inet_saddr < inet->inet_daddr) { >>> + struct sock *nsk = new_sock->sk; >>> >> Any reason you dropped the WARN_ON. Note that till we got commit >> 74e98eb0 (" RDS: verify the underlying transport exists before creating >> a connection") merged, we had an issue. That guards it now. > > That was done deliberately. Now that we have only one tcp socket, > we can run into an rds_tcp_connection for an outgoing connection > that we initiated, thus rs_tcp->t_sock can be non-null - which is > why a new check is added in the newly added line in the patch. > Thanks for clarification. Regards, Santosh