Changeset b085bbaa in mainline
- Timestamp:
- 2018-05-24T18:43:24Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 211b17a1
- Parents:
- cede6f8
- git-author:
- Jakub Jermar <jakub@…> (2018-05-24 18:43:19)
- git-committer:
- Jakub Jermar <jakub@…> (2018-05-24 18:43:24)
- Location:
- uspace/drv/nic/virtio-net
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/virtio-net/virtio-net.c
rcede6f8 rb085bbaa 90 90 } 91 91 92 static void virtio_net_create_buf_free_list(virtio_dev_t *vdev, uint16_t num, 93 uint16_t size, uint16_t *head) 94 { 95 for (unsigned i = 0; i < size; i++) { 96 virtio_virtq_set_desc(vdev, num, i, 0, 0, 97 VIRTQ_DESC_F_NEXT, (i + 1 == size) ? -1U : i + 1); 98 } 99 *head = 0; 100 } 101 92 102 static errno_t virtio_net_initialize(ddf_dev_t *dev) 93 103 { … … 181 191 182 192 /* 193 * Put all TX and CT buffers on a free list 194 */ 195 virtio_net_create_buf_free_list(vdev, TX_QUEUE_1, TX_BUFFERS, 196 &virtio_net->tx_free_head); 197 virtio_net_create_buf_free_list(vdev, CT_QUEUE_1, CT_BUFFERS, 198 &virtio_net->ct_free_head); 199 200 /* 183 201 * Read the MAC address 184 202 */ -
uspace/drv/nic/virtio-net/virtio-net.h
rcede6f8 rb085bbaa 57 57 void *ct_buf[CT_BUFFERS]; 58 58 uintptr_t ct_buf_p[CT_BUFFERS]; 59 60 uint16_t tx_free_head; 61 uint16_t ct_free_head; 59 62 } virtio_net_t; 60 63
Note:
See TracChangeset
for help on using the changeset viewer.