patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 01/16] net/dpaa2: fix 10g port negotiation issue
       [not found] <20200302145829.27808-1-hemant.agrawal@nxp.com>
@ 2020-03-02 14:58 ` Hemant Agrawal
  2020-03-02 14:58 ` [dpdk-stable] [PATCH 02/16] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
       [not found] ` <20200306095742.18080-1-hemant.agrawal@nxp.com>
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-03-02 14:58 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10g port negotiation issue with another 10G/non 10G port.
Initialize the port link speed.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7c..4fc550a88 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* [dpdk-stable] [PATCH 02/16] bus/fslmc: fix dereferencing null pointer
       [not found] <20200302145829.27808-1-hemant.agrawal@nxp.com>
  2020-03-02 14:58 ` [dpdk-stable] [PATCH 01/16] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
@ 2020-03-02 14:58 ` Hemant Agrawal
       [not found] ` <20200306095742.18080-1-hemant.agrawal@nxp.com>
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-03-02 14:58 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, stable, Apeksha Gupta

From: Apeksha Gupta <apeksha.gupta@nxp.com>

This patch fixees the nxp internal coverity reported
null pointer dereferncing issue.

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880..34374ae4b 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,26 +20,27 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v2 01/16] net/dpaa2: fix 10g port negotiation issue
       [not found] ` <20200306095742.18080-1-hemant.agrawal@nxp.com>
@ 2020-03-06  9:57   ` Hemant Agrawal
  2020-03-06  9:57   ` [dpdk-stable] [PATCH v2 02/16] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
       [not found]   ` <20200504124118.22877-1-hemant.agrawal@nxp.com>
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-03-06  9:57 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10g port negotiation issue with another 10G/non 10G port.
Initialize the port link speed.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7c..4fc550a88 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v2 02/16] bus/fslmc: fix dereferencing null pointer
       [not found] ` <20200306095742.18080-1-hemant.agrawal@nxp.com>
  2020-03-06  9:57   ` [dpdk-stable] [PATCH v2 01/16] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
@ 2020-03-06  9:57   ` Hemant Agrawal
       [not found]   ` <20200504124118.22877-1-hemant.agrawal@nxp.com>
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-03-06  9:57 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, stable, Apeksha Gupta

From: Apeksha Gupta <apeksha.gupta@nxp.com>

This patch fixees the nxp internal coverity reported
null pointer dereferncing issue.

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880..34374ae4b 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,26 +20,27 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v3 1/8] bus/fslmc: fix dereferencing null pointer
       [not found]   ` <20200504124118.22877-1-hemant.agrawal@nxp.com>
@ 2020-05-04 12:41     ` Hemant Agrawal
  2020-05-06 21:08       ` Ferruh Yigit
  2020-05-06 21:14       ` Ferruh Yigit
  2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 2/8] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
  2 siblings, 2 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-04 12:41 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Apeksha Gupta

From: Apeksha Gupta <apeksha.gupta@nxp.com>

This patch fixees the nxp internal coverity reported
null pointer dereferncing issue.

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880f..34374ae4b6 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,26 +20,27 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v3 2/8] net/dpaa2: fix 10g port negotiation issue
       [not found]   ` <20200504124118.22877-1-hemant.agrawal@nxp.com>
  2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 1/8] " Hemant Agrawal
@ 2020-05-04 12:41     ` Hemant Agrawal
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-04 12:41 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10g port negotiation issue with another 10G/non 10G port.
Initialize the port link speed.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* Re: [dpdk-stable] [PATCH v3 1/8] bus/fslmc: fix dereferencing null pointer
  2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 1/8] " Hemant Agrawal
@ 2020-05-06 21:08       ` Ferruh Yigit
  2020-05-06 21:09         ` Ferruh Yigit
  2020-05-06 21:14       ` Ferruh Yigit
  1 sibling, 1 reply; 22+ messages in thread
From: Ferruh Yigit @ 2020-05-06 21:08 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Apeksha Gupta

On 5/4/2020 1:41 PM, Hemant Agrawal wrote:
> From: Apeksha Gupta <apeksha.gupta@nxp.com>
> 
> This patch fixees the nxp internal coverity reported
> null pointer dereferncing issue.

What is the coverity issue number? Can you please put it into commit log as
"Coverity issue: ###" format.

> 
> Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>


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

* Re: [dpdk-stable] [PATCH v3 1/8] bus/fslmc: fix dereferencing null pointer
  2020-05-06 21:08       ` Ferruh Yigit
@ 2020-05-06 21:09         ` Ferruh Yigit
  0 siblings, 0 replies; 22+ messages in thread
From: Ferruh Yigit @ 2020-05-06 21:09 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Apeksha Gupta

On 5/6/2020 10:08 PM, Ferruh Yigit wrote:
> On 5/4/2020 1:41 PM, Hemant Agrawal wrote:
>> From: Apeksha Gupta <apeksha.gupta@nxp.com>
>>
>> This patch fixees the nxp internal coverity reported
>> null pointer dereferncing issue.
> 
> What is the coverity issue number? Can you please put it into commit log as
> "Coverity issue: ###" format.

Ahh, it says internal coverity, we need number only for public coverity, isn't
same issue reported on public coverity? If so we need that number.

> 
>>
>> Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> 


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

* Re: [dpdk-stable] [PATCH v3 1/8] bus/fslmc: fix dereferencing null pointer
  2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 1/8] " Hemant Agrawal
  2020-05-06 21:08       ` Ferruh Yigit
@ 2020-05-06 21:14       ` Ferruh Yigit
  1 sibling, 0 replies; 22+ messages in thread
From: Ferruh Yigit @ 2020-05-06 21:14 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Apeksha Gupta

On 5/4/2020 1:41 PM, Hemant Agrawal wrote:
> From: Apeksha Gupta <apeksha.gupta@nxp.com>
> 
> This patch fixees the nxp internal coverity reported
> null pointer dereferncing issue.
> 
> Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> ---
>  drivers/bus/fslmc/qbman/qbman_debug.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
> index 0bb2ce880f..34374ae4b6 100644
> --- a/drivers/bus/fslmc/qbman/qbman_debug.c
> +++ b/drivers/bus/fslmc/qbman/qbman_debug.c
> @@ -20,26 +20,27 @@ struct qbman_fq_query_desc {
>  	uint8_t verb;
>  	uint8_t reserved[3];
>  	uint32_t fqid;
> -	uint8_t reserved2[57];
> +	uint8_t reserved2[56];

Is decreasing 'reserved2' size related to null pointer de-referencing? This
looks unrelated.

>  };
>  
>  int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
>  			 struct qbman_fq_query_np_rslt *r)
>  {
>  	struct qbman_fq_query_desc *p;
> +	struct qbman_fq_query_np_rslt *var;
>  
>  	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
>  	if (!p)
>  		return -EBUSY;
>  
>  	p->fqid = fqid;
> -	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
> -						QBMAN_FQ_QUERY_NP);
> -	if (!r) {
> +	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
> +	if (!var) {
>  		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
>  		       fqid);
>  		return -EIO;
>  	}
> +	*r = *var;
>  
>  	/* Decode the outcome */
>  	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
> 


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

* [dpdk-stable] [PATCH v4 1/9] bus/fslmc: fix dereferencing null pointer
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
@ 2020-05-07 10:46       ` Hemant Agrawal
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-07 10:46 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Apeksha Gupta

From: Apeksha Gupta <apeksha.gupta@nxp.com>

This patch fixees the nxp internal coverity reported
null pointer dereferncing issue.

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880f..4cd0923acb 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -27,19 +27,20 @@ int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 1/9] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
@ 2020-05-07 10:46       ` Hemant Agrawal
  2020-05-07 14:36         ` Ferruh Yigit
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
                         ` (3 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-07 10:46 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10g port negotiation issue with another 10G/non 10G port.
Initialize the port link speed.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 1/9] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
@ 2020-05-07 10:46       ` Hemant Agrawal
  2020-05-07 14:33         ` Ferruh Yigit
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 9/9] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
                         ` (2 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-07 10:46 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Jun Yang

From: Jun Yang <jun.yang@nxp.com>

Flow id will not work when used with multiple traffic
classes. The CGID shall be provided in the INDEX field.

Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
Cc: stable@dpdk.org

Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index fd766a2184..1bab3b064c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -676,7 +676,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 						DPNI_CP_CONGESTION_GROUP,
 						DPNI_QUEUE_RX,
 						dpaa2_q->tc_index,
-						flow_id, &taildrop);
+						dpaa2_q->cgid, &taildrop);
 		} else {
 			/*enabling per rx queue congestion control */
 			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
@@ -703,7 +703,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
 					dpaa2_q->tc_index,
-					flow_id, &taildrop);
+					dpaa2_q->cgid, &taildrop);
 		} else {
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_QUEUE, DPNI_QUEUE_RX,
-- 
2.17.1


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

* [dpdk-stable] [PATCH v4 9/9] bus/fslmc: fix the size of qman fq desc
       [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
                         ` (2 preceding siblings ...)
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
@ 2020-05-07 10:46       ` Hemant Agrawal
       [not found]       ` <20200508125934.14255-1-hemant.agrawal@nxp.com>
       [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
  5 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-07 10:46 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Hemant Agrawal

correct the qman_fq_desc as per the HW defined size

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 4cd0923acb..34374ae4b6 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,7 +20,7 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
-- 
2.17.1


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

* Re: [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
@ 2020-05-07 14:33         ` Ferruh Yigit
  0 siblings, 0 replies; 22+ messages in thread
From: Ferruh Yigit @ 2020-05-07 14:33 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Jun Yang

On 5/7/2020 11:46 AM, Hemant Agrawal wrote:
> From: Jun Yang <jun.yang@nxp.com>
> 
> Flow id will not work when used with multiple traffic
> classes. The CGID shall be provided in the INDEX field.

Can you please add more detail, same also asked in prev version [1]. Btw what
does "flow id won't work" mean, and what is cong or cgid?

Thanks.

[1]

Can you please provide more information in commit log, why this change is done,
is it to fix something, if so what is broken with original code, why using "cong
group id" helps instead of using "flow_id" etc..


> 
> Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jun Yang <jun.yang@nxp.com>
> ---
>  drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index fd766a2184..1bab3b064c 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -676,7 +676,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
>  						DPNI_CP_CONGESTION_GROUP,
>  						DPNI_QUEUE_RX,
>  						dpaa2_q->tc_index,
> -						flow_id, &taildrop);
> +						dpaa2_q->cgid, &taildrop);
>  		} else {
>  			/*enabling per rx queue congestion control */
>  			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
> @@ -703,7 +703,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
>  			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
>  					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
>  					dpaa2_q->tc_index,
> -					flow_id, &taildrop);
> +					dpaa2_q->cgid, &taildrop);
>  		} else {
>  			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
>  					DPNI_CP_QUEUE, DPNI_QUEUE_RX,
> 


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

* Re: [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue
  2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
@ 2020-05-07 14:36         ` Ferruh Yigit
  0 siblings, 0 replies; 22+ messages in thread
From: Ferruh Yigit @ 2020-05-07 14:36 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Rohit Raj

On 5/7/2020 11:46 AM, Hemant Agrawal wrote:
> From: Rohit Raj <rohit.raj@nxp.com>
> 

s/10g/10G in the title

> Fixed 10g port negotiation issue with another 10G/non 10G port.

Can be good to explain how it is fixed.

> Initialize the port link speed.
> 
> Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
> ---
>  drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 2cde55e7cc..4fc550a885 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
>  	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
>  		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
>  
> -	/* update the current status */
> -	dpaa2_dev_link_update(dev, 0);
> -
>  	return 0;
>  }
>  
> @@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
>  	/* changing tx burst function to start enqueues */
>  	dev->tx_pkt_burst = dpaa2_dev_tx;
>  	dev->data->dev_link.link_status = state.up;
> +	dev->data->dev_link.link_speed = state.rate;
>  
>  	if (state.up)
>  		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
> 


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

* [dpdk-stable] [PATCH v5 1/9] net/dpaa2: fix 10G port negotiation issue
       [not found]       ` <20200508125934.14255-1-hemant.agrawal@nxp.com>
@ 2020-05-08 12:59         ` Hemant Agrawal
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 7/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 8/9] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 12:59 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10G port negotiation issue with another 10G/non 10G port.

When running testpmd with 10G interfaces on 10BaseT interface
on LS2088ARDB, the ports were showing link as down.

This was identified to be caused by the setting of link as down
during config.
Also, the line rate was not being updated in device link params,
thus having the incorrect link speed in status (as 0).

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v5 7/9] net/dpaa2: fix cong group id for multiple tcs
       [not found]       ` <20200508125934.14255-1-hemant.agrawal@nxp.com>
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 1/9] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
@ 2020-05-08 12:59         ` Hemant Agrawal
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 8/9] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 12:59 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Jun Yang

From: Jun Yang <jun.yang@nxp.com>

When using a single TC, flow id is same as congestion group id.
However in case of multiple traffic classes, same flow id values
are used within each traffc classs, which causes incorrect
traffic behavior e.g. halting of traffic.
This patches changes to use the cgid as the index which works
for single as well as multiple traffic classes.

Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
Cc: stable@dpdk.org

Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 08f9832eb8..d9960b01f7 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -669,7 +669,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 						DPNI_CP_CONGESTION_GROUP,
 						DPNI_QUEUE_RX,
 						dpaa2_q->tc_index,
-						flow_id, &taildrop);
+						dpaa2_q->cgid, &taildrop);
 		} else {
 			/*enabling per rx queue congestion control */
 			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
@@ -696,7 +696,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
 					dpaa2_q->tc_index,
-					flow_id, &taildrop);
+					dpaa2_q->cgid, &taildrop);
 		} else {
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_QUEUE, DPNI_QUEUE_RX,
-- 
2.17.1


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

* [dpdk-stable] [PATCH v5 8/9] bus/fslmc: fix the size of qman fq desc
       [not found]       ` <20200508125934.14255-1-hemant.agrawal@nxp.com>
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 1/9] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
  2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 7/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
