summaryrefslogtreecommitdiffstats
path: root/sys/xen/interface
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2012-01-26 16:35:09 +0000
committerken <ken@FreeBSD.org>2012-01-26 16:35:09 +0000
commit7f685c218aab7dcffad6119b6e3741a0b71a2e97 (patch)
treed7ac881e15cd62a22e0e8f7d9e34f5708762e482 /sys/xen/interface
parent709d732d543664ea423f0de76539e97df592cf5c (diff)
downloadFreeBSD-src-7f685c218aab7dcffad6119b6e3741a0b71a2e97.zip
FreeBSD-src-7f685c218aab7dcffad6119b6e3741a0b71a2e97.tar.gz
Xen netback driver rewrite.
share/man/man4/Makefile, share/man/man4/xnb.4, sys/dev/xen/netback/netback.c, sys/dev/xen/netback/netback_unit_tests.c: Rewrote the netback driver for xen to attach properly via newbus and work properly in both HVM and PVM mode (only HVM is tested). Works with the in-tree FreeBSD netfront driver or the Windows netfront driver from SuSE. Has not been extensively tested with a Linux netfront driver. Does not implement LRO, TSO, or polling. Includes unit tests that may be run through sysctl after compiling with XNB_DEBUG defined. sys/dev/xen/blkback/blkback.c, sys/xen/interface/io/netif.h: Comment elaboration. sys/kern/uipc_mbuf.c: Fix page fault in kernel mode when calling m_print() on a null mbuf. Since m_print() is only used for debugging, there are no performance concerns for extra error checking code. sys/kern/subr_scanf.c: Add the "hh" and "ll" width specifiers from C99 to scanf(). A few callers were already using "ll" even though scanf() was handling it as "l". Submitted by: Alan Somers <alans@spectralogic.com> Submitted by: John Suykerbuyk <johns@spectralogic.com> Sponsored by: Spectra Logic MFC after: 1 week Reviewed by: ken
Diffstat (limited to 'sys/xen/interface')
-rw-r--r--sys/xen/interface/io/netif.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/xen/interface/io/netif.h b/sys/xen/interface/io/netif.h
index fbb5c27..261b7d9 100644
--- a/sys/xen/interface/io/netif.h
+++ b/sys/xen/interface/io/netif.h
@@ -42,7 +42,7 @@
* This is the 'wire' format for packets:
* Request 1: netif_tx_request -- NETTXF_* (any flags)
* [Request 2: netif_tx_extra] (only if request 1 has NETTXF_extra_info)
- * [Request 3: netif_tx_extra] (only if request 2 has XEN_NETIF_EXTRA_MORE)
+ * [Request 3: netif_tx_extra] (only if request 2 has XEN_NETIF_EXTRA_FLAG_MORE)
* Request 4: netif_tx_request -- NETTXF_more_data
* Request 5: netif_tx_request -- NETTXF_more_data
* ...
@@ -70,7 +70,9 @@ struct netif_tx_request {
uint16_t offset; /* Offset within buffer page */
uint16_t flags; /* NETTXF_* */
uint16_t id; /* Echoed in response message. */
- uint16_t size; /* Packet size in bytes. */
+ uint16_t size; /* For the first request in a packet, the packet
+ size in bytes. For subsequent requests, the
+ size of that request's associated data in bytes*/
};
typedef struct netif_tx_request netif_tx_request_t;
@@ -175,7 +177,7 @@ struct netif_rx_response {
uint16_t id;
uint16_t offset; /* Offset in page of start of received packet */
uint16_t flags; /* NETRXF_* */
- int16_t status; /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
+ int16_t status; /* -ve: NETIF_RSP_* ; +ve: Rx'ed response size. */
};
typedef struct netif_rx_response netif_rx_response_t;
OpenPOWER on IntegriCloud