Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4e40363 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

netvsc: signal host if receive ring is emptied



Latency improvement related to NAPI conversion.
If all packets are processed from receive ring then need
to signal host.

Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49393347
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1195,10 +1195,15 @@ int netvsc_poll(struct napi_struct *napi, int budget)
		nvchan->desc = hv_pkt_iter_next(channel, nvchan->desc);
	}

	/* if ring is empty, signal host */
	if (!nvchan->desc)
		hv_pkt_iter_close(channel);

	/* If send of pending receive completions suceeded
	 *   and did not exhaust NAPI budget
	 *   and did not exhaust NAPI budget this time
	 *   and not doing busy poll
	 * then reschedule if more data has arrived from host
	 * then re-enable host interrupts
	 *     and reschedule if ring is not empty.
	 */
	if (send_recv_completions(nvchan) == 0 &&
	    work_done < budget &&