* pull request: sfc-2.6 2011-01-14
@ 2011-01-14 14:21 Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 1/2] sfc: Make efx_get_tx_queue() an inline function Ben Hutchings
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ben Hutchings @ 2011-01-14 14:21 UTC (permalink / raw)
To: David Miller; +Cc: netdev, sf-linux-drivers
The following changes since commit 5b919f833d9d60588d026ad82d17f17e8872c7a9:
net: ax25: fix information leak to userland harder (2011-01-12 00:34:49 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6.git master
A minor optimisation and a regression fix.
Ben.
Ben Hutchings (2):
sfc: Make efx_get_tx_queue() an inline function
sfc: Restore the effect of the rss_cpus module parameter
drivers/net/sfc/efx.c | 18 ++++++------------
drivers/net/sfc/net_driver.h | 10 ++++++++--
2 files changed, 14 insertions(+), 14 deletions(-)
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-2.6 1/2] sfc: Make efx_get_tx_queue() an inline function
2011-01-14 14:21 pull request: sfc-2.6 2011-01-14 Ben Hutchings
@ 2011-01-14 14:25 ` Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 2/2] sfc: Restore the effect of the rss_cpus module parameter Ben Hutchings
2011-01-14 20:42 ` pull request: sfc-2.6 2011-01-14 David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2011-01-14 14:25 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/sfc/efx.c | 15 +++------------
drivers/net/sfc/net_driver.h | 10 ++++++++--
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 711449c..c2dc9a5 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1266,27 +1266,18 @@ static void efx_remove_interrupts(struct efx_nic *efx)
efx->legacy_irq = 0;
}
-struct efx_tx_queue *
-efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type)
-{
- unsigned tx_channel_offset =
- separate_tx_channels ? efx->n_channels - efx->n_tx_channels : 0;
- EFX_BUG_ON_PARANOID(index >= efx->n_tx_channels ||
- type >= EFX_TXQ_TYPES);
- return &efx->channel[tx_channel_offset + index]->tx_queue[type];
-}
-
static void efx_set_channels(struct efx_nic *efx)
{
struct efx_channel *channel;
struct efx_tx_queue *tx_queue;
- unsigned tx_channel_offset =
+
+ efx->tx_channel_offset =
separate_tx_channels ? efx->n_channels - efx->n_tx_channels : 0;
/* Channel pointers were set in efx_init_struct() but we now
* need to clear them for TX queues in any RX-only channels. */
efx_for_each_channel(channel, efx) {
- if (channel->channel - tx_channel_offset >=
+ if (channel->channel - efx->tx_channel_offset >=
efx->n_tx_channels) {
efx_for_each_channel_tx_queue(tx_queue, channel)
tx_queue->channel = NULL;
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index bdce66d..28df866 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -735,6 +735,7 @@ struct efx_nic {
unsigned next_buffer_table;
unsigned n_channels;
unsigned n_rx_channels;
+ unsigned tx_channel_offset;
unsigned n_tx_channels;
unsigned int rx_buffer_len;
unsigned int rx_buffer_order;
@@ -929,8 +930,13 @@ efx_get_channel(struct efx_nic *efx, unsigned index)
_channel = (_channel->channel + 1 < (_efx)->n_channels) ? \
(_efx)->channel[_channel->channel + 1] : NULL)
-extern struct efx_tx_queue *
-efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type);
+static inline struct efx_tx_queue *
+efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type)
+{
+ EFX_BUG_ON_PARANOID(index >= efx->n_tx_channels ||
+ type >= EFX_TXQ_TYPES);
+ return &efx->channel[efx->tx_channel_offset + index]->tx_queue[type];
+}
static inline struct efx_tx_queue *
efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type)
--
1.7.3.4
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-2.6 2/2] sfc: Restore the effect of the rss_cpus module parameter
2011-01-14 14:21 pull request: sfc-2.6 2011-01-14 Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 1/2] sfc: Make efx_get_tx_queue() an inline function Ben Hutchings
@ 2011-01-14 14:25 ` Ben Hutchings
2011-01-14 20:42 ` pull request: sfc-2.6 2011-01-14 David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ben Hutchings @ 2011-01-14 14:25 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
Commit a4900ac ("sfc: Create multiple TX queues") accidentally
disabled the rss_cpus module parameter.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/sfc/efx.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index c2dc9a5..002bac7 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1153,6 +1153,9 @@ static int efx_wanted_channels(void)
int count;
int cpu;
+ if (rss_cpus)
+ return rss_cpus;
+
if (unlikely(!zalloc_cpumask_var(&core_mask, GFP_KERNEL))) {
printk(KERN_WARNING
"sfc: RSS disabled due to allocation failure\n");
--
1.7.3.4
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: pull request: sfc-2.6 2011-01-14
2011-01-14 14:21 pull request: sfc-2.6 2011-01-14 Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 1/2] sfc: Make efx_get_tx_queue() an inline function Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 2/2] sfc: Restore the effect of the rss_cpus module parameter Ben Hutchings
@ 2011-01-14 20:42 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-01-14 20:42 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 14 Jan 2011 14:21:29 +0000
> The following changes since commit 5b919f833d9d60588d026ad82d17f17e8872c7a9:
>
> net: ax25: fix information leak to userland harder (2011-01-12 00:34:49 -0800)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6.git master
>
> A minor optimisation and a regression fix.
Pulled, thanks Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-14 20:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 14:21 pull request: sfc-2.6 2011-01-14 Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 1/2] sfc: Make efx_get_tx_queue() an inline function Ben Hutchings
2011-01-14 14:25 ` [PATCH net-2.6 2/2] sfc: Restore the effect of the rss_cpus module parameter Ben Hutchings
2011-01-14 20:42 ` pull request: sfc-2.6 2011-01-14 David Miller
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).