Hi Nevada,

Thanks for the input.  But I haven't yet figured out what's wrong.  I
tried setting the source_ip directly as you suggested, but this had no
effect.  And in any event, the source_ip, destination_ip, and port as
indicated by Wireshark are all correct (as I set them).  It's just that my
python client doesn't read any data.

Also, I updated my ROACH board just last week according to
http://www.mail-archive.com/casper@lists.berkeley.edu/msg01058.html.  With
one difference, I used the kernel uImage-jiffy-20091110.  Anyway, I'll
update at the end of the week as Jason suggests.  But it'd be nice to
figure this out before then.


Sean



> We've had similar problems before. If you're going to use sockets, you
> need to be sure that you are setting the source IP address on the GBE
> module. Otherwise, you will see packets in Wireshark, but not in the
> sockets. You can do this in python with something like
>
> fpga.write(gbe_block, source_ip, offset = 0x10)
>
> (Here gbe_block is the name of the gbe yellow block). Also, it might be a
> good idea to set an arp entry on the roach, with something like the
> following:
>
>
> def set_arp_entry(dev_name, last_ip_octet, mac):
>     assert(last_ip_octet < 256)
>     fpga.write(dev_name, mac, offset = 0x3002 + last_ip_octet*8)
> ...
> set_arp_entry(gbe_block, 1, pc_mac_addr)
>
>
> You will not get very high data rates through Python (it's too slow). I
> would suggest using similar code, but in C.
>
> -Nevada
>
> On Mar 23, 2010, at 14:21 PM, mch...@physics.ucsb.edu wrote:
>
>> Hi Paul,
>>
>> Thanks for the reply.  By "not working" I meant that no data appears and
>> therefore the script stalls on the line
>> data = s.recvfrom(1024)[0]
>>
>> Also, currently I don't need very high data rates (~ 10Mb/s), but I will
>> need them in the near future.
>>
>>
>> Sean
>>
>>> Hi Sean,
>>>
>>> I've used python code almost identical to yours pretty successfully,
>>> mainly for simple tests/debugging.  Whether or not this is the right
>>> way
>>> to build a bigger application depends on things like the data rate you
>>> need to support, any additional data processing/formatting that needs
>>> to
>>> be done, etc.
>>>
>>> What form of "not working" are you experiencing?  ie, an error message,
>>> no
>>> data appears, data comes in but you can't keep up with it... or
>>> something
>>> else?
>>>
>>> -Paul
>>>
>>> On Tue, 23 Mar 2010, mch...@physics.ucsb.edu wrote:
>>>
>>>> Hi all,
>>>>
>>>> I need to dump data from a ROACH board to a PC over the 10gbe.  Do any
>>>> of
>>>> you have any recommendations for what I should use as a client to
>>>> handle
>>>> the incoming data?
>>>>
>>>> I've been trying to use a simple Python client like,
>>>>
>>>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>>> s.bind((ip_address, port))
>>>> data = s.recvfrom(1024)[0]
>>>>
>>>> where "ip_address" is the address of the pc's 10gbe nic.  This has
>>>> worked... only occasionally.  And I'm not sure why it fails.  Using
>>>> Wireshark I can see the incoming packets are coming in with 1024 bytes
>>>> from the ROACH as I expect.  Any thoughts?
>>>>
>>>> Thanks a lot.
>>>>
>>>>
>>>> Sean
>>>
>>
>>
>>
>
>
>



Reply via email to