diff options
| author | Lu Qiuwen <[email protected]> | 2023-05-17 16:58:14 +0800 |
|---|---|---|
| committer | Lu Qiuwen <[email protected]> | 2023-05-17 16:58:51 +0800 |
| commit | a2363d62052b3e6775ca5a8b2555e26fffe17d44 (patch) | |
| tree | 39658826c81f773c7e956c478faa646495c93728 /examples/l2fwd-nf.c | |
| parent | f53d201d1e7d6953c4f1c14381c4e531658d08ad (diff) | |
性能优化,调整关键部分代码的实现提高收、发包的性能。
1. 调整部分数据结构的定义,将需要跨核读写的部分单独使用一个cache line;
2. 增加关键数据结构的预取动作,如mbuf的metadata、数据包头部等;
3. 部分字节序转换的操作调整到编译器执行,运行时不再进行字节序转换;
4. 将mbuf头部后64字节作为mrb_metadata的存储区域,不再支持运行时调整。
5. 采用O3编译,march改用icelake-server以充分发挥处理器加速能力。
Diffstat (limited to 'examples/l2fwd-nf.c')
| -rw-r--r-- | examples/l2fwd-nf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/l2fwd-nf.c b/examples/l2fwd-nf.c index 99597fd..d5c54b0 100644 --- a/examples/l2fwd-nf.c +++ b/examples/l2fwd-nf.c @@ -23,7 +23,7 @@ unsigned int nr_burst = 32; /* options */ unsigned int opt_dump_packet_metadata = 1; -unsigned int opt_inject_by_deep_copy = 1; +unsigned int opt_inject_by_deep_copy = 0; void dump_packet_metadata(marsio_buff_t * buff) { |
