Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbcLGPxl (ORCPT ); Wed, 7 Dec 2016 10:53:41 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:34580 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbcLGPxj (ORCPT ); Wed, 7 Dec 2016 10:53:39 -0500 Date: Wed, 07 Dec 2016 10:53:18 -0500 (EST) Message-Id: <20161207.105318.2143064665652853543.davem@davemloft.net> To: santosh.shilimkar@oracle.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next][PATCH v2 10/18] RDS: IB: track and log active side endpoint in connection From: David Miller In-Reply-To: <1481083316-11648-11-git-send-email-santosh.shilimkar@oracle.com> References: <1481083316-11648-1-git-send-email-santosh.shilimkar@oracle.com> <1481083316-11648-11-git-send-email-santosh.shilimkar@oracle.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 07 Dec 2016 06:53:58 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 789 Lines: 31 From: Santosh Shilimkar Date: Tue, 6 Dec 2016 20:01:48 -0800 > @@ -181,6 +181,9 @@ struct rds_ib_connection { > > /* Batched completions */ > unsigned int i_unsignaled_wrs; > + > + /* Endpoint role in connection */ > + int i_active_side; > }; > ... > @@ -685,6 +686,7 @@ int rds_ib_cm_initiate_connect(struct rdma_cm_id *cm_id) > if (ic->i_cm_id == cm_id) > ret = 0; > } > + ic->i_active_side = true; > return ret; > } > > @@ -859,6 +861,7 @@ void rds_ib_conn_path_shutdown(struct rds_conn_path *cp) > ic->i_sends = NULL; > vfree(ic->i_recvs); > ic->i_recvs = NULL; > + ic->i_active_side = false; > } > > int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) Use type "bool", not "int", for true/false values.