Ben Hutchings
2014-Jan-13 15:38 UTC
[PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
On Mon, 2014-01-13 at 11:40 +0200, Michael S. Tsirkin wrote:> On Sun, Jan 12, 2014 at 03:32:28PM -0800, Michael Dalton wrote:[...]> > The last issue is how the rx_queue_attribute 'show' function > > implementation for mergeable_rx_buffer_size will access the appropriate > > per-receive queue EWMA data. The arguments to the show function will be > > the netdev_rx_queue and the attribute itself. We can get to the > > struct net_device from the netdev_rx_queue. If we extended > > netdev_rx_queue to indicate the queue_index or to store a void *priv_data > > pointer, that would be sufficient to allow us to resolve this issue. > > Hmm netdev_rx_queue is not defined unless CONFIG_RPS is set. > Maybe we should use a different structure.[...] I don't think RPS should own this structure. It's just that there are currently no per-RX-queue attributes other than those defined by RPS. By the way, CONFIG_RPS is equivalent to CONFIG_SMP so will likely be enabled already in most places where virtio_net is used. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Michael Dalton
2014-Jan-13 19:07 UTC
[PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
On Mon, Jan 13, 2014 at 7:38 AM, Ben Hutchings <bhutchings at solarflare.com> wrote:> I don't think RPS should own this structure. It's just that there are > currently no per-RX-queue attributes other than those defined by RPS.Agreed, there is useful attribute-independent functionality already built around netdev_rx_queue - e.g., dynamically resizing the rx queue kobjs as the number of RX queues enabled for the netdev is changed. While the current attributes happen to be used only by RPS, AFAICT it seems RPS should not own netdev_rx_queue but rather should own the RPS-specific fields themselves within netdev_rx_queue. If there are no objections, it seems like I could modify netdev_rx_queue and related functionality so that their existence does not depend on CONFIG_RPS, and instead just have CONFIG_RPS control whether or not the RPS-specific attributes/fields are present. Best, Mike
Michael Dalton
2014-Jan-13 19:19 UTC
[PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
Sorry I missed this important piece of information, it appears that netdev_queue (the TX equivalent of netdev_rx_queue) already has decoupled itself from CONFIG_XPS due to an attribute, queue_trans_timeout, that does not depend on XPS functionality. So it seems that something somewhat equivalent has already happened on the TX side. Best, Mike
Apparently Analagous Threads
- [PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
- [PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
- [PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
- [PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
- [PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size