summaryrefslogtreecommitdiffstats
path: root/hw/mipsnet.c
Commit message (Collapse)AuthorAgeFilesLines
* mipsnet: Fix compiler warning in debug codeStefan Weil2010-10-031-1/+1
| | | | | | | | size_t needs a different format specifier, so fix this. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* savevm: Add DeviceState paramAlex Williamson2010-07-061-2/+2
| | | | | | | | | | When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: convert mipsnet to NICStateMark McLoughlin2009-12-031-18/+27
| | | | | Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: remove NICInfo::vcMark McLoughlin2009-12-031-5/+5
| | | | | | | | Since 1cc33683, this field is not set for most devices, so just remove it and its remaining few uses. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add receive_raw parameter to qemu_new_vlan_client()Mark McLoughlin2009-10-271-1/+1
| | | | | | | | | | Trivial patch to allow supplying a receive_raw function. A future cleanup should combine this function pointer parameters into a table. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add a client type codeMark McLoughlin2009-10-271-1/+2
| | | | | | | | | This is so as to allow APIs which operate on specific client types without having to add a function table entry which is only implemented by a single client type. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: allow NICs to be connected to netdevsMark McLoughlin2009-10-151-2/+3
| | | | | | | | | | Introduce a 'peer' member to VLANClientState as an alternative to a vlan. The idea being that packets are transfered directly from peer clients rather than going through a vlan. Patchworks-ID: 35516 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Don't leak VLANClientState on PCI hot removeMark McLoughlin2009-07-091-3/+3
| | | | | | | | | | | | | | | destroy_nic() requires that NICInfo::private by a PCIDevice pointer, but then goes on to require that the same pointer matches VLANClientState::opaque. That is no longer the case for virtio-net since qdev and wasn't previously the case for rtl8139, ne2k_pci or eepro100. Make the situation a lot more clear by maintaining a VLANClientState pointer in NICInfo. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add return value to packet receive handlerMark McLoughlin2009-06-091-2/+4
| | | | | | | This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* net: pass VLANClientState* as first arg to receive handlersMark McLoughlin2009-06-091-5/+5
| | | | | | Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* net: re-name vc->fd_read() to vc->receive()Mark McLoughlin2009-06-091-1/+1
| | | | | | | | | VLANClientState's fd_read() handler doesn't read from file descriptors, it adds a buffer to the client's receive queue. Re-name the handlers to make things a little less confusing. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* net: add fd_readv() handler to qemu_new_vlan_client() argsMark McLoughlin2009-06-091-1/+1
| | | | | | | This, apparently, is the style we prefer - all VLANClientState should be an argument to qemu_new_vlan_client(). Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* Introduce VLANClientState::cleanup() (Mark McLoughlin)aliguori2009-04-171-1/+15
| | | | | | | | | | | We're currently leaking memory and file descriptors on device hot-unplug. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove NICInfo from e1000 and mipsnet state (Mark McLoughlin)aliguori2009-04-171-3/+1
| | | | | | | | | | | NICInfo isn't used after initialization, so remove it from the driver state structures. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7147 c046a42c-6fe2-441c-8c8c-71466251a162
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-2/+0
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
* Check NIC model in some NIC init functions (Mark McLoughlin)aliguori2009-01-131-0/+2
| | | | | | | | | | | | | Some NIC init functions are only called when that model is the only valid model. In that case, it makes sense to use qemu_check_nic_model() from the NIC init function itself. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6286 c046a42c-6fe2-441c-8c8c-71466251a162
* Add a -net name=foo parameter (Mark McLoughlin)aliguori2009-01-071-1/+1
| | | | | | | | | | | | | | Allow the user to supply a vlan client name on the command line. This is probably only useful for management tools so that they can use their own names rather than parsing the output of 'info network'. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6220 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_format_nic_info_str() (Mark McLoughlin)aliguori2009-01-071-8/+1
| | | | | | | | | | | | Factor out a simple little function for formatting a NIC's info_str and make all NICs use it. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162
* Add a model string to VLANClientState (Mark McLoughlin)aliguori2009-01-071-2/+2
| | | | | | | | | | | | | | | Don't lose track of what type/model a vlan client is so that we can e.g. assign a global per-model id to clients. The entire patch is basically a tedious excercise in making sure the type/model string gets propagated down to qemu_new_vlan_client(). Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6216 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix mipsnet device ID, noticed by Vijay Kumar.aurel322008-03-281-4/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4119 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* Less debug noise from the mipsnet driver.ths2007-10-281-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3463 c046a42c-6fe2-441c-8c8c-71466251a162
* Second half of mipssim support, plus documentation improvements.ths2007-10-171-0/+269
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3401 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud