Skip to content

Commit 0f36175

Browse files
Artem PrilutskiyArtem Prilutskiy
Artem Prilutskiy
authored and
Artem Prilutskiy
committed
Fix to fix, since queues are just void*
1 parent 7f98628 commit 0f36175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/driver/ixgbe.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,10 @@ struct ixy_device* ixgbe_init(const char* pci_addr, uint16_t rx_queues, uint16_t
571571
dev->rx_queues = calloc(rx_queues, sizeof(struct ixgbe_rx_queue));
572572
dev->tx_queues = calloc(tx_queues, sizeof(struct ixgbe_tx_queue));
573573
for (uint16_t i = 0; i < rx_queues; ++i) {
574-
dev->rx_queues[i].virtual_addresses = calloc(MAX_RX_QUEUE_ENTRIES, sizeof(void*));
574+
((struct ixgbe_rx_queue*)dev->rx_queues)[i].virtual_addresses = calloc(MAX_RX_QUEUE_ENTRIES, sizeof(void*));
575575
}
576576
for (uint16_t i = 0; i < tx_queues; ++i) {
577-
dev->tx_queues[i].virtual_addresses = calloc(MAX_TX_QUEUE_ENTRIES, sizeof(void*));
577+
((struct ixgbe_tx_queue*)dev->tx_queues)[i].virtual_addresses = calloc(MAX_TX_QUEUE_ENTRIES, sizeof(void*));
578578
}
579579
reset_and_init(dev);
580580
return &dev->ixy;

0 commit comments

Comments
 (0)