[Pkg-ofed-commits] [libfabric] 18/123: prov/sockets: Fixed fi_getinfo to user provided capabilities from hints

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Sat Oct 22 12:28:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

ana pushed a commit to annotated tag v1.1.1
in repository libfabric.

commit d266bf365946ca09288cead03aea4855e8056a46
Author: shantonu <shantonu.hossain at intel.com>
Date:   Thu Aug 27 14:27:27 2015 -0700

    prov/sockets: Fixed fi_getinfo to user provided capabilities from hints
    
    Signed-off-by: Shantonu Hossain <shantonu.hossain at intel.com>
---
 prov/sockets/src/sock_ep_dgram.c | 11 +++++++++--
 prov/sockets/src/sock_ep_msg.c   |  9 ++++++++-
 prov/sockets/src/sock_ep_rdm.c   |  9 ++++++++-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/prov/sockets/src/sock_ep_dgram.c b/prov/sockets/src/sock_ep_dgram.c
index ef8452c..4b5ad55 100644
--- a/prov/sockets/src/sock_ep_dgram.c
+++ b/prov/sockets/src/sock_ep_dgram.c
@@ -215,14 +215,21 @@ int sock_dgram_fi_info(void *src_addr, void *dest_addr, struct fi_info *hints,
 
 	if (hints && hints->rx_attr) {
 		(*info)->rx_attr->op_flags |= hints->rx_attr->op_flags;
+		if(hints->rx_attr->caps)
+			(*info)->rx_attr->caps = hints->rx_attr->caps;
 	}
 
 	if (hints && hints->tx_attr) {
 		(*info)->tx_attr->op_flags |= hints->tx_attr->op_flags;
+		if(hints->tx_attr->caps)
+			(*info)->tx_attr->caps = hints->tx_attr->caps;
 	}
 
-	(*info)->caps = SOCK_EP_DGRAM_CAP|
-			(*info)->rx_attr->caps | (*info)->tx_attr->caps;
+	(*info)->caps = SOCK_EP_DGRAM_CAP |
+                       (*info)->rx_attr->caps | (*info)->tx_attr->caps;
+        if(hints->caps)
+                (*info)->caps = hints->caps;
+
 	return 0;
 }
 
diff --git a/prov/sockets/src/sock_ep_msg.c b/prov/sockets/src/sock_ep_msg.c
index ab9606a..6f349e1 100644
--- a/prov/sockets/src/sock_ep_msg.c
+++ b/prov/sockets/src/sock_ep_msg.c
@@ -217,14 +217,21 @@ int sock_msg_fi_info(void *src_addr, void *dest_addr, struct fi_info *hints,
 
 	if (hints && hints->rx_attr) {
 		(*info)->rx_attr->op_flags |= hints->rx_attr->op_flags;
+		if(hints->rx_attr->caps)
+			(*info)->rx_attr->caps = hints->rx_attr->caps;
 	}
 
 	if (hints && hints->tx_attr) {
 		(*info)->tx_attr->op_flags |= hints->tx_attr->op_flags;
+		if(hints->tx_attr->caps)
+			(*info)->tx_attr->caps = hints->tx_attr->caps;
 	}
 
 	(*info)->caps = SOCK_EP_MSG_CAP |
-			(*info)->rx_attr->caps | (*info)->tx_attr->caps;
+                       (*info)->rx_attr->caps | (*info)->tx_attr->caps;
+        if(hints->caps)
+                (*info)->caps = hints->caps;
+
 	return 0;
 }
 
diff --git a/prov/sockets/src/sock_ep_rdm.c b/prov/sockets/src/sock_ep_rdm.c
index 5945493..ca1af3e 100644
--- a/prov/sockets/src/sock_ep_rdm.c
+++ b/prov/sockets/src/sock_ep_rdm.c
@@ -260,14 +260,21 @@ int sock_rdm_fi_info(void *src_addr, void *dest_addr, struct fi_info *hints,
 
 	if (hints && hints->rx_attr) {
 		(*info)->rx_attr->op_flags |= hints->rx_attr->op_flags;
+		if(hints->rx_attr->caps)
+			(*info)->rx_attr->caps = hints->rx_attr->caps;
 	}
 
 	if (hints && hints->tx_attr) {
 		(*info)->tx_attr->op_flags |= hints->tx_attr->op_flags;
+		if(hints->tx_attr->caps)
+			(*info)->tx_attr->caps = hints->tx_attr->caps;
 	}
 
 	(*info)->caps = SOCK_EP_RDM_CAP |
-			(*info)->rx_attr->caps | (*info)->tx_attr->caps;
+                       (*info)->rx_attr->caps | (*info)->tx_attr->caps;
+	if(hints->caps)
+		(*info)->caps = hints->caps;
+
 	return 0;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libfabric.git



More information about the Pkg-ofed-commits mailing list