svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl

Gleb Smirnoff glebius at FreeBSD.org
Tue May 5 06:46:00 UTC 2015


  John,

On Mon, May 04, 2015 at 04:01:28PM -0400, John Baldwin wrote:
J> > Your answer seems quite orthogonal to my question. I reread it couple of times,
J> > but still can't figure out how exactly do you prefet to fetch per-queue stats.
J> > Can you please explain in more detail?
J> 
J> struct if_queue {
J> 	struct ifnet *ifq_parent;
J> 	void (*ifq_get_counter)(struct if_queue *, ift_counter);
J> 	...
J> };
J> 
J> (Pretend that if_queue is a new object type and that each RX or TX queue on a
J> NIC has one.)

This looks like a driver with 1024 queues would carry extra 1024 function pointers
per ifnet. Is it really worth? Could it be that queue #0 differs from queue #1?
Even, if a rare case when queue #N differs from queue #M do exist, they still
can share the pointer and the differentiating logic would be in the function
itself.

Right now, in the projects/ifnet branch, I'm developing in quite opposite
direction - many instances of the same driver share the set of interface
options. This is done to shrink struct ifnet.

What's wrong with KPI when the queue number is parameter to an ifop? This
KPI would also hide the queue pointers from the stack, which are quite
driver specific.

-- 
Totus tuus, Glebius.


More information about the svn-src-all mailing list