CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2015/11/15 21:02:34
Modified files: sys/dev/pci : if_vge.c Log message: rework vge_start to avoid IFQ_POLL firstly, this checks for space in the tx ring before looking at the send queue. if there's no space, then IFF_OACTIVE is set and break. if there's space use IFQ_DEQUEUE to pull a packet off. if we fail to encapsulate it, it gets dropped. encap has been changed so the dmamaps the mbufs are loaded into are created with 7 segments instead of 32. this means we detect when the packet would overflow the tx descriptor at dmamap load time, rather than after we've looped over the segments writing them into the descriptor. we now use m_defrag to defrag the mbuf instead of allocating a new one and using m_copydata. now if we have any encap error on the first mbuf, we no longer set IFF_OACTIVE and wait for an interrupt that never comes to clear it. testing and (excellent) code review by richard proctor