Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272828
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Date | 2015-11-19 05:10 +0100 |
| Message-ID | <qwoHL-4kt-11@gated-at.bofh.it> (permalink) |
| References | <qweIq-60C-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v7] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller David Miller <davem@davemloft.net> - 2015-11-19 05:10 +0100
csiph-web