Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2017 20:06:42 -0500
From:      Xiaoye Sun <Xiaoye.Sun@rice.edu>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   [netmap] when does a packet in the netmap ring send out exactly
Message-ID:  <CAJnByzh4Kzp6-DXXcB06QHSBJpHBKhtDnKUn7R%2BK0A_5VUThyw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJnByzh4Kzp6-DXXcB06QHSBJpHBKhtDnKUn7R%2BK0A_5VUThyw>