Skip to contentSkip to conversation

acm.c: In acm_ep_up, fix pkey endian

PATCH New Hal Rosenstock 1 participant 1 message Aug 1, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acm.c: In acm_ep_up, fix pkey endian

ibv_query_pkey returns pkey in network rather than host order.

---

src/acm.c +1 -0
index 09051dc..401e367 100644
@@ -3068,6 +3068,7 @@ static void acm_ep_up(struct acm_port *port, uint16_t pkey_index)
 	if (ret)
 		return;
 
+	pkey = ntohs(pkey);	/* pkey returned is in network rather than host endian */
 	if (acm_find_ep(port, pkey)) {
 		acm_log(2, "endpoint for pkey 0x%x already exists\n", pkey);
 		return;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html