Vitezslav Samel <vitezslav(a)samel.cz> writes:
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
v2:
no need to check for NULL on xmallocz()ed pointer
v1:
initial revision
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 | 67 +++++++++++++++++++++++++++++++++++++------------------
src/packet.h | 30 +++++++------------------
src/pktsize.c | 6 ++++-
src/serv.c | 6 +++--
10 files changed, 102 insertions(+), 73 deletions(-)
$ git am -3s vita-apply
Applying: refactor struct pkt_hdr initialization
Applying: refactor pkt_cleanup()
Applying: packet_get(): optimize - move struct iovec
Applying: packet_get(): optimize - move struct sockaddr_ll
fatal: corrupt patch at line 52
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0004 packet_get(): optimize - move struct sockaddr_ll
The copy of the patch that failed is found in:
/home/npajkovsky/upstream/iptraf-ng/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
--
Nikola