[netmap] when does a packet in the netmap ring send out exactly

Xiaoye Sun Xiaoye.Sun at rice.edu
Fri Oct 27 01:06:43 UTC 2017


Hi

I write a netmap program that sends packets to the network. my program
uses one netmap ring and fills the ring slots with packets.
My program needs to do something (action A) after a particular packet
(packet P) in the ring slot is sent to the network. so the program tracks
the position of the tail point and checks if the tail point has moved
across the slot I used to put that packet P.
However, I found that the tail pointer may not move forward even seconds
after the receiver side got packet P.
Sometimes the tail pointer never moves forward until the TX ring is full.
I try ioctl(NIOCTXSYNC), however, it cannot 100% solve the problem.

My question is that is there a way to make the TX ring empty as early as
possible so that I can know when my packet is sent out. or is there another
way to know when the packet in the slot is sent to the network/NIC physical
queue?

I am using Linux 3.16.0-4-amd64.

Thanks!

Best,
Xiaoye


More information about the freebsd-net mailing list