From owner-freebsd-net@FreeBSD.ORG Mon Apr 8 05:18:43 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2B2252C7 for ; Mon, 8 Apr 2013 05:18:43 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-da0-x234.google.com (mail-da0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) by mx1.freebsd.org (Postfix) with ESMTP id 06ECC160 for ; Mon, 8 Apr 2013 05:18:43 +0000 (UTC) Received: by mail-da0-f52.google.com with SMTP id f10so2470443dak.39 for ; Sun, 07 Apr 2013 22:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:date:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=IXDdbYgHNJmCF284oVPQmshA2HhCLfV18DaEAzNGUUA=; b=JFVTyt67BariClcDi9BqhpBCrlr+ognv21Jo6/P9mOGKCsxoYo2mmRbh/6T4SXb93c 6xE56ADGAybyMHM63plk7a2ajIZrdSBTEhlvA9MyR+QE+GZ+7FWmomjx8V8/j7PzC4ux 1WhBH81ZVICSMdG8qpSMPLyq6Y4YYCZHphSSqCNeRF6l5Ai6FAp5irIcYAvV1Xevjbym kqn8zjdVP1/qITalaHBjxmS63teHr/LckjF0JIDjGXycF3ky63FtBWXg+pOpH8fqw2vb Pm8lq5XsEhwLKHCLxwx5/7EofIrnFFXeT6YWBTRklq4ibLIlij9XstRfC4XDUizp5woL wZhA== X-Received: by 10.66.123.5 with SMTP id lw5mr34401305pab.132.1365398322601; Sun, 07 Apr 2013 22:18:42 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id ux10sm36229417pab.1.2013.04.07.22.18.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 07 Apr 2013 22:18:41 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 08 Apr 2013 14:18:36 +0900 From: YongHyeon PYUN Date: Mon, 8 Apr 2013 14:18:36 +0900 To: "Eggert, Lars" Subject: Re: enable tcpdump GUESS_TSO flag? Message-ID: <20130408051836.GA1526@michelle.cdnetworks.com> References: <0A5ED929-C148-45C3-8576-C31D2C05AB04@netapp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0A5ED929-C148-45C3-8576-C31D2C05AB04@netapp.com> User-Agent: Mutt/1.4.2.3i Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 05:18:43 -0000 On Thu, Apr 04, 2013 at 11:24:18AM +0000, Eggert, Lars wrote: > Hi, > > I wonder whether it'd be a good idea to enable tcpdump's GUESS_TSO flag by default? It enables a heuristic that lets tcpdump understand pcaps that include segments generated by TCP TSO (which otherwise show up as "IP bad-len 0".) > I don't have strong option on enabling that flag but I think it would be even better to have an option to enable/disable that feature(default off). em(4) controllers require IP length should be 0 before controller performs TSO operation. fxp(4) controllers requires IP length should be set to the IP length of the first TCP segment after TSO operation. bpf listeners see the modified packet so it can confuse them. AFAIK, except em(4)/fxp(4) controllers, no other controllers in tree have such limitation with TSO. Enabling GUESS_TSO flag may make it hard to debug network/driver issues I guess. > See the dicussion at http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg01051.html for details. > > Lars > > diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile > index ca8ec4c..5fd73a1 100644 > --- a/usr.sbin/tcpdump/tcpdump/Makefile > +++ b/usr.sbin/tcpdump/tcpdump/Makefile > @@ -45,6 +45,10 @@ CFLAGS+= -I${.CURDIR} -I${TCPDUMP_DISTDIR} > CFLAGS+= -DHAVE_CONFIG_H > CFLAGS+= -D_U_="__attribute__((unused))" > > +# Enable tcpdump heuristic to identify TSO-generated packets; see > +# http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg01051.html > +CFLAGS+= -DGUESS_TSO > + > .if ${MK_INET6_SUPPORT} != "no" > SRCS+= print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c \ > print-icmp6.c print-babel.c print-frag6.c print-rt6.c print-ospf6.c \ >