Marvell Yukon ethernet and xVM

When xVM was integrated into Nevada in build 75, I immediately tried it on my laptop (a Toshiba M3). Only to find out that it didn't work because xVM requires GLD version 3 network drivers. My particular type of M3 unfortunately has a Marvell Yukon gigabit ethernet adapter and the skge driver from SysKonnect I had been using for the past years is not a GLD v3 driver.

While looking for a more recent version of skge (hoping for GLD v3 support in skge), I came across the myk driver written by Masayuki Murayama. This driver can be compiled as a GLD v3 driver and a quick look in the install script showed that the PCI ID of my Yukon chip was supported by myk. To compile a GLD v3 version of the driver you'll need the driver sources and a recent copy of the ON sources (for the required GLD header files).

$ gzcat myk-2.5.0.tar.gz | tar xf -
$ cd myk-2.5.0
$ rm Makefile.config
$ ln -s Makefile.config_gld3 Makefile.config
$ vi Makefile.config
Change -I to point to where you keep the ON sources:
#
# Common configuration infomations for all platforms
#
DRV     = myk
include version
DFLAGS  = -DDEBUG -DDEBUG_LEVEL=0 -DGEM_DEBUG_LEVEL=0 \\
          -DTX_BUF_SIZE=256 -DRX_BUF_SIZE=256 \\
          -I /export/home/ml93401/ws/onnv-gate/usr/src/uts/common  change appropriately
#
CFGFLAGS = -UCONFIG_OO \\
           -DGEM_CONFIG_POLLING \\
           -DGEM_CONFIG_VLAN -UCONFIG_HW_VLAN \\
           -DGEM_CONFIG_CKSUM_OFFLOAD \\
           -DGEM_CONFIG_GLDv3 -DSOLARIS10

LDFLAGS += -dy -N misc/mac -N drv/ip
Build and install the driver:
$ make
$ su
# ./adddrv.sh
After a reboot we should have a GLD v3 driver usable for xVM (if the type is not 'legacy' it is a GLD v3 driver):
# dladm show-link
myk0            type: non-vlan  mtu: 1500       device: myk0
iwi0            type: non-vlan  mtu: 1500       device: iwi0
Creating a DomU now works fine (as expected). If only I had more memory in this laptop...

Comments:

IF compiling with Sun Studio, the documentation (for the compiler) states that optimization no higher than -xO2 should be used because of timing primitives. Mr. Murayama however uses -O, which by default is -xO3 in the newer Sun Studio compilers.

I haven't tested the actual functionality, but since -O == -xO3, might as well use additional performance boost of the Sun Studio C compiler:

edit "Makefile.macros" thus:

chmod u+w ./Makefile.macros
(vi ./Makefile.macros)

change the following lines as described below:
OFLAGS_SUNCC = -xO4 -xprefetch=auto -D"__INLINE__="
AFLAGS_SUNCC_I386 = -Di86pc -xarch=generic -xchip=generic -xtarget=generic
AFLAGS_SUNCC_AMD64 = -m64 -xarch=generic64 -xtarget=generic64 -xchip=generic64 -Di86pc -Wu,-xmodel=kernel

Note that these settings pertain to Sun Studio 12 compilers; they're inappropriate for Sun Studio 11 or lower revisions.

Posted by UX-admin on December 24, 2007 at 09:26 AM CET #

Post a Comment:
Comments are closed for this entry.
About

menno

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll

No bookmarks in folder