-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prov/efa: Handle receive window overflow #10194
Conversation
@jiaxiyan it's the convention to have change and unit test in the same commit |
} | ||
|
||
overflow_pke_list_entry->pkt_entry = pkt_entry; | ||
dlist_insert_head(&overflow_pke_list_entry->entry, &peer->overflow_pke_list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any preference on insert head or tail here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No preference since we do not care about the ordering of this linked list.
/* Message id that overflows the receive window should be put in the | ||
* overflow_pke_list and return 1 */ | ||
test_efa_rdm_peer_reorder_msg_impl(resource, exp_msg_id, msg_id, expected_ret); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have more unit tests to cover
- moving entry from overflow to recv window
- two pkt entries of same msg id will be appended to the same entry.
4ee0395
to
4b024e7
Compare
|
||
pkt_entry1 = *ofi_recvwin_get_msg((&peer->robuf), 17000); | ||
assert_non_null(pkt_entry1); | ||
assert_non_null(pkt_entry1->next); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to have an assert that pkt_entry1->next == pkt_entry2
b550d95
to
74d45dc
Compare
Store out-of-order packet entries that overflow the receive window in a double linked list. After processing a window size of packet entries, move the packet entries in the linked list back to the receive window if they can fit in the window now. Signed-off-by: Jessie Yang <[email protected]>
When receiving an out-of-order message that exceeds the current receive window, instead of a hard fail, store this packet entry in a double linked list. After finishing processing a window size multiple of packet entries, iterate through the linked list.
Put the packet entry back to the circular queue if it can fit within the receive window now, and remove it from the linked list. If using the multi-req protocol and a packet entry with the same msg_id already exists in the receive window, append this packet entry to the existing packet entry.