demikernel icon indicating copy to clipboard operation
demikernel copied to clipboard

[pdpix] Support Scatter-Gather Arrays with Multiple Segments

Open ppenna opened this issue 2 years ago • 3 comments

Description

Demikernel currently has the limitation of single-segment scatter-gather arrays:

#define DMTR_SGARRAY_MAXSIZE 1

...

typedef struct dmtr_sgarray {
    void *sga_buf;
    uint32_t sga_numsegs;
    dmtr_sgaseg_t sga_segs[DMTR_SGARRAY_MAXSIZE];
    // todo: to be removed when LWIP libOS is retired in favor of
    // `dpdk-catnip`.
    struct sockaddr_in sga_addr;
} dmtr_sgarray_t;

We should support the creation of scatter-gatther arrays with multiple segments.

ppenna avatar Apr 13 '22 19:04 ppenna

I am interested in fixing this issue since this is something I would like to use for a different project. Any pointers on how to approach will be great.

JayjeetAtGithub avatar Oct 23 '22 20:10 JayjeetAtGithub

Hello @JayjeetAtGithub this change requires:

  • Changing the layout of data structures
  • Changing the code of all libOses to handle the proper allocation of multiple-segment scatter gather arrays.

I would recommend you start with Catnap, which is easier to fix.

ppenna avatar Oct 26 '22 00:10 ppenna

Okay, I will try to raise a PR soon. Thanks.

JayjeetAtGithub avatar Oct 26 '22 03:10 JayjeetAtGithub