···181181182182 /* Batched completions */183183 unsigned int i_unsignaled_wrs;184184+185185+ /* Endpoint role in connection */186186+ bool i_active_side;184187};185188186189/* This assumes that atomic_t is at least 32 bits */
+7-4
net/rds/ib_cm.c
···120120 rds_conn_destroy(conn);121121 return;122122 } else {123123- pr_notice("RDS/IB: connected <%pI4,%pI4> version %u.%u%s\n",123123+ pr_notice("RDS/IB: %s conn connected <%pI4,%pI4> version %u.%u%s\n",124124+ ic->i_active_side ? "Active" : "Passive",124125 &conn->c_laddr, &conn->c_faddr,125126 RDS_PROTOCOL_MAJOR(conn->c_version),126127 RDS_PROTOCOL_MINOR(conn->c_version),127128 ic->i_flowctl ? ", flow control" : "");128129 }129130130130- /*131131- * Init rings and fill recv. this needs to wait until protocol negotiation132132- * is complete, since ring layout is different from 3.0 to 3.1.131131+ /* Init rings and fill recv. this needs to wait until protocol132132+ * negotiation is complete, since ring layout is different133133+ * from 3.1 to 4.1.133134 */134135 rds_ib_send_init_ring(ic);135136 rds_ib_recv_init_ring(ic);···686685 if (ic->i_cm_id == cm_id)687686 ret = 0;688687 }688688+ ic->i_active_side = true;689689 return ret;690690}691691···861859 ic->i_sends = NULL;862860 vfree(ic->i_recvs);863861 ic->i_recvs = NULL;862862+ ic->i_active_side = false;864863}865864866865int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)