Age | Commit message (Collapse) | Author | Files | Lines |
|
Move those functions out so that they can be more easily maintained
in its separate file.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Put them separately for the sake of maintanence.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This is more appropriate and consistent with other device irq
functions.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Rename xio to ioops (io-ops) and boil its include files down to a
minimum.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Break this out so that we only need to have sigint non-static where
it is really needed.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Again, we move them out of xio to shrink it down.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We only need it in curvetun, this makes it easier to maintain.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We have a boolen condition, so use bool instead of doing stupid
things with ints.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
No, it's not about whine bottles ... move udp and tcp cork functions
out of xutils.c, so that we can further let it shrink.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Break out all string handling functions and lockme stuff in order
to further eliminate the big code blob in xutils, so that it can
be easier maintained.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Break this stuff out, for better maintainability and readability.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We need to carry frame_count through multiple calls of walk function
to account correctly for --num <pkts>. Also, move socket stats printing
into rx ring, since it belongs there.
Todo: the kernel socket seems to have a different count that what we
see. This needs to be fixed one way or the other. Not yet sure what's
causing this.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Break out IRQ functionality from xutils, simplify it, and
save + restore IRQ affinity list.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Update those functions to implementation status.
Signed-off-by: Hideo Hattori <hhatto.jp@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
To make it more clear whether we're using the total number of CPUs or
the top number (default 10 or specified by user), rename the variable,
where the top number is used.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Give -J a lower prio in the help option ranking and state that its
only for replay or forwarding.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
--jumbo-support is now not always needed anymore. So document when
one needs it and when not.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Since frames are stored more compressed and contiguous, we can also
enable jumbo support in pcap dumps by default, since we have no further
restrictions in terms of ring buffer frame size.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Let this be freed by the kernel during close(2) call in case of v3
otherwise we would get a -EINVAL.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Lets migrate capturing to TPACKET_V3, since it will bring a better
performance due to fewer page cache misses caused by a higher density
of packets, since now they are contigous placed in the ring buffer.
It is said that TPACKET_V3 brings the following benefits:
*) ~15 - 20% reduction in CPU-usage
*) ~20% increase in packet capture rate
*) ~2x increase in packet density
*) Port aggregation analysis
*) Non static frame size to capture entire packet payload
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Prepare TPACKET_V3 for allowing to transparently setting up the
frame structure such that we do not need to change much in the
netsniff-ng/trafgen code.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We do not want to maintain duplicate code, so move this into a separate
file and name those *_generic() helpers.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Arg, this was a leftover when copying the other function. So fix it!
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Implement ring setup routines and structures for TPACKET_V3.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Mention the -n command line option in the general description, not just
the hard limit. Also remove the BUGS section, since this is now
basically resolved.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
There's no good reason why we currently waste an 'int' for
jumbo_support while this must better be done as 'bool'.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Prepare setup_rx_ring_layout for both, v2 and v3. Also do some checks
during compile time if offsets stay the same as we operate on different
union mappings.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Prepare and add some structures an helper functions for TPACKET_V3.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
It rather belongs to built_in.h, and not here.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We only use it once and nowhere else, so just replace the correct
value right away.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Add set_sockopt_tpacket_v3() in preparation for TPACKET_V3.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Needed to let Git merge to not run into conflicts with Tobias' set
of changes on ifpps resp. ifpps manpage.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
More hyphen fixes all over.
Signed-off-by: Kartik Mistry <kartik@debian.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Fix hyphens all over.
Signed-off-by: Kartik Mistry <kartik@debian.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Instead of hard-coding the maximum number of top hitter CPUs, allow the
user to set it manually using a command line option. The default value
(if no command line parameter is specified) remains at 10.
Also update the manpage accordingly.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
The two functions timer_elapsed() and timer_next_dump() both take an
argument which they don't use. Annotate them appropriately using the
__maybe_unused attribute.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Rename it to set_sockopt_tpacket_v2 so that we later on can also
add other versions and have it clearly stated which one we use.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Avoid code duplication by allocating the stats arrays dependent on the
number of CPUs in main() rather than screen_main() and term_main().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
We currently do not support it, so do not keep it here.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Some fixes all over, part 1.
Signed-off-by: Kartik Mistry <kartik@debian.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Fix for spelling mistakes detected by Lintian.
Signed-off-by: Kartik Mistry <kartik@debian.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Update oui entries.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
We don't need to keep an extra file around, put this into the
AUTHORS file under sponsor section. Also credit Team Cymru for
providing an extra machine for us for ASN mappings.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
For packaging, we cannot use -O3, -march etc, so have an option that
allows for distribution build and does less tuning.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|
|
This is needed for distribution packaging purposes. Also remove the
warning, because -I/-L paths for nacl could be defined via cmdline
as well.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
|