Commit Graph
713 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain bef5a7699a [PCI] back: Fix potential infinite loop in pcistub_match_one().
The for loop in pcistub_match_one will loop forever if the
dev->bus->self links to itself at the uppermost bridge.  Adding a
check to prevent linking back in on itself prevents this.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2006-08-02 09:15:26 +01:00
kfraser@localhost.localdomain 6c8184a0a3 [LINUX] Fix save/restore (broken by my own GSO tweaks).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 18:06:44 +01:00
kfraser@localhost.localdomain 0434f44fcd [NET] Enable TCPv4 segmentation offload in front/back drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 11:54:45 +01:00
kfraser@localhost.localdomain e40c413dc9 [NET] back: Transmit TSO packets if supported
This patch adds TSO transmission support to the backend.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Disable for now, as domU->dom0 direction.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:49:36 +01:00
kfraser@localhost.localdomain 3fa4fb49fe [NET] front: Add TSO support
This patch adds TCP Segmentation Offload (TSO) support to the
frontend.
It also advertises this fact through xenbus so that the frontend can
detect this and send through TSO requests only if it is supported.

This is done using an extra request slot which is indicated by a flag
in the first slot.  In future checksum offload can be done in the same
way.

Even though only TSO is supported for now the code actually supports
GSO so it can be applied to any other protocol.  The only missing bit
is the detection of host support for a specific GSO protocol.  Once
that is added we can advertise all supported protocols to the guest.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Disable for now, as in domU->dom0 direction.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:45:22 +01:00
kfraser@localhost.localdomain ee5e8cb59c [NET] back: Transmit SG packets if supported
This patch adds scatter-and-gather transmission support to the
backend. This allows the MTU to be raised right now and the potential
for TSO in future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-31 17:42:13 +01:00
kfraser@localhost.localdomain 0cfb94daa1 [NET] front: Add SG support
This patch adds scatter-and-gather support to the frontend.  It also
advertises this fact through xenbus so that the backend can detect
this and send through SG requests only if it is supported.

SG support is required to support skb's larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-31 17:35:43 +01:00
kfraser@localhost.localdomain 0e81c9938e [NET] back: Added tx queue
This patch adds a tx queue to the backend if the frontend supports rx
refill notification.  A queue is needed because SG/TSO greatly reduces
the number of packets that can be stored in the rx ring.  Given an rx
ring with 256 entries, a maximum TSO packet can occupy as many as 18
entries, meaning that the entire ring can only hold 14 packets.  This
is too small at high bandwidths with large TCP RX windows.

Having a tx queue does not present a new security risk as the queue is
a fixed size buffer just like the rx ring.  So each guest can only
hold a
fixed amount of memory (proportional to the tx queue length) on the
host.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cannot BUG_ON netbk_queue_full yet !netbk_can_queue, as this can be
triggered by a misbehaving client. Set req_event appropriately when
stopping the packet queue, or we will not receive a notification.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:29:00 +01:00
kfraser@localhost.localdomain cef4d5d58a [NET] front: Fix the build (broken my me a few changesets back).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 17:52:57 +01:00
kfraser@localhost.localdomain ffb974095f [TPM] Remove some stale code from the TPM backend driver. The code
used to be used for sending of vTPM control commands, but now this is
all done with the hotplug scripts.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-07-28 17:33:26 +01:00
kfraser@localhost.localdomain 6faab8acaf [PCI] Pcifront for ia64.
Added in Kconfig.
On ia64, use ia64 sysdata instead of pcifront genuine one.
Fix a warning on xenbus.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-28 17:23:15 +01:00
kfraser@localhost.localdomain d5dd60406f [NET] front: Added feature-rx-notify
This patch adds support to the frontend for notifying the backend whenever
the rx ring is refilled.  This is required in order for the backend to
get a tx queue.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Modified to only send notification if req_event index is set
appropriately.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 17:13:08 +01:00
kfraser@localhost.localdomain 648ad07608 [NET] back: Replace netif->status with netif_carrier_ok
The connection status to the frontend can be represented using
netif_carrier_ok instead of netif->status.  As a result, we delay
the construction of the dev qdisc until the carrier comes on.  This
is a prerequisite for adding a tx queue.

By the same token, netif->active is now simply the conjunction of
netif_running and netif_carrier_ok so it too can be removed.

Because netif_carrier_off/netif_carrier_on and rtnl_lock all entail
memory barriers, there is no need to have extra memory barriers around
them.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:04:55 +01:00
kfraser@localhost.localdomain db9f62f570 [NET] front: Move rx req pushing to one spot
This patch moves all rx request pushing to network_alloc_rx_buffers.
This is needed to reduce churn for TSO.  More importantly, this makes
it easier to send notifications when adding rx requests which is
required for having a queue in dom0.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:03:26 +01:00
kfraser@localhost.localdomain 47a078f101 [NET] front: Clean up rx ring recovery.
Signed-off-by: Keir Fraser <keir@xensource.com>

