Received: from eggs.gnu.org ([208.118.235.92]:58582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttg0E-0005fp-Bz for qemu-devel@nongnu.org; Fri, 11 Jan 2013 09:54:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ttg0A-00078X-G9 for qemu-devel@nongnu.org; Fri, 11 Jan 2013 09:54:37 -0500 Received: from onelab2.iet.unipi.it ([131.114.59.238]:59955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttg0A-00077X-9G for qemu-devel@nongnu.org; Fri, 11 Jan 2013 09:54:34 -0500 Date: Fri, 11 Jan 2013 15:53:50 +0100 From: Luigi Rizzo Message-ID: <20130111145350.GD79361@onelab2.iet.unipi.it> References: <20121227100658.GB48891@onelab2.iet.unipi.it> <20130110122548.GB30946@stefanha-thinkpad.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130110122548.GB30946@stefanha-thinkpad.redhat.com> Subject: [Qemu-devel] nic-specific options ? (Re: [RFC] updated e1000 mitigation patch) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Giuseppe Lettieri , qemu-devel@nongnu.org, v.maffione@gmail.com On Thu, Jan 10, 2013 at 01:25:48PM +0100, Stefan Hajnoczi wrote: > On Thu, Dec 27, 2012 at 11:06:58AM +0100, Luigi Rizzo wrote: > > diff -urp qemu-1.3.0-orig/hw/e1000.c qemu-1.3.0/hw/e1000.c > > --- qemu-1.3.0-orig/hw/e1000.c 2012-12-03 20:37:05.000000000 +0100 > > +++ qemu-1.3.0/hw/e1000.c 2012-12-27 09:47:16.000000000 +0100 > > @@ -35,6 +35,8 @@ > > > > #include "e1000_hw.h" > > > > +static int mit_on = 1; /* interrupt mitigation enable */ > > If you want to make this optional then please put it inside E1000State > so it can be toggled per NIC. what is the simplest way to add NIC-specific options ? I have added one line to e1000_properties, as below static Property e1000_properties[] = { DEFINE_NIC_PROPERTIES(E1000State, conf), + DEFINE_PROP_UINT32("mit_on, E1000State, mit_on, 0), DEFINE_PROP_END_OF_LIST(), }; and this way i can do recognise this on the command line qemu ... -device e1000,mit_on=1 ... but i do not know how to set the property for the NIC i am using. Specifically, i normally run qemu with "-net nic,model=1000" (leaving the nic unconnected to the host network, so i can test the tx path without being constrained by the backend's speed) Any suggestion ? thanks luigi