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
cce28794
Commit
cce28794
authored
Oct 02, 2013
by
Jon Cooper
Committed by
Ben Hutchings
Dec 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Make initial fill of RX descriptors synchronous
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
92a04168
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/ef10.c
+1
-1
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.c
+4
-2
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/efx.h
+1
-1
drivers/net/ethernet/sfc/farch.c
drivers/net/ethernet/sfc/farch.c
+1
-1
drivers/net/ethernet/sfc/rx.c
drivers/net/ethernet/sfc/rx.c
+5
-4
No files found.
drivers/net/ethernet/sfc/ef10.c
View file @
cce28794
...
...
@@ -1907,7 +1907,7 @@ static void efx_ef10_handle_driver_generated_event(struct efx_channel *channel,
* events, so efx_process_channel() won't refill the
* queue. Refill it here
*/
efx_fast_push_rx_descriptors
(
&
channel
->
rx_queue
);
efx_fast_push_rx_descriptors
(
&
channel
->
rx_queue
,
true
);
break
;
default:
netif_err
(
efx
,
hw
,
efx
->
net_dev
,
...
...
drivers/net/ethernet/sfc/efx.c
View file @
cce28794
...
...
@@ -253,7 +253,7 @@ static int efx_process_channel(struct efx_channel *channel, int budget)
efx_channel_get_rx_queue
(
channel
);
efx_rx_flush_packet
(
channel
);
efx_fast_push_rx_descriptors
(
rx_queue
);
efx_fast_push_rx_descriptors
(
rx_queue
,
true
);
}
return
spent
;
...
...
@@ -646,7 +646,9 @@ static void efx_start_datapath(struct efx_nic *efx)
efx_for_each_channel_rx_queue
(
rx_queue
,
channel
)
{
efx_init_rx_queue
(
rx_queue
);
atomic_inc
(
&
efx
->
active_queues
);
efx_nic_generate_fill_event
(
rx_queue
);
efx_stop_eventq
(
channel
);
efx_fast_push_rx_descriptors
(
rx_queue
,
false
);
efx_start_eventq
(
channel
);
}
WARN_ON
(
channel
->
rx_pkt_n_frags
);
...
...
drivers/net/ethernet/sfc/efx.h
View file @
cce28794
...
...
@@ -37,7 +37,7 @@ int efx_probe_rx_queue(struct efx_rx_queue *rx_queue);
void
efx_remove_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_init_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fini_rx_queue
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
);
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
);
void
efx_rx_slow_fill
(
unsigned
long
context
);
void
__efx_rx_packet
(
struct
efx_channel
*
channel
);
void
efx_rx_packet
(
struct
efx_rx_queue
*
rx_queue
,
unsigned
int
index
,
...
...
drivers/net/ethernet/sfc/farch.c
View file @
cce28794
...
...
@@ -1147,7 +1147,7 @@ static void efx_farch_handle_generated_event(struct efx_channel *channel,
/* The queue must be empty, so we won't receive any rx
* events, so efx_process_channel() won't refill the
* queue. Refill it here */
efx_fast_push_rx_descriptors
(
rx_queue
);
efx_fast_push_rx_descriptors
(
rx_queue
,
true
);
}
else
if
(
rx_queue
&&
magic
==
EFX_CHANNEL_MAGIC_RX_DRAIN
(
rx_queue
))
{
efx_farch_handle_drain_event
(
channel
);
}
else
if
(
code
==
_EFX_CHANNEL_MAGIC_TX_DRAIN
)
{
...
...
drivers/net/ethernet/sfc/rx.c
View file @
cce28794
...
...
@@ -149,7 +149,7 @@ static struct page *efx_reuse_page(struct efx_rx_queue *rx_queue)
* 0 on success. If a single page can be used for multiple buffers,
* then the page will either be inserted fully, or not at all.
*/
static
int
efx_init_rx_buffers
(
struct
efx_rx_queue
*
rx_queue
)
static
int
efx_init_rx_buffers
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
)
{
struct
efx_nic
*
efx
=
rx_queue
->
efx
;
struct
efx_rx_buffer
*
rx_buf
;
...
...
@@ -163,7 +163,8 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue)
do
{
page
=
efx_reuse_page
(
rx_queue
);
if
(
page
==
NULL
)
{
page
=
alloc_pages
(
__GFP_COLD
|
__GFP_COMP
|
GFP_ATOMIC
,
page
=
alloc_pages
(
__GFP_COLD
|
__GFP_COMP
|
(
atomic
?
GFP_ATOMIC
:
GFP_KERNEL
),
efx
->
rx_buffer_order
);
if
(
unlikely
(
page
==
NULL
))
return
-
ENOMEM
;
...
...
@@ -321,7 +322,7 @@ static void efx_discard_rx_packet(struct efx_channel *channel,
* this means this function must run from the NAPI handler, or be called
* when NAPI is disabled.
*/
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
)
void
efx_fast_push_rx_descriptors
(
struct
efx_rx_queue
*
rx_queue
,
bool
atomic
)
{
struct
efx_nic
*
efx
=
rx_queue
->
efx
;
unsigned
int
fill_level
,
batch_size
;
...
...
@@ -354,7 +355,7 @@ void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue)
do
{
rc
=
efx_init_rx_buffers
(
rx_queue
);
rc
=
efx_init_rx_buffers
(
rx_queue
,
atomic
);
if
(
unlikely
(
rc
))
{
/* Ensure that we don't leave the rx queue empty */
if
(
rx_queue
->
added_count
==
rx_queue
->
removed_count
)
...
...
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