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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to