From owner-freebsd-current@FreeBSD.ORG Thu Nov 14 10:59:00 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D16D4E2 for ; Thu, 14 Nov 2013 10:59:00 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 238772FBC for ; Thu, 14 Nov 2013 10:59:00 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id E402D7300A; Thu, 14 Nov 2013 12:01:07 +0100 (CET) Date: Thu, 14 Nov 2013 12:01:07 +0100 From: Luigi Rizzo To: current@freebsd.org Subject: RFC: adding queue number/size fields to ifnet Message-ID: <20131114110107.GA36421@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 10:59:00 -0000 Hi, it would be useful to have a common place with the indication of NIC parameters such as number of tx/rx queues and their lengths. Various 10G drivers do include this information in various places in the softc, but there is no common place. I was wondering if there is any objection to either or both of these options: 1. four fields to the struct ifnet (field names are bikeshed material and irrelevant for the discussion): if_tx_queues, if_rx_queues, if_tx_slots, if_rx_slots 2. a sysctl-like get/set method for key-value pairs (key is always a string, value is possibly one of a few simple types such as INT64, UINT64, STRING) so that we extend the system in the future, e.g. to handle RSS, flow control and whatnot. Of course this also requires to settle on names of features. This is meant for low-frequency access to the parameters of the device, so performance is not an issue. cheers luigi