Tuvie opened a new pull request, #2005: URL: https://github.com/apache/incubator-brpc/pull/2005
### What problem does this PR solve? Issue Number: [1995](https://github.com/apache/incubator-brpc/issues/1995) Problem Summary: When using IOBuf::append_user_data, if the application specify a buffer with an offset over the base address registered with rdma::RegisterMemoryForRdma, brpc reports a failure for invalid memory region. ### What is changed and the side effects? Changed: Add a new function named append_user_data_with_meta in IOBuf. Allow application specifying the lkey as meta to explicitly inform brpc. This removes the necessity to lookup the lkey for the IOBuf Block in rpc processing. Side effects: - Performance effects(性能影响): - Breaking backward compatibility(向后兼容性): To store the meta/lkey in IOBuf Block, the portal_next field is reused when flags is non-0. It is acceptable because portal_next is only used for tls cache of IOBuf, which does not work for user defined Blocks. --- ### Check List: - Please make sure your changes are compilable(请确保你的更改可以通过编译). - When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试). - Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
