From owner-svn-src-all@freebsd.org Fri Jul 22 23:22:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 747BCBA17AF; Fri, 22 Jul 2016 23:22:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E7F719AD; Fri, 22 Jul 2016 23:22:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EA7A8B946; Fri, 22 Jul 2016 19:22:21 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303205 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Date: Fri, 22 Jul 2016 16:15:37 -0700 Message-ID: <8075415.uQxp9geTMj@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201607222246.u6MMkfQh021096@repo.freebsd.org> References: <201607222246.u6MMkfQh021096@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 22 Jul 2016 19:22:22 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 23:22:23 -0000 On Friday, July 22, 2016 10:46:41 PM John Baldwin wrote: > Author: jhb > Date: Fri Jul 22 22:46:41 2016 > New Revision: 303205 > URL: https://svnweb.freebsd.org/changeset/base/303205 > > Log: > Add a driver to create VF devices on Chelsio T4/T5 NICs. > > Chelsio NICs are a bit unique compared to some other NICs in that they > expose different functionality on different physical functions. In > particular, PF4 is used to manage the NIC interfaces ('t4nex' and 't5nex'). > However, PF4 is not able to create VF devices. Instead, VFs are only > supported by physical functions 0 through 3. This commit adds 't4iov' > and 't5iov' drivers that attach to PF0-3. > > One extra wrinkle is that the iov devices cannot enable SR-IOV until the > firwmare has been initialized by the main PF4 driver. To handle this > case, a new t4_if kobj interface has been added to permit cross-calls > between the PF drivers. The PF4 driver notifies sibling drivers when it > is fully attached. It also requests sibling drivers to detach before it > detaches. Sibling drivers query the PF4 driver during their attach > routine to see if it is attached. If not, the sibling drivers defer > their attach actions until the PF4 driver informs them it is attached. > > VF devices are associated with a single port on the NIC. VF devices > created from PF0 are associated with the first port on the NIC, VFs > from PF1 are associated with the second port, etc. VF devices can > only be created from a PF device that has an associated port. Thus, > on a 2-port card, VFs are only supported on PF0 and PF1. > > Reviewed by: np (earlier versions) > MFC after: 1 month > Sponsored by: Chelsio Communications Note that this only permits the creation of VFs, it does not include a driver for these VFs. I have a mostly working driver, but it is against an older HEAD and has to be rebased. In addition, Linux VF drivers will not work without some hacks to the FreeBSD cxgbe/cxl driver because the Linux VF driver only wants page-sized buffers whereas the FreeBSD drivers use 2k buffers (since that is an mbuf cluster). -- John Baldwin