@ 2020-05-08 12:59         ` Hemant Agrawal
  2 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 12:59 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Hemant Agrawal

correct the qman_fq_desc as per the HW defined size

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 4cd0923acb..34374ae4b6 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,7 +20,7 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
-- 
2.17.1


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

* [dpdk-stable] [PATCH v6 01/10] bus/fslmc: fix dereferencing null pointer
       [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
@ 2020-05-08 13:02         ` Hemant Agrawal
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 02/10] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 13:02 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Apeksha Gupta

From: Apeksha Gupta <apeksha.gupta@nxp.com>

This patch fixees the nxp internal coverity reported
null pointer dereferncing issue.

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880f..4cd0923acb 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -27,19 +27,20 @@ int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v6 02/10] net/dpaa2: fix 10G port negotiation issue
       [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 01/10] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
@ 2020-05-08 13:02         ` Hemant Agrawal
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 08/10] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 09/10] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
  3 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 13:02 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Rohit Raj

From: Rohit Raj <rohit.raj@nxp.com>

Fixed 10G port negotiation issue with another 10G/non 10G port.

When running testpmd with 10G interfaces on 10BaseT interface
on LS2088ARDB, the ports were showing link as down.

This was identified to be caused by the setting of link as down
during config.
Also, the line rate was not being updated in device link params,
thus having the incorrect link speed in status (as 0).

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.17.1


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

* [dpdk-stable] [PATCH v6 08/10] net/dpaa2: fix cong group id for multiple tcs
       [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 01/10] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 02/10] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
@ 2020-05-08 13:02         ` Hemant Agrawal
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 09/10] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
  3 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 13:02 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Jun Yang

