On 10 October 2016 at 11:26, Pradeep Kiruvale <pradeepkiruv...@gmail.com>
wrote:

> Hi Stefan,
>
> Thanks for the reply.
>
> On 30 September 2016 at 15:49, Stefan Hajnoczi <stefa...@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 <stefa...@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
>>
>
>

Reply via email to