351680 |
02-Sep-2019 |
emaste |
MFC r351603: vnic: avoid NULL deref in error case
Reported by: Dr Silvio Cesare of InfoSect Sponsored by: The FreeBSD Foundation |
326788 |
12-Dec-2017 |
emaste |
MFC r326597: vnic: apply hardware L3 checksum only for IPv4
Previously we set the csum_l3 flag for IPv4 and IPv6, but only IPv4 should have header checksumming applied.
Prompted by Linux commit fa6d7cb5d76cf0467c61420fc9238045aedfd379.
Sponsored by: The FreeBSD Foundation |
326062 |
21-Nov-2017 |
emaste |
MFC r325813 (bz): Unbreak IPv6.
No longer return ENXIO when trying to send an IPv6 packet in nicvf_sq_add_hdr_subdesc(). Restructure the code so that the upper layer protocol parts are agnostic of the L3 protocol (and no longer specific to IPv4). With this basic IPv6 packets go through. We are still seeing weird behaviour which needs further diagnosis.
PR: 223669 |
326059 |
21-Nov-2017 |
emaste |
MFC r325811: vnic: report that the driver supports multicast
The driver is currently hardcoded to force promiscuous mode, so all of the MAC filtering code is presently unused and multicast should "just work." Report to the higher layers that multicast is supported.
PR: 223573 Reported by: bz Sponsored by: The FreeBSD Foundation |
325916 |
17-Nov-2017 |
emaste |
MFC r325683: vnic: apply BPF tap before passing packet to hardware
Previously we passed tx packets to hardware via nicvf_tx_mbuf_locked and then to the BPF tap, with a possibly invalid mbuf which would result in a panic.
PR: 223600 Discussed with: bz Sponsored by: The FreeBSD Foundation, Packet.net (hardware) |
308333 |
05-Nov-2016 |
mmel |
MFC r304459,r305527:
r304459: INTRNG: Rework handling with resources. Partially revert r301453. - Read interrupt properties at bus enumeration time and store it into global mapping table. - At bus_activate_resource() time, given mapping entry is resolved and connected to real interrupt source. A copy of mapping entry is attached to given resource. - At bus_setup_intr() time, mapping entry stored in resource is used for delivery of requested interrupt configuration. - For MSI/MSIX interrupts, mapping entry is created within pci_alloc_msi()/pci_alloc_msix() call. - For legacy PCI interrupts, mapping entry must be created within pcib_route_interrupt() by pcib driver itself. r305527: Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459 |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
301453 |
05-Jun-2016 |
skra |
INTRNG - change the way how an interrupt mapping data are provided to the framework in OFW (FDT) case.
This is a follow-up to r301451.
Differential Revision: https://reviews.freebsd.org/D6634
|
300295 |
20-May-2016 |
wma |
Fix VNIC module unloading
Fix panics which were present when BGX and PF module were unloaded.
Reviewed by: zbb Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D6346
|
300294 |
20-May-2016 |
wma |
Allow building VNIC as a module
Add directory structure and fix dependencies to be able to build and use Cavium VNIC driver as a module.
Reviewed by: zbb Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D6345
|
299447 |
11-May-2016 |
zbb |
Add support for MTU chaning and Jumbo frames to VNIC
Enable previously added code for MTU handling (based on Cavium 1.0 driver released on BSD license). This commit enables possibility to change MTU on VNIC driver.
Obtained from: Semihalf Sponsored by: Cavium
|
299446 |
11-May-2016 |
zbb |
Fix deadlock in VNIC when using single CPU only
Number of free Tx descriptors does not need to be locked since it can be modified atomically between SND and CQ tasks. It will also block Tx routine from sending packets while CQ will not be able to free descriptors.
Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D6266
|
299444 |
11-May-2016 |
zbb |
Add HW RSS support to VNIC driver
Based on v1.0 driver provided by Cavium under BSD license. Support in-hardware RSS to distribute IP, UDP and TCP traffic among available RX Queues and hence multiple CPUs.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D6230
|
299443 |
11-May-2016 |
zbb |
Bind CQ interrupts and tasks to separate CPUs in VNIC
Delegate interrupts and completion tasks on separate CPUs for each VNIC.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D6229
|
297721 |
08-Apr-2016 |
zbb |
Fix sending TSO packets larger than single DMA segment on VNIC
Due to the bug in the number of 'GATHER' subdescriptors for TSO packets, VNIC was not able to transmit more than one DMA segment with TSO enabled.
Obtained from: Semihalf Sponsored by: Cavium
|
297707 |
08-Apr-2016 |
wma |
Speedup BGX link polling on ARM64
The previous values caused the callout thread stall for 100ms each 2s if no link is present. Dtrace analysis showed that it has significant impact on overall interrupt performance. Decrease these values by a factor of 100.
Obtained from: Semihalf Sponsored by: Cavium Reviewed by: zbb Differential Revision: https://reviews.freebsd.org/D5854
|
297482 |
01-Apr-2016 |
sephe |
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
|
297457 |
31-Mar-2016 |
zbb |
Fix number of the enabled VFs in VNIC
nic->num_vf_en is set based on the number of the enabled LMACs. This number should not be overwritten later by any routine. Instead it should fail PCI_IOV_ADD_VF() so that available VFs with the corresponding LMACs will attach whereas other, disabled VFs will fail with the proper error code. Error signaling (due to improper number of VFs requested) is also moved from PCI_IOV_INIT() to PCI_IOV_ADD_VF().
This will be reworked when multiple queue sets are enabled but for now this is the correct behavior of the driver.
Obtained from: Semihalf Sponsored by: Cavium
|
297453 |
31-Mar-2016 |
zbb |
Don't omit m_dup() for non-writeable mbufs that need checksum calculation
If the driver is not active or link is down the packet could remain non-writeable. This commit makes all mbufs enqueued to the driver's ring buffer to have correct attributes.
Pointed out by: wma Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5800
|
297451 |
31-Mar-2016 |
zbb |
Fix MAC address configuration for VNIC
The FDT description is as follows: - phy-handle, reg, qlm-mode, mac-address are under nodes in bgx0/1 node - phy nodes (pointed by phy-handle) are under MDIO even though they may not be connected through to MDIO. In those nodes they do not contain MAC address or etc.
This commit changes parsing of the FDT nodes for BGX so that it can obtain correct MAC address for a given PHY.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5781
|
297450 |
31-Mar-2016 |
zbb |
Improve TX path of the VNIC driver
- Avoid memory leak when nicvf_tx_mbuf_locked() fails - Introduce nicvf_xmit_locked() routine that uses drbr_peek(), drbr_advance() or drbr_putback() for a specific ifnet. This gives more clear and efficient design as well as prevents from dropping mbufs that where not sent due to temporary lack of descriptors. - Add missing ETHER_BPF_MTAP() hook
Pointed out by: yongari Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5534
|
297448 |
31-Mar-2016 |
zbb |
Fix typo in the VNIC's PF function name
Should be add_vf not addr_vf.
|
297389 |
29-Mar-2016 |
zbb |
Improve HW checksums support in VNIC
- Do not mark CSUM_IP_CHECKED and CSUM_IP_VALID on IPv6 packets. IPv6 does not have checksums by definition. - Set SCTP packets csum_flags CSUM_SCTP_VALID instead of CSUM_DATA_VALID and skip csum_data - Set csum_data simply as 0xffff without byteswap
Pointed out by: yongari Reviewed by: yongari, wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5537
|
297388 |
29-Mar-2016 |
zbb |
Don't manage free SQ entry index by the atomic operations
It is not necessary as entries are being manipulated under lock.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5536
|
296602 |
10-Mar-2016 |
zbb |
Fix bug in VNIC causing phony number of available TX descriptors
TSO packets will signal segments TX completion in the separate CQ descriptors. Each CQ descriptor for HW TSO will point to the same SQ entry. Do not invoke nicvf_put_sq_desc() for secondary segments to avoid free_cnt corruption and eventually integer overflow that will result in the negative free_cnt value and hence impossibility of further transmission.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5535
|
296601 |
10-Mar-2016 |
zbb |
Fix "received NULL mbuf" bug in VNIC
Do not modify NIC_QSET_CQ_0_7_HEAD manually, especially in non-atomic context. It doesn't seem to be necessary to recreate CQ head after interrupt clearing too.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5533
|
296039 |
25-Feb-2016 |
zbb |
Introduce HW TSO support for VNIC
This feature was added in Pass2.0. Significantly improves VNIC's TCP performance on Tx.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5424
|
296038 |
25-Feb-2016 |
zbb |
Enable CQ count threshold interrupt on VNIC Pass2.0
On Pass2.0 can trigger interrupt on both timer and CQ count.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5423
|
296037 |
25-Feb-2016 |
zbb |
Fix VNIC support for Pass2.0 ThunderX chips
- Check chip revision using pass1_silicon() routine. - Configure CPI correctly for Pass2.0
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5422
|
296036 |
25-Feb-2016 |
zbb |
Remove soft reset from the VNIC's PF driver
This is not needed and causes revid register of the PCI configuration space to clear on Pass2.0.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5421
|
296035 |
25-Feb-2016 |
zbb |
Improve VNIC performance on Tx path by immediate packet transmission
Don't postpone Tx if the Tx lock can be acquired now. This gives 3x better performance on egress.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5325
|
296034 |
25-Feb-2016 |
zbb |
Clean-up network interface settings for VNIC
- Remove unrelevant bits - Remove redundant code - Reset variables and then set given bits
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5324
|
296033 |
25-Feb-2016 |
zbb |
Enable HWSTATS capability for VNIC
VNIC manages counters in hardware hence it is desired to have this option enabled to avoid redundant stats update in ether_input_internal().
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5323
|
296032 |
25-Feb-2016 |
zbb |
Prefetch next CQ descriptor in Completion Queue handling loop of VNIC
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5322
|
296031 |
25-Feb-2016 |
zbb |
Enable LRO support for VNIC driver
Support for software LRO when enabled in the capabilities
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5321
|
296030 |
25-Feb-2016 |
zbb |
Add support for hardware Tx and Rx checksums to VNIC driver
- The network controller verifies Rx TCP/UDP/SCTP checksums by default. Communicate this to the stack when the packet is not marked as erroneous to avoid redundant checksum calculation in kernel. - It is not uncommon to get the mbuf with m_len that is less than the minimal size for the IP, TCP, UDP, etc. when HW checsumming is enabled. To avoid data corruption performed by the HW that is intended to write IP and TCP/UDP/SCTP checksums to the data segment, the mbuf needs to be pulled up by the required number of bytes. - Make sure that one can modify the mbufs that require checsum calculation rather than check for NULL mbuf on each transmission.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5320
|
295832 |
20-Feb-2016 |
jhibbits |
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
This simplifies checking for default resource range for bus_alloc_resource(), and improves readability.
This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t.
Discussed with: jhb Suggested by: marcel
|
294998 |
28-Jan-2016 |
zbb |
Fix VNIC enumeration after r294993 and r294990
ofw_bus_get_node() must be tested against negative values since missing parent bus method will result in calling the default method which simply returns (-1): sys/dev/ofw/ofw_bus_if.m This was lost in the review process.
Obtained from: Semihalf Sponsored by: Cavium
|
294994 |
28-Jan-2016 |
zbb |
Support new MDIO hierarchy in ThunderX DTB
Some firmware revisions provide different DTB tree that include odd MDIO placement in the tree. This commit adds support for 2 new buses: - MRML bridge (PCIB subordinate) - MDIO nexus (MRML subordinate) This allows for the correct MDIO attachment with both - new and old firmware.
Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5070
|
294990 |
28-Jan-2016 |
zbb |
Fix finding appropriate BGX node in DTB and move it to a separate function
Search for BGX node in DTS in two ways: 1. Try to find it uder root node first 2. If not found under root, find the top level PCI bridge node and search all nodes below it until appropriate BGX node is found. Move search code to another function to make the code more clear. Remove unused variable by the way.
Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5066
|
290448 |
06-Nov-2015 |
andrew |
Mark the thunder_mdio_fdt driver as early, the bgx needs it to exist so it can find the network phy.
Sponsored by: ABT Systems Ltd
|
289552 |
18-Oct-2015 |
zbb |
Introduce driver for Cavium's ThunderX MDIO
This commit adds support for MDIO present in the ThunderX SoC. From the FDT point of view it is compatible with "octeon-3860-mdio" however only C22 mode is used. The code also implements lmac_if interface functions.
Obtained from: Semihalf Sponsored by: The FreeBSD Foundation
|
289551 |
18-Oct-2015 |
zbb |
Introduce initial support for Cavium's ThunderX networking interface
- The driver consists of three main componens: PF, VF, BGX - Requires appropriate entries in DTS and MDIO driver - Supports only FDT configuration - Multiple Tx queues and single Rx queue supported - No RSS, HW checksum and TSO support - No more than 8 queues per-IF (only one Queue Set per IF) - HW statistics enabled - Works in all available MAC modes (1,10,20,40G) - Style converted to BSD according to style(9) - The code brings lmac_if interface used by the BGX driver to update its logical MACs state.
Obtained from: Semihalf Sponsored by: The FreeBSD Foundation
|
289550 |
18-Oct-2015 |
zbb |
Raw import of ThunderX VNIC networking driver components
This import brings following components of the Linux driver: - Thunder BGX (programmable MAC) - Physical Function driver - Virtual Function driver - Headers
Revision: 1.0 Obtained from: Cavium License information: Cavium provided these files under BSD license
|