Thread (12 messages) flat view 12 messages, 2 authors, 2021-02-06

Re: [PATCH net-next 2/7] net: ipa: synchronize NAPI only for suspend

From: Alex Elder <hidden>
Date: 2021-02-05 13:43:32
Also in: lkml

On 2/4/21 10:53 PM, Jakub Kicinski wrote:
On Wed,  3 Feb 2021 09:28:50 -0600 Alex Elder wrote:
quoted
 int gsi_channel_suspend(struct gsi *gsi, u32 channel_id, bool stop)
 {
 	struct gsi_channel *channel = &gsi->channel[channel_id];
+	int ret;
 
-	return __gsi_channel_stop(channel, stop);
+	/* Synchronize NAPI if successful, to ensure polling has finished. */
+	ret = __gsi_channel_stop(channel, stop);
+	if (!ret)
+		napi_synchronize(&channel->napi);
+
+	return ret;
nit:

	ret = function();
	if (ret)
		return ret;

	/* success path: do something else */

	return 0;
No problem, I'm happy with it the way you suggest.  I will
update in v2.   Thank you.

					-Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help