nic_router: print packet info before sending it

By now, the 'verbose packets' output when sending packets was printed after
finish sending the packet. This makes following the packet flow harder if you
have multiple components that print such information.

Issue #2732
This commit is contained in:
Martin Stein 2018-03-29 18:13:02 +02:00 committed by Christian Helmuth
parent 168407a40a
commit 6a988749a1

View File

@ -1272,12 +1272,12 @@ void Interface::_send_submit_pkt(Packet_descriptor &pkt,
size_t pkt_size)
{
Domain &local_domain = _domain();
_source().submit_packet(pkt);
local_domain.raise_tx_bytes(pkt_size);
if (local_domain.verbose_packets()) {
log("[", local_domain, "] snd ",
*reinterpret_cast<Ethernet_frame *>(pkt_base));
}
_source().submit_packet(pkt);
}