openbmc / pldm

Apache License 2.0
31 stars 40 forks source link

Optimise pldmd response handling #10

Closed dkodihal closed 5 years ago

dkodihal commented 5 years ago

The pldm daemon currently receives a PLDM response message as a std::vector<uint8_t> from a command handler, and then inserts at the beginning the MCTP EID and Type (as required by the mctp demux daemon). Insertion at the beginning of the vector is not optimal - it requires O(n) element moves.

This issue is to come up with an optimization - either be using a different data struct or reserving space at the beginning for the vector, or something else.

dkodihal commented 5 years ago

@zaxxed can you work on this please?

dkodihal commented 5 years ago

Fixed with ad30c54e7ea8b6db4c82ab70944ffe7ede65207f