From owner-svn-src-all@FreeBSD.ORG Mon Oct 29 05:40:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86089EC5; Mon, 29 Oct 2012 05:40:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 307158FC08; Mon, 29 Oct 2012 05:40:44 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so4190331pbb.13 for ; Sun, 28 Oct 2012 22:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=CD5HfW5hjsvvIKtmgFV/SDx5VBE1tffZ7m6pxBzQCY4=; b=zN+Q09DU1pTcLbCxeoPNrUnyAbs8yiCnnx/TJ93UPmw8C5pdvwpJLusfdxES60ah70 SLpby/IF/HAPolqueM+IqAWkAPVnPq4D8eCgTBJArGizPY1oN66jT9Qxijc8ItEPWwhc MGk1kmMLR5ZBvQGtg+AGbD93mZKzktOX0vBEOuhhpbB+qIYjllYLc89yBC5Nc8GJp4Rw CiJsIZC2HYoisUO8jJfmjPL/k6jeQNSDiiFNQRx/sjbGK10sLYtenyJo4W2+2POd1CFw EC54vw5NUZUbn10a5qkE6jYk31y/4kVGLRP/GhmYGejvheRx+3qQaJwrousEqWXNhdmD Mkqw== Received: by 10.66.78.136 with SMTP id b8mr80631562pax.26.1351489244857; Sun, 28 Oct 2012 22:40:44 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id bc8sm5371713pab.5.2012.10.28.22.40.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2012 22:40:44 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 29 Oct 2012 14:40:38 -0700 From: YongHyeon PYUN Date: Mon, 29 Oct 2012 14:40:38 -0700 To: Gleb Smirnoff Subject: Re: svn commit: r242161 - in head/sys: net netinet netpfil/pf Message-ID: <20121029214038.GD1431@michelle.cdnetworks.com> References: <201210262106.q9QL6YgY000943@svn.freebsd.org> <508BBE6C.7010409@freebsd.org> <20121027220137.GJ70741@FreeBSD.org> <20121029204104.GA1431@michelle.cdnetworks.com> <20121029052100.GO70741@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121029052100.GO70741@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 05:40:45 -0000 On Mon, Oct 29, 2012 at 09:21:00AM +0400, Gleb Smirnoff wrote: > On Mon, Oct 29, 2012 at 01:41:04PM -0700, YongHyeon PYUN wrote: > Y> On Sun, Oct 28, 2012 at 02:01:37AM +0400, Gleb Smirnoff wrote: > Y> > On Sat, Oct 27, 2012 at 12:58:52PM +0200, Andre Oppermann wrote: > Y> > A> On 26.10.2012 23:06, Gleb Smirnoff wrote: > Y> > A> > Author: glebius > Y> > A> > Date: Fri Oct 26 21:06:33 2012 > Y> > A> > New Revision: 242161 > Y> > A> > URL: http://svn.freebsd.org/changeset/base/242161 > Y> > A> > > Y> > A> > Log: > Y> > A> > o Remove last argument to ip_fragment(), and obtain all needed information > Y> > A> > on checksums directly from mbuf flags. This simplifies code. > Y> > A> > o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in > Y> > Y> I'm not sure whether ti(4)'s checksum offloading for IP fragmented > Y> packets(CSUM_IP_FRAGS) still works after this change. ti(4) > Y> requires CSUM_IP should be set for IP fragmented packets. Not sure > Y> whether it's a bug or not. I have a ti(4) controller but I don't > Y> remember where I can find it and don't have a link > Y> parter(1000baseSX) to test it. :-( > > ti(4) declares both CSUM_IP and CSUM_IP_FRAGS, so ip_fragment() won't do Because it supports both CSUM_IP and CSUM_IP_FRAGS. Probably ti(4) is the only controller that supports TCP/UDP checksum offloading for an IP fragmented packet. > software checksums, and thus won't clear these flags. > > Potentially a driver that announces one flag in if_hwassist but relies on > couple of flags to be set on mbuf is not correct. If a driver can't do single > checksum processing independently from others, then it should set or clear > appropriate flags in if_hwassist as a group. Hmm, then what would be best way to achieve CSUM_IP_FRAGS in driver? I don't have clear idea how to utilize the hardware feature. The stack should tell that the mbuf needs TCP/UDP checksum offloading for IP fragmented packet(i.e. CSUM_IP_FRAGS is not set by upper stack). > > Y> > A> > hardware. Some driver may not announce CSUM_IP in theur if_hwassist, > ^^^^^^^^ > > Oh, that was a typo! Software was meant. > > -- > Totus tuus, Glebius.