Changeset 9ce251c7 in mainline for uspace/drv/nic/virtio-net/virtio-net.c
- Timestamp:
- 2024-12-13T08:32:55Z (10 months ago)
- Children:
- 8765039
- Parents:
- 91042127
- git-author:
- Nataliia Korop <n.corop08@…> (2024-03-10 09:38:44)
- git-committer:
- Nataliia Korop <n.corop08@…> (2024-12-13 08:32:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/virtio-net/virtio-net.c
r91042127 r9ce251c7 43 43 44 44 #include <virtio-pci.h> 45 #include "pcapdump_iface.h"46 #include "pcap_iface.h" 45 #include <pcapdump_iface.h> 46 47 47 #define NAME "virtio-net" 48 48 … … 98 98 if (frame) { 99 99 memcpy(frame->data, &hdr[1], len - sizeof(*hdr)); 100 pcapdump_packet(nic_get_pcap_iface(nic), frame->data, frame->size);101 100 nic_received_frame(nic, frame); 102 101 } else { … … 359 358 /* Copy packet data into the buffer just past the header */ 360 359 memcpy(&hdr[1], data, size); 361 pcapdump_packet(nic_get_pcap_iface(nic), data, size); 360 362 361 /* 363 362 * Set the descriptor, put it into the virtqueue and notify the device … … 439 438 ddf_dev_get_name(dev)); 440 439 441 errno_t pcap_rc = pcapdump_init(nic_get_pcap_iface(nic));442 443 if (pcap_rc != EOK) {444 printf("Failed creating pcapdump port\n");445 }446 440 rc = ddf_fun_add_to_category(fun, "pcap"); 447 if (rc != EOK) 441 if (rc != EOK) { 442 ddf_msg(LVL_ERROR, "Failed adding function to category pcap"); 448 443 goto unbind; 444 } 449 445 450 446 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.