Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
3ac0cb32 |
| 01-Mar-2022 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert if_vge(4) to IfAPI
Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37801
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
cea02fc2 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vge: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
937d37fc |
| 19-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325842 through r325998.
|
#
df57947f |
| 18-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensou
spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
Initially, only tag files that use BSD 4-Clause "Original" license.
RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0 |
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
#
50a44b8b |
| 09-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200696,200740,200756,200758-200759,200972
r200696: Add rudimentary WOL support. While I'm here remove enabling busmastering/memory address in resume path. Bus driver will handle that.
r2
MFC r200696,200740,200756,200758-200759,200972
r200696: Add rudimentary WOL support. While I'm here remove enabling busmastering/memory address in resume path. Bus driver will handle that.
r200740: Swap VGE_TXQTIMER and VGE_RXQTIMER register definition. Pending timer for Tx queue is at 0x3E.
r200756: Correct fragment bit definition in comments.
r200758: VT6130 datasheet was wrong. If VT6130 receive a jumbo frame the controller will split the jumbo frame into multiple RX buffers. However it seems the hardware always dma the frame to 8 bytes boundary for the split frames. Only the first part of the fragment can have 4 byte alignment and subsequent buffers should be 8 bytes aligned. Change RX buffer the alignment requirement to 8 bytes from 4 bytes.
r200759: Disable jumbo frame support for PCIe VT6130/VT6132 controllers. Quite contrary to VT6130 datasheet which says it supports up to 8K jumbo frame, VT6130 does not seem to send jumbo frame that is larger than 4K in length. Trying to send a frame that is larger than 4K cause TX MAC hang. Even though it's possible to allow 4K jumbo frame for VT6130, I think it's meaningless to allow 4K jumbo frame. I'm not sure VT6132 also has the same limitation but I guess it uses the same MAC of VT6130.
r200972: Remove wrong assertion.
show more ...
|
#
6f311c86 |
| 09-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200638: Implement interrupt moderation scheme supported by VT61xx controllers. TX/RX interrupt mitigation is controlled by VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppres
MFC r200638: Implement interrupt moderation scheme supported by VT61xx controllers. TX/RX interrupt mitigation is controlled by VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress generation of interrupts until the programmed frames counter equals to the registers. VT61xx also supports interrupt hold off timer register. If this interrupt hold off timer is active all interrupts would be disabled until the timer reaches to 0. The timer value is reloaded whenever VGE_ISR register written. The timer resolution is about 20us.
Previously vge(4) used single shot timer to reduce Tx completion interrupts. This required VGE_CRS1 register access in Tx start/completion handler to rearm new timeout value and it did not show satisfactory result(more than 50k interrupts under load). Rx interrupts was not moderated at all such that vge(4) used to generate too many interrupts which in turn made polling(4) better approach under high network load.
This change activates all interrupt moderation mechanism and initial values were tuned to generate interrupt less than 8k per second. That number of interrupts wouldn't add additional packet latencies compared to polling(4). These interrupt parameters could be changed with sysctl. dev.vge.%d.int_holdoff dev.vge.%d.rx_coal_pkt dev.vge.%d.tx_coal_pkt Interface has be brought down and up again before change take effect.
With interrupt moderation there is no more need to loop in interrupt handler. This loop always added one more register access. While I'm here remove dead code which tried to implement subset of interrupt moderation.
show more ...
|
#
babaf83d |
| 09-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200616-200617,200635,200639,200644
r200616: Add new flag VGE_FLAG_SUSPENDED to mark suspended state and remove suspended member in softc.
r200617: Add "Velocity" to probe message which w
MFC r200616-200617,200635,200639,200644
r200616: Add new flag VGE_FLAG_SUSPENDED to mark suspended state and remove suspended member in softc.
r200617: Add "Velocity" to probe message which will make it clearer which ethernet controller was recognized. VIA consistently calls "Velocity" family for gigabit ethernet controllers. For fast ethernet controllers they uses "Rhine" family(vr(4) controllers)) and vr(4) already shows "Rhine" in probe message.
r200635: Remove unused VGE_ETHER_ALIGN definition.
r200639: Actually clear interrupts. Writing 0 has no effect.
r200644: Remove unused member variable of softc.
show more ...
|
#
2e04b859 |
| 09-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC 200615: Add hardware MAC statistics support. This statistics could be extracted from dev.vge.%d.stats sysctl node.
|
#
b79a3f65 |
| 08-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200538,200540-200541,200543,200545,200548
r200538: Introduce vge_flags member in softc. The vge_flags member will record device specific bits. Remove vge_link and use vge_flags. While her
MFC r200538,200540-200541,200543,200545,200548
r200538: Introduce vge_flags member in softc. The vge_flags member will record device specific bits. Remove vge_link and use vge_flags. While here, move clearing link state before mii_mediachg() as mii_mediachg() may affect link state.
r200540: Save PHY address by reading VGE_MIICFG register. For PCIe controllers(VT613x), we assume the PHY address is 1. Use the saved PHY address in MII register access routines and remove accessing VGE_MIICFG register. While I'm here save PCI express capability register which will be used in near future.
r200541: Add MSI support for VT613x controllers.
r200543: Increase output queue size from 64 to 255.
r200545: We don't have to reload EEPROM in vge_reset(). Because vge_reset() is called in vge_init_lock(), vge(4) always used to reload EEPROM. Also add more comment why vge(4) clears VGE_CHIPCFG0_PACPI bit. While I'm here add missing new line in vge_reset().
r200548: Sort function prototyes.
show more ...
|
#
ef227052 |
| 08-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200526-200527,200529,200531-200533,200536
r200526: Use PCIR_BAR instead of hard-coded value.
r200527: Fix typo in register definition.
r200529: Clear VGE_TXDESC_Q bit for transmitted fr
MFC r200526-200527,200529,200531-200533,200536
r200526: Use PCIR_BAR instead of hard-coded value.
r200527: Fix typo in register definition.
r200529: Clear VGE_TXDESC_Q bit for transmitted frames. The VGE_TXDESC_Q bit seems to work like a tag that indicates 'not list end' of queued frames. Without having a VGE_TXDESC_Q bit indicates 'list end'. So the last frame of multiple queued frames has no VGE_TXDESC_Q bit. The hardware has peculiar behavior for VGE_TXDESC_Q bit handling. If the VGE_TXDESC_Q bit of descriptor was set the controller would fetch next descriptor. However if next descriptor's OWN bit was cleared but VGE_TXDESC_Q was set, it could confuse controller. Clearing VGE_TXDESC_Q bit for transmitted frames ensure correct behavior.
r200531: Use ANSI function definations.
r200532: Remove unnecessary return statement.
r200533: s/u_intXX_t/uintXX_t/g
r200536: style(9).
show more ...
|
#
bce2400f |
| 08-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r200525: Overhaul bus_dma(9) usage and fix various things. o Separate TX/RX buffer DMA tag from TX/RX descriptor ring DMA tag. o Separate RX buffer DMA tag from common buffer DMA tag. RX
MFC r200525: Overhaul bus_dma(9) usage and fix various things. o Separate TX/RX buffer DMA tag from TX/RX descriptor ring DMA tag. o Separate RX buffer DMA tag from common buffer DMA tag. RX DMA tag has different restriction compared to TX DMA tag. o Add 40bit DMA address support. o Adjust TX/RX descriptor ring alignment to 64 bytes from 256 bytes as documented in datasheet. o Added check to ensure TX/RX ring reside within a 4GB boundary. Since TX/RX ring shares the same high address register they should have the same high address. o TX/RX side bus_dmamap_load_mbuf_sg(9) support. o Add lock assertion to vge_setmulti(). o Add RX spare DMA map to recover from DMA map load failure. o Add optimized RX buffer handler, vge_discard_rxbuf which is activated when vge(4) sees bad frames. o Don't blindly update VGE_RXDESC_RESIDUECNT register. Datasheet says the register should be updated only when number of available RX descriptors are multiple of 4. o Use __NO_STRICT_ALIGNMENT instead of defining VGE_FIXUP_RX which is only set for i386 architecture. Previously vge(4) also performed expensive copy operation to align IP header on amd64. This change should give RX performance boost on amd64 architecture. o Don't reinitialize controller if driver is already running. This should reduce number of link state flipping. o Since vge(4) drops a driver lock before passing received frame to upper layer, make sure vge(4) is still running after re-acquiring driver lock. o Add second argument count to vge_rxeof(). The argument will limit number of packets could be processed in RX handler. o Rearrange vge_rxeof() not to allocate RX buffer if received frame was bad packet. o Removed if_printf that prints DMA map failure. This type of message shouldn't be used in fast path of driver. o Reduce number of allowed TX buffer fragments to 6 from 7. A TX descriptor allows 7 fragments of a frame. However the CMZ field of descriptor has just 3bits and the controller wants to see fragment + 1 in the field. So if we have 7 fragments the field value would be 0 which seems to cause unexpected results under certain conditions. This change should fix occasional TX hang observed on vge(4). o Simplify vge_stat_locked() and add number of available TX descriptor check. o vge(4) controllers lack padding short frames. Make sure to fill zero for the padded bytes. This closes unintended information disclosure. o Don't set VGE_TDCTL_JUMBO flag. Datasheet is not clear whether this bit should be set by driver or write-back status bit after transmission. At least vendor's driver does not set this bit so remove it. Without this bit vge(4) still can send jumbo frames. o Don't start driver when vge(4) know there are not enough RX buffers. o Remove volatile keyword in RX descriptor structure. This should be handled by bus_dma(9). o Collapse two 16bits member of TX/RX descriptor into single 32bits member. o Reduce number of RX descriptors to 252 from 256. The VGE_RXDESCNUM is 16bits register but only lower 8bits are valid. So the maximum number of RX descriptors would be 255. However the number of should be multiple of 4 as controller wants to update 4 RX descriptors at a time. This limits the maximum number of RX descriptor to be 252.
PR: kern/141276, kern/141414
show more ...
|
#
6d2fb730 |
| 08-Jan-2010 |
Pyun YongHyeon <yongari@FreeBSD.org> |
MFC r198987,199414,199543,200422
Partial merge r198987: Use device_printf() and if_printf() instead of printf() with an explicit unit number and remove 'unit' members from softc.
Partial merge
MFC r198987,199414,199543,200422
Partial merge r198987: Use device_printf() and if_printf() instead of printf() with an explicit unit number and remove 'unit' members from softc.
Partial merge r199414: Use the bus_*() routines rather than bus_space_*() for register operations.
r199543: Several fixes to this driver: - Overhaul the locking to avoid recursion and add missing locking in a few places. - Don't schedule a task to call vge_start() from contexts that are safe to call vge_start() directly. Just invoke the routine directly instead (this is what all of the other NIC drivers I am familiar with do). Note that vge(4) does not use an interrupt filter handler which is the primary reason some other drivers use tasks. - Add a new private timer to drive the watchdog timer instead of using if_watchdog and if_timer. - Fixup detach by calling ether_ifdetach() before stopping the interface.
r200422: Remove driver lock assertion in MII register access. This change was made in r199543 to remove MTX_RECURSE. These routines can be called in device attach phase(e.g. mii_phy_probe()) so checking assertion here is not right as caller does not hold a driver lock.
show more ...
|
#
9199c09a |
| 06-Jan-2010 |
Warner Losh <imp@FreeBSD.org> |
Merge from head at r201628.
# This hasn't been tested, and there are at least three bad commits # that need to be backed out before the branch will be stable again.
|
#
33a0d70b |
| 20-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Disable jumbo frame support for PCIe VT6130/VT6132 controllers. Quite contrary to VT6130 datasheet which says it supports up to 8K jumbo frame, VT6130 does not seem to send jumbo frame that is larger
Disable jumbo frame support for PCIe VT6130/VT6132 controllers. Quite contrary to VT6130 datasheet which says it supports up to 8K jumbo frame, VT6130 does not seem to send jumbo frame that is larger than 4K in length. Trying to send a frame that is larger than 4K cause TX MAC hang. Even though it's possible to allow 4K jumbo frame for VT6130, I think it's meaningless to allow 4K jumbo frame. I'm not sure VT6132 also has the same limitation but I guess it uses the same MAC of VT6130.
show more ...
|
#
564340e7 |
| 20-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
VT6130 datasheet was wrong. If VT6130 receive a jumbo frame the controller will split the jumbo frame into multiple RX buffers. However it seems the hardware always dma the frame to 8 bytes boundary
VT6130 datasheet was wrong. If VT6130 receive a jumbo frame the controller will split the jumbo frame into multiple RX buffers. However it seems the hardware always dma the frame to 8 bytes boundary for the split frames. Only the first part of the fragment can have 4 byte alignment and subsequent buffers should be 8 bytes aligned. Change RX buffer the alignment requirement to 8 bytes from 4 bytes.
show more ...
|
#
7fc94bc4 |
| 18-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Add rudimentary WOL support. While I'm here remove enabling busmastering/memory address in resume path. Bus driver will handle that.
|
#
dd77a053 |
| 17-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove unused member variable of softc.
|
#
3b2b8afb |
| 17-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Implement interrupt moderation scheme supported by VT61xx controllers. TX/RX interrupt mitigation is controlled by VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress generation of int
Implement interrupt moderation scheme supported by VT61xx controllers. TX/RX interrupt mitigation is controlled by VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress generation of interrupts until the programmed frames counter equals to the registers. VT61xx also supports interrupt hold off timer register. If this interrupt hold off timer is active all interrupts would be disabled until the timer reaches to 0. The timer value is reloaded whenever VGE_ISR register written. The timer resolution is about 20us.
Previously vge(4) used single shot timer to reduce Tx completion interrupts. This required VGE_CRS1 register access in Tx start/completion handler to rearm new timeout value and it did not show satisfactory result(more than 50k interrupts under load). Rx interrupts was not moderated at all such that vge(4) used to generate too many interrupts which in turn made polling(4) better approach under high network load.
This change activates all interrupt moderation mechanism and initial values were tuned to generate interrupt less than 8k per second. That number of interrupts wouldn't add additional packet latencies compared to polling(4). These interrupt parameters could be changed with sysctl. dev.vge.%d.int_holdoff dev.vge.%d.rx_coal_pkt dev.vge.%d.tx_coal_pkt Interface has be brought down and up again before change take effect.
With interrupt moderation there is no more need to loop in interrupt handler. This loop always added one more register access. While I'm here remove dead code which tried to implement subset of interrupt moderation.
show more ...
|
#
ed03d795 |
| 17-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Remove unused VGE_ETHER_ALIGN definition.
|
#
a931e549 |
| 16-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Add new flag VGE_FLAG_SUSPENDED to mark suspended state and remove suspended member in softc.
|
#
7129fb20 |
| 16-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Add hardware MAC statistics support. This statistics could be extracted from dev.vge.%d.stats sysctl node.
|
#
623fa718 |
| 14-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Increase output queue size from 64 to 255.
|
#
5957cc2a |
| 14-Dec-2009 |
Pyun YongHyeon <yongari@FreeBSD.org> |
Add MSI support for VT613x controllers.
|