Thanks Stefan. I don't have source code of QEMU emulation of the network card?
I do have the source code(driver code) of the devices the I wanted to emulate. Basically,Ethernet controller, I wanted to emulate has following two main part 1)Ethernet PHY 2)Ethernet MAC nd have driver code for these devices. But I don't know what are the steps to emulate it for QEMU. Would you suggest me some links where I can get some idea of how emulating a Device for QEMU? Thanks, Rajan On Mon, Jan 20, 2014 at 9:52 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: > On Sat, Jan 18, 2014 at 09:19:43AM -0800, rajan pathak wrote: > > I am looking forward to emulate single-chip Ethernet controller. > > > > I can find some of its source code online and it has two main part > Ethernet > > PHY (any 1GB SGMII compatible) > > and Ethernet MAC . > > > > So ,DO I need to simply put the corresponding source files of PHY and MAC > > in hw/net directory of QEMU? > > I'm not sure what you mean. Do you have source code for QEMU emulation > of the network card? > > If you have some other source code like a driver for the card, or > emulation for the card but not for QEMU, then a lot more work would be > necessary to emulate the card in QEMU. > > > Also ,do I need to take care of underlying Ethernet controller(of my > > machine where I am trying to do this) from > > Broadcom in any way? > > QEMU uses mechanisms to send raw packets from userspace, like the > tun/tap driver that many OSes have. Therefore the physical NIC doesn't > matter, it's abstracted by the tun/tap interface that the host kernel > provides. >