From owner-freebsd-net@FreeBSD.ORG Thu Jun 3 17:21:04 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80EA71065673 for ; Thu, 3 Jun 2010 17:21:04 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f175.google.com (mail-pz0-f175.google.com [209.85.222.175]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1B68FC18 for ; Thu, 3 Jun 2010 17:21:04 +0000 (UTC) Received: by pzk5 with SMTP id 5so187912pzk.14 for ; Thu, 03 Jun 2010 10:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=xDa0zBV4iSxXrgLywi3lxs8An3FB2d48XMydVD0oifI=; b=cOcfhVybXwwuGm+2HfCRDVoSlH/e6bpUBqeIZ4Uw4ZAF77w6ew4PVE5j3PaLWxr5/5 zR/4AFvtkagnbZftDFWZkHA/sg3D/Z1CP4++Ldk8TthZKVSTZLUHat+VOm0r8BjgNREe UkZaftMwBfQKWlKpyziiDCk19F7ab4c/0xhK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Pk5zaJjejDUdvcf9F0imclZnU1e/OzPHDW9DPI/xoDhs9Vb/L5eW06FUS5IoVSbU5A BJwLsOS2UZA6anCyF0VoQH+6Ezb021U9btOG9mJNVQP0/DAamxTJHht4ivdvQPPNH8uS f1yk300Ji/8mY9wYSw1Ua7jpmVKljNbIQN7Ho= Received: by 10.143.20.1 with SMTP id x1mr6806627wfi.148.1275585663636; Thu, 03 Jun 2010 10:21:03 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 23sm163139pzk.6.2010.06.03.10.21.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 03 Jun 2010 10:21:01 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 3 Jun 2010 10:20:38 -0700 From: Pyun YongHyeon Date: Thu, 3 Jun 2010 10:20:38 -0700 To: Krzysztof Dajka Message-ID: <20100603172037.GA13502@michelle.cdnetworks.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Is enabling jumbo frames on RTL8111C possible? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 03 Jun 2010 17:21:04 -0000 On Thu, Jun 03, 2010 at 02:24:38PM +0200, Krzysztof Dajka wrote: > Hi, > > I'm trying to enable jumbo frames on my re0 NIC. I tried: > # ifconfig re0 mtu 1600 > ifconfig: ioctl (set mtu): Invalid argument > > I have found in /usr/src/sys/dev/re/if_re.c > /* > * These controllers support jumbo frame but it seems > * that enabling it requires touching additional magic > * registers. Depending on MAC revisions some > * controllers need to disable checksum offload. So > * disable jumbo frame until I have better idea what > * it really requires to make it support. > * RTL8168C/CP : supports up to 6KB jumbo frame. > * RTL8111C/CP : supports up to 9KB jumbo frame. > */ > > pciconf -lv shows: > re0@pci0:2:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x02 > hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' > class = network > subclass = ethernet > > Do I need to set some quirks in boot process to enable jumbo frames, or it > cannot be done because it's not implemented in the driver. > I tried setting larger mtu than 1500 on Debian Squeeze and it worked well, > so definitely my chip supports jumbo frames RealTek no longer releases datasheet so it's hard to know required information to support jumbo frame. It seems driver released by vendor has magic code which enables jumbo frame as well as DSP fixups. The magic code is very complex and hard to understand the meaning. It seems Linux borrowed the magic code from vendor but I guess they also don't know what the magic code does and why the magic is needed. Controllers targeted to servers show very good performance number with jumbo frame(e.g. about 990Mbps for bulk TCP transfers) but I'm not sure how well consumer controller works with jumbo frame. Vendor driver disables checksum offloading when jumbo frame is used. This indicates the controller has very small FIFO(less than 1 jumbo frame size) which in turn means it may show poor performance under load.