netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dborkman@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] packet: use percpu mmap tx frame pending refcount
Date: Tue, 14 Jan 2014 17:16:34 -0800 (PST)	[thread overview]
Message-ID: <20140114.171634.1073334641652236373.davem@davemloft.net> (raw)
In-Reply-To: <1389543768-20234-4-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
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.

      parent reply	other threads:[~2014-01-15  1:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 16:22 [PATCH net-next 0/3] pf_packet updates Daniel Borkmann
2014-01-12 16:22 ` [PATCH net-next 1/3] packet: improve socket create/bind latency in some cases Daniel Borkmann
2014-01-12 16:22 ` [PATCH net-next 2/3] packet: don't unconditionally schedule() in case of MSG_DONTWAIT Daniel Borkmann
2014-01-12 16:22 ` [PATCH net-next 3/3] packet: use percpu mmap tx frame pending refcount Daniel Borkmann
2014-01-13  5:51   ` Cong Wang
2014-01-13  9:55     ` David Laight
2014-01-13 11:19     ` Daniel Borkmann
2014-01-13 11:58       ` David Laight
2014-01-13 12:57         ` Daniel Borkmann
2014-01-15  1:16   ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140114.171634.1073334641652236373.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).