Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2015 09:45:56 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl
Message-ID:  <20150505064556.GM34544@FreeBSD.org>
In-Reply-To: <2463555.FfYUgqxYi8@ralph.baldwin.cx>
References:  <201504301823.t3UINd74073186@svn.freebsd.org> <26088556.xbkUe5VAyp@ralph.baldwin.cx> <20150504185125.GL34544@FreeBSD.org> <2463555.FfYUgqxYi8@ralph.baldwin.cx>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150505064556.GM34544>