Thanks for the education. will look into the assembly code.
原始邮件
主题: Re: [vpp-dev] Incrementing node counters
来自: "Dave Barach via Lists.Fd.Io"
发至: 2018年11月3日 下午7:55
抄送: Kingwel Xie ,vpp-dev@lists.fd.io
You’ll have to look at the instruction stream in gdb or else “g
You’ll have to look at the instruction stream in gdb or else “gcc –S” and look
at the generated assembly-language code. Even at that, the difference in clock
cycles won’t be completely obvious due to subarchitectural CPU implementation
details. “Node” is not a typical hot variable which would en
Thanks for the comments.
I know is_ip6 will be optimized by complier.
I am still wondering how different between using xxx_node.index and
node->node_index. Anyway,thanks, now I understand it is a performance
consideration.
Best Regards,
Kingwel
原始邮件
主题: RE: Incrementing nod
Yes, you missed something. This pattern is used in inline functions called with
compile-time constant values for is_ip6:
always_inline uword
ah_encrypt_inline (vlib_main_t * vm,
vlib_node_runtime_t * node, vlib_frame_t * from_frame,
int is_ip6)
VLIB_NODE_FN (ah4_encr