From: Ian Campbell Subject: Re: PCI passthrough issue Date: Tue, 1 Feb 2011 15:38:53 +0000 Message-ID: <1296574733.13091.261.camel@zakaz.uk.xensource.com> References: <4D2E28C5.30203@jbfavre.org> <4D2EE1DE.5070006@jbfavre.org> <4D2F5009.2090701@jbfavre.org> <20110113201922.GA20494@dumpdata.com> <4D2F6431.8030606@jbfavre.org> <20110114145350.GB7371@dumpdata.com> <4D30DC5A.9080303@jbfavre.org> <4D340504.7020203@jbfavre.org> <4D344AF4.80301@jbfavre.org> <4D3AB003.3040603@jbfavre.org> <20110127202755.GA4194@dumpdata.com> <4D41E7EE.4060502@jbfavre.org> <4D42E520.9020107@jbfavre.org> <1296560086.13091.131.camel@zakaz.uk.xensource.com> <4D47F9CF.2040107@jbfavre.org> <1296566401.13091.171.camel@zakaz.uk.xensource.com> <4D4814CE.5050303@jbfavre.org> <1296569931.13091.194.camel@zakaz.uk.xensource.com> <4D48234F.2020907@jbfavre.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4D48234F.2020907@jbfavre.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, 2011-02-01 at 15:14 +0000, Jean Baptiste Favre wrote: > Le 01/02/2011 15:18, Ian Campbell a =C3=A9crit : > > Assuming the driver is modular: > > "modprobe sky2 copybreak=3D" > > > > Depending on your distro there will be somewhere in /etc you can add > > this. e.g. on Debian you can create a file in /etc/modprobe.d/ > > containing "option sky copybreak=3D" other distros > > use /etc/modprobe.conf etc. > OK I see but it doesn't seems to have any effect. > I tried "option sky copybreak=3D0" to get all packet copied with no cha= nge. The driver is called sky2 not sky so this won't have done anything. I typo'd it above, sorry. > But I have to say that I'm a bit confused: as I run a PV domU, kernel > and initrd are provided by dom0. > So basically, I had no module related binaries installed. After > installation, I tried to remove module and reload it with different > configuration without changes. > Is there any way to provide this sort of option in kernel commandline s= o > that it 'll be taken into account even in initrd ? It depends on your distro and/or initrd tool, I don't know a generic answer.=20 If the driver is statically compiled and not modular at all you can do .=3D on the kernel command line, e.g. "sky2.copybreak=3D256". There doesn't appear to be any way to find out what copybreak the driver actually uses, short of hacking something into the driver itself. e.g. diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 7d85a38..786b8c6 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -87,7 +87,7 @@ module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0=3Dnone,...,16=3Dall)"); =20 static int copybreak __read_mostly =3D 128; -module_param(copybreak, int, 0); +module_param(copybreak, int, 0444); MODULE_PARM_DESC(copybreak, "Receive copy threshold"); =20 static int disable_msi =3D 0; Allow you to see the current active value in /sys/module/sky2/parameters/copybreak. If you are going to do that you might as well just change the constant above though ;-) Ian.