Thread (14 messages) 14 messages, 2 authors, 2021-02-23

Re: [PATCH V4 net 5/5] net: stmmac: re-init rx buffers when mac resume back

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-02-06 20:39:10

On Thu,  4 Feb 2021 19:21:44 +0800 Joakim Zhang wrote:
quoted hunk ↗ jump to hunk
+err_reinit_rx_buffers:
+	while (queue >= 0) {
+		while (--i >= 0)
+			stmmac_free_rx_buffer(priv, queue, i);
+
+		if (queue == 0)
+			break;
+
+		i = priv->dma_rx_size;
+		queue--;
+	}
nit:

	do {
		...
	} while (queue-- > 0);
+
+	return -ENOMEM;
the caller ignores the return value anyway, so you make make this
function void.

I'm not sure why you recycle and reallocate every buffer. Isn't it
enough to reinitialize the descriptors with the buffers which are
already allocated?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help