Statistics
| Branch: | Revision:

root / net / hub.c @ f487b677

History | View | Annotate | Download (8.2 kB)

# Date Author Comment
199ee608 02/27/2013 05:10 pm Luigi Rizzo

net: fix qemu_flush_queued_packets() in presence of a hub

When frontend and backend are connected through a hub as below
(showing only one direction), and the frontend (or in general, all
output ports of the hub) cannot accept more traffic, the backend
queues packets in queue-A....

27dd7730 12/20/2012 01:15 am Anthony Liguori

Merge remote-tracking branch 'bonzini/header-dirs' into staging

  • bonzini/header-dirs: (45 commits)
    janitor: move remaining public headers to include/
    hw: move executable format header files to hw/
    fpu: move public header file to include/fpu
    softmmu: move remaining include files to include/ subdirectories...
1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

1422e32d 12/19/2012 09:31 am Paolo Bonzini

net: reorganize headers

Move public headers to include/net, and leave private headers in net/.
Put the virtio headers in include/net/tap.h, removing the multiple copies
that existed. Leave include/net/tap.h as the interface for NICs, and
net/tap_int.h as the interface for OS-specific parts of the tap backend....

e103129b 12/18/2012 05:48 pm Zhi Yong Wu

net, hub: fix the indent in the comments

Remove some redundant blanks in the comments of
net_hub_id_for_client().

Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>

a245fc18 10/08/2012 02:59 pm Paolo Bonzini

net: consolidate NetClientState header files into one

This patch doesn't seem much useful alone, I must admit. However,
it makes sense as part of the upcoming directory reorganization,
where I want to have include/net/tap.h as the net<->hw interface
for tap. Then having both net/tap.h and include/net/tap.h does...

61518a74 09/14/2012 10:40 am Stefan Hajnoczi

net: broadcast hub packets if at least one port can receive

In commit 60c07d933c66c4b30a83b7ccbc8a0cb3df1b2d0e ("net: fix
qemu_can_send_packet logic") the "VLAN" broadcast behavior was changed
to queue packets if any net client cannot receive. It turns out that...

1a859593 08/01/2012 03:32 pm Zhi Yong Wu

net: Make "info network" output more readable info

Reviewed-by: Jan Kiszka <>
Signed-off-by: Zhi Yong Wu <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Laszlo Ersek <>

52a3cb86 08/01/2012 03:32 pm Zhi Yong Wu

hub: add the support for hub own flow control

Only when all other hub port's peer .can_receive() all return 1,
the source hub port .can_receive() return 1.

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Zhi Yong Wu <>...

4e68f7a0 08/01/2012 03:32 pm Stefan Hajnoczi

net: Rename VLANClientState to NetClientState

The vlan feature is no longer part of net core. Rename VLANClientState
to NetClientState because net clients are not explicitly associated with
a vlan at all, instead they have a peer net client to which they are...

f6c874e3 08/01/2012 02:28 pm Stefan Hajnoczi

net: Add a hub net client

The vlan feature can be implemented in terms of hubs. By introducing a
hub net client it becomes possible to remove the special case vlan code
from net.c and push the vlan feature out of generic networking code.

Signed-off-by: Stefan Hajnoczi <>...

d33d93b2 08/01/2012 02:28 pm Stefan Hajnoczi

net: Use hubs for the vlan feature

Stop using the special-case vlan code in net.c. Instead use the hub net
client to implement the vlan feature. The next patch will remove vlan
code from net.c completely.

Signed-off-by: Stefan Hajnoczi <>...

90d87a33 08/01/2012 02:28 pm Stefan Hajnoczi

net: Look up 'vlan' net clients using hubs

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

81017645 08/01/2012 02:28 pm Stefan Hajnoczi

hub: Check that hubs are configured correctly

Checks can be performed to make sure that hubs have at least one NIC and
one host device, warning the user if this is not the case.
Configurations which do not meet this rule tend to be broken but just
emit a warning. This patch preserves compatibility with the checks...

ab5f3f84 08/01/2012 02:28 pm Stefan Hajnoczi

net: Drop vlan argument to qemu_new_net_client()

Since hubs are now used to implement the 'vlan' feature and the vlan
argument is always NULL, remove the argument entirely and update all net
clients that use qemu_new_net_client().

Signed-off-by: Stefan Hajnoczi <>...

606c10e2 08/01/2012 02:28 pm Zhi Yong Wu

net: Convert qdev_prop_vlan to peer with hub

Instead of using VLANState use net/hub.h to support the vlan qdev
property. The vlan qdev property becomes an alias for the peer qdev
property but is represented as a VLAN ID number. When a VLAN ID is
selected the device will really peer with a hub port....