Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 2010 12:15:12 -0800
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Dennis Glatting <freebsd@penx.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Any work to update the RealTek Drivers?
Message-ID:  <20101207201512.GB6471@michelle.cdnetworks.com>
In-Reply-To: <alpine.BSF.2.00.1012062210100.21846@Elmer.dco.penx.com>
References:  <alpine.BSF.2.00.1012062210100.21846@Elmer.dco.penx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 06, 2010 at 10:10:48PM -0700, Dennis Glatting wrote:
> Is there any work going on with the RealTek drivers? The RealTek devices I
> am using support a 9k MTU but the code limits the MTU to the default. Over
> gigabit, a larger MTU is desirable.
> 
> Specifically, on one of several machines I am using:
> 
> re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port
> 0xde00-0xdeff mem 0xfbcff000-0xfbcfffff,0xfbcf8000-0xfbcfbfff irq 16 at
> device 0.0 on pci7
> re1: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port
> 0xce00-0xceff mem 0xfbaff000-0xfbafffff,0xfbaf8000-0xfbafbfff irq 17 at
> device 0.0 on pci8
> 
> 
> Trying to set the MTU:
> 
> btw# ifconfig re1 mtu 4096
> ifconfig: ioctl (set mtu): Invalid argument
> 

Personally I did want to make TSO work on these newer RealTek
controllers. TSO may also give similar performance boost of jumbo
frame if the network connection use TCP. In addition, it seems
these recent re(4) controllers seem to require contiguous jumbo RX 
buffer instead of supporting chaining multiple RX buffers into
single buffer which in turn put much more burden to VM. Supporting
this type of jumbo frame support is not hard but it seems this
requires undocumented register access with guessing and real
hardware for experiments. RealTek does not release data sheet to
open source driver writers any more so it would be hard to make it
work in near future. RealTek's policy for open source developers
had been quite disappointing compared to other leading major
network controller vendors.

> 
> Looking at the source sys/dev/re/if_re.c
> 
> /*-
>   * Copyright (c) 1997, 1998-2003
>   *      Bill Paul <wpaul@windriver.com>.  All rights reserved.
> 
> (snip)
> 
>         case RL_HWREV_8168CP:
>          case RL_HWREV_8168D:
>          case RL_HWREV_8168DP:
>                  sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR |
>                      RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP |
>                      RL_FLAG_AUTOPAD;
>                  /*
>                   * 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.
>                   */
>                  sc->rl_flags |= RL_FLAG_NOJUMBO;
>                  break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101207201512.GB6471>