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
285e4280
Commit
285e4280
authored
Jun 09, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/core/user_dma.c: Use frag list abstraction interfaces.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
fbb398a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
net/core/user_dma.c
net/core/user_dma.c
+22
-24
No files found.
net/core/user_dma.c
View file @
285e4280
...
...
@@ -51,6 +51,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
{
int
start
=
skb_headlen
(
skb
);
int
i
,
copy
=
start
-
offset
;
struct
sk_buff
*
frag_iter
;
dma_cookie_t
cookie
=
0
;
/* Copy header. */
...
...
@@ -94,31 +95,28 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
start
=
end
;
}
if
(
skb_shinfo
(
skb
)
->
frag_list
)
{
struct
sk_buff
*
list
=
skb_shinfo
(
skb
)
->
frag_list
;
for
(;
list
;
list
=
list
->
next
)
{
int
end
;
WARN_ON
(
start
>
offset
+
len
);
end
=
start
+
list
->
len
;
copy
=
end
-
offset
;
if
(
copy
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
cookie
=
dma_skb_copy_datagram_iovec
(
chan
,
list
,
offset
-
start
,
to
,
copy
,
pinned_list
);
if
(
cookie
<
0
)
goto
fault
;
len
-=
copy
;
if
(
len
==
0
)
goto
end
;
offset
+=
copy
;
}
start
=
end
;
skb_walk_frags
(
skb
,
frag_iter
)
{
int
end
;
WARN_ON
(
start
>
offset
+
len
);
end
=
start
+
frag_iter
->
len
;
copy
=
end
-
offset
;
if
(
copy
>
0
)
{
if
(
copy
>
len
)
copy
=
len
;
cookie
=
dma_skb_copy_datagram_iovec
(
chan
,
frag_iter
,
offset
-
start
,
to
,
copy
,
pinned_list
);
if
(
cookie
<
0
)
goto
fault
;
len
-=
copy
;
if
(
len
==
0
)
goto
end
;
offset
+=
copy
;
}
start
=
end
;
}
end:
...
...
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