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
e07e56b3
Commit
e07e56b3
authored
Sep 12, 2020
by
Antoine Kaufmann
Browse files
i40e: fix descriptor writeback
parent
0ceb071a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
i40e_bm/i40e_bm.h
i40e_bm/i40e_bm.h
+5
-2
i40e_bm/i40e_lan.cc
i40e_bm/i40e_lan.cc
+7
-0
i40e_bm/i40e_queues.cc
i40e_bm/i40e_queues.cc
+2
-2
No files found.
i40e_bm/i40e_bm.h
View file @
e07e56b3
...
...
@@ -77,8 +77,8 @@ class queue_base {
size_t
data_len
;
size_t
data_capacity
;
void
prepared
();
void
processed
();
virtual
void
prepared
();
virtual
void
processed
();
protected:
void
data_fetch
(
uint64_t
addr
,
size_t
len
);
...
...
@@ -133,7 +133,9 @@ class queue_base {
virtual
void
done
();
};
public:
std
::
string
qname
;
protected:
desc_ctx
*
desc_ctxs
[
MAX_ACTIVE_DESCS
];
uint32_t
active_first_pos
;
uint32_t
active_first_idx
;
...
...
@@ -298,6 +300,7 @@ class lan_queue_tx : public lan_queue_base {
virtual
void
prepare
();
virtual
void
process
();
virtual
void
processed
();
};
...
...
i40e_bm/i40e_lan.cc
View file @
e07e56b3
...
...
@@ -498,6 +498,13 @@ void lan_queue_tx::tx_desc_ctx::process()
tq
.
trigger_tx
();
}
void
lan_queue_tx
::
tx_desc_ctx
::
processed
()
{
d
->
cmd_type_offset_bsz
=
I40E_TX_DESC_DTYPE_DESC_DONE
<<
I40E_TXD_QW1_DTYPE_SHIFT
;
desc_ctx
::
processed
();
}
lan_queue_tx
::
dma_hwb
::
dma_hwb
(
lan_queue_tx
&
queue_
,
uint32_t
pos_
,
uint32_t
cnt_
,
uint32_t
nh_
)
:
queue
(
queue_
),
pos
(
pos_
),
cnt
(
cnt_
),
next_head
(
nh_
)
...
...
i40e_bm/i40e_queues.cc
View file @
e07e56b3
...
...
@@ -118,8 +118,8 @@ void queue_base::trigger_writeback()
break
;
uint32_t
cnt
=
std
::
min
(
avail
,
max_writeback_capacity
());
if
(
active_first_
pos
+
cnt
>
len
)
cnt
=
len
-
active_first_
pos
;
if
(
active_first_
idx
+
cnt
>
len
)
cnt
=
len
-
active_first_
idx
;
#ifdef DEBUG_QUEUES
std
::
cerr
<<
qname
<<
": writing back avail="
<<
avail
<<
" cnt="
<<
cnt
<<
...
...
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