#
6af45170 |
| 07-Sep-2016 |
John Baldwin <jhb@FreeBSD.org> |
Chelsio T4/T5 VF driver.
The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) an
Chelsio T4/T5 VF driver.
The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) and as such the VF device driver currently depends on the PF4 driver.
Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf PCI device driver that attaches to the VF device. It then creates child cxgbev/cxlv devices representing ports assigned to the VF. By default, the PF driver assigns a single port to each VF.
t4vf_hw.c contains VF-specific routines from the shared code used to fetch VF-specific parameters from the firmware.
t4_vf.c contains the VF-specific PCI device driver and includes its own attach routine.
VF devices are required to use a different firmware request when transmitting packets (which in turn requires a different CPL message to encapsulate messages). This alternate firmware request does not permit chaining multiple packets in a single message, so each packet results in a firmware request. In addition, the different CPL message requires more detailed information when enabling hardware checksums, so parse_pkt() on VF devices must examine L2 and L3 headers for all packets (not just TSO packets) for VF devices. Finally, L2 checksums on non-UDP/non-TCP packets do not work reliably (the firmware trashes the IPv4 fragment field), so IPv4 checksums for such packets are calculated in software.
Most of the other changes in the non-VF-specific code are to expose various variables and functions private to the PF driver so that they can be used by the VF driver.
Note that a limited subset of cxgbetool functions are supported on VF devices including register dumps, scheduler classes, and clearing of statistics. In addition, TOE is not supported on VF devices, only for the PF interfaces.
Reviewed by: np MFC after: 2 months Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7599
show more ...
|
#
e06ab612 |
| 07-Sep-2016 |
John Baldwin <jhb@FreeBSD.org> |
Don't break out of the m_advance() loop if len drops to zero.
If a packet contains the Ethernet header (14 bytes) in the first mbuf and the payload (IP + UDP + data) in the second mbuf, then the att
Don't break out of the m_advance() loop if len drops to zero.
If a packet contains the Ethernet header (14 bytes) in the first mbuf and the payload (IP + UDP + data) in the second mbuf, then the attempt to fetch the l3hdr will return a NULL pointer. The first loop iteration will drop len to zero and exit the loop without setting 'p'. However, the desired data is at the start of the second mbuf, so the correct behavior is to loop around and let the conditional set 'p' to m_data of the next mbuf (and leave offset as 0).
Reviewed by: np Sponsored by: Chelsio Communications
show more ...
|
#
637cce3a |
| 03-Sep-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r305314
|
#
2aeb0380 |
| 02-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305220 through r305300.
|
#
7cba15b1 |
| 01-Sep-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to routines available in t4_tom to manage the iSCSI DDP page pod region.
This adds the ability to use multiple DDP page sizes to the
cxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to routines available in t4_tom to manage the iSCSI DDP page pod region.
This adds the ability to use multiple DDP page sizes to the iSCSI driver, among other improvements.
Sponsored by: Chelsio Communications
show more ...
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
532c3cde |
| 16-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r304232
|
#
59c1e950 |
| 15-Aug-2016 |
John Baldwin <jhb@FreeBSD.org> |
Make SGE parameter handling more VF-friendly.
Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() f
Make SGE parameter handling more VF-friendly.
Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() for PF devices and change t4_read_chip_settings() to pull these values out of the params structure instead of reading registers directly. This will permit t4_read_chip_settings() to be reused for VF devices which cannot read SGE registers directly.
While here, move the call to t4_init_sge_params() to get_params__post_init(). The VF driver will populate the SGE parameters structure via a different method before calling t4_read_chip_settings().
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7476
show more ...
|
#
ec55567c |
| 09-Aug-2016 |
John Baldwin <jhb@FreeBSD.org> |
Track the base absolute ID of ingress and egress queues.
Use this to map an absolute queue ID to a logical queue ID in interrupt handlers. For the regular cxgbe/cxl drivers this should be a no-op a
Track the base absolute ID of ingress and egress queues.
Use this to map an absolute queue ID to a logical queue ID in interrupt handlers. For the regular cxgbe/cxl drivers this should be a no-op as the base absolute ID should be zero. VF devices have a non-zero base absolute ID and require this change. While here, export the absolute ID of egress queues via a sysctl.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7446
show more ...
|
#
8f6690d3 |
| 08-Aug-2016 |
John Baldwin <jhb@FreeBSD.org> |
Fix a typo.
|
#
315048f2 |
| 02-Aug-2016 |
John Baldwin <jhb@FreeBSD.org> |
Store the offset of the KDOORBELL and GTS registers in the softc.
VF devices use a different register layout than PF devices. Storing the offset in a value in the softc allows code to be shared bet
Store the offset of the KDOORBELL and GTS registers in the softc.
VF devices use a different register layout than PF devices. Storing the offset in a value in the softc allows code to be shared between the PF and VF drivers.
Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7389
show more ...
|
#
29c229e9 |
| 28-Jul-2016 |
John Baldwin <jhb@FreeBSD.org> |
Mark spg_len and fl_pktshift static.
These variables are no longer exported to t4_netmap.c after r296478.
|
#
069af0eb |
| 22-Jul-2016 |
John Baldwin <jhb@FreeBSD.org> |
Install a handler for firmware work request error messages.
If a driver sends an malformed or disallowed work request, the firmware responds with a work request error. Previously the driver treated
Install a handler for firmware work request error messages.
If a driver sends an malformed or disallowed work request, the firmware responds with a work request error. Previously the driver treated this is as an unexpected message and panicked. Now it decodes the error message to aid in debugging.
Reviewed by: np (older version) MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D6950
show more ...
|
#
671bf2b8 |
| 05-Jul-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Changes to the CPL-handler registration mechanism and code related to "shared" CPLs.
a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single function. Allow callers to direct t
cxgbe(4): Changes to the CPL-handler registration mechanism and code related to "shared" CPLs.
a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single function. Allow callers to direct the response to any iq. Tidy up set_ulp_mode_iscsi while there to use names from t4_tcb.h instead of magic constants.
b) Remove all CPL handler tables from struct adapter. This reduces its size by around 2KB. All handlers are now registered at MOD_LOAD instead of attach or some kind of initialization/activation. The registration functions do not need an adapter parameter any more.
c) Add per-iq handlers to deal with CPLs whose destination cannot be determined solely from the opcode. There are 2 such CPLs in use right now: SET_TCB_RPL and L2T_WRITE_RPL. The base driver continues to send filter and L2T_WRITEs over the mgmtq and solicits the reply on fwq. t4_tom (including the DDP code) now uses the port's ctrlq to send L2T_WRITEs and SET_TCB_FIELDs and solicits the reply on an ofld_rxq. fwq and ofld_rxq have different handlers that know what kind of tid to expect in the reply. Update t4_write_l2e and callers to to support any wrq/iq combination.
Approved by: re@ (kib@) Sponsored by: Chelsio Communications
show more ...
|
#
62291463 |
| 23-Jun-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to the vcxgbe/vcxl interfaces and retire the 'n' interfaces. The main cxgbe/cxl interfaces and tunables related to them are not affecte
cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to the vcxgbe/vcxl interfaces and retire the 'n' interfaces. The main cxgbe/cxl interfaces and tunables related to them are not affected by any of this and will continue to operate as usual.
The driver used to create an additional 'n' interface for every cxgbe/cxl interface if "device netmap" was in the kernel. The 'n' interface shared the wire with the main interface but was otherwise autonomous (with its own MAC address, etc.). It did not have normal tx/rx but had a specialized netmap-only data path. r291665 added another set of virtual interfaces (the 'v' interfaces) to the driver. These had normal tx/rx but no netmap support.
This revision consolidates the features of both the interfaces into the 'v' interface which now has a normal data path, TOE support, and native netmap support. The 'v' interfaces need to be created explicitly with the hw.cxgbe.num_vis tunable. This means "device netmap" will not result in the automatic creation of any virtual interfaces.
The following tunables can be used to override the default number of queues allocated for each 'v' interface. nofld* = 0 will disable TOE on the virtual interface and nnm* = 0 to will disable native netmap support.
# number of normal NIC queues hw.cxgbe.ntxq_vi hw.cxgbe.nrxq_vi
# number of TOE queues hw.cxgbe.nofldtxq_vi hw.cxgbe.nofldrxq_vi
# number of netmap queues hw.cxgbe.nnmtxq_vi hw.cxgbe.nnmrxq_vi
hw.cxgbe.nnm{t,r}xq{10,1}g tunables have been removed.
--- tl;dr version --- The workflow for netmap on cxgbe starting with FreeBSD 11 is: 1) "device netmap" in the kernel config. 2) "hw.cxgbe.num_vis=2" in loader.conf. num_vis > 2 is ok too, you'll end up with multiple autonomous netmap-capable interfaces for every port. 3) "dmesg | grep vcxl | grep netmap" to verify that the interface has netmap queues. 4) Use any of the 'v' interfaces for netmap. pkt-gen -i vcxl<n>... . One major improvement is that the netmap interface has a normal data path as expected. 5) Just ignore the cxl interfaces if you want to use netmap only. No need to bring them up. The vcxl interfaces are completely independent and everything should just work. ---------------------
Approved by: re@ (gjb@) Relnotes: Yes Sponsored by: Chelsio Communications
show more ...
|
#
02f972e8 |
| 08-Jun-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class.
Sponsored by: Chelsio Communications
|
#
453130d9 |
| 03-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
#
9c831bbd |
| 13-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
cda2ab0e |
| 13-Apr-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Always dispatch all work requests that have been written to the descriptor ring before leaving drain_wrq_wr_list.
|
#
d6084013 |
| 05-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
6dd38b87 |
| 01-Apr-2016 |
Sepherosa Ziehau <sephe@FreeBSD.org> |
tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication
And factor out tcp_lro_rx_done, which deduplicates the same logic with netinet/tcp_lro.c
Reviewed by: gallatin (1st versio
tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication
And factor out tcp_lro_rx_done, which deduplicates the same logic with netinet/tcp_lro.c
Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5725
show more ...
|
Revision tags: release/10.3.0 |
|
#
78552b23 |
| 22-Mar-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Be consistent and call ETHER_BPF_MTAP before writing anything to the descriptor ring no matter what path the frame takes within the driver's tx.
|
#
7d536dc8 |
| 10-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
90e7434a |
| 08-Mar-2016 |
Navdeep Parhar <np@FreeBSD.org> |
cxgbe(4): Add a struct sge_params to store per-adapter SGE parameters. Move the code that reads all the parameters to t4_init_sge_params in the shared code. Use these per-adapter values instead of g
cxgbe(4): Add a struct sge_params to store per-adapter SGE parameters. Move the code that reads all the parameters to t4_init_sge_params in the shared code. Use these per-adapter values instead of globals.
Sponsored by: Chelsio Communications
show more ...
|
#
b655ec97 |
| 06-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|