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
e3a2f334
"...composable_kernel_rocm.git" did not exist on "6f27bc987248633255cc400437bd017dca70cf1e"
Commit
e3a2f334
authored
Sep 10, 2020
by
Antoine Kaufmann
Browse files
i40e: improved debug messages
parent
f854fc37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
i40e_bm/i40e_adminq.cc
i40e_bm/i40e_adminq.cc
+1
-0
i40e_bm/i40e_lan.cc
i40e_bm/i40e_lan.cc
+6
-3
i40e_bm/i40e_queues.cc
i40e_bm/i40e_queues.cc
+3
-2
No files found.
i40e_bm/i40e_adminq.cc
View file @
e3a2f334
...
...
@@ -224,6 +224,7 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
memset
(
&
hr
,
0
,
sizeof
(
hr
));
hr
.
num_reported
=
report
;
hr
.
num_total
=
cnt
;
std
::
cerr
<<
" report="
<<
report
<<
" cnt="
<<
cnt
<<
" seid="
<<
sw
->
seid
<<
std
::
endl
;
// create temporary contiguous buffer
size_t
buflen
=
sizeof
(
hr
)
+
sizeof
(
els
[
0
])
*
report
;
...
...
i40e_bm/i40e_lan.cc
View file @
e3a2f334
...
...
@@ -256,7 +256,7 @@ void lan_queue_rx::packet_received(const void *data, size_t pktlen)
return
;
}
std
::
cerr
<<
"rxq: packet received
"
<<
std
::
endl
;
std
::
cerr
<<
"rxq: packet received
didx="
<<
dcache_first_idx
<<
" cnt="
<<
dcache_first_cnt
<<
std
::
endl
;
union
i40e_32byte_rx_desc
rxd
;
memset
(
&
rxd
,
0
,
sizeof
(
rxd
));
rxd
.
wb
.
qword1
.
status_error_len
|=
(
1
<<
I40E_RX_DESC_STATUS_DD_SHIFT
);
...
...
@@ -312,11 +312,12 @@ void lan_queue_tx::initialize()
void
lan_queue_tx
::
desc_fetched
(
void
*
desc_buf
,
uint32_t
didx
)
{
std
::
cerr
<<
"txq: desc fetched"
<<
std
::
endl
;
struct
i40e_tx_desc
*
desc
=
reinterpret_cast
<
struct
i40e_tx_desc
*>
(
desc_buf
);
uint64_t
d1
=
desc
->
cmd_type_offset_bsz
;
std
::
cerr
<<
"txq: desc fetched didx="
<<
didx
<<
" d1="
<<
d1
<<
std
::
endl
;
uint8_t
dtype
=
(
d1
&
I40E_TXD_QW1_DTYPE_MASK
)
>>
I40E_TXD_QW1_DTYPE_SHIFT
;
if
(
dtype
==
I40E_TX_DESC_DTYPE_DATA
)
{
uint16_t
len
=
(
d1
&
I40E_TXD_QW1_TX_BUF_SZ_MASK
)
>>
...
...
@@ -345,9 +346,9 @@ void lan_queue_tx::desc_fetched(void *desc_buf, uint32_t didx)
void
lan_queue_tx
::
data_fetched
(
void
*
desc_buf
,
uint32_t
didx
,
void
*
data
)
{
std
::
cerr
<<
"txq: data fetched"
<<
std
::
endl
;
struct
i40e_tx_desc
*
desc
=
reinterpret_cast
<
struct
i40e_tx_desc
*>
(
desc_buf
);
uint64_t
d1
=
desc
->
cmd_type_offset_bsz
;
std
::
cerr
<<
"txq: data fetched didx="
<<
didx
<<
" d1="
<<
d1
<<
std
::
endl
;
uint16_t
pkt_len
=
(
d1
&
I40E_TXD_QW1_TX_BUF_SZ_MASK
)
>>
I40E_TXD_QW1_TX_BUF_SZ_SHIFT
;
...
...
@@ -364,6 +365,8 @@ void lan_queue_tx::data_fetched(void *desc_buf, uint32_t didx, void *data)
/*uint16_t l4len = (off & I40E_TXD_QW1_L4LEN_MASK) >>
I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;*/
std
::
cerr
<<
" eop="
<<
eop
<<
" len="
<<
pkt_len
<<
" pktbuf_len="
<<
pktbuf_len
<<
std
::
endl
;
// part of a multi-descriptor packet
if
(
!
eop
||
pktbuf_len
!=
0
)
{
if
(
pktbuf_len
+
pkt_len
>
MTU
)
{
...
...
i40e_bm/i40e_queues.cc
View file @
e3a2f334
...
...
@@ -32,8 +32,8 @@ void queue_base::trigger_fetch()
pending_fetches
++
;
std
::
cerr
<<
"fetching
"
<<
(
reg_tail
-
fetch_head
)
%
len
<<
"
descriptors
from "
<<
dma
->
dma_addr
<<
std
::
endl
;
std
::
cerr
<<
"fetching
: avail=
"
<<
(
reg_tail
-
fetch_head
)
%
len
<<
"
fhead="
<<
fetch_head
<<
"
from "
<<
dma
->
dma_addr
<<
std
::
endl
;
std
::
cerr
<<
"dma = "
<<
dma
<<
std
::
endl
;
runner
->
issue_dma
(
*
dma
);
...
...
@@ -112,6 +112,7 @@ uint32_t queue_base::max_fetch_capacity()
void
queue_base
::
desc_done
(
uint32_t
idx
)
{
assert
(
reg_head
==
idx
);
reg_head
=
(
idx
+
1
)
%
len
;
trigger_fetch
();
}
...
...
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