commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10689 - in gnuradio/trunk: . gnuradio-core/src/python


From: eb
Subject: [Commit-gnuradio] r10689 - in gnuradio/trunk: . gnuradio-core/src/python/gnuradio/gr gr-wxgui/src/python/plotter grc/data/platforms/python/blocks usrp2/firmware/include usrp2/host/lib
Date: Thu, 26 Mar 2009 12:52:39 -0600 (MDT)

Author: eb
Date: 2009-03-26 12:52:38 -0600 (Thu, 26 Mar 2009)
New Revision: 10689

Modified:
   gnuradio/trunk/
   gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py
   gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py
   gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml
   gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml
   gnuradio/trunk/usrp2/firmware/include/usrp2_eth_packet.h
   gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
Log:
Partial fix for ticket:378.  Merged eb/t378 -r10682:10688 to trunk.



Property changes on: gnuradio/trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
   + /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546


Property changes on: 
gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/michaelld/two_mods/gr-wxgui/src/python/pubsub.py:10540-10546
   + 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/michaelld/two_mods/gr-wxgui/src/python/pubsub.py:10540-10546


Property changes on: 
gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
   + 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677


Property changes on: 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546


Property changes on: 
gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546

Modified: gnuradio/trunk/usrp2/firmware/include/usrp2_eth_packet.h
===================================================================
--- gnuradio/trunk/usrp2/firmware/include/usrp2_eth_packet.h    2009-03-25 
23:14:29 UTC (rev 10688)
+++ gnuradio/trunk/usrp2/firmware/include/usrp2_eth_packet.h    2009-03-26 
18:52:38 UTC (rev 10689)
@@ -150,6 +150,7 @@
  */
 
 #define U2_MAX_SAMPLES 371
+#define        U2_MIN_SAMPLES    9
 
 typedef struct {
   u2_eth_packet_t      hdrs;

Modified: gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc
===================================================================
--- gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-03-25 23:14:29 UTC (rev 
10688)
+++ gnuradio/trunk/usrp2/host/lib/usrp2_impl.cc 2009-03-26 18:52:38 UTC (rev 
10689)
@@ -932,10 +932,8 @@
     if (nitems == 0)
       return true;
 
-    // FIXME there's the possibility that we send fewer than 9 items in a 
frame.
-    // That would end up glitching the transmitter, since the ethernet will 
pad to
-    // 64-bytes total (9 items).  We really need some part of the stack to
-    // carry the real length (thdr?).
+    // FIXME can't deal with nitems < U2_MIN_SAMPLES (will be fixed in VRT)
+    // FIXME need to check the MTU instead of assuming 1500 bytes
 
     // fragment as necessary then fire away
 
@@ -965,7 +963,12 @@
 
       init_etf_hdrs(&hdrs, d_addr, flags, channel, timestamp);
 
-      size_t i = std::min((size_t) U2_MAX_SAMPLES, nitems - n);
+      // Avoid short packet by splitting last two packets if reqd
+      size_t i;
+      if ((nitems - n) > U2_MAX_SAMPLES && (nitems - n) < (U2_MAX_SAMPLES + 
U2_MIN_SAMPLES))
+       i = (nitems - n) / 2;
+      else
+       i = std::min((size_t) U2_MAX_SAMPLES, nitems - n);
 
       eth_iovec iov[2];
       iov[0].iov_base = &hdrs;





reply via email to

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