This is an update to c/s
10855:03c8002068d9d60c7bbfc2f41af975e09b2e2211
which should have contained the following changeset message
(rather than 'Merge.').

[NET] front: Stop using rx->id

With the current protocol for transferring packets from dom0 to domU,
the
rx->id field is useless because it can be derived from the rx request
ring
ID.  In particular,

        rx->id = (ring_id & NET_RX_RING_SIZE - 1) + 1;

This formula works because the rx response to each request always
occupies
the same slot that the request arrived in.  This in turn is a
consequence
of the fact that each packet only occupies one slot.

The other important reason that this works for dom0=>domU but not
domU=>dom0
is that the resource associated with the rx->id is freed immediately
while
in the domU=>dom0 case the resource is held until the skb is liberated
by
dom0.

Using this formula we can essentially remove rx->id from the protocol,
freeing up space that could be instead be used by things like TSO.
The
only constraint is that the backend must obey the rule that each id
must
only be used in the response that occupies the same slot as the
request.

The actual field of rx->id is still maintained for compatibility with
older backends.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:00:10 +01:00
kfraser@localhost.localdomain 30ec819826 Merge. 2006-07-28 16:53:58 +01:00
kfraser@localhost.localdomain 4c975eb710 [PCI] Per-device permissive flag (replaces global permissive flag).
Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
2006-07-28 12:56:10 +01:00
kfraser@localhost.localdomain 5b0a11ef14 [PCI] Allow per-device configuration for fine-grained control over PCI
configuration space writes, with a goal that was also previously
described by Ryan:

"Permissive mode should only be used as a fall back for unknown
devices.
I think the correct solution for dealing with these device-specific
configuration space registers is to identify them and add the
device-specific fields to the overlay. This patch adds a special
configuration space handler for network cards based on the tg3 linux
network device driver. This handler should allow for reads/writes to
all of the configuration space registers that the tg3 driver requires."

This patch attempts to address concerns with Ryan's original
submission by moving policy from the dom0 kernel into dom0 user-space.
As new quirky devices emerge they can be incorporated into the user-space
policy.  An added benefit is that changes to the policy are effective
for domains created after the changes are written (no need rebuild the
hypervisor or restart xend).

Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
2006-07-28 12:54:58 +01:00
kfraser@localhost.localdomain a111f90b19 [LINUX] Clean up reboot.c suspend handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 11:10:08 +01:00
awilliam@xenbuild.aw 0fe57ed434 merge with xen-unstable.hg 2006-07-27 10:43:34 -06:00
kfraser@localhost.localdomain 9314b23b01 Revert previous changeset. Needs more review.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-27 14:06:15 +01:00
kfraser@localhost.localdomain e91cb0ab6f [NET] back: Replace netif->active with netif_carrier_ok
The connection status to the frontend can be represented using
netif_carrier_ok instead of netif->active.  As a result, we delay
the construction of the dev qdisc until the carrier comes on.  This
is a prerequisite for adding a tx queue.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:52:02 +01:00
kfraser@localhost.localdomain 8fd94b35bf [NET] back: Make use of the simplicity of tasklets in net_rx_action
Tasklets have the property that each one is running on only one CPU at
any time.  This means that you don't have to worry about the tasklet
racing against itself.  Therefore any resources used by just a single
tasklet does not need to be guarded by locks.

Since net_rx_action is the only user of alloc_mfn, we can remove the
mfn_lock that guard it.

The notify_list array is huge by Linux standards so placing it on the
stack is unsafe.  Since net_rx_action is not re-entrant, we can simply
make it static.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:34:09 +01:00
kfraser@localhost.localdomain b93f5d8456 [NET] front: Zero gso features/pad
Set unused gso features/pad values to zero for forward-compatibility.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:32:29 +01:00
awilliam@xenbuild.aw d2ac905a14 merge with xen-unstable.hg 2006-07-26 10:49:32 -06:00
awilliam@xenbuild.aw 31423d8a91 merge with xen-unstable.hg 2006-07-25 12:19:05 -06:00
kfraser@localhost.localdomain 30aab42f71 [LINUX][NET] Add default ethtool get_link implementation to all
interfaces. Some management tools rely on this operation.

