Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
87f5032e
Commit
87f5032e
authored
Jul 31, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[E1000]: Convert to netdev_alloc_skb
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
a20e9c62
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+6
-5
No files found.
drivers/net/e1000/e1000_main.c
View file @
87f5032e
...
...
@@ -3127,7 +3127,7 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
break
;
}
/* NOTE: dev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
/* NOTE:
net
dev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN
* means we reserve 2 more, this pushes us to allocate from the next
* larger slab size
* i.e. RXBUFFER_2048 --> size-4096 slab */
...
...
@@ -3708,7 +3708,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
#define E1000_CB_LENGTH 256
if
(
length
<
E1000_CB_LENGTH
)
{
struct
sk_buff
*
new_skb
=
dev_alloc_skb
(
length
+
NET_IP_ALIGN
);
netdev_alloc_skb
(
netdev
,
length
+
NET_IP_ALIGN
);
if
(
new_skb
)
{
skb_reserve
(
new_skb
,
NET_IP_ALIGN
);
new_skb
->
dev
=
netdev
;
...
...
@@ -3979,7 +3979,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
while
(
cleaned_count
--
)
{
if
(
!
(
skb
=
buffer_info
->
skb
))
skb
=
dev_alloc_skb
(
bufsz
);
skb
=
netdev_alloc_skb
(
netdev
,
bufsz
);
else
{
skb_trim
(
skb
,
0
);
goto
map_skb
;
...
...
@@ -3997,7 +3997,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
DPRINTK
(
RX_ERR
,
ERR
,
"skb align check failed: %u bytes "
"at %p
\n
"
,
bufsz
,
skb
->
data
);
/* Try again, without freeing the previous */
skb
=
dev_alloc_skb
(
bufsz
);
skb
=
netdev_alloc_skb
(
netdev
,
bufsz
);
/* Failed allocation, critical failure */
if
(
!
skb
)
{
dev_kfree_skb
(
oldskb
);
...
...
@@ -4121,7 +4121,8 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
rx_desc
->
read
.
buffer_addr
[
j
+
1
]
=
~
0
;
}
skb
=
dev_alloc_skb
(
adapter
->
rx_ps_bsize0
+
NET_IP_ALIGN
);
skb
=
netdev_alloc_skb
(
netdev
,
adapter
->
rx_ps_bsize0
+
NET_IP_ALIGN
);
if
(
unlikely
(
!
skb
))
{
adapter
->
alloc_rx_buff_failed
++
;
...
...
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