From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2VO-00043L-PJ for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:26:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv2VK-0004Ma-HS for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:26:33 -0400 Date: Fri, 14 Oct 2016 14:26:26 +0100 From: Stefan Hajnoczi Message-ID: <20161014132626.GA3482@stefanha-x1.localdomain> References: <20160928082911.GB4196@stefanha-x1.localdomain> <20160930134921.GJ24982@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Virtio-net cli parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pradeep Kiruvale Cc: "qemu-devel@nongnu.org Developers" , "qemu-discuss@nongnu.org" --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 10, 2016 at 03:00:20PM +0200, Pradeep Kiruvale wrote: > On 10 October 2016 at 11:26, Pradeep Kiruvale > wrote: >=20 > > Hi Stefan, > > > > Thanks for the reply. > > > > On 30 September 2016 at 15:49, Stefan Hajnoczi wro= te: > > > >> 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=3Doff > >> > > 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=3D52:54:00:37:4d:10,model=3Dvirtio 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. Stefan --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYAN0CAAoJEJykq7OBq3PI25UH/3IWtCocJ22yqUqzgr1+N9Zn QK1+hgjChwyI9/JBhT34fiewbTg3MYzmYg2pSvm3S1fe/3Qgir1iB0afHUsynuL+ eg65G3IVjeSwMdhr2HyaTPBQOZFpyU8CDXhav+ov3cioSPVhrm+FS+6r8qdBwnt3 PFNwfKUpecV9r4rnO0MqTqjk9Na/AyuNKxZveYs6wB72siOoA9lybTp7ZoUAqcqX 4gTsObn5mFyhnybxYC0a2dyZ5GF6fCYGzB5y8DQow7oBU+a9U3hzgEKiSvyn7fvL hFMC9OkTNNOotR7qrVVf4Zjslhec4bSTxDykFEs1gdwBgedkDidRbk3G22NgIl4= =v4m2 -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--