[P4] Sebsesseg
Péter Vörös
vopraai at caesar.elte.hu
Tue Feb 16 14:27:02 CET 2016
Sziasztok!
Elkezdtem mericskelni, meg javitgatni 3700Mbps a jelenlegi allapot.
Valamiert kb 150Mbps-t gyorsulunk ha ezeket a macrokat atrakom sima fuggvenybe:
#define EXTRACT_EGRESSPORT(p) (*(uint32_t
*)(((uint8_t*)(p)->headers[/*header instance id - hopefully it's the
very first one*/0].pointer)+/*byteoffset*/6) & /*mask*/0x7fc) >>
/*bitoffset*/2
#define EXTRACT_INGRESSPORT(p) (*(uint32_t
*)(((uint8_t*)(p)->headers[/*header instance id - hopefully it's the
very first one*/0].pointer)+/*byteoffset*/0) & /*mask*/0x1ff) >>
/*bitoffset*/0
Jelenleg a perf szerint a legtobbet ezekben allunk
25.56% example_dpdk1 [.] memcmp at plt
13.15% example_dpdk1 [.] rx_recv_pkts
12.30% example_dpdk1 [.] rte_hash_lookup
11.20% example_dpdk1 [.] packet_received
9.37% example_dpdk1 [.] apply_table_smac
9.21% example_dpdk1 [.] ixgbe_xmit_pkts_vec
5.20% libc-2.19.so [.] __memcmp_sse4_1
Ugy vettem eszre, hogy sebessegben nem eredmenyezett javulast a CRC
szamolas uj fuggvenyre alakitasa, viszont a perf mar nem pirosozza be.
Nezegetem tovabb...
Peti
More information about the P4
mailing list