mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mans@mansr.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v7] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller
Date: Wed, 18 Nov 2015 23:01:01 -0500 (EST)	[thread overview]
Message-ID: <20151118.230101.2199889775612098415.davem@davemloft.net> (raw)
In-Reply-To: <1447867764-23075-1-git-send-email-mans@mansr.com>

From: Mans Rullgard <mans@mansr.com>
Date: Wed, 18 Nov 2015 17:29:24 +0000

> +static int nb8800_poll(struct napi_struct *napi, int budget)
> +{
> +	struct net_device *dev = napi->dev;
> +	struct nb8800_priv *priv = netdev_priv(dev);
> +	struct nb8800_rx_desc *rxd;
> +	int work = 0;
> +	int last = priv->rx_eoc;
> +	int next;
 ...
> +		next = (last + 1) % RX_DESC_COUNT;

You should look at what the assembler looks like for these modulo
operations.

They will be much simpler (ie. one instruction) if you use unsigned
variables to hold the queue indices.

Please fix this in the entire driver.

      reply	other threads:[~2015-11-19  4:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 17:29 Mans Rullgard
2015-11-19  4:01 ` 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=20151118.230101.2199889775612098415.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans@mansr.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

all inboxes | Powered by JetHome®