Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a16e5b24
Commit
a16e5b24
authored
Feb 14, 2012
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Make all CPU/IRQ/channel/queue counts unsigned
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
5bbe2f4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.c
+10
-8
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/net_driver.h
+1
-1
No files found.
drivers/net/ethernet/sfc/efx.c
View file @
a16e5b24
...
@@ -1104,10 +1104,10 @@ static void efx_fini_io(struct efx_nic *efx)
...
@@ -1104,10 +1104,10 @@ static void efx_fini_io(struct efx_nic *efx)
pci_disable_device
(
efx
->
pci_dev
);
pci_disable_device
(
efx
->
pci_dev
);
}
}
static
int
efx_wanted_parallelism
(
void
)
static
unsigned
int
efx_wanted_parallelism
(
void
)
{
{
cpumask_var_t
thread_mask
;
cpumask_var_t
thread_mask
;
int
count
;
unsigned
int
count
;
int
cpu
;
int
cpu
;
if
(
rss_cpus
)
if
(
rss_cpus
)
...
@@ -1136,7 +1136,8 @@ static int
...
@@ -1136,7 +1136,8 @@ static int
efx_init_rx_cpu_rmap
(
struct
efx_nic
*
efx
,
struct
msix_entry
*
xentries
)
efx_init_rx_cpu_rmap
(
struct
efx_nic
*
efx
,
struct
msix_entry
*
xentries
)
{
{
#ifdef CONFIG_RFS_ACCEL
#ifdef CONFIG_RFS_ACCEL
int
i
,
rc
;
unsigned
int
i
;
int
rc
;
efx
->
net_dev
->
rx_cpu_rmap
=
alloc_irq_cpu_rmap
(
efx
->
n_rx_channels
);
efx
->
net_dev
->
rx_cpu_rmap
=
alloc_irq_cpu_rmap
(
efx
->
n_rx_channels
);
if
(
!
efx
->
net_dev
->
rx_cpu_rmap
)
if
(
!
efx
->
net_dev
->
rx_cpu_rmap
)
...
@@ -1159,13 +1160,14 @@ efx_init_rx_cpu_rmap(struct efx_nic *efx, struct msix_entry *xentries)
...
@@ -1159,13 +1160,14 @@ efx_init_rx_cpu_rmap(struct efx_nic *efx, struct msix_entry *xentries)
*/
*/
static
int
efx_probe_interrupts
(
struct
efx_nic
*
efx
)
static
int
efx_probe_interrupts
(
struct
efx_nic
*
efx
)
{
{
int
max_channels
=
unsigned
int
max_channels
=
min_t
(
int
,
efx
->
type
->
phys_addr_channels
,
EFX_MAX_CHANNELS
);
min
(
efx
->
type
->
phys_addr_channels
,
EFX_MAX_CHANNELS
);
int
rc
,
i
;
unsigned
int
i
;
int
rc
;
if
(
efx
->
interrupt_mode
==
EFX_INT_MODE_MSIX
)
{
if
(
efx
->
interrupt_mode
==
EFX_INT_MODE_MSIX
)
{
struct
msix_entry
xentries
[
EFX_MAX_CHANNELS
];
struct
msix_entry
xentries
[
EFX_MAX_CHANNELS
];
int
n_channels
;
unsigned
int
n_channels
;
n_channels
=
efx_wanted_parallelism
();
n_channels
=
efx_wanted_parallelism
();
if
(
separate_tx_channels
)
if
(
separate_tx_channels
)
...
@@ -1178,7 +1180,7 @@ static int efx_probe_interrupts(struct efx_nic *efx)
...
@@ -1178,7 +1180,7 @@ static int efx_probe_interrupts(struct efx_nic *efx)
if
(
rc
>
0
)
{
if
(
rc
>
0
)
{
netif_err
(
efx
,
drv
,
efx
->
net_dev
,
netif_err
(
efx
,
drv
,
efx
->
net_dev
,
"WARNING: Insufficient MSI-X vectors"
"WARNING: Insufficient MSI-X vectors"
" available (%d < %
d
).
\n
"
,
rc
,
n_channels
);
" available (%d < %
u
).
\n
"
,
rc
,
n_channels
);
netif_err
(
efx
,
drv
,
efx
->
net_dev
,
netif_err
(
efx
,
drv
,
efx
->
net_dev
,
"WARNING: Performance may be reduced.
\n
"
);
"WARNING: Performance may be reduced.
\n
"
);
EFX_BUG_ON_PARANOID
(
rc
>=
n_channels
);
EFX_BUG_ON_PARANOID
(
rc
>=
n_channels
);
...
...
drivers/net/ethernet/sfc/net_driver.h
View file @
a16e5b24
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
*
*
**************************************************************************/
**************************************************************************/
#define EFX_MAX_CHANNELS 32
#define EFX_MAX_CHANNELS 32
U
#define EFX_MAX_RX_QUEUES EFX_MAX_CHANNELS
#define EFX_MAX_RX_QUEUES EFX_MAX_CHANNELS
/* Checksum generation is a per-queue option in hardware, so each
/* Checksum generation is a per-queue option in hardware, so each
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment