DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing
@ 2020-10-14 19:30 Tal Shnaiderman
  2020-10-14 20:44 ` Ranjit Menon
  2020-10-15 18:45 ` Narcisa Ana Maria Vasile
  0 siblings, 2 replies; 4+ messages in thread
From: Tal Shnaiderman @ 2020-10-14 19:30 UTC (permalink / raw)
  To: dev
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, ranjit.menon, navasile,
	dmitrym, stable

When reading bus and segment values using SPDRP_BUSNUMBER
bits 24-31 are undefined.

They are cleared to verify we read the segment number correctly.

Fixes: c3adf8144a1 ("bus/pci: support segment value as address domain on Window")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 drivers/bus/pci/windows/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 2cd010a09b..2b0a7a7c86 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info,
 		return -1;
 	}
 
-	addr->domain = bus_num >> 8;
+	addr->domain = (bus_num >> 8) & 0xffff;
 	addr->bus = bus_num & 0xff;
 	addr->devid = dev_and_func >> 16;
 	addr->function = dev_and_func & 0xffff;
-- 
2.16.1.windows.4


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

* Re: [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing
  2020-10-14 19:30 [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing Tal Shnaiderman
@ 2020-10-14 20:44 ` Ranjit Menon
  2020-10-15 18:45 ` Narcisa Ana Maria Vasile
  1 sibling, 0 replies; 4+ messages in thread
From: Ranjit Menon @ 2020-10-14 20:44 UTC (permalink / raw)
  To: Tal Shnaiderman, dev
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym, stable


On 10/14/2020 12:30 PM, Tal Shnaiderman wrote:
> When reading bus and segment values using SPDRP_BUSNUMBER
> bits 24-31 are undefined.
>
> They are cleared to verify we read the segment number correctly.
>
> Fixes: c3adf8144a1 ("bus/pci: support segment value as address domain on Window")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>   drivers/bus/pci/windows/pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
> index 2cd010a09b..2b0a7a7c86 100644
> --- a/drivers/bus/pci/windows/pci.c
> +++ b/drivers/bus/pci/windows/pci.c
> @@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info,
>   		return -1;
>   	}
>   
> -	addr->domain = bus_num >> 8;
> +	addr->domain = (bus_num >> 8) & 0xffff;
>   	addr->bus = bus_num & 0xff;
>   	addr->devid = dev_and_func >> 16;
>   	addr->function = dev_and_func & 0xffff;

Acked-by: Ranjit Menon <ranjit.menon@intel.com>


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

* Re: [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing
  2020-10-14 19:30 [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing Tal Shnaiderman
  2020-10-14 20:44 ` Ranjit Menon
@ 2020-10-15 18:45 ` Narcisa Ana Maria Vasile
  2020-10-16 10:22   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-10-15 18:45 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, thomas, pallavi.kadam, dmitry.kozliuk, ranjit.menon,
	dmitrym, stable

On Wed, Oct 14, 2020 at 10:30:01PM +0300, Tal Shnaiderman wrote:
> When reading bus and segment values using SPDRP_BUSNUMBER
> bits 24-31 are undefined.
> 
> They are cleared to verify we read the segment number correctly.
> 
> Fixes: c3adf8144a1 ("bus/pci: support segment value as address domain on Window")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  drivers/bus/pci/windows/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

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

* Re: [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing
  2020-10-15 18:45 ` Narcisa Ana Maria Vasile
@ 2020-10-16 10:22   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-10-16 10:22 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, pallavi.kadam, dmitry.kozliuk, ranjit.menon, dmitrym,
	stable, Narcisa Ana Maria Vasile

15/10/2020 20:45, Narcisa Ana Maria Vasile:
> On Wed, Oct 14, 2020 at 10:30:01PM +0300, Tal Shnaiderman wrote:
> > When reading bus and segment values using SPDRP_BUSNUMBER
> > bits 24-31 are undefined.
> > 
> > They are cleared to verify we read the segment number correctly.
> > 
> > Fixes: c3adf8144a1 ("bus/pci: support segment value as address domain on Window")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> 
> Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

Applied, thanks




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

end of thread, other threads:[~2020-10-16 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 19:30 [dpdk-dev] [PATCH] bus/pci: clear undefined bits in Windows segment parsing Tal Shnaiderman
2020-10-14 20:44 ` Ranjit Menon
2020-10-15 18:45 ` Narcisa Ana Maria Vasile
2020-10-16 10:22   ` Thomas Monjalon

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).