Eric Blossom wrote:
On Wed, Nov 05, 2008 at 06:15:03PM +0100, Mattias Kjellsson wrote:
I have been playing with ioctl's today and while browsing the USRP2-
code i found that max length of a packet is defined to 371 which results
in 1484 bytes of "data", and 16 bytes left, leaving room for the 14 byte
ethernet header, but not a 372:nd sample, since each sample is 4 bytes.
But when I look at the output of ifconfig my MTU is set to 1500, but
when I print out how much data is received from a raw socket (listening
to some random network traffic), it tells me it reads max 1514 bytes,
which I figured is 1500 bytes of data, and 2*6 bytes mac- addresses + 2
bytes of protocol. This gives me two questions. Is there (probably)
something I missed here, or should we be able to increase U2_MAX_SAMPLES
to 375 (1500/4 = 375), not that four samples might make a huge
difference in the end, but still... And the other question, shouldn't
one check for the MTU set by the nic and calculate this number, instead
of having it #defined? But then again, it would be a whole lot of re-
writing, since U2_MAX_SAMPLES is #defined... Or have I missed some
fundamental here?
BR
Mattias Kjellsson
There are a couple of headers. See usrp2_eth_packet.h
So I have. Regarding the channel and timestamp fields in "struct
u2_fixed_hdr_t", channel is going to (when implemented) reflect which
usrp2 you want to "speak" with, when mimo- configured? For instance say
I have two usrp2 connected with a mimo- cable. Then I send data to
usrp2#1 on channel #1 and to usrp2#2 on channel #2, while I still use
channel #0 to configure them? Or is this functionality still to much on
the drawing- board to be able to say "this is how it's (going to(?)) work.
The timestamp in the same header, supposed to reflect when it's going to
be sent out on the antenna, when it was received to the usrp2, when it
left the host- computer, or any of the above, depending on what the
current time is, and what the timestamp is? Or is this function as well
in to early stages to say?
(This format is all subject to change.)
So I have noticed ;)
We'll be modifying the code so that it checks
for the actual MTU and does the right thing. It's ticket:310.
I might have some code to do precisely this, but I don't know if it is
as portable and neat as the rest of the code in here, and as I mentioned
earlier I'm not sure exactly where U2_MAX_SAMPLES is used, but I guess
"it's just trail and error, compile and re- write", that does the trick?
BR
//Mattias Kjellsson
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio