From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2br-0001Ck-1K for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:33:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv2bo-0006Zr-Ib for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:33:13 -0400 MIME-Version: 1.0 In-Reply-To: <20161014132626.GA3482@stefanha-x1.localdomain> References: <20160928082911.GB4196@stefanha-x1.localdomain> <20160930134921.GJ24982@stefanha-x1.localdomain> <20161014132626.GA3482@stefanha-x1.localdomain> From: Pradeep Kiruvale Date: Fri, 14 Oct 2016 15:33:10 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] Virtio-net cli parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "qemu-devel@nongnu.org Developers" , "qemu-discuss@nongnu.org" On 14 October 2016 at 15:26, Stefan Hajnoczi wrote: > On Mon, Oct 10, 2016 at 03:00:20PM +0200, Pradeep Kiruvale wrote: > > On 10 October 2016 at 11:26, Pradeep Kiruvale > > > wrote: > > > > > Hi Stefan, > > > > > > Thanks for the reply. > > > > > > On 30 September 2016 at 15:49, Stefan Hajnoczi > wrote: > > > > > >> On Thu, Sep 29, 2016 at 04:11:27PM +0200, Pradeep Kiruvale wrote: > > >> > Hi Stefan, > > >> > > > >> > On 28 September 2016 at 10:29, Stefan Hajnoczi > > >> wrote: > > >> > > > >> > > On Mon, Sep 26, 2016 at 05:41:55PM +0200, Pradeep Kiruvale wrote: > > >> > > > I want to add couple of new cli options for the virtio-net > driver > > >> and use > > >> > > > them inside the > > >> > > > virtio-net driver to throttle the packets. I did go through the > > >> code and > > >> > > > did single stepping > > >> > > > using the gdb, but still could not find the place where the > > >> virtio-net > > >> > > > parameters are getting > > >> > > > parsed and populated into the virtio-net structures. > > >> > > > Could some one please guide/suggest where to look into, in qemu > code > > >> > > base? > > >> > > > > >> > > Take a look at virtio_net_properties[] in hw/net/virtio-net.c. > > >> > > > > >> > > > >> > These variables/properties are static variables. What I am looking > > >> about is > > >> > how can I pass a cli option from qemu into virtio-net driver. > > >> > > >> When you say "virtio-net driver" I think you mean the virtio-net > > >> device emulation code in QEMU? > > >> > > > Yes, which the virtio-net driver uses to do the network I/O. > > > > > >> > > >> These *are* the properties that can be set from the QEMU command-line. > > >> For example: > > >> > > >> -device virtio-net-pci,csum=off > > >> > > > This is the clue, I was looking for. I will see how to proceed from > here > > > on. > > > > > But when I have a cli option like below, how can pass above options? > > -net nic,macaddr=52:54:00:37:4d:10,model=virtio > > Please look at "Network Devices" in docs/qdev-device-use.txt for > information on modern -netdev/-device syntax. > > The old -net syntax should be replaced with the more powerful > -netdev/-device syntax. > > Thanks Stefan for suggestions. I will have a look. Regards, Pradeep Stefan >