fn transmit(&'a mut self) -> Option<Self::TxToken> {
        // see if there is something to dequeue
        let numdeq = self.device.txq[0].can_dequeue(false);

        let packet = if numdeq > 0 {
            // info!("TX: reusing buffer chain");
            self.device.txq[0].dequeue().expect("Couldn't dequeue?")
        } else {
            // info!("TX: new buffer chain");
            let mut iobuf = IOBufChain::new(0, 1).expect("Can't create chain?");
            iobuf.append(self.pool_tx.get_buf().expect("Can't get buffer from pool"));
            iobuf
        };

        // get an empty TX token from the pool
        Some(TxPacket::new(
            packet,
            &mut self.device.txq[0],
            &mut self.pool_tx,
        ))
    }
/// Obtains/allocates an empty end buffer
Obtains/allocates an empty end buffer
Obtains / allocates an empty end buffer
fn transmit(&'a mut self) -> Option<Self::TxToken> {
        // see if there is something to dequeue
        let numdeq = self.device.txq[0].can_dequeue(false);
        let packet = if numdeq > 0 {
            // info!("TX: reusing buffer chain");
            self.device.txq[0].dequeue().expect("Couldn't dequeue?")
        } else {
            // info!("TX: new buffer chain");
            let mut iobuf = IOBufChain::new(0, 1).expect("Can't create chain?");
            iobuf.append(self.pool_tx.get_buf().expect("Can't get buffer from pool"));
            iobuf
        };
        // get an empty TX token from the pool
        Some(TxPacket::new(
            packet,
            &mut self.device.txq[0],
            &mut self.pool_tx,
        ))
    }
fn transmit ( & ' a mut self ) -> Option < Self :: TxToken > { // see if there is something to dequeue let numdeq = self . device . txq [ 0 ] . can_dequeue ( false ) ; let packet = if numdeq > 0 { // info!("TX: reusing buffer chain"); self . device . txq [ 0 ] . dequeue ( ) . expect ( " " ) } else { // info!("TX: new buffer chain"); let mut iobuf = IOBufChain :: new ( 0 , 1 ) . expect ( " " ) ; iobuf . append ( self . pool_tx . get_buf ( ) . expect ( " " ) ) ; iobuf } ; // get an empty TX token from the pool Some ( TxPacket :: new ( packet , & mut self . device . txq [ 0 ] , & mut self . pool_tx , ) ) }
Obtains/allocates an empty end buffer
Obtains / allocates an empty end buffer
&'a mut self
&'a mut self