DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>, dev@dpdk.org
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH 5/5] net/bnxt: Support for rx/tx_queue_start/stop ops
Date: Mon, 22 Jan 2018 12:25:15 +0000	[thread overview]
Message-ID: <0bf4b23f-58b1-3b1e-ed6c-a4318d6c3caf@intel.com> (raw)
In-Reply-To: <20180122062046.81908-6-ajit.khaparde@broadcom.com>

On 1/22/2018 6:20 AM, Ajit Khaparde wrote:
> Currently this is implemented entirely in the PMD as there is no explicit
> support in the HW. Re-program the RSS Table without this queue on stop
> and add it back to the table on start.
> 
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

<...>

> @@ -1,4 +1,4 @@
> -/*-
> +/*
>   *   BSD LICENSE
>   *
>   *   Copyright(c) Broadcom Limited.

Unrelated but since I saw this, do you plan switching to the SPDX tags?

<...>

> @@ -321,8 +334,7 @@ static int bnxt_init_chip(struct bnxt *bp)
>  	     !RTE_ETH_DEV_SRIOV(bp->eth_dev).active) &&
>  	    bp->eth_dev->data->dev_conf.intr_conf.rxq != 0) {
>  		intr_vector = bp->eth_dev->data->nb_rx_queues;
> -		PMD_DRV_LOG(INFO, "%s(): intr_vector = %d\n", __func__,
> -			intr_vector);
> +		PMD_DRV_LOG(INFO, "intr_vector = %d\n", intr_vector);

With new logging macro "__func__" is duplicate, why not fix them all in the
patch 2/5 that introduces new macro?

<...>

> @@ -2969,6 +2981,49 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
>  	return 0;
>  }
>  
> +int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
> +{
> +	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
> +	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
> +	struct bnxt_rx_queue *rxq = bp->rx_queues[rx_queue_id];
> +	struct bnxt_vnic_info *vnic = NULL;
> +
> +	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
> +	rxq->rx_deferred_start = false;
> +	PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
> +	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
> +		vnic = rxq->vnic;
> +		if (vnic->fw_grp_ids[rx_queue_id] != INVALID_HW_RING_ID)
> +			return 0;
> +		PMD_DRV_LOG(DEBUG, "vnic = %p fw_grp_id = %d\n",
> +			vnic, bp->grp_info[rx_queue_id + 1].fw_grp_id);
> +		vnic->fw_grp_ids[rx_queue_id] =
> +					bp->grp_info[rx_queue_id + 1].fw_grp_id;
> +		return bnxt_vnic_rss_configure(bp, vnic);
> +	}
> +
> +	return 0;
> +}
> +
> +int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
> +{
> +	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
> +	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
> +	struct bnxt_rx_queue *rxq = bp->rx_queues[rx_queue_id];
> +	struct bnxt_vnic_info *vnic = NULL;
> +
> +	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
> +	rxq->rx_deferred_start = true;
> +	PMD_DRV_LOG(DEBUG, "Rx queue stopped\n");
> +
> +	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
> +		vnic = rxq->vnic;
> +		vnic->fw_grp_ids[rx_queue_id] = INVALID_HW_RING_ID;
> +		return bnxt_vnic_rss_configure(bp, vnic);
> +	}
> +	return 0;
> +}

There is already a source file "bnxt_rxq.c", which seems for Rxq related
functions, why not add new functions there?

<...>

> @@ -364,3 +369,30 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>  
>  	return nb_tx_pkts;
>  }
> +
> +int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
> +{
> +	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
> +	struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id];
> +
> +	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
> +	txq->tx_deferred_start = false;
> +	PMD_DRV_LOG(DEBUG, "Tx queue started\n");
> +
> +	return 0;
> +}
> +
> +int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
> +{
> +	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
> +	struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id];
> +
> +	/* Handle TX completions */
> +	bnxt_handle_tx_cp(txq);
> +
> +	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
> +	txq->tx_deferred_start = true;
> +	PMD_DRV_LOG(DEBUG, "Tx queue stopped\n");
> +
> +	return 0;
> +}

Similar question for these functions, they seem implemented in txr (Tx Ring ?)
source file, bnxt_txq.c seems better fit, what do you think?

<...>

      reply	other threads:[~2018-01-22 12:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22  6:20 [dpdk-dev] [PATCH 0/5] bnxt patchset Ajit Khaparde
2018-01-22  6:20 ` [dpdk-dev] [PATCH 1/5] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-22 12:22   ` Ferruh Yigit
2018-01-22  6:20 ` [dpdk-dev] [PATCH 2/5] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-22 12:23   ` Ferruh Yigit
2018-01-25 22:47     ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: register for more async events Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-26 17:08         ` Ferruh Yigit
2018-01-26 17:31           ` [dpdk-dev] [PATCH v3 0/7] bnxt patchset Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 1/7] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 2/7] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 3/7] net/bnxt: register for more async events Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 4/7] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 5/7] net/bnxt: support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-26 17:31             ` [dpdk-dev] [PATCH v3 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-26 17:32             ` [dpdk-dev] [PATCH v3 7/7] net/bnxt: fix number of pools for RSS Ajit Khaparde
2018-01-26 18:00             ` [dpdk-dev] [PATCH v3 0/7] bnxt patchset Ferruh Yigit
2018-01-26 17:33           ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-25 22:47       ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix number of pools for RSS Ajit Khaparde
2018-01-26 17:35       ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit
2018-01-26 17:37         ` Ferruh Yigit
2018-01-22  6:20 ` [dpdk-dev] [PATCH 3/5] net/bnxt: register for more async events Ajit Khaparde
2018-01-22  6:20 ` [dpdk-dev] [PATCH 4/5] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-22 12:26   ` Ferruh Yigit
2018-01-22  6:20 ` [dpdk-dev] [PATCH 5/5] net/bnxt: Support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-22 12:25   ` Ferruh Yigit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0bf4b23f-58b1-3b1e-ed6c-a4318d6c3caf@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=somnath.kotur@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).