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
Kirill Smelkov
linux
Commits
1ddceb4c
Commit
1ddceb4c
authored
Jan 23, 2012
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Move the end of the non-GRO RX path into its own function
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
f9c76250
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
drivers/net/ethernet/sfc/rx.c
drivers/net/ethernet/sfc/rx.c
+23
-18
No files found.
drivers/net/ethernet/sfc/rx.c
View file @
1ddceb4c
...
@@ -568,12 +568,30 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
...
@@ -568,12 +568,30 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
channel
->
rx_pkt_csummed
=
checksummed
;
channel
->
rx_pkt_csummed
=
checksummed
;
}
}
static
void
efx_rx_deliver
(
struct
efx_channel
*
channel
,
struct
efx_rx_buffer
*
rx_buf
)
{
struct
sk_buff
*
skb
;
/* We now own the SKB */
skb
=
rx_buf
->
u
.
skb
;
rx_buf
->
u
.
skb
=
NULL
;
/* Set the SKB flags */
skb_checksum_none_assert
(
skb
);
/* Pass the packet up */
netif_receive_skb
(
skb
);
/* Update allocation strategy method */
channel
->
rx_alloc_level
+=
RX_ALLOC_FACTOR_SKB
;
}
/* Handle a received packet. Second half: Touches packet payload. */
/* Handle a received packet. Second half: Touches packet payload. */
void
__efx_rx_packet
(
struct
efx_channel
*
channel
,
void
__efx_rx_packet
(
struct
efx_channel
*
channel
,
struct
efx_rx_buffer
*
rx_buf
,
bool
checksummed
)
struct
efx_rx_buffer
*
rx_buf
,
bool
checksummed
)
{
{
struct
efx_nic
*
efx
=
channel
->
efx
;
struct
efx_nic
*
efx
=
channel
->
efx
;
struct
sk_buff
*
skb
;
u8
*
eh
=
efx_rx_buf_eh
(
efx
,
rx_buf
);
u8
*
eh
=
efx_rx_buf_eh
(
efx
,
rx_buf
);
/* If we're in loopback test, then pass the packet directly to the
/* If we're in loopback test, then pass the packet directly to the
...
@@ -586,7 +604,7 @@ void __efx_rx_packet(struct efx_channel *channel,
...
@@ -586,7 +604,7 @@ void __efx_rx_packet(struct efx_channel *channel,
}
}
if
(
!
rx_buf
->
is_page
)
{
if
(
!
rx_buf
->
is_page
)
{
skb
=
rx_buf
->
u
.
skb
;
s
truct
sk_buff
*
s
kb
=
rx_buf
->
u
.
skb
;
prefetch
(
skb_shinfo
(
skb
));
prefetch
(
skb_shinfo
(
skb
));
...
@@ -606,23 +624,10 @@ void __efx_rx_packet(struct efx_channel *channel,
...
@@ -606,23 +624,10 @@ void __efx_rx_packet(struct efx_channel *channel,
if
(
unlikely
(
!
(
efx
->
net_dev
->
features
&
NETIF_F_RXCSUM
)))
if
(
unlikely
(
!
(
efx
->
net_dev
->
features
&
NETIF_F_RXCSUM
)))
checksummed
=
false
;
checksummed
=
false
;
if
(
likely
(
checksummed
||
rx_buf
->
is_page
))
{
if
(
likely
(
checksummed
||
rx_buf
->
is_page
))
efx_rx_packet_gro
(
channel
,
rx_buf
,
eh
,
checksummed
);
efx_rx_packet_gro
(
channel
,
rx_buf
,
eh
,
checksummed
);
return
;
else
}
efx_rx_deliver
(
channel
,
rx_buf
);
/* We now own the SKB */
skb
=
rx_buf
->
u
.
skb
;
rx_buf
->
u
.
skb
=
NULL
;
/* Set the SKB flags */
skb_checksum_none_assert
(
skb
);
/* Pass the packet up */
netif_receive_skb
(
skb
);
/* Update allocation strategy method */
channel
->
rx_alloc_level
+=
RX_ALLOC_FACTOR_SKB
;
}
}
void
efx_rx_strategy
(
struct
efx_channel
*
channel
)
void
efx_rx_strategy
(
struct
efx_channel
*
channel
)
...
...
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