patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 4/4] event/dlb2: add missing sections to documentation
@ 2020-11-05 21:22 Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 3/4] event/dlb2: fix dereference NULL pointer Coverity warning Timothy McDaniel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Timothy McDaniel @ 2020-11-05 21:22 UTC (permalink / raw)
  Cc: dev, erik.g.carrillo, gage.eads, harry.van.haaren, jerinj,
	john.mcnamara, stable

Add queue depth threshold and class of service sections
to DLB2 rst file.

Fixes:5433956 ("event/dlb2: add eventdev probe")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 doc/guides/eventdevs/dlb2.rst | 47 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/doc/guides/eventdevs/dlb2.rst b/doc/guides/eventdevs/dlb2.rst
index b9f57fd..159f36c 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -363,3 +363,50 @@ increase a vdev's per-queue atomic-inflight allocation to (for example) 64:
 
        --vdev=dlb1_event,atm_inflights=64
 
+QID Depth Threshold
+~~~~~~~~~~~~~~~~~~~
+
+DLB2 supports setting and tracking queue depth thresholds. Hardware uses
+the thresholds to track how full a queue is compared to its threshold.
+Four buckets are used
+
+- Less than or equal to 50% of queue depth threshold
+- Greater than 50%, but less than or equal to 75% of depth threshold
+- Greater than 75%, but less than or equal to 100% of depth threshold
+- Greater than 100% of depth thresholds
+
+Per queue threshold metrics are tracked in the DLB2 xstats, and are also
+returned in the impl_opaque field of each received event.
+
+The per qid threshold can be specified as part of the device args, and
+can be applied to all queue, a range of queues, or a single queue, as
+shown below.
+
+    .. code-block:: console
+
+       --vdev=dlb2_event,qid_depth_thresh=all:<threshold_value>
+       --vdev=dlb2_event,qid_depth_thresh=qidA-qidB:<threshold_value>
+       --vdev=dlb2_event,qid_depth_thresh=qid:<threshold_value>
+
+Class of service
+~~~~~~~~~~~~~~~~
+
+DLB2 supports provisioning the DLB2 bandwidth into 4 classes of service.
+
+- Class 4 corresponds to 40% of the DLB2 hardware bandwidth
+- Class 3 corresponds to 30% of the DLB2 hardware bandwidth
+- Class 2 corresponds to 20% of the DLB2 hardware bandwidth
+- Class 1 corresponds to 10% of the DLB2 hardware bandwidth
+- Class 0 corresponds to don't care
+
+The classes are applied globally to the set of ports contained in this
+scheduling domain, which is more appropriate for the bifurcated
+PMD than for the PF PMD, since the PF PMD supports just 1 scheduling
+domain.
+
+Class of service can be specified in the devargs, as follows
+
+    .. code-block:: console
+
+       --vdev=dlb2_event,cos=<0..4>
+
-- 
2.6.4


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

* [dpdk-stable] [PATCH 3/4] event/dlb2: fix dereference NULL pointer Coverity warning
  2020-11-05 21:22 [dpdk-stable] [PATCH 4/4] event/dlb2: add missing sections to documentation Timothy McDaniel
@ 2020-11-05 21:22 ` Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 1/4] event/dlb: fix memory overrun " Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 2/4] event/dlb: fix no-effect " Timothy McDaniel
  2 siblings, 0 replies; 6+ messages in thread
From: Timothy McDaniel @ 2020-11-05 21:22 UTC (permalink / raw)
  To: Gage Eads
  Cc: dev, erik.g.carrillo, harry.van.haaren, jerinj, john.mcnamara, stable

Add NULL check before using t->mbuf_pool.

Fixes: 6f1b828 ("event/dlb2: add self-tests")
Coverity issue: 363719
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb2/dlb2_selftest.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
index e300067..f433654 100644
--- a/drivers/event/dlb2/dlb2_selftest.c
+++ b/drivers/event/dlb2/dlb2_selftest.c
@@ -212,7 +212,12 @@ test_stop_flush(struct test *t) /* test to check we can properly flush events */
 		goto err;
 	}
 
-	count = rte_mempool_avail_count(t->mbuf_pool);
+	if (t->mbuf_pool)
+		count = rte_mempool_avail_count(t->mbuf_pool);
+	else {
+		printf("%d: mbuf_pool is NULL\n", __LINE__);
+		goto err;
+	}
 
 	if (rte_event_port_attr_get(evdev,
 				    0,
-- 
2.6.4


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

* [dpdk-stable] [PATCH 1/4] event/dlb: fix memory overrun Coverity warning
  2020-11-05 21:22 [dpdk-stable] [PATCH 4/4] event/dlb2: add missing sections to documentation Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 3/4] event/dlb2: fix dereference NULL pointer Coverity warning Timothy McDaniel
@ 2020-11-05 21:22 ` Timothy McDaniel
  2020-11-10 15:36   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 2/4] event/dlb: fix no-effect " Timothy McDaniel
  2 siblings, 1 reply; 6+ messages in thread
From: Timothy McDaniel @ 2020-11-05 21:22 UTC (permalink / raw)
  To: Gage Eads
  Cc: dev, erik.g.carrillo, harry.van.haaren, jerinj, john.mcnamara, stable

Fix memory corruption bug caused by passing address of a 16b value,
instead of address of a 32b value.

Fixes: 1998008 ("event/dlb: add eventdev probe")
Coverity issue: 363715
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/pf/dlb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/event/dlb/pf/dlb_main.c b/drivers/event/dlb/pf/dlb_main.c
index 87ab8dd..17e671e 100644
--- a/drivers/event/dlb/pf/dlb_main.c
+++ b/drivers/event/dlb/pf/dlb_main.c
@@ -250,13 +250,13 @@ dlb_pf_reset(struct dlb_dev *dlb_dev)
 {
 	int msix_cap_offset, err_cap_offset, acs_cap_offset, wait_count;
 	uint16_t dev_ctl_word, dev_ctl2_word, lnk_word, lnk_word2;
-	uint16_t rt_ctl_word, pri_reqs_dword,  pri_ctrl_word;
+	uint16_t rt_ctl_word, pri_ctrl_word;
 	struct rte_pci_device *pdev = dlb_dev->pdev;
 	uint16_t devsta_busy_word, devctl_word;
 	int pcie_cap_offset, pri_cap_offset;
 	uint16_t slt_word, slt_word2, cmd;
 	int ret = 0, i = 0;
-	uint32_t dword[16];
+	uint32_t dword[16], pri_reqs_dword;
 	off_t off;
 
 	/* Save PCI config state */
-- 
2.6.4


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

* [dpdk-stable] [PATCH 2/4] event/dlb: fix no-effect Coverity warning
  2020-11-05 21:22 [dpdk-stable] [PATCH 4/4] event/dlb2: add missing sections to documentation Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 3/4] event/dlb2: fix dereference NULL pointer Coverity warning Timothy McDaniel
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 1/4] event/dlb: fix memory overrun " Timothy McDaniel
@ 2020-11-05 21:22 ` Timothy McDaniel
  2 siblings, 0 replies; 6+ messages in thread
From: Timothy McDaniel @ 2020-11-05 21:22 UTC (permalink / raw)
  To: Gage Eads
  Cc: dev, erik.g.carrillo, harry.van.haaren, jerinj, john.mcnamara, stable

Remove nonproductive assignment of qmport->cq_depth.

Fixes: ee57517 ("event/dlb: add port setup")
Coverity issue: 363717
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 2bb270d..0c95c47 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -1000,7 +1000,6 @@ dlb_hw_create_ldb_port(struct dlb_eventdev *dlb,
 	/* The credit window is one high water mark of QEs */
 	qm_port->dir_pushcount_at_credit_expiry = 0;
 	qm_port->cached_dir_credits = cfg.dir_credit_high_watermark;
-	qm_port->cq_depth = cfg.cq_depth;
 	/* CQs with depth < 8 use an 8-entry queue, but withhold credits so
 	 * the effective depth is smaller.
 	 */
-- 
2.6.4


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/4] event/dlb: fix memory overrun Coverity warning
  2020-11-05 21:22 ` [dpdk-stable] [PATCH 1/4] event/dlb: fix memory overrun " Timothy McDaniel
@ 2020-11-10 15:36   ` Jerin Jacob
  2020-11-10 15:44     ` McDaniel, Timothy
  0 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2020-11-10 15:36 UTC (permalink / raw)
  To: Timothy McDaniel
  Cc: Gage Eads, dpdk-dev, Erik Gabriel Carrillo, Van Haaren, Harry,
	Jerin Jacob, john.mcnamara, dpdk stable

On Fri, Nov 6, 2020 at 2:51 AM Timothy McDaniel
<timothy.mcdaniel@intel.com> wrote:
>
> Fix memory corruption bug caused by passing address of a 16b value,
> instead of address of a 32b value.
>
> Fixes: 1998008 ("event/dlb: add eventdev probe")
> Coverity issue: 363715
> Cc: stable@dpdk.org
>
> Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>

Series applied to dpdk-next-eventdev/for-main. Thanks.


> ---
>  drivers/event/dlb/pf/dlb_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/event/dlb/pf/dlb_main.c b/drivers/event/dlb/pf/dlb_main.c
> index 87ab8dd..17e671e 100644
> --- a/drivers/event/dlb/pf/dlb_main.c
> +++ b/drivers/event/dlb/pf/dlb_main.c
> @@ -250,13 +250,13 @@ dlb_pf_reset(struct dlb_dev *dlb_dev)
>  {
>         int msix_cap_offset, err_cap_offset, acs_cap_offset, wait_count;
>         uint16_t dev_ctl_word, dev_ctl2_word, lnk_word, lnk_word2;
> -       uint16_t rt_ctl_word, pri_reqs_dword,  pri_ctrl_word;
> +       uint16_t rt_ctl_word, pri_ctrl_word;
>         struct rte_pci_device *pdev = dlb_dev->pdev;
>         uint16_t devsta_busy_word, devctl_word;
>         int pcie_cap_offset, pri_cap_offset;
>         uint16_t slt_word, slt_word2, cmd;
>         int ret = 0, i = 0;
> -       uint32_t dword[16];
> +       uint32_t dword[16], pri_reqs_dword;
>         off_t off;
>
>         /* Save PCI config state */
> --
> 2.6.4
>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH 1/4] event/dlb: fix memory overrun Coverity warning
  2020-11-10 15:36   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
@ 2020-11-10 15:44     ` McDaniel, Timothy
  0 siblings, 0 replies; 6+ messages in thread
From: McDaniel, Timothy @ 2020-11-10 15:44 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Eads, Gage, dpdk-dev, Carrillo, Erik G, Van Haaren, Harry,
	Jerin Jacob, john.mcnamara, dpdk stable



> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Tuesday, November 10, 2020 9:36 AM
> To: McDaniel, Timothy <timothy.mcdaniel@intel.com>
> Cc: Eads, Gage <gage.eads@intel.com>; dpdk-dev <dev@dpdk.org>; Carrillo,
> Erik G <erik.g.carrillo@intel.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>; Jerin Jacob <jerinj@marvell.com>;
> john.mcnamara@dpdk.org; dpdk stable <stable@dpdk.org>
> Subject: Re: [dpdk-dev] [PATCH 1/4] event/dlb: fix memory overrun Coverity
> warning
> 
> On Fri, Nov 6, 2020 at 2:51 AM Timothy McDaniel
> <timothy.mcdaniel@intel.com> wrote:
> >
> > Fix memory corruption bug caused by passing address of a 16b value,
> > instead of address of a 32b value.
> >
> > Fixes: 1998008 ("event/dlb: add eventdev probe")
> > Coverity issue: 363715
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
> 
> Series applied to dpdk-next-eventdev/for-main. Thanks.
> 

Thank you, Jerin.

> 
> > ---
> >  drivers/event/dlb/pf/dlb_main.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/event/dlb/pf/dlb_main.c b/drivers/event/dlb/pf/dlb_main.c
> > index 87ab8dd..17e671e 100644
> > --- a/drivers/event/dlb/pf/dlb_main.c
> > +++ b/drivers/event/dlb/pf/dlb_main.c
> > @@ -250,13 +250,13 @@ dlb_pf_reset(struct dlb_dev *dlb_dev)
> >  {
> >         int msix_cap_offset, err_cap_offset, acs_cap_offset, wait_count;
> >         uint16_t dev_ctl_word, dev_ctl2_word, lnk_word, lnk_word2;
> > -       uint16_t rt_ctl_word, pri_reqs_dword,  pri_ctrl_word;
> > +       uint16_t rt_ctl_word, pri_ctrl_word;
> >         struct rte_pci_device *pdev = dlb_dev->pdev;
> >         uint16_t devsta_busy_word, devctl_word;
> >         int pcie_cap_offset, pri_cap_offset;
> >         uint16_t slt_word, slt_word2, cmd;
> >         int ret = 0, i = 0;
> > -       uint32_t dword[16];
> > +       uint32_t dword[16], pri_reqs_dword;
> >         off_t off;
> >
> >         /* Save PCI config state */
> > --
> > 2.6.4
> >

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

end of thread, other threads:[~2020-11-10 15:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 21:22 [dpdk-stable] [PATCH 4/4] event/dlb2: add missing sections to documentation Timothy McDaniel
2020-11-05 21:22 ` [dpdk-stable] [PATCH 3/4] event/dlb2: fix dereference NULL pointer Coverity warning Timothy McDaniel
2020-11-05 21:22 ` [dpdk-stable] [PATCH 1/4] event/dlb: fix memory overrun " Timothy McDaniel
2020-11-10 15:36   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2020-11-10 15:44     ` McDaniel, Timothy
2020-11-05 21:22 ` [dpdk-stable] [PATCH 2/4] event/dlb: fix no-effect " Timothy McDaniel

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://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/ http://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