Hi
Thanks much. I can understand the idea. But pushing at 10G at that way may not
be possible practically.
So, just to clarify:
Test Case:
1) 2-10G Intel Igxbe cards -82599EB based.
2) The same pcap file has like: Frame 1->NIC1, Frame 2->NIC1, Frame n->NICn (It
is random). Only by examining the inner details like Port etc like if HTTP goto
NIC1 if FTP, goto NIC2, etc.
Use of Zero Copy Netsniff-ng:
1) Read each frame. Copy to NIC buffer using:
So, what is this outer loop?
while (user_may_pull_from_tx(tx_ring.frames[it].iov_base)) {
struct pcap_pkthdr phdr;
hdr = tx_ring.frames[it].iov_base;
/* Kernel assumes: data = ph.raw + po->tp_hdrlen -
* sizeof(struct sockaddr_ll); */
out = ((uint8_t *) hdr) + TPACKET_HDRLEN -
sizeof(struct sockaddr_ll);
And, what is this innerloop?
do {
memset(&phdr, 0, sizeof(phdr));
ret = pcap_ops[mode->pcap]->read_pcap_pkt(fd,
&phdr,
out, ring_frame_size(&tx_ring));
if (unlikely(ret <= 0))
goto out;
if (ring_frame_size(&tx_ring) < phdr.len) {
phdr.len = ring_frame_size(&tx_ring);
trunced++;
}
} while (mode->filter && !bpf_run_filter(&bpf_ops, out,
phdr.len));
pcap_pkthdr_to_tpacket_hdr(&phdr, &hdr->tp_h);
2) How should I copy frame to a temporary buffer for all NIC cards and then
decide for all NIC cards, out of these all TX_SLOTs which should be kept and
which should be discarded?
If so how should I do that?
Also please, if possible, send a user mode filter (even if it is early
development stages). Even a rough code would do.
Regards,
Sibir
On Monday, October 8, 2012 4:04:46 PM UTC+5:30, [email protected] wrote:
> I downloaded and compiled the netsniff-ng. The replay works perfectly for 10G
> and 1G rates, well above other open source softwares. I have achieved around
> close to 2.6 Mpps with 512 byte packets and close to 5Mpps in 10G Intel Ixgbe
> card.
>
> I have a few queries:
>
> 1) In the code for netnsiff-ng, it expects bpf filter which is applied on the
> Pcap file. Can I instead apply the filter on the TxRing ie. the Intel NIC
> card? So that multiple TxRings can have multiple filters.
>
> eg. eth1#SrcPort=1233-1244
> eth2#IPSrc=1.2.3.4/16 etc.
>
> 2) One more requirement is that, is it possible to get a bpf filter from
> command line in a human readable format like SrcPort like the one in
> tcpreplay ?
--