[libvirt] [PATCH v4 3/6] util: Add helper APIs to get/verify VF Representor name

2018-06-28 Thread Jai Singh Rana
in Domain's hostdev def and subsequently verifying the required net sysfs directory and file entries of VF representor. Signed-off-by: Jai Singh Rana --- po/POTFILES | 1 + src/libvirt_private.syms| 7 ++ src/util/Makefile.inc.am| 2 + src/util/virhostdev.c

[libvirt] [PATCH v4 6/6] docs: Update news about Network stats support for VF Representor

2018-06-28 Thread Jai Singh Rana
Signed-off-by: Jai Singh Rana --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 468d34093a..c6394a8f0f 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -130,6 +130,15 @@ or virStorageVolCreateXMLFrom

[libvirt] [PATCH v4 4/6] conf: util: Add API to find net def given its domain's hostdev

2018-06-28 Thread Jai Singh Rana
Introduce API virDomainNetFindByHostdev which retrieves net def in given domain for the given hostdev def. This API will now be used by virDomainNetFind to further probe net for hostdev network devices. Signed-off-by: Jai Singh Rana --- src/conf/domain_conf.c | 43

[libvirt] [PATCH v4 0/6] Support network stats for VF representor interface

2018-06-28 Thread Jai Singh Rana
://www.kernel.org/doc/Documentation/networking/switchdev.txt V3: https://www.redhat.com/archives/libvir-list/2018-April/msg00306.html Jai Singh Rana (6): util: Add helper function to clean extra spaces in string util: Add generic API to fetch network stats from procfs util: Add helper APIs to get/verify

[libvirt] [PATCH v4 1/6] util: Add helper function to clean extra spaces

2018-06-28 Thread Jai Singh Rana
This patch adds string manupulation helper function which takes string as input and returns string with all but one space removed between letters, numbers or words. Signed-off-by: Jai Singh Rana --- src/libvirt_private.syms | 1 + src/util/virstring.c | 36

[libvirt] [PATCH v4 2/6] util: Add generic API to fetch network stats from procfs

2018-06-28 Thread Jai Singh Rana
virNetDevTapInterfaceStats which earlier fetched stats for tap devies is modified to use above API accordingly. Signed-off-by: Jai Singh Rana --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 202 ++- src/util/virnetdev.h | 5 ++ src/util/virnetdevtap.c

[libvirt] [PATCH v4 5/6] qemu: Network stats support for VF Representor

2018-06-28 Thread Jai Singh Rana
In case of pci SR-IOV device with interface_type as 'hostdev', return network stats if it has a VF Representor interface enabled on host for pci SR-IOV device according to switchdev model. Signed-off-by: Jai Singh Rana --- src/qemu/qemu_driver.c | 34 ++ 1 file

[libvirt] [PATCH v3 1/2] util: Add helper APIs to get/verify VF Representor name

2018-04-04 Thread Jai Singh Rana
Switchdev VF representor interface name on host is queried based on Bus:Device:Function information of pci SR-IOV device in Domain's 'hostdev' structure and subsequently verifying the required net sysfs directory and file entries of VF representor according to switchdev model. --- v3 includes

[libvirt] [PATCH v3 2/2] qemu: conf: Network stats support for VF Representors

2018-04-04 Thread Jai Singh Rana
In case of pci SR-IOV device with interface_type as 'hostdev', return network stats if it has a VF Representor interface on host for pci SR-IOV device according to switchdev model. --- v3 includes changes based on v2's[1] feedback and suggestions. Includes fix for hostdev to net mapping in a given

[libvirt] [PATCH v3 0/2] Support network stats for VF representor interface

2018-04-04 Thread Jai Singh Rana
://www.kernel.org/doc/Documentation/networking/switchdev.txt V2 https://www.redhat.com/archives/libvir-list/2018-February/msg00561.html Jai Singh Rana (2): util: Add helper APIs to get/verify VF Representor name qemu: conf: Network stats support for VF Representors docs/news.xml

Re: [libvirt] [PATCH v2 2/2] qemu: conf: Network stats support for hostdev VF Representor

2018-02-21 Thread Jai Singh Rana
Again thanks for the feedback for this patch set. Helps me a lot. Will take care feedback in v3. On Wed, Feb 21, 2018 at 4:00 AM, John Ferlan <jfer...@redhat.com> wrote: > > > On 02/12/2018 03:07 AM, Jai Singh Rana wrote: >> In case of , return stats if its a Switch

