From owner-p4-projects@FreeBSD.ORG Thu Dec 27 22:19:00 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1817216A418; Thu, 27 Dec 2007 22:19:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AB4516A419 for ; Thu, 27 Dec 2007 22:18:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 842A113C43E for ; Thu, 27 Dec 2007 22:18:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lBRMIxsK024694 for ; Thu, 27 Dec 2007 22:18:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBRMIxVT024691 for perforce@freebsd.org; Thu, 27 Dec 2007 22:18:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 27 Dec 2007 22:18:59 GMT Message-Id: <200712272218.lBRMIxVT024691@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 131808 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2007 22:19:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=131808 Change 131808 by hselasky@hselasky_laptop001 on 2007/12/27 22:18:49 This is the first step towards a currently FreeBSD specific extension to the USB CDC Ethernet protocol. The extension will allow for super high IP transfer rates without the need to copy any data or per-IP-packet interrupts, just like an ordinary ethernet controller. Background: When I started reworking the USB ethernet drivers I noticed that the authors had in mind allocating and queueing multiple USB transfers at a time to boost performance. Unfortunatly that would not have increased any performance, because the USB Host Controller would have had to interrupt for every IP-packet anyway, which would have been the boottlneck. Now that I have implemented something I have called "multi sub-framing" it will finally become realistic to do exactly that, and in a very efficient way using only one USB transfer per direction! Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_cdc.h#7 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_cdc.h#7 (text+ko) ==== @@ -188,4 +188,13 @@ #define UCDC_MDM_PARITY_ERR 0x20 #define UCDC_MDM_OVERRUN_ERR 0x40 +/* Multi Frame Ethernet Header */ +typedef struct { + uByte bSig0[2]; /* "MF" */ + uDWord dwFramesAhead; + uDWord dwFramesAheadInverse; +} __packed usb_cdc_mf_eth_header_t; + +#define CDC_MF_ETH_HEADER_SIZE 10 /* bytes */ + #endif /* _USB_CDC_H_ */