rte_keepalive_register_relay_callback 混乱

rte_keepalive_register_relay_callback confusion

rte_keepalive_register_relay_callback()documentation 提到了这个函数 "is called when a core is known to be alive"。但是同时,该函数有一个参数 callback 即 "called upon detection of a dead core." 我当时很困惑。 rte_keepalive_register_relay_callback() 是检测到核心是活的还是死的时候调用?请解释。

The documentation for rte_keepalive_register_relay_callback() mentions that this function "is called when a core is known to be alive".

不是rte_keepalive_register_relay_callback()函数,而是我们传递给这个函数的callback

At the same time, however, the function has a parameter callback that is "called upon detection of a dead core." I am confused then.

那是另一个功能,rte_keepalive_create()。我们传递到那里的回调将在死核检测时调用。

Please explain.

可能有两种情况:1) 核心死了或 2) 核心还活着。

  1. 我们传递给 rte_keepalive_create() 的回调在核心死机时被调用。

  2. 我们传递给 rte_keepalive_register_relay_callback() 的回调在核心活动时调用。