Skip to content

Commit

Permalink
virtionet: remove old transmit_queue. Fixes transmission bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfreb committed Nov 2, 2018
1 parent 478a654 commit 052682f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/drivers/virtionet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,12 @@ void VirtioNet::msix_xmit_handler()
VDBG_TX("[virtionet] %d transmitted\n", dequeued_tx);

// transmit as much as possible from the buffer
if (transmit_queue != nullptr) {
//auto tx = packets_tx_;
transmit(std::move(transmit_queue));
//printf("[virtionet] %ld transmit queue\n", packets_tx_ - tx);
if (! sendq.empty()) {
transmit(nullptr);
}

// If we now emptied the buffer, offer packets to stack
if (transmit_queue == nullptr && tx_q.num_free() > 1) {
if (sendq.empty() && tx_q.num_free() > 1) {
transmit_queue_available_event(tx_q.num_free() / 2);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/drivers/virtionet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ class VirtioNet : Virtio, public net::Link_layer<net::Ethernet> {
bool deferred_kick = false;
static void handle_deferred_devices();

net::Packet_ptr transmit_queue = nullptr;
net::BufferStore bufstore_;

/** Stats */
Expand Down

0 comments on commit 052682f

Please sign in to comment.