Received: by 10.223.164.202 with SMTP id h10csp3498620wrb; Sun, 19 Nov 2017 23:40:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMbWTSKJapIJNTSwvCaNWcrN6oimcZ6puW42yA0euBRMDF+tKFZEkmUYQ2JDxoslkJGU0OMW X-Received: by 10.99.190.6 with SMTP id l6mr12245821pgf.288.1511163640296; Sun, 19 Nov 2017 23:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511163640; cv=none; d=google.com; s=arc-20160816; b=dPwQCiK0sUxhwyHZh3txc2ivkjtlC8xIW39Hsv1cGeOHQTYAyMqCcNPsw8q8ljmc0Z NqrlAI0R6syyrHH2JLjguGlh3Gm4ib32CKhOzJpikuIwFTV+D5HOk2Nd7Bg6MNEt/0Yn 8a7i/JlumHA4yJVUbg+IVklsdCT/VqMWQ2BsjVm3b5Q28kJmL5RailFj+QIuad+vQVtD fLZf/ftBWnKnD4pQfeEzU7d0v1xB8pa7iTX/3lyykAMBChXoZmlKF3fxj0LcTcs2iPeS HTqgFaY7i5OIb5Q94aDZZjgtyfkZCK7W0gfv889OuCm4gro5TrwKUp8mefiAG3AflIoA gqoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:arc-authentication-results; bh=EAzGD4Tj8ijEis8a+CEBDN7PocxTYw3e93Wxc4IOpVc=; b=syKE13C8YVaZCM8fUJ7232wsTgLjspr2yhhtEXDD73Hrc4caLazhet7iJRdNzL50Bz urzr3iJl2lx/wr0W8NODY6F/FWftWK9RbSWZW806gl6sas3V8xegh00iY2JgBUARBjmB N9VfT0Oj+07Ms3CKyGR7Dj9qqpDmzmrlFba/ZWCtap3g57U20tM9DZmqnZBKr3WQEoR6 9qJqwkp4wtzBJvVGI3bLrovZlygP0JAPf326uWyHwLTvssmL9XFJN7bCe6rwryTUrgcw 2cj/moIy5sl/9sJaTWuzIAWeguvnE8RiUW4P+sMnpW69XTl8TGZprlhM2JRQI3vojP0n d/dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k14si7274323pgt.316.2017.11.19.23.40.30; Sun, 19 Nov 2017 23:40:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751260AbdKTHix (ORCPT + 68 others); Mon, 20 Nov 2017 02:38:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48890 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbdKTHiv (ORCPT ); Mon, 20 Nov 2017 02:38:51 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3801FC0587DF; Mon, 20 Nov 2017 07:38:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 042A1620A2; Mon, 20 Nov 2017 07:38:51 +0000 (UTC) Received: from zmail25.collab.prod.int.phx2.redhat.com (zmail25.collab.prod.int.phx2.redhat.com [10.5.83.31]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B283E1809547; Mon, 20 Nov 2017 07:38:50 +0000 (UTC) Date: Mon, 20 Nov 2017 02:38:50 -0500 (EST) From: Leif Sahlberg To: Long Li Cc: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Christoph Hellwig , Tom Talpey , Matthew Wilcox , Stephen Hemminger , Long Li Message-ID: <1711300759.28570763.1511163530669.JavaMail.zimbra@redhat.com> In-Reply-To: <20171105054404.23886-8-longli@exchange.microsoft.com> References: <20171105054404.23886-1-longli@exchange.microsoft.com> <20171105054404.23886-8-longli@exchange.microsoft.com> Subject: Re: [Patch v6 07/22] CIFS: SMBD: Implement function to create a SMB Direct connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.64.54.107, 10.4.195.1] Thread-Topic: CIFS: SMBD: Implement function to create a SMB Direct connection Thread-Index: +HfmYZei8IexFkfCxEDiDaUOFU3L0g== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 20 Nov 2017 07:38:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Ronnie Sahlberg ----- Original Message ----- From: "Long Li" To: "Steve French" , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, "Christoph Hellwig" , "Tom Talpey" , "Matthew Wilcox" , "Stephen Hemminger" Cc: "Long Li" Sent: Sunday, 5 November, 2017 4:43:49 PM Subject: [Patch v6 07/22] CIFS: SMBD: Implement function to create a SMB Direct connection From: Long Li The upper layer calls this function to connect to peer through SMB Direct. Each SMB Direct connection is based on a RDMA RC Queue Pair. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index 7af49cd..47d999f 100644 --- a/fs/cifs/smbdirect.c +++ b/fs/cifs/smbdirect.c @@ -1652,3 +1652,20 @@ struct smbd_connection *_smbd_get_connection( kfree(info); return NULL; } + +struct smbd_connection *smbd_get_connection( + struct TCP_Server_Info *server, struct sockaddr *dstaddr) +{ + struct smbd_connection *ret; + int port = SMBD_PORT; + +try_again: + ret = _smbd_get_connection(server, dstaddr, port); + + /* Try SMB_PORT if SMBD_PORT doesn't work */ + if (!ret && port == SMBD_PORT) { + port = SMB_PORT; + goto try_again; + } + return ret; +} -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From 1583204090372874809@xxx Sun Nov 05 05:51:18 +0000 2017 X-GM-THRID: 1583204090372874809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread