patches for DPDK stable branches
 help / color / mirror / Atom feed
* Re: [dpdk-stable] [PATCH 1/2] net/bnxt: fix drop en in rxq get information
       [not found] <20200922140438.284862-1-lance.richardson@broadcom.com>
@ 2020-09-24  0:54 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2020-09-24  0:54 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, dpdk-dev, dpdk stable

On Tue, Sep 22, 2020 at 7:04 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Return correct value for rx_drop_en. Add per-queue field to
> track rx_drop_en configuration.
>
> Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")
> Cc: stable@dpdk.org
>
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Patch applied to  dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 5 ++---
>  drivers/net/bnxt/bnxt_rxq.c    | 5 +++++
>  drivers/net/bnxt/bnxt_rxq.h    | 4 ++++
>  3 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 05e9a6abbf..61684e0291 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -887,8 +887,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
>                         .wthresh = 0,
>                 },
>                 .rx_free_thresh = 32,
> -               /* If no descriptors available, pkts are dropped by default */
> -               .rx_drop_en = 1,
> +               .rx_drop_en = BNXT_DEFAULT_RX_DROP_EN,
>         };
>
>         dev_info->default_txconf = (struct rte_eth_txconf) {
> @@ -2600,7 +2599,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
>         qinfo->nb_desc = rxq->nb_rx_desc;
>
>         qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
> -       qinfo->conf.rx_drop_en = 0;
> +       qinfo->conf.rx_drop_en = rxq->drop_en;
>         qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
>  }
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
> index 793a47d112..8cc77f7f9e 100644
> --- a/drivers/net/bnxt/bnxt_rxq.c
> +++ b/drivers/net/bnxt/bnxt_rxq.c
> @@ -330,6 +330,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
>         rxq->rx_free_thresh =
>                 RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_RX_BURST);
>
> +       if (rx_conf->rx_drop_en != BNXT_DEFAULT_RX_DROP_EN)
> +               PMD_DRV_LOG(NOTICE,
> +                           "Per-queue config of drop-en is not supported.\n");
> +       rxq->drop_en = BNXT_DEFAULT_RX_DROP_EN;
> +
>         PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
>
>         rc = bnxt_init_rx_ring_struct(rxq, socket_id);
> diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> index fae92ea45c..f70cb04373 100644
> --- a/drivers/net/bnxt/bnxt_rxq.h
> +++ b/drivers/net/bnxt/bnxt_rxq.h
> @@ -9,6 +9,9 @@
>  /* Maximum receive burst supported in vector mode. */
>  #define RTE_BNXT_MAX_RX_BURST          64U
>
> +/* Drop by default when receive desc is not available. */
> +#define BNXT_DEFAULT_RX_DROP_EN                1
> +
>  struct bnxt;
>  struct bnxt_rx_ring_info;
>  struct bnxt_cp_ring_info;
> @@ -34,6 +37,7 @@ struct bnxt_rx_queue {
>         uint8_t                 crc_len; /* 0 if CRC stripped, 4 otherwise */
>         uint8_t                 rx_deferred_start; /* not in global dev start */
>         uint8_t                 rx_started; /* RX queue is started */
> +       uint8_t                 drop_en; /* Drop when rx desc not available. */
>
>         struct bnxt             *bp;
>         int                     index;
> --
> 2.25.1
>

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

* [dpdk-stable] [PATCH 1/2] net/bnxt: fix drop en in rxq get information
@ 2020-09-22 17:30 Lance Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Lance Richardson @ 2020-09-22 17:30 UTC (permalink / raw)
  To: Ajit Khaparde, Somnath Kotur; +Cc: dev, stable

Return correct value for rx_drop_en. Add per-queue field to
track rx_drop_en configuration.

Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 ++---
 drivers/net/bnxt/bnxt_rxq.c    | 5 +++++
 drivers/net/bnxt/bnxt_rxq.h    | 4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 05e9a6abbf..61684e0291 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -887,8 +887,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 			.wthresh = 0,
 		},
 		.rx_free_thresh = 32,
-		/* If no descriptors available, pkts are dropped by default */
-		.rx_drop_en = 1,
+		.rx_drop_en = BNXT_DEFAULT_RX_DROP_EN,
 	};
 
 	dev_info->default_txconf = (struct rte_eth_txconf) {
@@ -2600,7 +2599,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->nb_desc = rxq->nb_rx_desc;
 
 	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
-	qinfo->conf.rx_drop_en = 0;
+	qinfo->conf.rx_drop_en = rxq->drop_en;
 	qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
 }
 
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 793a47d112..8cc77f7f9e 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -330,6 +330,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	rxq->rx_free_thresh =
 		RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_RX_BURST);
 
+	if (rx_conf->rx_drop_en != BNXT_DEFAULT_RX_DROP_EN)
+		PMD_DRV_LOG(NOTICE,
+			    "Per-queue config of drop-en is not supported.\n");
+	rxq->drop_en = BNXT_DEFAULT_RX_DROP_EN;
+
 	PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
 
 	rc = bnxt_init_rx_ring_struct(rxq, socket_id);
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index fae92ea45c..f70cb04373 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -9,6 +9,9 @@
 /* Maximum receive burst supported in vector mode. */
 #define RTE_BNXT_MAX_RX_BURST		64U
 
+/* Drop by default when receive desc is not available. */
+#define BNXT_DEFAULT_RX_DROP_EN		1
+
 struct bnxt;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
@@ -34,6 +37,7 @@ struct bnxt_rx_queue {
 	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
 	uint8_t			rx_deferred_start; /* not in global dev start */
 	uint8_t			rx_started; /* RX queue is started */
+	uint8_t			drop_en; /* Drop when rx desc not available. */
 
 	struct bnxt		*bp;
 	int			index;
-- 
2.25.1


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200922140438.284862-1-lance.richardson@broadcom.com>
2020-09-24  0:54 ` [dpdk-stable] [PATCH 1/2] net/bnxt: fix drop en in rxq get information Ajit Khaparde
2020-09-22 17:30 Lance Richardson

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