erpc-io / eRPC

Efficient RPCs for datacenter networks
https://erpc.io/
Other
835 stars 137 forks source link

bugfix: fix dpdk_proc_type variable set error #91

Closed cxz66666 closed 1 year ago

cxz66666 commented 1 year ago

when we use 'dpdk_dameon process', and run another process which has create more than one DpdkTransport elements, variable dpdk_proc_type_ will not be set (except for first element) because g_dpdk_initialized is true and will miss setting it, which will cause a runtime_error at https://github.com/erpc-io/eRPC/blob/c516856d47c60359937d17650d9a5a210f7d1524/src/transport_impl/dpdk/dpdk_transport.cc#L196-L199

I find following comment

Resolve bandwidth. XXX: For some reason, rte_eth_link_get() does not work // in secondary DPDK processes in DPDK 19.11

I'm using DPDK 21.05, and rte_eth_link_get() also doesn't work well in secondary DPDK processes, so it will cause a runtime_error

anujkaliaiitd commented 1 year ago

Thanks a lot @cxz66666 for the detailed bug fix. I've merged it.

Thanks also for your note about rte_eth_link_get(). I've updated the code comment in https://github.com/erpc-io/eRPC/commit/dba4001bd1cd839b2eb6263eca2cb3d49ce02afd