[PATCH v2 2/2] bus/pci: add IO port region check before region map

2023-06-28 Thread Miao Li
This patch adds IO port region check to skip region map when doing IO port map for legacy device in secondary process. Fixes: 33604c31354a ("vfio: refactor PCI BAR mapping") Cc: sta...@dpdk.org Signed-off-by: Miao Li --- drivers/bus/pci/linux/pci_vfio.c | 9 + 1 file

[PATCH v2 1/2] net/virtio: fix legacy device IO port map in secondary process

2023-06-28 Thread Miao Li
: 512e27eeb743 ("net/virtio: move PCI specific dev init to PCI ethdev init") Cc: sta...@dpdk.org Signed-off-by: Miao Li --- drivers/net/virtio/virtio_pci_ethdev.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio/virtio_pci_e

[PATCH 2/2] bus/pci: add IO port region check before region map

2023-06-27 Thread Miao Li
This patch adds IO port region check to skip region map when doing IO port map for legacy device in sencondary process. Fixes: 33604c31354a ("vfio: refactor PCI BAR mapping") Cc: sta...@dpdk.org Signed-off-by: Miao Li --- drivers/bus/pci/linux/pci_vfio.c | 9 + 1 file

[PATCH 1/2] net/virtio: fix legacy device IO port map in secondary process

2023-06-27 Thread Miao Li
: 512e27eeb743 ("net/virtio: move PCI specific dev init to PCI ethdev init") Cc: sta...@dpdk.org Signed-off-by: Miao Li --- drivers/net/virtio/virtio_pci_ethdev.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio/virtio_pci_e

[PATCH v4 4/4] bus/pci: add VFIO sparse mmap support

2023-05-30 Thread Miao Li
access all mapped sparse mmap regions by using 'bar_base_address + bar_offset'. Signed-off-by: Miao Li Signed-off-by: Chenbo Xia Acked-by: Sunil Kumar Kori Acked-by: Yahui Cao --- drivers/bus/pci/linux/pci_vfio.c | 138 +++ drivers/bus/pci/private.h

[PATCH v4 3/4] bus/pci: introduce helper for MMIO read and write

2023-05-30 Thread Miao Li
From: Chenbo Xia The MMIO regions may not be mmap-able for VFIO-PCI devices. In this case, the driver should explicitly do read and write to access these regions. Signed-off-by: Chenbo Xia Acked-by: Sunil Kumar Kori Acked-by: Yahui Cao --- doc/guides/rel_notes/release_23_07.rst | 5 +++ dri

[PATCH v4 2/4] bus/pci: avoid depending on private value in kernel source