From: Jun Yang <jun.yang@nxp.com>

When using a single TC, flow id is same as congestion group id.
However in case of multiple traffic classes, same flow id values
are used within each traffc classs, which causes incorrect
traffic behavior e.g. halting of traffic.
This patches changes to use the cgid as the index which works
for single as well as multiple traffic classes.

Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
Cc: stable@dpdk.org

Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 08f9832eb8..d9960b01f7 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -669,7 +669,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 						DPNI_CP_CONGESTION_GROUP,
 						DPNI_QUEUE_RX,
 						dpaa2_q->tc_index,
-						flow_id, &taildrop);
+						dpaa2_q->cgid, &taildrop);
 		} else {
 			/*enabling per rx queue congestion control */
 			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
@@ -696,7 +696,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
 					dpaa2_q->tc_index,
-					flow_id, &taildrop);
+					dpaa2_q->cgid, &taildrop);
 		} else {
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_QUEUE, DPNI_QUEUE_RX,
-- 
2.17.1


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

* [dpdk-stable] [PATCH v6 09/10] bus/fslmc: fix the size of qman fq desc
       [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
                           ` (2 preceding siblings ...)
  2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 08/10] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
@ 2020-05-08 13:02         ` Hemant Agrawal
  3 siblings, 0 replies; 22+ messages in thread
From: Hemant Agrawal @ 2020-05-08 13:02 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable, Hemant Agrawal

correct the qman_fq_desc as per the HW defined size

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 4cd0923acb..34374ae4b6 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,7 +20,7 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
-- 
2.17.1


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

end of thread, other threads:[~2020-05-08 13:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200302145829.27808-1-hemant.agrawal@nxp.com>
2020-03-02 14:58 ` [dpdk-stable] [PATCH 01/16] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
2020-03-02 14:58 ` [dpdk-stable] [PATCH 02/16] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
     [not found] ` <20200306095742.18080-1-hemant.agrawal@nxp.com>
2020-03-06  9:57   ` [dpdk-stable] [PATCH v2 01/16] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
2020-03-06  9:57   ` [dpdk-stable] [PATCH v2 02/16] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
     [not found]   ` <20200504124118.22877-1-hemant.agrawal@nxp.com>
2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 1/8] " Hemant Agrawal
2020-05-06 21:08       ` Ferruh Yigit
2020-05-06 21:09         ` Ferruh Yigit
2020-05-06 21:14       ` Ferruh Yigit
2020-05-04 12:41     ` [dpdk-stable] [PATCH v3 2/8] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
     [not found]     ` <20200507104645.31990-1-hemant.agrawal@nxp.com>
2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 1/9] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue Hemant Agrawal
2020-05-07 14:36         ` Ferruh Yigit
2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
2020-05-07 14:33         ` Ferruh Yigit
2020-05-07 10:46       ` [dpdk-stable] [PATCH v4 9/9] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
     [not found]       ` <20200508125934.14255-1-hemant.agrawal@nxp.com>
2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 1/9] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 7/9] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
2020-05-08 12:59         ` [dpdk-stable] [PATCH v5 8/9] bus/fslmc: fix the size of qman fq desc Hemant Agrawal
     [not found]       ` <20200508130211.14334-1-hemant.agrawal@nxp.com>
2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 01/10] bus/fslmc: fix dereferencing null pointer Hemant Agrawal
2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 02/10] net/dpaa2: fix 10G port negotiation issue Hemant Agrawal
2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 08/10] net/dpaa2: fix cong group id for multiple tcs Hemant Agrawal
2020-05-08 13:02         ` [dpdk-stable] [PATCH v6 09/10] bus/fslmc: fix the size of qman fq desc Hemant Agrawal

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