[PATCH 0/7] iptraf-ng: packet_get optimizations
by Vitezslav Samel
Main idea for this work is to minimize the work needed to be done
in packet_get(), which is the hottest path in the program.
Cheers,
Vita
Vitezslav Samel (7):
refactor struct pkt_hdr initialization
refactor pkt_cleanup()
packet_get(): optimize - move struct iovec
packet_get(): optimize - move struct sockaddr_ll
packet_get(): optimize - move struct msghdr
packet_get(): optimize - remove cache variables
pkt_hdr: make pkt_buf allocated from heap
src/capture-pkt.c | 12 ++++++----
src/detstats.c | 10 ++++----
src/hostmon.c | 18 ++++++++------
src/ifstats.c | 8 ++++---
src/itrafmon.c | 12 ++++++----
src/othptab.c | 6 ++---
src/packet.c | 70 ++++++++++++++++++++++++++++++++++++++-----------------
src/packet.h | 30 +++++++-----------------
src/pktsize.c | 6 ++++-
src/serv.c | 6 +++--
10 files changed, 105 insertions(+), 73 deletions(-)
--
1.9.1
9 years, 1 month
[PATCH v2 00/10] iptraf-ng fixes and cleanups
by Vitezslav Samel
Here are some fixes and cleanups caught by inspecting code and/or compiling
by new compilers.
Cheers,
Vita
v1 -> v2: drop ipfrag changes (will be done later)
Vitezslav Samel (10):
packet.c: simplify and rename in_cksum() to verify_ipv4_hdr_chksum()
verify_ipv4_hdr_chksum(): remove unneded check
ifstats.c: simplify destroyiflist()
bugfix: detstats(), ifstats(): handle packets with incorrect header checksum
bugfix: positionptr(): properly allocate newly created interfaces
packet_get(): optimization
build: use wide version of -lpanel when needed
ifaces.c: fix warning
packet.c: fix "use of uninitialized variable" warning
iptraf.c: fix "use of uninitialized variable" warning
Makefile | 22 ++++++++++++++--------
src/detstats.c | 18 ++++++++++--------
src/ifaces.c | 2 +-
src/ifaces.h | 2 +-
src/ifstats.c | 53 +++++++++++++++++++++++++++++------------------------
src/iptraf.c | 9 +++------
src/packet.c | 29 ++++++++++-------------------
7 files changed, 68 insertions(+), 67 deletions(-)
--
1.9.1
9 years, 1 month