
deri at ntop
May 3, 2012, 5:19 AM
Post #3 of 3
(252 views)
Permalink
|
James, PF_RING (non-DNA) has been tuned for RX. As of TX we use syscalls so adding a little delay is normal due to the system call. Please note that we have recently introduced an optimization, that is designed for apps that receive packets and send them back on an interface. Search in pf_ring.h int bounce_interface; /* Interface Id where this packet will bounce after processing if its values is other than UNKNOWN_INTERFACE */ When on a received packet you set the bounce_interface field, the packet is sent on such interface. We'll soon add a code example to the PF_RING repository. Regards Luca On 05/03/2012 12:56 PM, James Hunter wrote: > Apologies but the scale used in the previous e-mail was incorrect, Its > +200 microseconds (so a little bit less latency than I first thought ;) > > I'd still like to have information on reducing this further without > resorting to DMA, is it possible? > > Regards, > > James >> Hi, >> >> I've a very simple test application that takes in packets from Eth 1 >> and passes then to Eth 2, and visa versa - the (real time / CPU >> affinity locked) threads spin on pf_recv() and does an immediate >> pf_send() >> >> On a vanilla cable connection I see packet round trips of about 0.160 >> to 0.200ms - with PF_Ring I see packet trips of 0.380 to 0.400 (an >> extra ~200ms) >> >> I have verified with DMA enabled PF_ring that there is no noticable >> increase in delay, but I'm curious as to why non-DNA pf_ring adds >> such high latency (+200ms is a eternity considering the thread spins >> on pf_recv() ) >> >> Is there anything I can do to reduce this? My application is latency >> sensitive but I don't want to use DMA (at least not at the minute) >> >> Regards, >> >> James >> _______________________________________________ >> Ntop-misc mailing list >> Ntop-misc [at] listgateway >> http://listgateway.unipi.it/mailman/listinfo/ntop-misc >> > > _______________________________________________ > Ntop-misc mailing list > Ntop-misc [at] listgateway > http://listgateway.unipi.it/mailman/listinfo/ntop-misc _______________________________________________ Ntop-misc mailing list Ntop-misc [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop-misc
|