Skip to content

Commit

Permalink
Handle CDAT discovery timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
HJ-Fan committed Aug 12, 2024
1 parent 77a92d4 commit 97047ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cxl/cxl-cdat.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ func (cdat *DOE_CAP) dicover_data_objects() {
if !cdat.doe_busy() {
cdat.doe_request(request)
for !cdat.doe_ready() {
if retry > maxRetry {
klog.V(DBG_LVL_BASIC).InfoS("cxl-DOE.dicover_data_objects", "timeout", retry)
return
}
time.Sleep(time.Duration(MB_CHECK_INTERVAL) * time.Millisecond)
retry++
}
response := cdat.doe_response()
discover_response := parseStruct(u32toByte([]uint32{response.Data_Object_DW[0]}), DOE_Discovery_Response{})
Expand Down

0 comments on commit 97047ca

Please sign in to comment.