When net_read_uncompressed_nonblocking detects a packet of maximum length, it returns NET_ASYNC_NOT_READY right away. Looping in this case might save some higher level calls and help with edge-triggered event notification if there is still data to read:
do {
net_async->mp_status = net_read_packet_nonblocking(net, &len);
net_async->mp_total_length += len;
net->where_b += len;
} while (len == MAX_PACKET_LENGTH);
Or is there a specific reason for the early exit?