Thread (10 messages) 10 messages, 5 authors, 2015-09-23

Re: [PATCH v2] netpoll: Close race condition between poll_one_napi and napi_disable

flat view

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2015-09-23 10:39:15

On Tue, Sep 22, 2015 at 03:09:20PM -0700, Stephen Hemminger wrote:
On Tue, 22 Sep 2015 16:01:36 -0400
Neil Horman [off-list ref] wrote:
quoted
+	clear_bit(NAPI_STATE_NPSVC, &n->state);
+
 }
why introduce extra line here?
quoted
+	/*
+	 * If we set this bit but see that it has already been set,
+	 * that indicates that napi has been disabled and we need
+	 * to abort this operation
+ 	 */
+
+	if(test_and_set_bit(NAPI_STATE_NPSVC, &napi->state))
And why introduce line after comment before code.
My preference is to have comment as close to code as possible.
Mine is to add spaces, as I feel the code is more readable if its a bit more
spread out.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help