aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/xen-netback/xenbus.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-06drivers/net/*: Fix FSF address in file headersJeff Kirsher1-2/+1
Several files refer to an old address for the Free Software Foundation in the file header comment. Resolve by replacing the address with the URL <http://www.gnu.org/licenses/> so that we do not have to keep updating the header comments anytime the address changes. CC: Jay Vosburgh <[email protected]> CC: Veaceslav Falico <[email protected]> CC: Andy Gospodarek <[email protected]> CC: Haiyang Zhang <[email protected]> CC: "K. Y. Srinivasan" <[email protected]> CC: Paul Mackerras <[email protected]> CC: Ian Campbell <[email protected]> CC: Wei Liu <[email protected]> CC: Rusty Russell <[email protected]> CC: "Michael S. Tsirkin" <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Acked-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-10-17xen-netback: enable IPv6 TCP GSO to the guestPaul Durrant1-2/+27
This patch adds code to handle SKB_GSO_TCPV6 skbs and construct appropriate extra or prefix segments to pass the large packet to the frontend. New xenstore flags, feature-gso-tcpv6 and feature-gso-tcpv6-prefix, are sampled to determine if the frontend is capable of handling such packets. Signed-off-by: Paul Durrant <[email protected]> Cc: Wei Liu <[email protected]> Cc: David Vrabel <[email protected]> Cc: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-10-17xen-netback: handle IPv6 TCP GSO packets from the guestPaul Durrant1-0/+7
This patch adds a xenstore feature flag, festure-gso-tcpv6, to advertise that netback can handle IPv6 TCP GSO packets. It creates SKB_GSO_TCPV6 skbs if the frontend passes an extra segment with the new type XEN_NETIF_GSO_TYPE_TCPV6 added to netif.h. Signed-off-by: Paul Durrant <[email protected]> Cc: Wei Liu <[email protected]> Cc: David Vrabel <[email protected]> Acked-by: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-10-17xen-netback: add support for IPv6 checksum offload from guestPaul Durrant1-0/+9
For performance of VM to VM traffic on a single host it is better to avoid calculation of TCP/UDP checksum in the sending frontend. To allow this this patch adds the code necessary to set up partial checksum for IPv6 packets and xenstore flag feature-ipv6-csum-offload to advertise that fact to frontends. Signed-off-by: Paul Durrant <[email protected]> Cc: Wei Liu <[email protected]> Cc: David Vrabel <[email protected]> Cc: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-10-17xen-netback: add support for IPv6 checksum offload to guestPaul Durrant1-1/+6
Check xenstore flag feature-ipv6-csum-offload to determine if a guest is happy to accept IPv6 packets with only partial checksum. Signed-off-by: Paul Durrant <[email protected]> Cc: Wei Liu <[email protected]> Cc: David Vrabel <[email protected]> Cc: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-10-08xen-netback: transition to CLOSED when removing a VIFDavid Vrabel1-0/+4
If a guest is destroyed without transitioning its frontend to CLOSED, the domain becomes a zombie as netback was not grant unmapping the shared rings. When removing a VIF, transition the backend to CLOSED so the VIF is disconnected if necessary (which will unmap the shared rings etc). This fixes a regression introduced by 279f438e36c0a70b23b86d2090aeec50155034a9 (xen-netback: Don't destroy the netdev until the vif is shut down). Signed-off-by: David Vrabel <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Wei Liu <[email protected]> Cc: Paul Durrant <[email protected]> Acked-by: Wei Liu <[email protected]> Reviewed-by: Paul Durrant <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-30xen-netback: Handle backend state transitions in a more robust wayPaul Durrant1-30/+118
When the frontend state changes netback now specifies its desired state to a new function, set_backend_state(), which transitions through any necessary intermediate states. This fixes an issue observed with some old Windows frontend drivers where they failed to transition through the Closing state and netback would not behave correctly. Signed-off-by: Paul Durrant <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Wei Liu <[email protected]> Cc: David Vrabel <[email protected]> Acked-by: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-19xen-netback: Don't destroy the netdev until the vif is shut downPaul Durrant1-5/+12
Without this patch, if a frontend cycles through states Closing and Closed (which Windows frontends need to do) then the netdev will be destroyed and requires re-invocation of hotplug scripts to restore state before the frontend can move to Connected. Thus when udev is not in use the backend gets stuck in InitWait. With this patch, the netdev is left alone whilst the backend is still online and is only de-registered and freed just prior to destroying the vif (which is also nicely symmetrical with the netdev allocation and registration being done during probe) so no re-invocation of hotplug scripts is required. Signed-off-by: Paul Durrant <[email protected]> Cc: David Vrabel <[email protected]> Cc: Wei Liu <[email protected]> Cc: Ian Campbell <[email protected]> Acked-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-07-02xen-netback: xenbus.c: use more current logging stylesWei Liu1-5/+4
Convert one printk to pr_<level>. Add a missing newline in several places to avoid message interleaving, coalesce formats, reflow modified lines to 80 columns. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-23xen-netback: split event channels support for Xen backend driverWei Liu1-7/+34
Netback and netfront only use one event channel to do TX / RX notification, which may cause unnecessary wake-up of processing routines. This patch adds a new feature called feature-split-event-channels to netback, enabling it to handle TX and RX events separately. Netback will use tx_irq to notify guest for TX completion, rx_irq for RX notification. If frontend doesn't support this feature, tx_irq equals to rx_irq. Signed-off-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-17xen-netback: enable user to unload netback moduleWei Liu1-0/+5
This patch enables user to unload netback module, which is useful when user wants to upgrade to a newer netback module without rebooting the host. Netfront cannot handle netback removal event. As we cannot fix all possible frontends we add module get / put along with vif get / put to avoid mis-unloading of netback. To unload netback module, user needs to shutdown all VMs or migrate them to another host or unplug all vifs before hand. Signed-off-by: Wei Liu <[email protected]> Acked-by: Ian Campbell <[email protected]>¬ Signed-off-by: David S. Miller <[email protected]>
2012-01-04Xen: consolidate and simplify struct xenbus_driver instantiationJan Beulich1-6/+3
The 'name', 'owner', and 'mod_name' members are redundant with the identically named fields in the 'driver' sub-structure. Rather than switching each instance to specify these fields explicitly, introduce a macro to simplify this. Eliminate further redundancy by allowing the drvname argument to DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from the ID table will be used for .driver.name). Also eliminate the questionable xenbus_register_{back,front}end() wrappers - their sole remaining purpose was the checking of the 'owner' field, proper setting of which shouldn't be an issue anymore when the macro gets used. v2: Restore DRV_NAME for the driver name in xen-pciback. Signed-off-by: Jan Beulich <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Ian Campbell <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2011-04-06Signed bit field; int have_hotplug_status_watch:1Ian Campbell1-1/+1
Fixes error from sparse: CHECK drivers/net/xen-netback/xenbus.c drivers/net/xen-netback/xenbus.c:29:40: error: dubious one-bit signed bitfield int have_hotplug_status_watch:1; Reported-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-15xen network backend driverIan Campbell1-0/+490
netback is the host side counterpart to the frontend driver in drivers/net/xen-netfront.c. The PV protocol is also implemented by frontend drivers in other OSes too, such as the BSDs and even Windows. The patch is based on the driver from the xen.git pvops kernel tree but has been put through the checkpatch.pl wringer plus several manual cleanup passes and review iterations. The driver has been moved from drivers/xen/netback to drivers/net/xen-netback. One major change from xen.git is that the guest transmit path (i.e. what looks like receive to netback) has been significantly reworked to remove the dependency on the out of tree PageForeign page flag (a core kernel patch which enables a per page destructor callback on the final put_page). This page flag was used in order to implement a grant map based transmit path (where guest pages are mapped directly into SKB frags). Instead this version of netback uses grant copy operations into regular memory belonging to the backend domain. Reinstating the grant map functionality is something which I would like to revisit in the future. Note that this driver depends on 2e820f58f7ad "xen/irq: implement bind_interdomain_evtchn_to_irqhandler for backend drivers" which is in linux next via the "xen-two" tree and is intended for the 2.6.39 merge window: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/backends this branch has only that single commit since 2.6.38-rc2 and is safe for cross merging into the net branch. Signed-off-by: Ian Campbell <[email protected]> Reviewed-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>