Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5dddac1 in mainline


Ignore:
Timestamp:
2018-05-23T20:41:33Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
e3887ce
Parents:
c1ba24a
Message:

Feed RX buffers to the virtio-net RX queue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/virtio-net/virtio-net.c

    rc1ba24a r5dddac1  
    163163
    164164        /*
     165         * Give all RX buffers to the NIC
     166         */
     167        for (unsigned i = 0; i < RX_BUFFERS; i++) {
     168                /*
     169                 * Associtate the buffer with the descriptor, set length and
     170                 * flags.
     171                 */
     172                virtio_virtq_set_desc(vdev, RX_QUEUE_1, i,
     173                    virtio_net->rx_buf_p[i], RX_BUF_SIZE, VIRTQ_DESC_F_WRITE,
     174                    0);
     175                /*
     176                 * Put the set descriptor into the available ring of the RX
     177                 * queue.
     178                 */
     179                virtio_virtq_produce_available(vdev, RX_QUEUE_1, i);
     180        }
     181
     182        /*
    165183         * Read the MAC address
    166184         */
Note: See TracChangeset for help on using the changeset viewer.