On 09/23/2013 11:36 PM, chintu hetam wrote:
Thanks Daniel.
1) Assembly syntax is great, but then it requires translation efforts to
generate vhdl/verilog output. And more effort to verify efficacy of manual
translation. Most HDL tools support c like syntax then it's easier to use
for verilog/vhdl as they have language support. That's all.
2) My mistake,in my vhdl implementation context backward jump is like for
e.g. ldh[12]...few other instruction..ldh[10], as access to 10 comes after
location 12 is accessed. What it does is you can't create parallel state
machine. Even though jumps on jt/jf is forward direction. Hope this
clarifies my previous vague statement.
so far i understood from bpfc notes and messages is that, it basically
binds filter to the specified socket, does that mean it doesn't do in-place
filtering?if yes then what is the performance advantage and how it gains
that performance advantage?i will be looking deep into bpfc, any knowledge
sharing of natural language(tcpdump filter definition options for e.g.) to
CFG generation will be great Daniel.
Well, just that we're on the same page. ;-) bpfc is just a flex/bison tool
that translates asm-like syntax into opcodes. Those opcodes are then attached
in a PF_PACKET program to the kernel through setsockopt(2). There, it needs
to pass additional sanity checks and is then run on an interpreter that is
being attached to the socket, and executed for each packet that passes the
socket receive handler. In case on JIT, a JIT compiled image is used instead
of the interpreter, if your arch supports that in the kernel and if opcodes
are all translatable by your JIT compiler (there are a few exceptions on BPF
extensions). So, bpfc is just a frontend to allow for low-level filter
programming
as tcpdump does not seem to update or include new BPF extensions into their
high-level filter compiler. That said, all the "magic" is done in kernel space.
JIT performance gain over the interpreter should be around 50ns per packet.
--
You received this message because you are subscribed to the Google Groups
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.