Re: [libvirt] [PATCH v2 1/2] util: Add helper APIs to get/verify VF Representor name

2018-02-21 Thread Jai Singh Rana
to address them. -Jai On Wed, Feb 21, 2018 at 4:00 AM, John Ferlan <jfer...@redhat.com> wrote: > > > On 02/12/2018 03:07 AM, Jai Singh Rana wrote: >> Switchdev VF Representor interface name on host is derived based on BDF >> of pci SR-IOV device in 'hostdev' and

[libvirt] [PATCH v2 0/2] Support network stats for hostdev(SR-IOV) in Switchdev mode

2018-02-12 Thread Jai Singh Rana
' and querying required net sysfs entries on host. These helper APIs are then used in qemu_driver to get the hostdev interface stats for pci SR-IOV device. [1] https://www.kernel.org/doc/Documentation/networking/switchdev.txt Jai Singh Rana (2): util: Add helper APIs to get/verify VF Representor

[libvirt] [PATCH v2 2/2] qemu: conf: Network stats support for hostdev VF Representor

2018-02-12 Thread Jai Singh Rana
In case of , return stats if its a Switchdev VF Representor interface of pci SR-IOV device. --- v2 fixes bracket spacing in domain_conf.c src/conf/domain_conf.c | 7 +++ src/qemu/qemu_driver.c | 34 ++ 2 files changed, 37 insertions(+), 4 deletions(-) diff

[libvirt] [PATCH v2 1/2] util: Add helper APIs to get/verify VF Representor name

2018-02-12 Thread Jai Singh Rana
Switchdev VF Representor interface name on host is derived based on BDF of pci SR-IOV device in 'hostdev' and querying required net sysfs entries on host. --- v2 includes commented code cleanup in virnetdevhostdev.c po/POTFILES.in | 1 + src/Makefile.am | 1 +

[libvirt] [PATCH 2/2] qemu: conf: Network stats support for hostdev VF Representor

2018-02-09 Thread Jai Singh Rana
In case of , return stats if its a Switchdev VF Representor interface of pci SR-IOV device. --- src/conf/domain_conf.c | 7 +++ src/qemu/qemu_driver.c | 34 ++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH 1/2] util: Add helper APIs to get/verify VF Representor name

2018-02-09 Thread Jai Singh Rana
Switchdev VF Representor interface name on host is derived based on BDF of pci SR-IOV device in 'hostdev' and querying required net sysfs entries on host. --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms| 5 + src/util/virhostdev.c

[libvirt] [PATCH 0/2] Support network stats for hostdev(SR-IOV) in Switchdev mode

2018-02-09 Thread Jai Singh Rana
' and querying required net sysfs entries on host. These helper APIs are then used in qemu_driver to get the hostdev interface stats for pci SR-IOV device. [1] https://www.kernel.org/doc/Documentation/networking/switchdev.txt Jai Singh Rana (2): util: Add helper APIs to get/verify VF Representor

Re: [libvirt] Support interface network stats for SR-IOV in Switchdev mode(VF representors)

2018-02-07 Thread Jai Singh Rana
or shall I copy this function definition as virNetdevHostdevVFRepInterfaceStats in new file virNetdevhostdev.c to rule out any dependency on virnetdevtap. #define virNetdevHostdevVFRepInterfaceStats virNetDevTapInterfaceStats Thanks, Jai On Wed, Jan 31, 2018 at 5:20 PM, Jai Singh Rana <ja

Re: [libvirt] Support interface network stats for SR-IOV in Switchdev mode(VF representors)

2018-01-31 Thread Jai Singh Rana
Thanks Daniel for the feedback. On Wed, Jan 31, 2018 at 5:07 PM, Daniel P. Berrangé <berra...@redhat.com> wrote: > On Wed, Jan 31, 2018 at 05:02:59PM +0530, Jai Singh Rana wrote: >> Hi All, >> >> Currently libvirt does not support networks interface stats for &

[libvirt] Support interface network stats for SR-IOV in Switchdev mode(VF representors)

2018-01-31 Thread Jai Singh Rana
Hi All, Currently libvirt does not support networks interface stats for . With availability of switchdev model in linux, it is possible to capture stats for SR-IOV VFs on host using its VF representor interface on host for nics supporting switchdev model.