Thread (10 messages) flat view 10 messages, 4 authors, 2014-01-15

Re: [PATCH net-next 3/3] packet: use percpu mmap tx frame pending refcount

From: David Miller <davem@davemloft.net>
Date: 2014-01-15 01:16:35

From: Daniel Borkmann <redacted>
Date: Sun, 12 Jan 2014 17:22:48 +0100
+static int packet_read_pending(const struct packet_ring_buffer *rb)
+{
+	int i, refcnt = 0;
+
+	/* We don't use pending refcount in rx_ring. */
+	if (rb->pending_refcnt == NULL)
+		return 0;
+
+	for_each_possible_cpu(i)
+		refcnt += *per_cpu_ptr(rb->pending_refcnt, i);
+
+	return refcnt;
+}
David Laight stated that this works properly only if all the arithmetic
is unsigned.

Therefore, maybe use "unsigned int" for refcnt here?

Can you respin this series with that fixed?

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