patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] bus/pci: fix mapping of PCI resources
@ 2020-09-28  6:34 alvinx.zhang
  2020-09-28  9:10 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
  2020-09-28  9:55 ` Ling, WeiX
  0 siblings, 2 replies; 4+ messages in thread
From: alvinx.zhang @ 2020-09-28  6:34 UTC (permalink / raw)
  To: david.marchand, arybchenko; +Cc: dev, Alvin Zhang, stable

From: Alvin Zhang <alvinx.zhang@intel.com>

When mapping PCI bar resources around the MSI-X table, if the size
of the first part is 0, the second part should also be mapped if
its size is not 0.

Fixes: e200535c1ca3 ("mem: drop mapping API workaround")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 34b5da8..37bfda8 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -565,7 +565,7 @@
 		}
 
 		/* if there's a second part, try to map it */
-		if (map_addr != NULL
+		if ((map_addr != NULL || memreg[0].size == 0)
 			&& memreg[1].offset && memreg[1].size) {
 			void *second_addr = RTE_PTR_ADD(bar_addr,
 						(uintptr_t)(memreg[1].offset -
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix mapping of PCI resources
  2020-09-28  6:34 [dpdk-stable] [PATCH] bus/pci: fix mapping of PCI resources alvinx.zhang
@ 2020-09-28  9:10 ` Burakov, Anatoly
  2020-09-28  9:43   ` David Marchand
  2020-09-28  9:55 ` Ling, WeiX
  1 sibling, 1 reply; 4+ messages in thread
From: Burakov, Anatoly @ 2020-09-28  9:10 UTC (permalink / raw)
  To: alvinx.zhang, david.marchand, arybchenko; +Cc: dev, stable

On 28-Sep-20 7:34 AM, alvinx.zhang@intel.com wrote:
> From: Alvin Zhang <alvinx.zhang@intel.com>
> 
> When mapping PCI bar resources around the MSI-X table, if the size
> of the first part is 0, the second part should also be mapped if
> its size is not 0.
> 
> Fixes: e200535c1ca3 ("mem: drop mapping API workaround")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
>   drivers/bus/pci/linux/pci_vfio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
> index 34b5da8..37bfda8 100644
> --- a/drivers/bus/pci/linux/pci_vfio.c
> +++ b/drivers/bus/pci/linux/pci_vfio.c
> @@ -565,7 +565,7 @@
>   		}
>   
>   		/* if there's a second part, try to map it */
> -		if (map_addr != NULL
> +		if ((map_addr != NULL || memreg[0].size == 0)
>   			&& memreg[1].offset && memreg[1].size) {
>   			void *second_addr = RTE_PTR_ADD(bar_addr,
>   						(uintptr_t)(memreg[1].offset -
> 

Dupe of http://patches.dpdk.org/patch/78768/ ?

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix mapping of PCI resources
  2020-09-28  9:10 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
@ 2020-09-28  9:43   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-09-28  9:43 UTC (permalink / raw)
  To: Burakov, Anatoly, Zhang, AlvinX; +Cc: Andrew Rybchenko, dev, dpdk stable

On Mon, Sep 28, 2020 at 11:11 AM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
> Dupe of http://patches.dpdk.org/patch/78768/ ?

Yes.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix mapping of PCI resources
  2020-09-28  6:34 [dpdk-stable] [PATCH] bus/pci: fix mapping of PCI resources alvinx.zhang
  2020-09-28  9:10 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
@ 2020-09-28  9:55 ` Ling, WeiX
  1 sibling, 0 replies; 4+ messages in thread
From: Ling, WeiX @ 2020-09-28  9:55 UTC (permalink / raw)
  To: Zhang, AlvinX, david.marchand, arybchenko; +Cc: dev, Zhang, AlvinX, stable

Tested-by: Ling, Wei <weix.ling@intel.com>

Regards,
Ling Wei

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of alvinx.zhang@intel.com
> Sent: Monday, September 28, 2020 02:34 PM
> To: david.marchand@redhat.com; arybchenko@solarflare.com
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] bus/pci: fix mapping of PCI resources
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-28  9:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28  6:34 [dpdk-stable] [PATCH] bus/pci: fix mapping of PCI resources alvinx.zhang
2020-09-28  9:10 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
2020-09-28  9:43   ` David Marchand
2020-09-28  9:55 ` Ling, WeiX

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git