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
97653431
Commit
97653431
authored
Jan 12, 2011
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Make efx_get_tx_queue() an inline function
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
5b919f83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
drivers/net/sfc/efx.c
drivers/net/sfc/efx.c
+3
-12
drivers/net/sfc/net_driver.h
drivers/net/sfc/net_driver.h
+8
-2
No files found.
drivers/net/sfc/efx.c
View file @
97653431
...
...
@@ -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
;
...
...
drivers/net/sfc/net_driver.h
View file @
97653431
...
...
@@ -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
)
...
...
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