Changeset ab936440 in mainline for uspace/drv/nic/virtio-net/virtio-net.c
- Timestamp:
- 2019-02-12T20:42:42Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f31ca47
- Parents:
- 7f7817a9 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/virtio-net/virtio-net.c
r7f7817a9 rab936440 211 211 ddf_msg(LVL_NOTE, "Unsupported number of virtqueues: %u", 212 212 num_queues); 213 rc = ELIMIT; 213 214 goto fail; 214 215 } … … 342 343 assert(descno < TX_BUFFERS); 343 344 344 /* Setup the packe dheader */345 /* Setup the packet header */ 345 346 virtio_net_hdr_t *hdr = (virtio_net_hdr_t *) virtio_net->tx_buf[descno]; 346 347 memset(hdr, 0, sizeof(virtio_net_hdr_t)); 347 348 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; 349 hdr->num_buffers = 0; 348 350 349 351 /* Copy packet data into the buffer just past the header */ … … 403 405 if (fun == NULL) { 404 406 rc = ENOMEM; 405 goto error;407 goto uninitialize; 406 408 } 407 409 nic_t *nic = ddf_dev_data_get(dev); … … 417 419 if (rc != EOK) { 418 420 ddf_msg(LVL_ERROR, "Failed binding device function"); 419 goto uninitialize;421 goto destroy; 420 422 } 421 423 … … 433 435 unbind: 434 436 ddf_fun_unbind(fun); 437 destroy: 438 ddf_fun_destroy(fun); 435 439 uninitialize: 436 440 virtio_net_uninitialize(dev); 437 error:438 441 return rc; 439 442 }
Note:
See TracChangeset
for help on using the changeset viewer.