From: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-25 16:11:12 +01:00
chris@kneesaa.uk.xensource.com d30245b2bf Fix some more text inconsistencies and put devices in a more sensible order.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-07-14 14:18:39 +01:00
kaf24@firebug.cl.cam.ac.uk 815077ee40 [TPM] Discard a future response packet after a timeout has occurred instead of
removing the request right away.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-07-14 11:48:48 +01:00
kfraser@localhost.localdomain 0df65f6bf9 Fix typo in description of XEN_BLKDEV_TAP
Signed-off-by: Horms <horms@verge.net.au>
2006-07-14 11:43:57 +01:00
jchesterfield@dhcp92.uk.xensource.com 0da81aa1d4 Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README. 2006-07-13 10:13:26 +01:00
awilliam@xenbuild.aw 89b0862b3a [IA64] Save & restore.
xc_ia64_linux_save.c and xc_ia64_linux_restore.c added.
vcpu context has more registers and states (eg: tr registers).
Per cpu irqs are deallocated when cpu is switched off.
#if/#endif added in reboot.c for ia64.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-11 12:51:18 -06:00
kfraser@localhost.localdomain fb79aef8d8 [XENCONSOLE] reference of tty->count in xencons_close() is racy.
It must be protected by tty_sem semaphore like con_close() in
drivers/char/vt.c. and prevent re-opening this tty.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-10 15:23:15 +01:00
kaf24@firebug.cl.cam.ac.uk 90ad2d20d5 [NET]: Rename feature-tso to feature-gso-tcpv4
This patch renames the name feature-tso to feature-gso-tcpv4 for future
expansion.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-03 09:07:33 +01:00
kaf24@firebug.cl.cam.ac.uk 7232160efd [NET] front: Zero negotiated bits in xen_set_features
When we reconnect to the backend we need to first zero all negotiated
bits as the functions xen_set_sg and xen_set_tso do not (and are not
supposed to) zero bits when they fail to set them.

This patch also permanently enables the NETIF_F_GSO_ROBUST bit as we
never parse any GSO fields ourselves (even if we did the backend could
not trust us so it's wasted effort).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-03 09:06:59 +01:00
kaf24@firebug.cl.cam.ac.uk 3c8767d832 [NET] back: Add GSO features field and check gso_size
This patch adds the as-yet unused GSO features which will contain
protocol-independent bits such as the ECN marker.

It also makes the backend check gso_size to ensure that it is non-zero.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-03 09:05:18 +01:00
kaf24@firebug.cl.cam.ac.uk 3de1ac2405 [NET] back: Fix off-by-one error in netbk_tx_err
The generalised extra request info patch introduced a bug with the use
of netbk_tx_err since it advanced the req_cons pointer by one.  This
patch fixes thing by delaying the increment in netbk_tx_err.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-03 08:57:15 +01:00
kfraser@dhcp93.uk.xensource.com 65dc3b4029 [LINUX] Fix booting with e.g. xencons=tty3, so that tty1/tty2 are valid (dummy) devices.
Attached patch makes it always create valid devices on tty1-tty63, but
all but the one specified by xencons are dummy devices.

From: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-03 08:52:27 +01:00
kaf24@firebug.cl.cam.ac.uk d88eb17bac [XENBUS] Another simplification -- bus_for_each_dev() better than bus_find_device().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 22:02:18 +01:00
kfraser@dhcp93.uk.xensource.com f4b8644cb0 [XENBUS] Another fix to the wait-for-device-connection code.
The new method for printing unconnected device status is arguably
cleaner and also does not screw up reference counts (previous code
called bus_find_device() with no put_device() on the result.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 18:14:57 +01:00
kfraser@dhcp93.uk.xensource.com c97b7fb5d1 [XENBUS] Do not wait for devices with no driver to connect.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 17:53:52 +01:00
kaf24@firebug.cl.cam.ac.uk bab2abfd36 [XENBUS] Improve the code for waiting for devices to connect. Provide
a more useful error when devices fail to connect.
From: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 17:02:22 +01:00
kfraser@dhcp93.uk.xensource.com 4509ffb83c [BLK] back: Only remove sysfs attributes if they were previously
added. Also check for errors during attribute creation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 14:30:43 +01:00
kaf24@firebug.cl.cam.ac.uk 10e88b13f4 Use explicit accessors to handle unusually-sized atomic operations in grant table code.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-30 10:10:39 +01:00
kaf24@firebug.cl.cam.ac.uk 047923da52 evtchn_do_upcall() has a micro optimization which is depends on that xchg is a barrier.
However xchg of IA64 has acquire semantics so that event
channel notification is lost sometimes. This patch fixes it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-06-30 10:07:38 +01:00
kfraser@dhcp93.uk.xensource.com ff695fb354 [NET]: Remove gso.segs field from netif protocol.
From: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-30 10:04:22 +01:00
kaf24@firebug.cl.cam.ac.uk 33c0901c24 [BLK] back: Clean up sysfs-interfacing code to use VBD_SHOW macro where possible.
Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2006-06-30 09:43:08 +01:00
kfraser@dhcp93.uk.xensource.com fb1285fc5a [NET] front: Transmit TSO packets if supported
This patch adds TSO transmission support to the frontend.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-29 19:34:16 +01:00
kfraser@dhcp93.uk.xensource.com d167b5e795 [NET] back: build fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-29 19:33:53 +01:00
kfraser@dhcp93.uk.xensource.com da6d1a68a3 [NET] More net protocol and GSO changes.
From: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-29 19:02:45 +01:00