aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/enic
Commit message (Collapse)AuthorAgeFilesLines
* enic: Report device enable failures to iflibKevin Bowling13 days1-3/+10
| | | | | | | | | | | | Do not publish a running interface after vnic_dev_enable_wait() fails. Run the existing stop cleanup for the queues configured before the enable request, then report initialization failure to iflib. Mark those queues as needing cleanup before submitting the enable request so the stopped-state shortcut cannot skip the unwind. MFC after: 2 weeks Sponsored by: BBOX.io
* enic: Clean the completion ring matching each queueKevin Bowling13 days1-2/+2
| | | | | | | | | | The transmit stop loop cleaned the receive completion ring, and the receive stop loop cleaned the transmit completion ring. Use enic_cq_wq() for transmit queues and enic_cq_rq() for receive queues, matching the queue indices used by the remaining ring bookkeeping. MFC after: 2 weeks Sponsored by: BBOX.io
* iflib: Use the framework run-state accessor in driversKevin Bowling2026-09-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace direct IFF_DRV_RUNNING reads in igbv, ixgbe, ixv, iavf, ixl, ice, bnxt Ethernet, aq, enic and the axgbe PCI frontend with iflib_is_running(). Keep each existing mailbox-ready, fault-state, link-state and administrative-up condition: framework admission is not a substitute for device specific readiness. This covers interrupt admission, operational link publication, VF mailbox and VLAN replay, and live-configuration decisions. Remove ifnet temporaries used only to read the driver flags. Replace the em and igc debug dumps' RUNNING/OACTIVE text with one framework admission snapshot. OACTIVE does not mean that the interface or hardware is inactive. Label the result as software admission rather than link state or proof that DMA has stopped, and retain the queue head/tail dumps and separate RS diagnostics. Keep the filter register and requested interface flags in the axgbe PCI promiscuous-mode trace, but remove its unrelated legacy driver flags. Use the parent Ethernet PF context for the bnxt RDMA running check, retaining the link-state check and the existing IB_PORT_ACTIVE policy. Both current RDMA construction paths use the PF netdev, and Ethernet detach synchronously removes the RDMA auxiliary child before iflib frees that context. Declare the direct iflib module dependency. This does not transfer ownership of RDMA queues to iflib. Leave the independent, non-iflib axgbe ARM frontend unchanged. Reviewed by: iflib (gallatin) MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59601
* enic: Route resets through iflib lifecycleKevin Bowling2026-09-031-4/+4
| | | | | | | | | | | | | Mark the driver stopped after attach so its first IFDI_STOP() call does not repeat hardware shutdown. Defer error interrupt recovery through iflib instead of calling driver stop and init methods from interrupt context. Let iflib own the stop and restart around MTU changes as well, avoiding duplicate lifecycle operations. MFC after: 2 weeks Sponsored by: BBOX.io
* enic: Correct queue and attach resource ownershipKevin Bowling2026-08-081-26/+42
| | | | | | | | | | | | | | | | | Completion queues are allocated by attach_pre but released by queues_free. An iflib failure between those stages leaks the allocation, while the original size expression also underallocates the array. Move completion queue allocation into the TX queue callback, correct its size, and unwind it with TX state if RX allocation fails. Make interrupt cleanup tolerate an unavailable array and reuse the array allocated during device initialization instead of replacing and leaking it. Release the DMA, multicast, and lock resources owned by a successful attach_pre during detach. Avoid allocating the statistics DMA area a second time near the end of attach_pre. MFC after: 2 weeks
* enic: fix potential panic due to not understanding what iflib had allocatedDoug Ambrisko2025-03-037-31/+12
| | | | | | | | | For safety I was trying to clear out the descriptor but the full descriptor was not allocated. Remove any code trying to do that so the same mistake won't be made. This was found when looking to MFC the prior change and having the loader, load the module. Remove cq->ntxqsets since the completion queue is part of the RX and TX sets
* enic(4): fix down/up, MTU changes and moreDoug Ambrisko2025-01-0917-136/+559
| | | | | | | | | | | | | | | | | | | | ifconfig down/up cycles was not working. Fix that which is required to support MTU changes. Now doing ifconfig enic0 mtu 3000 for example works. If the MTU is changes in the VIC HW configuration, that is not reflected in and the OS reports the default 1500. I need to look at that but changing it via ifconfig works. So this is different then what Linux does. Change TX interrupt allocation to be in this driver. Change the admin interrupt count to 2. This make multiple queues work but need to be done as pairs so if the VIC has more TX or RX queues setup in the VIC configuration it will use the lesser value. While updating the TX interrupt also add support for devcmd2. Enable checksum offloading. PR: 282095
* enic: Remove a stray semicolonZhenlei Huang2024-10-241-1/+1
| | | | MFC after: 1 week
* sys/dev/enic/if_enic.c: remove an extra semicolonrilysh2024-02-031-1/+1
| | | | | | Signed-off-by: rilysh <nightquick@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/959
* Remove a few more stray __FBSDID usesJohn Baldwin2023-09-251-3/+0
| | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41954
* enic: Don't restart on VLAN changesKevin Bowling2023-08-241-0/+13
| | | | | | | | | | | In rS360398, a new iflib device method was added with default of opt out for VLAN events needing an interface reset. This re-init is unintentional for vmxnet3(4). MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558
* iflib drivers: Constify PCI ID LUTsMarius Strobl2023-08-171-1/+1
| | | | | | | | Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready for this change. While at it, make isc_driver_version strings (static) const where not apparently un-const on purpose, too. This reduces the size of the amd64 GENERIC by about 10 KiB.
* enic(4): Remove unused dupe prototypeMarius Strobl2023-07-191-2/+0
|
* enic: convert to IfAPIDoug Ambrisko2023-02-062-11/+11
| | | | Prompted by: jhibbits
* enic: Cisco VIC driverDoug Ambrisko2023-02-0626-0/+6761
This driver is based of the enic (Cisco VIC) DPDK driver. It provides basic ethernet functionality. Has been run with various VIC cards to do UEFI PXE boot with NFS root.