commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 85/148: also release ethernet frames here


From: git
Subject: [Commit-gnuradio] [gnuradio] 85/148: also release ethernet frames here
Date: Mon, 15 Aug 2016 00:47:27 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

nwest pushed a commit to annotated tag old_usrp_devel_udp
in repository gnuradio.

commit 0b50ece0ecc7e33eda0cb945e85c20018ae21e87
Author: Josh Blum <address@hidden>
Date:   Tue Dec 15 19:05:48 2009 -0800

    also release ethernet frames here
---
 usrp2/host/lib/eth_data_transport.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/usrp2/host/lib/eth_data_transport.cc 
b/usrp2/host/lib/eth_data_transport.cc
index 628c6ae..ad020df 100644
--- a/usrp2/host/lib/eth_data_transport.cc
+++ b/usrp2/host/lib/eth_data_transport.cc
@@ -21,6 +21,7 @@
 #include <gruel/realtime.h>
 #include <gruel/sys_pri.h>
 #include <iostream>
+#include <cstdio>
 
 usrp2::eth_data_transport::eth_data_transport(const std::string &ifc, 
u2_mac_addr_t mac, size_t rx_bufsize)
  : transport("ethernet control"), d_mac(mac), d_tx_seqno(0), d_rx_seqno(0),
@@ -63,6 +64,7 @@ void usrp2::eth_data_transport::recv_bg(void){
 
         if (len <= sizeof(u2_eth_packet_t)){
             DEBUG_LOG("D");
+            d_eth_data->release_frame(base);
             continue; //drop truncated packet
         }
 
@@ -159,5 +161,7 @@ void usrp2::eth_data_transport::recv(data_handler *handler){
 void usrp2::eth_data_transport::flush(void){
     //dequeue everything in the ring
     ring_data rd;
-    while (d_ring->dequeue(rd)){}
+    while (d_ring->dequeue(rd)){
+        d_eth_data->release_frame(rd.base);
+    }
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]