From owner-cvs-src-old@FreeBSD.ORG Tue Jun 8 03:13:43 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64AA9106564A for ; Tue, 8 Jun 2010 03:13:43 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repoman.freebsd.org (unknown [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 52BE08FC0A for ; Tue, 8 Jun 2010 03:13:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o583Dhcv001707 for ; Tue, 8 Jun 2010 03:13:43 GMT (envelope-from ken@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o583DhnY001706 for cvs-src-old@freebsd.org; Tue, 8 Jun 2010 03:13:43 GMT (envelope-from ken@repoman.freebsd.org) Message-Id: <201006080313.o583DhnY001706@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ken@repoman.freebsd.org using -f From: "Kenneth D. Merry" Date: Tue, 8 Jun 2010 03:13:26 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/xen/netfront netfront.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2010 03:13:43 -0000 ken 2010-06-08 03:13:26 UTC FreeBSD src repository Modified files: sys/dev/xen/netfront netfront.c Log: SVN rev 208901 on 2010-06-08 03:13:26Z by ken A number of netfront fixes and stability improvements: - Re-enable TSO. This was broken previously due to CSUM_TSO clearing the CSUM_TCP flag, so our checksum flags were incorrectly set going to the netback driver. That was fixed in r206844 in tcp_output.c, so we can turn TSO back on here. - Fix the way transmit slots are calculated, so that we can't overfill the ring. - Avoid sending packets with more fragments/segments than netback can handle. The Linux netback code can only handle packets of MAX_SKB_FRAGS, which turns out to be 18 on machines with 4K pages. We can easily generate packets with 32 or so fragments with TSO turned on. Right now the solution is just to drop the packets (since netback doesn't seem to handle it gracefully), but we should come up with a way to allow a driver to tell the TCP stack the maximum number of fragments it can handle in a single packet. - Fix the way the consumer is tracked in the receive path. It could get out of sync fairly easily. - Use standard Xen ring macros to make it clearer how netfront is using the rings. - Get rid of Linux-ish negative errno return values. - Added more documentation to the driver. - Refactored code to make it easier to read. - Some other minor fixes. Reviewed by: gibbs Reviewed by: gibbs Sponsored by: Spectra Logic MFC after: 7 days Revision Changes Path 1.29 +358 -288 src/sys/dev/xen/netfront/netfront.c