* [Qemu-devel] Virtio-net cli parameters @ 2016-09-26 15:41 Pradeep Kiruvale 2016-09-28 8:29 ` Stefan Hajnoczi 0 siblings, 1 reply; 9+ messages in thread From: Pradeep Kiruvale @ 2016-09-26 15:41 UTC (permalink / raw) To: qemu-devel, qemu-discuss@nongnu.org Hi All, 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? Thanks & Regards, Pradeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-09-26 15:41 [Qemu-devel] Virtio-net cli parameters Pradeep Kiruvale @ 2016-09-28 8:29 ` Stefan Hajnoczi 2016-09-29 8:13 ` Pradeep Kiruvale 2016-09-29 14:11 ` Pradeep Kiruvale 0 siblings, 2 replies; 9+ messages in thread From: Stefan Hajnoczi @ 2016-09-28 8:29 UTC (permalink / raw) To: Pradeep Kiruvale; +Cc: qemu-devel, qemu-discuss@nongnu.org [-- Attachment #1: Type: text/plain, Size: 551 bytes --] 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 455 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-09-28 8:29 ` Stefan Hajnoczi @ 2016-09-29 8:13 ` Pradeep Kiruvale 2016-09-29 14:11 ` Pradeep Kiruvale 1 sibling, 0 replies; 9+ messages in thread From: Pradeep Kiruvale @ 2016-09-29 8:13 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org On 28 September 2016 at 10:29, Stefan Hajnoczi <stefanha@gmail.com> 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. > Thanks Stefan I will have a look. Thanks & Regards, Pradeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-09-28 8:29 ` Stefan Hajnoczi 2016-09-29 8:13 ` Pradeep Kiruvale @ 2016-09-29 14:11 ` Pradeep Kiruvale 2016-09-30 13:49 ` Stefan Hajnoczi 1 sibling, 1 reply; 9+ messages in thread From: Pradeep Kiruvale @ 2016-09-29 14:11 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org Hi Stefan, On 28 September 2016 at 10:29, Stefan Hajnoczi <stefanha@gmail.com> 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. I am looking at these options because I would like to implement the throttling to virtio-net using the throttle APIs that are available in side the qemu. Regards, Pradeep ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-09-29 14:11 ` Pradeep Kiruvale @ 2016-09-30 13:49 ` Stefan Hajnoczi 2016-10-10 9:26 ` Pradeep Kiruvale 0 siblings, 1 reply; 9+ messages in thread From: Stefan Hajnoczi @ 2016-09-30 13:49 UTC (permalink / raw) To: Pradeep Kiruvale Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1373 bytes --] On Thu, Sep 29, 2016 at 04:11:27PM +0200, Pradeep Kiruvale wrote: > Hi Stefan, > > On 28 September 2016 at 10:29, Stefan Hajnoczi <stefanha@gmail.com> 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? These *are* the properties that can be set from the QEMU command-line. For example: -device virtio-net-pci,csum=off The command-line -device option creates device objects using qdev_device_add() and then loops over the command-line parameters calling set_property() on them. Hope this helps you understand the code. Stefan [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 455 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-09-30 13:49 ` Stefan Hajnoczi @ 2016-10-10 9:26 ` Pradeep Kiruvale 2016-10-10 13:00 ` Pradeep Kiruvale 0 siblings, 1 reply; 9+ messages in thread From: Pradeep Kiruvale @ 2016-10-10 9:26 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org Hi Stefan, Thanks for the reply. On 30 September 2016 at 15:49, Stefan Hajnoczi <stefanha@gmail.com> 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 <stefanha@gmail.com> > 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. > > The command-line -device option creates device objects using > qdev_device_add() and then loops over the command-line parameters > calling set_property() on them. > > Hope this helps you understand the code. > Thanks, it will really help me to proceed with my work. Regards, Pradeep > > Stefan > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-10-10 9:26 ` Pradeep Kiruvale @ 2016-10-10 13:00 ` Pradeep Kiruvale 2016-10-14 13:26 ` Stefan Hajnoczi 0 siblings, 1 reply; 9+ messages in thread From: Pradeep Kiruvale @ 2016-10-10 13:00 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org On 10 October 2016 at 11:26, Pradeep Kiruvale <pradeepkiruvale@gmail.com> wrote: > Hi Stefan, > > Thanks for the reply. > > On 30 September 2016 at 15:49, Stefan Hajnoczi <stefanha@gmail.com> 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 <stefanha@gmail.com> >> 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 -Pradeep >> The command-line -device option creates device objects using >> qdev_device_add() and then loops over the command-line parameters >> calling set_property() on them. >> >> Hope this helps you understand the code. >> > Thanks, it will really help me to proceed with my work. > > Regards, > Pradeep > >> >> Stefan >> > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-10-10 13:00 ` Pradeep Kiruvale @ 2016-10-14 13:26 ` Stefan Hajnoczi 2016-10-14 13:33 ` Pradeep Kiruvale 0 siblings, 1 reply; 9+ messages in thread From: Stefan Hajnoczi @ 2016-10-14 13:26 UTC (permalink / raw) To: Pradeep Kiruvale Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org [-- Attachment #1: Type: text/plain, Size: 2133 bytes --] On Mon, Oct 10, 2016 at 03:00:20PM +0200, Pradeep Kiruvale wrote: > On 10 October 2016 at 11:26, Pradeep Kiruvale <pradeepkiruvale@gmail.com> > wrote: > > > Hi Stefan, > > > > Thanks for the reply. > > > > On 30 September 2016 at 15:49, Stefan Hajnoczi <stefanha@gmail.com> 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 <stefanha@gmail.com> > >> 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. Stefan [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 455 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Virtio-net cli parameters 2016-10-14 13:26 ` Stefan Hajnoczi @ 2016-10-14 13:33 ` Pradeep Kiruvale 0 siblings, 0 replies; 9+ messages in thread From: Pradeep Kiruvale @ 2016-10-14 13:33 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel@nongnu.org Developers, qemu-discuss@nongnu.org On 14 October 2016 at 15:26, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Mon, Oct 10, 2016 at 03:00:20PM +0200, Pradeep Kiruvale wrote: > > On 10 October 2016 at 11:26, Pradeep Kiruvale <pradeepkiruvale@gmail.com > > > > wrote: > > > > > Hi Stefan, > > > > > > Thanks for the reply. > > > > > > On 30 September 2016 at 15:49, Stefan Hajnoczi <stefanha@gmail.com> > 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 <stefanha@gmail.com> > > >> 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 > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-10-14 13:33 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-26 15:41 [Qemu-devel] Virtio-net cli parameters Pradeep Kiruvale 2016-09-28 8:29 ` Stefan Hajnoczi 2016-09-29 8:13 ` Pradeep Kiruvale 2016-09-29 14:11 ` Pradeep Kiruvale 2016-09-30 13:49 ` Stefan Hajnoczi 2016-10-10 9:26 ` Pradeep Kiruvale 2016-10-10 13:00 ` Pradeep Kiruvale 2016-10-14 13:26 ` Stefan Hajnoczi 2016-10-14 13:33 ` Pradeep Kiruvale
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).