Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
99c08227
Commit
99c08227
authored
Sep 17, 2020
by
Antoine Kaufmann
Browse files
i40e: avoid crash if packet received before queue initialized
parent
07757fdc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
i40e_bm/i40e_lan.cc
i40e_bm/i40e_lan.cc
+3
-0
No files found.
i40e_bm/i40e_lan.cc
View file @
99c08227
...
...
@@ -260,6 +260,9 @@ void lan_queue_rx::packet_received(const void *data, size_t pktlen)
{
size_t
num_descs
=
(
pktlen
+
dbuff_size
-
1
)
/
dbuff_size
;
if
(
!
enabled
)
return
;
if
(
dcache
.
size
()
<
num_descs
)
{
#ifdef DEBUG_LAN
log
<<
" not enough rx descs ("
<<
num_descs
<<
", dropping packet"
<<
...
...
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