Hello,
Consider the following pseudo code that attempts to send every inbound RX packet through the same port it was received.
// Note 2 deferment rings where the RX ring is attached "eth1, eth2, eth3" and
// the TX ring is attached only to "eth1"
pfring *rx_handle, *tx_handle;
while (true)
{
if ((rc = pfring_recv(rx_handle, &localBuf_p, , MAX_SIZE, &hdr, 1)) == 1)
{
pfring_send(tx_handle, localBuf_p, hdr.len, 1);
pfring_flush_tx_packets(tx_handle);
}
}
My setup includes a Linux box that runs this code, a PC that sends packets to the Linux “eth1” port, and an external sniffer that inspecting the traffic.
When sending a single packet (128 bytes) to Linux box over “eth1", the sniffer reports about 400ms delay until the packet is being sent back.
This Linux is an 8 cores x64 running basically only this code.
Any clue?
Is this normal?
10x
Eitan.
Consider the following pseudo code that attempts to send every inbound RX packet through the same port it was received.
// Note 2 deferment rings where the RX ring is attached "eth1, eth2, eth3" and
// the TX ring is attached only to "eth1"
pfring *rx_handle, *tx_handle;
while (true)
{
if ((rc = pfring_recv(rx_handle, &localBuf_p, , MAX_SIZE, &hdr, 1)) == 1)
{
pfring_send(tx_handle, localBuf_p, hdr.len, 1);
pfring_flush_tx_packets(tx_handle);
}
}
My setup includes a Linux box that runs this code, a PC that sends packets to the Linux “eth1” port, and an external sniffer that inspecting the traffic.
When sending a single packet (128 bytes) to Linux box over “eth1", the sniffer reports about 400ms delay until the packet is being sent back.
This Linux is an 8 cores x64 running basically only this code.
Any clue?
Is this normal?
10x
Eitan.