Received: from [140.186.70.92] (port=50327 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1lx0-00073b-K1 for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:43:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1lwu-0002NZ-04 for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:43:42 -0400 Received: from hall.aurel32.net ([88.191.126.93]:45414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1lwt-0002N4-Rk for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:43:35 -0400 Date: Mon, 21 Mar 2011 21:43:31 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH v2] e1000: Fix multi-descriptor packet checksum offload Message-ID: <20110321204331.GC10234@volta.aurel32.net> References: <1299528247-22545-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1299528247-22545-1-git-send-email-stefanha@linux.vnet.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Alex Williamson , Bug 638955 <638955@bugs.launchpad.net>, qemu-devel@nongnu.org, "Michael S. Tsirkin" On Mon, Mar 07, 2011 at 08:04:07PM +0000, Stefan Hajnoczi wrote: > The PCI/PCI-X Family of Gigabit Ethernet Controllers Software > Developer’s Manual states the following about the POPTS field: > > Provides a number of options which control the handling of this > packet. This field is ignored except on the first data descriptor of > a packet. > > The current implementation always loads the field and its checksum > offload flags. This patch uses only the first descriptor's POPTS field > in order to comply with the specification. > > When Solaris sends multi-descriptor packets it fills in POPTS for the > first descriptor only. Therefore this patch is necessary in order to > perform checksum offload correctly for multi-descriptor packets. > > Reported-by: Daniel Pecka > Reported-by: Gabriele A. Trombetti > Signed-off-by: Stefan Hajnoczi > --- > v2: > * Fix Reported-by: details > > hw/e1000.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) Thanks, applied. > diff --git a/hw/e1000.c b/hw/e1000.c > index 0a4574c..2a4d5c7 100644 > --- a/hw/e1000.c > +++ b/hw/e1000.c > @@ -446,7 +446,9 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp) > return; > } else if (dtype == (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D)) { > // data descriptor > - tp->sum_needed = le32_to_cpu(dp->upper.data) >> 8; > + if (tp->size == 0) { > + tp->sum_needed = le32_to_cpu(dp->upper.data) >> 8; > + } > tp->cptse = ( txd_lower & E1000_TXD_CMD_TSE ) ? 1 : 0; > } else { > // legacy descriptor > -- > 1.7.2.3 > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net