Hi Ahmad, It seems ok. Maybe you should make sure data can be successful received from com2. Try to add "-d -d -d" to socat (verbose output), then check if data can be received from com2. You can also write some data to com2, then check if you can receive same data from 3457 port. I remember 3456 port was for com2? I'm not sure about it.
p.s. I use ethertap only for control purpose, not for benchmarking. The final result may non-deterministic as Andreas said if you make benchmark in this way. Jiuyue > 在 2014年6月27日,21:19,"Ahmad Hassan" <[email protected]> 写道: > > Hi Jiuyue, > > I have a use case where my benchmark opens a sockets in simulated OS inside > gem5 on port 8080. Now I want to send data to this 8080 port from outside > gem5 (from host OS). I have done the following: > > I added a serial port com_2. Now I see that port 3456 is opened for com_1 and > 3457 for com_2. Then I send data from host OS to gem5 com_2 using port 3457. > The log message shows that gem5 receives this data. Inside gem5 then I bind > com_2 to port 8080 using the following commands but com_2 doesn't forward > anything to port 8080: > > mknod /dev/ttyS1 c 4 65 > socat /dev/ttyS1,raw,echo=0,crnl tcp4-connect:localhost:8080 << binds > successfully > > Is this approach wrong? > > Regards, > >> On 27 June 2014 13:27, 马久跃 via gem5-users <[email protected]> wrote: >> Hi Ahmad, >> >> 3500 port provided by ethertap is a "virtual ethernet tunnel" (google >> TAP/TUN), you can send/recv ethernet packet to/from gem5. >> >> socat can bind this port to a virtual ethernet device on host os. >> >> you need to do followings to make this work: >> 1) connect Ethernet device to ethertap.tap port using EtherLink, maybe you >> have to add "tap" port to py file yourself (see getSlavePort() in >> ethertap.cc) >> 2) run socat on host os, bind localhost:3500 to tap device (I forgot the >> parameter, you may google it), this will create a virtual ethernet device >> "tapX" at host os, you can config ip to it as other ethernet device >> 3) you also need some modify to send/recv in ethertap cxx source, current >> impl send data using a loop which cause checksum failed and packet dropped >> at host kernel. I'll post this patch next week. >> >> Jiuyue >> >> 在 2014年6月27日,19:02,"Ahmad Hassan" <[email protected]> 写道: >> >>> Hi Jiuyue, >>> >>> I added ethertap in FSConfig.py as self.ethertap = EtherTap(). I noticed >>> that it opens the port 3500 on the local host. What does EtherTap do if I >>> send the data on port 3500? >>> >>> Shall I run socat on simulated OS or the host OS? What socket I should bind >>> to whom, using socat? >>> >>> Thanks. >>> Regards, >>> >>> Best Regards, Hassan >>> TIP HANA Cloud Computing, Systems Engineering >>> >>> SAP (UK) Limited | The Concourse, Queen's Rd, Queen's Island, Titanic >>> Quarter | BT3 9DT Belfast | UK >>> >>> >>> >>>> On 26 June 2014 00:07, 马久跃 via gem5-users <[email protected]> wrote: >>>> Hi Ahmad, >>>> >>>> you may try ethertap device + socat tool, they can connect gem5 to host >>>> machine. but you need some modify to ethertap to make it work with socat. >>>> >>>> Jiuyue >>>> >>>>> 在 2014年6月25日,20:58,"Andreas Hansson via gem5-users" <[email protected]> >>>>> 写道: >>>>> >>>> >>>>> Hi Ahmad, >>>>> >>>>> There is currently no such functionality in gem5, and networking is only >>>>> supported within one simulator instance. At the moment you can connect >>>>> two systems (as there is no ethernet switch), but on the developer list >>>>> there has been discussions mentioning ongoing work to create an Ethernet >>>>> switch, which would allow more systems (>2) to communicate over Ethernet. >>>>> >>>>> Coming back to your original question, the tricky part with host >>>>> bridging/NATing is the different time scales. The simulated system is >>>>> perhaps 1.000 - 10.000x slower than the host system, and this difference >>>>> in time scale confuses the TCP/IP stack(s). Also, having an external >>>>> network connection will make simulations non-deterministic, which is >>>>> often undesirable. All this said, if you have ideas of how to make it >>>>> work, please feel free to share and discuss on the list. >>>>> >>>>> Andreas >>>>> >>>>> From: Ahmad Hassan via gem5-users <[email protected]> >>>>> Reply-To: Ahmad Hassan <[email protected]>, gem5 users mailing list >>>>> <[email protected]> >>>>> Date: Wednesday, 25 June 2014 04:55 >>>>> To: gem5 users mailing list <[email protected]> >>>>> Subject: [gem5-users] Configure networking in Gem5 X86 FS >>>>> >>>>> Hi, >>>>> >>>>> I have set up eth0 interface in X86 FS mode through e1000 driver. But I >>>>> cannot SSH or ping the the host machine or any other IP or the network. I >>>>> noticed that GEM5 does not create any bridge/NAT on the host machine. >>>>> >>>>> How can I configure networking in gem5 so that I can SSH from any machine >>>>> on the network or the host machine into gem5 X86 FS Ubuntu? >>>>> >>>>> Thanks. >>>>> >>>>> -Ahmad >>>>> >>>>> -- IMPORTANT NOTICE: The contents of this email and any attachments are >>>>> confidential and may also be privileged. If you are not the intended >>>>> recipient, please notify the sender immediately and do not disclose the >>>>> contents to any other person, use it for any purpose, or store or copy >>>>> the information in any medium. Thank you. >>>>> >>>>> ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, >>>>> Registered in England & Wales, Company No: 2557590 >>>>> ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, >>>>> Registered in England & Wales, Company No: 2548782 >>>>> _______________________________________________ >>>>> gem5-users mailing list >>>>> [email protected] >>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>>> >>>> _______________________________________________ >>>> gem5-users mailing list >>>> [email protected] >>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
