1. l3fwd example 內有 5-tuple可用,要移植到原 parse Src / Dst IP 的程式。
2. 有104 bits 5tuple後 hash 變成 32 bits Flow key
用到 ipv4_5tuple 跟 ipv4_5tuple_host 這個Struct的Function:
在l3fwd_em.c內:
ipv4_l3fwd_em_route
ipv4_hash_crc
em_get_ipv4_dst_port
populate_ipv4_few_flow_into_table
populate_ipv4_many_flow_into_table
setup_hash
convert_ipv4_5tuple (把ipv4_5tuple變成ipv4_5tuple_host )
實際執行發現只有下面這個Function在l3fwd_em.c內會被執行:
em_cb_parse_ptype
sudo make install T=x86_64-native-linuxapp-gcc DESTDIR=install CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC" -j 28