code: func (t *tx) init(mtu uint32, c *QueueConfig) error {
  	// Map in all buffers.
  	txPipe, err := getBuffer(c.TxPipeFD)
  	if err != nil {
  		return err
  	}
  
  	rxPipe, err := getBuffer(c.RxPipeFD)
  	if err != nil {
  		syscall.Munmap(txPipe)
  		return err
  	}
  
  	data, err := getBuffer(c.DataFD)
  	if err != nil {
  		syscall.Munmap(txPipe)
  		syscall.Munmap(rxPipe)
  		return err
  	}
  
  	// Initialize state based on buffers.
  	t.q.Init(txPipe, rxPipe)
  	t.ids.init()
  	t.bufs.init(0, len(data), int(mtu))
  	t.data = data
  
  	return nil
  }
docs: // init initializes all state needed by the tx queue based on the information
  // provided.
  //
  // The caller always retains ownership of all file descriptors passed in. The
  // queue implementation will duplicate any that it may need in the future.