You assigned buf to sg list, buf was malloc'ed so was a VA. The sg list then is a list of buffers, registered with their virtual address. So the library must have to translate the address into physical address and on top, must add in more sg entries in case the buffer wasn't physically contiguous for the NIC to consume, is that correct?
@erfan_mehraban4 күн бұрын
the NIC hardware uses the lkey (local key) provided in the sg entry to look up the translations in its MMU The MMU contains the VA-to-PA mappings that were set up during memory registration. This is actually one of the key benefits of RDMA - the expensive address translation work is done once at registration time, not on every transfer.