Thread (2 messages) flat view 2 messages, 2 authors, 2012-08-07

Re: [RFC][PATCH v2] net-tcp: TCP/IP stack bypass for loopback connections

From: David Miller <davem@davemloft.net>
Date: 2012-08-07 00:24:08

From: "Bruce \"Brutus\" Curtis" <redacted>
Date: Mon,  6 Aug 2012 17:13:49 -0700
+			/*
+			 * If friends haven't been made yet, our sk_friend
+			 * still == NULL, then update with the ACK's friend
+			 * value (the listen()er's sock addr) which is used
+			 * as a place holder.
+			 */
+			atomic_long_cmpxchg(&sk->sk_friend, 0,
+					    (u64)skb->friend);
You probably want plain:

	cmpxchg(&sk->sk_friend, NULL, skb->friend);

here.

Rather than using an expression that implies an equivalence between
the types 'long' and 'void *'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help