2023-05-30 Thread Miao Li
From: Chenbo Xia The value 40 used in VFIO_GET_REGION_ADDR() is a private value (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It is not part of VFIO API, and we should not depend on it. [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h Signed-off-by: Ch

[PATCH v4 1/4] bus/pci: introduce an internal representation of PCI device

2023-05-30 Thread Miao Li
From: Chenbo Xia This patch introduces an internal representation of the PCI device which will be used to store the internal information that don't have to be exposed to drivers, e.g., the VFIO region sizes/offsets. In this patch, the internal structure is simply a wrapper of the rte_pci_device

[PATCH v4 0/4] Support VFIO sparse mmap in PCI bus

2023-05-30 Thread Miao Li
: bus/pci: introduce an internal representation of PCI device bus/pci: avoid depending on private value in kernel source bus/pci: introduce helper for MMIO read and write Miao Li (1): bus/pci: add VFIO sparse mmap support doc/guides/rel_notes/release_23_07.rst | 5 + drivers/bus/pci/bsd

[PATCH v3 4/4] bus/pci: add VFIO sparse mmap support

2023-05-25 Thread Miao Li
access all mapped sparse mmap regions by using 'bar_base_address + bar_offset'. Signed-off-by: Miao Li Signed-off-by: Chenbo Xia --- drivers/bus/pci/linux/pci_vfio.c | 104 +++ drivers/bus/pci/private.h| 2 + 2 files changed, 94 insertions(+), 12

[PATCH v3 3/4] bus/pci: introduce helper for MMIO read and write

2023-05-25 Thread Miao Li
From: Chenbo Xia The MMIO regions may not be mmap-able for VFIO-PCI devices. In this case, the driver should explicitly do read and write to access these regions. Signed-off-by: Chenbo Xia --- drivers/bus/pci/bsd/pci.c| 22 +++ drivers/bus/pci/linux/pci.c | 46

[PATCH v3 2/4] bus/pci: avoid depending on private value in kernel source

2023-05-25 Thread Miao Li
From: Chenbo Xia The value 40 used in VFIO_GET_REGION_ADDR() is a private value (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It is not part of VFIO API, and we should not depend on it. [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h Signed-off-by: Ch

[PATCH v3 1/4] bus/pci: introduce an internal representation of PCI device

2023-05-25 Thread Miao Li
From: Chenbo Xia This patch introduces an internal representation of the PCI device which will be used to store the internal information that don't have to be exposed to drivers, e.g., the VFIO region sizes/offsets. In this patch, the internal structure is simply a wrapper of the rte_pci_device

[PATCH v3 0/4] Support VFIO sparse mmap in PCI bus

2023-05-25 Thread Miao Li
te value in kernel source bus/pci: introduce helper for MMIO read and write Miao Li (1): bus/pci: add VFIO sparse mmap support drivers/bus/pci/bsd/pci.c| 35 +++- drivers/bus/pci/linux/pci.c | 78 +-- drivers/bus/pci/linux/pci_init.h | 14 +- drivers/bus/pci/linux/pci_uio.c

[PATCH v2 4/4] bus/pci: add VFIO sparse mmap support

2023-05-15 Thread Miao Li
access all mapped sparse mmap regions by using 'bar_base_address + bar_offset'. Signed-off-by: Miao Li Signed-off-by: Chenbo Xia --- drivers/bus/pci/linux/pci_vfio.c | 104 +++ drivers/bus/pci/private.h| 2 + 2 files changed, 94 insertions(+), 12

[PATCH v2 3/4] bus/pci: introduce helper for MMIO read and write

2023-05-15 Thread Miao Li
From: Chenbo Xia The MMIO regions may not be mmap-able for VFIO-PCI devices. In this case, the driver should explicitly do read and write to access these regions. Signed-off-by: Chenbo Xia --- drivers/bus/pci/bsd/pci.c| 22 +++ drivers/bus/pci/linux/pci.c | 46

[PATCH v2 2/4] bus/pci: avoid depending on private value in kernel source

2023-05-15 Thread Miao Li
From: Chenbo Xia The value 40 used in VFIO_GET_REGION_ADDR() is a private value (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It is not part of VFIO API, and we should not depend on it. [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h Signed-off-by: Ch

[PATCH v2 1/4] bus/pci: introduce an internal representation of PCI device

2023-05-15 Thread Miao Li
From: Chenbo Xia This patch introduces an internal representation of the PCI device which will be used to store the internal information that don't have to be exposed to drivers, e.g., the VFIO region sizes/offsets. In this patch, the internal structure is simply a wrapper of the rte_pci_device

[PATCH v2 0/4] Support VFIO sparse mmap in PCI bus

2023-05-15 Thread Miao Li
pport finally. v2: 1. add PCI device internal structure in bus/pci/windows/pci.c 2. fix parameter type error Chenbo Xia (3): bus/pci: introduce an internal representation of PCI device bus/pci: avoid depending on private value in kernel source bus/pci: introduce helper for MMIO read and write

[PATCH v1 4/4] bus/pci: add VFIO sparse mmap support

2023-05-14 Thread Miao Li
access all mapped sparse mmap regions by using 'bar_base_address + bar_offset'. Signed-off-by: Miao Li Signed-off-by: Chenbo Xia --- drivers/bus/pci/linux/pci_vfio.c | 104 +++ drivers/bus/pci/private.h| 2 + 2 files changed, 94 insertions(+), 12

[PATCH v1 3/4] bus/pci: introduce helper for MMIO read and write

2023-05-14 Thread Miao Li
From: Chenbo Xia The MMIO regions may not be mmap-able for VFIO-PCI devices. In this case, the driver should explicitly do read and write to access these regions. Signed-off-by: Chenbo Xia --- drivers/bus/pci/bsd/pci.c| 22 +++ drivers/bus/pci/linux/pci.c | 46

[PATCH v1 2/4] bus/pci: avoid depending on private value in kernel source

2023-05-14 Thread Miao Li
From: Chenbo Xia The value 40 used in VFIO_GET_REGION_ADDR() is a private value (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It is not part of VFIO API, and we should not depend on it. [1] https://github.com/torvalds/linux/blob/v6.2/include/linux/vfio_pci_core.h Signed-off-by: Ch

[PATCH v1 1/4] bus/pci: introduce an internal representation of PCI device

2023-05-14 Thread Miao Li
From: Chenbo Xia This patch introduces an internal representation of the PCI device which will be used to store the internal information that don't have to be exposed to drivers, e.g., the VFIO region sizes/offsets. In this patch, the internal structure is simply a wrapper of the rte_pci_device

[PATCH v1 0/4] Support VFIO sparse mmap in PCI bus

2023-05-14 Thread Miao Li
pport finally. Chenbo Xia (3): bus/pci: introduce an internal representation of PCI device bus/pci: avoid depending on private value in kernel source bus/pci: introduce helper for MMIO read and write Miao Li (1): bus/pci: add VFIO sparse mmap support drivers/bus/pci/bsd/pci.c

[PATCH v1] power: add wakeup log

2022-02-21 Thread Miao Li
This patch adds a log in rte_power_monitor to show the core has been waked up. Signed-off-by: Miao Li --- lib/eal/x86/rte_power_intrinsics.c | 8 1 file changed, 8 insertions(+) diff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c index f749da9b85

[PATCH v2] examples/l3fwd-power: add wakeup log

2021-11-16 Thread Miao Li
This patch adds a log in main telemetry loop to show the thread has woken up and begun to send and receive packets. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index

[PATCH v1] net/vhost: add queue status check

2021-11-16 Thread Miao Li
This patch adds queue status check to make sure that vhost monitor address will not be got until the link between backend and frontend up and the packets are allowed to be queued. Signed-off-by: Miao Li --- drivers/net/vhost/rte_eth_vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v1] examples/l3fwd-power: add wakeup log

2021-11-15 Thread Miao Li
This patch adds a log in main telemetry loop to show the thread is waked up and begins to send and receive packets. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index

[dpdk-dev] [PATCH v8 5/5] examples/l3fwd-power: support virtio/vhost

2021-10-24 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia Acked-by: David Hunt --- examples/l3fwd-power/main.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 21c79567b1

[dpdk-dev] [PATCH v8 4/5] power: modify return of queue_stopped

2021-10-24 Thread Miao Li
return -ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Fixes: 209fd585456c ("power: make ethdev power management thread unsafe") Cc: sta...@dpdk.org Signed-off-by: Miao Li Acked-by: Anatoly Burakov Reviewed-by: Chenbo Xia

[dpdk-dev] [PATCH v8 3/5] net/vhost: support power monitor

2021-10-24 Thread Miao Li
and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia Acked-by: David Hunt --- doc/guides/rel_notes/release_21_11.rst | 4 +++ drivers/net/vhost/rte_eth_vhost.c | 40

[dpdk-dev] [PATCH v8 2/5] vhost: add power monitor support API

2021-10-24 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia Acked-by: David Hunt --- doc/guides/rel_notes/release_21_11.rst | 4 +++ lib/vhost/rte_vhost.h

[dpdk-dev] [PATCH v8 1/5] net/virtio: support power monitor

2021-10-24 Thread Miao Li
and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia Acked-by: David Hunt --- doc/guides/rel_notes/release_21_11.rst | 4 ++ drivers/net/virtio/virtio_ethdev.c | 56

[dpdk-dev] [PATCH v8 0/5] Support power monitor in virtio/vhost PMD

2021-10-24 Thread Miao Li
ort configuration according to the device information and remove adding command line arguments -modify some titles Miao Li (5): net/virtio: support power monitor vhost: add power monitor support API net/vhost: support power monitor power: modify return of queue_stopped examples/l3fwd-power: supp

[dpdk-dev] [PATCH v7 5/5] examples/l3fwd-power: support virtio/vhost

2021-10-17 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 73a3ab5bc0..5811908283 100644 --- a/examples/l3fwd-power

[dpdk-dev] [PATCH v7 4/5] power: modify return of queue_stopped

2021-10-17 Thread Miao Li
return -ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li Acked-by: Anatoly Burakov Reviewed-by: Chenbo Xia --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff

[dpdk-dev] [PATCH v7 3/5] net/vhost: implement rte_power_monitor API

2021-10-17 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11

[dpdk-dev] [PATCH v7 2/5] vhost: implement rte_power_monitor API

2021-10-17 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11.rst | 4 +++ lib/vhost/rte_vhost.h | 42 ++ lib/vhost/v

[dpdk-dev] [PATCH v7 1/5] net/virtio: implement rte_power_monitor API

2021-10-17 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia --- doc/guides

[dpdk-dev] [PATCH v7 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-10-17 Thread Miao Li
size in rte_vhost_power_monitor_cond -modify power callback function -add dev and queue id check and remove unnecessary check -fix the assignment of pmc->size -update port configuration according to the device information and remove adding command line arguments -modify some titles Miao Li (5):

[dpdk-dev] [PATCH v6 5/5] examples/l3fwd-power: support virtio/vhost

2021-10-15 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 73a3ab5bc0..dac946c18f 100644 --- a/examples/l3fwd-power

[dpdk-dev] [PATCH v6 4/5] power: modify return of queue_stopped

2021-10-15 Thread Miao Li
return -ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li Acked-by: Anatoly Burakov Reviewed-by: Chenbo Xia --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff

[dpdk-dev] [PATCH v6 3/5] net/vhost: implement rte_power_monitor API

2021-10-15 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11

[dpdk-dev] [PATCH v6 2/5] vhost: implement rte_power_monitor API

2021-10-15 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11.rst | 4 +++ lib/vhost/rte_vhost.h | 42 ++ lib/vhost/v

[dpdk-dev] [PATCH v6 1/5] net/virtio: implement rte_power_monitor API

2021-10-15 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia --- doc/guides

[dpdk-dev] [PATCH v6 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-10-15 Thread Miao Li
callback function -add dev and queue id check and remove unnecessary check -fix the assignment of pmc->size -update port configuration according to the device information and remove adding command line arguments -modify some titles Miao Li (5): net/virtio: implement rte_power_monitor API vh

[dpdk-dev] [PATCH v5 5/5] examples/l3fwd-power: support virtio/vhost

2021-10-15 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 73a3ab5bc0..61c15e01d2 100644 --- a/examples/l3fwd-power/main.c +++ b

[dpdk-dev] [PATCH v5 4/5] power: modify return of queue_stopped

2021-10-15 Thread Miao Li
return ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li Acked-by: Anatoly Burakov --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/power

[dpdk-dev] [PATCH v5 3/5] net/vhost: implement rte_power_monitor API

2021-10-15 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11

[dpdk-dev] [PATCH v5 2/5] vhost: implement rte_power_monitor API

2021-10-15 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11.rst | 4 +++ lib/vhost/rte_vhost.h | 44 ++ lib/vhost/v

[dpdk-dev] [PATCH v5 1/5] net/virtio: implement rte_power_monitor API

2021-10-15 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia --- doc/guides

[dpdk-dev] [PATCH v5 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-10-15 Thread Miao Li
check -fix the assignment of pmc->size -update port configuration according to the device information and remove adding command line arguments -modify some titles Miao Li (5): net/virtio: implement rte_power_monitor API vhost: implement rte_power_monitor API net/vhost: implem

[dpdk-dev] [PATCH v4 5/5] examples/l3fwd-power: support virtio/vhost

2021-10-11 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 73a3ab5bc0..61c15e01d2 100644 --- a/examples/l3fwd-power/main.c +++ b

[dpdk-dev] [PATCH v4 4/5] power: modify return of queue_stopped

2021-10-11 Thread Miao Li
return ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li Acked-by: Anatoly Burakov --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/power

[dpdk-dev] [PATCH v4 3/5] net/vhost: implement rte_power_monitor API

2021-10-11 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11

[dpdk-dev] [PATCH v4 2/5] vhost: implement rte_power_monitor API

2021-10-11 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- doc/guides/rel_notes/release_21_11.rst | 4 +++ lib/vhost/rte_vhost.h | 44 ++ lib/vhost/v

[dpdk-dev] [PATCH v4 1/5] net/virtio: implement rte_power_monitor API

2021-10-11 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li Reviewed-by: Chenbo Xia --- doc/guides

[dpdk-dev] [PATCH v4 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-10-11 Thread Miao Li
pmc->size -update port configuration according to the device information and remove adding command line arguments -modify some titles Miao Li (5): net/virtio: implement rte_power_monitor API vhost: implement rte_power_monitor API net/vhost: implement rte_power_monitor API power: mod

[dpdk-dev] [PATCH v3 5/5] examples/l3fwd-power: support virtio/vhost

2021-09-23 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index aa7b8db44a..14ae87a9d5 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd

[dpdk-dev] [PATCH v3 4/5] power: modify return of queue_stopped

2021-09-23 Thread Miao Li
return ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power

[dpdk-dev] [PATCH v3 3/5] net/vhost: implement rte_power_monitor API

2021-09-23 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/vhost/rte_eth_vhost.c

[dpdk-dev] [PATCH v3 2/5] vhost: implement rte_power_monitor API

2021-09-23 Thread Miao Li
nguish the value used to match something or not match something. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- lib/vhost/rte_vhost.h | 41 + lib/vhost/version.map | 3 +++ lib/vhost/vhost.

[dpdk-dev] [PATCH v3 1/5] net/virtio: implement rte_power_monitor API

2021-09-23 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH v3 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-09-23 Thread Miao Li
ice information and remove adding command line arguments -modify some titles Miao Li (5): net/virtio: implement rte_power_monitor API vhost: implement rte_power_monitor API net/vhost: implement rte_power_monitor API power: modify return of queue_stopped examples/l3fwd-power: support virtio/vh

[dpdk-dev] [PATCH 5/5] examples/l3fwd-power: support virtio/vhost

2021-09-17 Thread Miao Li
support devices like virtio and vhost. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index aa7b8db44a..14ae87a9d5 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd

[dpdk-dev] [PATCH 4/5] power: modify return of queue_stopped

2021-09-17 Thread Miao Li
return ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power

[dpdk-dev] [PATCH 3/5] net/vhost: implement rte_power_monitor API

2021-09-17 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/vhost/rte_eth_vhost.c

[dpdk-dev] [PATCH 2/5] vhost: implement rte_power_monitor API

2021-09-17 Thread Miao Li
nguish the value used to match something or not match someting. Vhost driver can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- lib/vhost/rte_vhost.h | 41 + lib/vhost/version.map | 3 +++ lib/vhost/vhost.

[dpdk-dev] [PATCH 1/5] net/virtio: implement rte_power_monitor API

2021-09-17 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH 0/5] Implement rte_power_monitor API in virtio/vhost PMD

2021-09-17 Thread Miao Li
ify some titles Miao Li (5): net/virtio: implement rte_power_monitor API vhost: implement rte_power_monitor API net/vhost: implement rte_power_monitor API power: modify return of queue_stopped examples/l3fwd-power: support virtio/vhost drivers/net/vhost/rte_eth_vhost.c |

[dpdk-dev] [PATCH 5/5] examples/l3fwd-power: support virtio/vhost

2021-09-09 Thread Miao Li
This patch adds two command line arguments which will be needed when using virtio/vhost vdev. One argument sets rx offloads capabilities DEV_RX_OFFLOAD_VLAN_STRIP. The other argument sets DCB, PSS and VMDQ off for RX side. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 15

[dpdk-dev] [PATCH 4/5] lib/power: modify return of queue_stopped

2021-09-09 Thread Miao Li
return ENOTSUP to support vdevs which cannot provide rx queue information and rx queue state enable power management. Signed-off-by: Miao Li --- lib/power/rte_power_pmd_mgmt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power

[dpdk-dev] [PATCH 3/5] net/vhost: implement rte_power_monitor API

2021-09-09 Thread Miao Li
vhost_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/vhost/rte_eth_vhost.c

[dpdk-dev] [PATCH 2/5] lib/vhost: implement rte_power_monitor API

2021-09-09 Thread Miao Li
er can use these information to fill rte_power_monitor_cond. Signed-off-by: Miao Li --- lib/vhost/rte_vhost.h | 33 + lib/vhost/version.map | 3 +++ lib/vhost/vhost.c | 30 ++ 3 files changed, 66 insertions(+) diff --git a

[dpdk-dev] [PATCH 1/5] net/virtio: implement rte_power_monitor API

2021-09-09 Thread Miao Li
virtio_get_monitor_addr to provide address to monitor. When no packet come in, the value of address will not be changed and the running core will sleep. Once packets arrive, the value of address will be changed and the running core will wakeup. Signed-off-by: Miao Li --- drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH 0/5] CPU Enabling: Implement rte_power_monitor API in virtio/vhost PMD

2021-09-09 Thread Miao Li
This patchset implements rte_power_monitor API in virtio and vhost PMD to reduce power consumption when no packet come in. This API can be called and tested in l3fwd-power after adding vhost and virtio support in l3fwd-power and ignoring the rx queue information check in queue_stopped(). Miao Li