DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf
@ 2021-04-09  7:59 Radha Mohan Chintakuntla
  2021-04-09  8:07 ` Radha Mohan
  0 siblings, 1 reply; 5+ messages in thread
From: Radha Mohan Chintakuntla @ 2021-04-09  7:59 UTC (permalink / raw)
  To: vburru, thomas; +Cc: dev, Radha Mohan Chintakuntla

The PCI device address is being used for sending mailbox which was
introduced in previous commit which replaced the macros so that
multiple DPI blocks in the hardware can be supported.

This patch fixes a NULL pointer access by assigning the PCI device
structure to dpivf.

Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
---
 drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
index efdba2779b..8c01f25ec7 100644
--- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
+++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
@@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
 		 (pci_dev->addr.function & 0x7);
 	vf_id -= 1;
+	dpivf->dev = pci_dev;
 	dpivf->state = DPI_QUEUE_START;
 	dpivf->vf_id = vf_id;
 	dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
-- 
2.24.1


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

* Re: [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf
  2021-04-09  7:59 [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf Radha Mohan Chintakuntla
@ 2021-04-09  8:07 ` Radha Mohan
  0 siblings, 0 replies; 5+ messages in thread
From: Radha Mohan @ 2021-04-09  8:07 UTC (permalink / raw)
  To: Radha Mohan Chintakuntla; +Cc: Veerasenareddy Burru, Thomas Monjalon, dpdk-dev

On Fri, Apr 9, 2021 at 1:29 PM Radha Mohan Chintakuntla
<radhac@marvell.com> wrote:
>
> The PCI device address is being used for sending mailbox which was
> introduced in previous commit which replaced the macros so that
> multiple DPI blocks in the hardware can be supported.
>
> This patch fixes a NULL pointer access by assigning the PCI device
> structure to dpivf.
>
> Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")
>
> Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
> ---
>  drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> index efdba2779b..8c01f25ec7 100644
> --- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> +++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> @@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
>         vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
>                  (pci_dev->addr.function & 0x7);
>         vf_id -= 1;
> +       dpivf->dev = pci_dev;
>         dpivf->state = DPI_QUEUE_START;
>         dpivf->vf_id = vf_id;
>         dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
> --
> 2.24.1

I sent another with proper subject patch version. Please ignore this.

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

* Re: [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf
  2021-04-09  6:43 ` Jerin Jacob
@ 2021-04-09  8:01   ` Radha Mohan
  0 siblings, 0 replies; 5+ messages in thread
From: Radha Mohan @ 2021-04-09  8:01 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Radha Mohan Chintakuntla, Veerasenareddy Burru, Thomas Monjalon,
	dpdk-dev

On Fri, Apr 9, 2021 at 12:13 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Mon, Mar 22, 2021 at 8:52 PM Radha Mohan Chintakuntla
> <radhac@marvell.com> wrote:
> >
> > Add PCI device to dpivf structure.
> >
> > Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")
>
> Since it is a fix, Please describe what is fixed in  git commit log.

ok submitted v2.

>
>
> > Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
> > ---
> >  drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> > index efdba2779b..8c01f25ec7 100644
> > --- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> > +++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> > @@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
> >         vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
> >                  (pci_dev->addr.function & 0x7);
> >         vf_id -= 1;
> > +       dpivf->dev = pci_dev;
> >         dpivf->state = DPI_QUEUE_START;
> >         dpivf->vf_id = vf_id;
> >         dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
> > --
> > 2.24.1
> >

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

* Re: [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf
  2021-03-22 15:21 Radha Mohan Chintakuntla
@ 2021-04-09  6:43 ` Jerin Jacob
  2021-04-09  8:01   ` Radha Mohan
  0 siblings, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2021-04-09  6:43 UTC (permalink / raw)
  To: Radha Mohan Chintakuntla; +Cc: Veerasenareddy Burru, Thomas Monjalon, dpdk-dev

On Mon, Mar 22, 2021 at 8:52 PM Radha Mohan Chintakuntla
<radhac@marvell.com> wrote:
>
> Add PCI device to dpivf structure.
>
> Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")

Since it is a fix, Please describe what is fixed in  git commit log.


> Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
> ---
>  drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> index efdba2779b..8c01f25ec7 100644
> --- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> +++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
> @@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
>         vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
>                  (pci_dev->addr.function & 0x7);
>         vf_id -= 1;
> +       dpivf->dev = pci_dev;
>         dpivf->state = DPI_QUEUE_START;
>         dpivf->vf_id = vf_id;
>         dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
> --
> 2.24.1
>

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

* [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf
@ 2021-03-22 15:21 Radha Mohan Chintakuntla
  2021-04-09  6:43 ` Jerin Jacob
  0 siblings, 1 reply; 5+ messages in thread
From: Radha Mohan Chintakuntla @ 2021-03-22 15:21 UTC (permalink / raw)
  To: vburru, thomas; +Cc: dev, Radha Mohan Chintakuntla

Add PCI device to dpivf structure.

Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
---
 drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
index efdba2779b..8c01f25ec7 100644
--- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
+++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
@@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
 		 (pci_dev->addr.function & 0x7);
 	vf_id -= 1;
+	dpivf->dev = pci_dev;
 	dpivf->state = DPI_QUEUE_START;
 	dpivf->vf_id = vf_id;
 	dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
-- 
2.24.1


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

end of thread, other threads:[~2021-04-09  8:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  7:59 [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf Radha Mohan Chintakuntla
2021-04-09  8:07 ` Radha Mohan
  -- strict thread matches above, loose matches on Subject: below --
2021-03-22 15:21 Radha Mohan Chintakuntla
2021-04-09  6:43 ` Jerin Jacob
2021-04-09  8:01   ` Radha Mohan

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