uccs / librte

The RTE project
Other
2 stars 0 forks source link

rte_unpack bugs #7

Open shamisp opened 10 years ago

shamisp commented 10 years ago
  1. We want to enable unpack for more than one rte_iovec entry
  2. rte_pmi unpack doesn't copy data to used buffer. Also it doesn't really convert the data.
boehms commented 10 years ago

There is no real pack/unpack in the lmi implementation. Since we are using the key/value store to send data around, I would assume that the PMI implementation takes care of data integrity. However, I fixed the unpack to memcpy the data into the user buffer and to return the offset.

As to unpacking multiple rte_iovecs, do we want to change rte_unpack or introduce an additional function?

shamisp commented 10 years ago

PMI - this is not issue of integrity but support for heterogeneous system. PMI doesn't provide this. Since the datatypes are basic, probably host-to-network translation has to do the trick.

rte_unpack - seems like it is much more easier to extend existing API ?

shamisp commented 10 years ago

Also, probably we have to define clarify the documentation to make sure that user allocate memory properly for the unpack destination

boehms commented 10 years ago

So the proposed change would look something like this: int rte_unpack (rte_iovec_t *data, int iov_count, void src, uint32_t *offset)?

shamisp commented 10 years ago

Looks good.

On Dec 5, 2013, at 10:41 AM, Swen Boehm notifications@github.com<mailto:notifications@github.com> wrote:

So the proposed change would look something like this: int rte_unpack (rte_iovec_t *data, int iov_count, void src, uint32_t *offset)?

— Reply to this email directly or view it on GitHubhttps://github.com/uccs/librte/issues/7#issuecomment-29908148.