DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: vanshika.shukla@nxp.com
Cc: dev@dpdk.org, Gagandeep Singh <g.singh@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Apeksha Gupta <apeksha.gupta@nxp.com>
Subject: Re: [v1 02/12] net/enetc: Add RX and TX queue APIs for ENETC4 PMD
Date: Wed, 15 Oct 2025 14:42:18 -0700	[thread overview]
Message-ID: <20251015144218.0ae34a17@hermes.local> (raw)
In-Reply-To: <20251009111633.3585957-3-vanshika.shukla@nxp.com>

On Thu,  9 Oct 2025 16:46:23 +0530
vanshika.shukla@nxp.com wrote:

> +int
> +enetc4_tx_queue_setup(struct rte_eth_dev *dev,
> +		     uint16_t queue_idx,
> +		     uint16_t nb_desc,
> +		     unsigned int socket_id __rte_unused,
> +		     const struct rte_eth_txconf *tx_conf)
> +{
> +	int err = 0;
> +	struct enetc_bdr *tx_ring;
> +	struct rte_eth_dev_data *data = dev->data;
> +	struct enetc_eth_adapter *priv =
> +			ENETC_DEV_PRIVATE(data->dev_private);
> +
> +	PMD_INIT_FUNC_TRACE();
> +	if (nb_desc > MAX_BD_COUNT)
> +		return -1;
> +
> +	tx_ring = rte_zmalloc(NULL, sizeof(struct enetc_bdr), 0);
> +	if (tx_ring == NULL) {
> +		ENETC_PMD_ERR("Failed to allocate TX ring memory");
> +		err = -ENOMEM;
> +		return -1;
> +	}
> +
> +	tx_ring->index = queue_idx;
> +	err = enetc4_alloc_txbdr(tx_ring, nb_desc);
> +	if (err)
> +		goto fail;
> +
> +	tx_ring->ndev = dev;
> +	enetc4_setup_txbdr(&priv->hw.hw, tx_ring);
> +	data->tx_queues[queue_idx] = tx_ring;
> +	if (!tx_conf->tx_deferred_start) {
> +		/* enable ring */
> +		enetc4_txbdr_wr(&priv->hw.hw, tx_ring->index,
> +			       ENETC_TBMR, ENETC_TBMR_EN);
> +		dev->data->tx_queue_state[tx_ring->index] =
> +			       RTE_ETH_QUEUE_STATE_STARTED;
> +	} else {
> +		dev->data->tx_queue_state[tx_ring->index] =
> +			       RTE_ETH_QUEUE_STATE_STOPPED;
> +	}
> +

Max line length is now 100 so could be on one line here.

  parent reply	other threads:[~2025-10-15 22:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 11:16 [v1 00/12] ENETC4 PMD support vanshika.shukla
2025-10-09 11:16 ` [v1 01/12] net/enetc: Add initial ENETC4 PMD driver support vanshika.shukla
2025-10-09 16:06   ` Hemant Agrawal
2025-10-15 21:34   ` Stephen Hemminger
2025-10-09 11:16 ` [v1 02/12] net/enetc: Add RX and TX queue APIs for ENETC4 PMD vanshika.shukla
2025-10-15 21:36   ` Stephen Hemminger
2025-10-15 21:42   ` Stephen Hemminger [this message]
2025-10-15 21:43   ` Stephen Hemminger
2025-10-15 21:50   ` Stephen Hemminger
2025-10-09 11:16 ` [v1 03/12] net/enetc: Optimize ENETC4 data path vanshika.shukla
2025-10-09 11:16 ` [v1 04/12] net/enetc: Add TX checksum offload and RX checksum validation vanshika.shukla
2025-10-09 11:16 ` [v1 05/12] net/enetc: Add basic statistics vanshika.shukla
2025-10-09 11:16 ` [v1 06/12] net/enetc: Add packet type parsing support vanshika.shukla
2025-10-09 11:16 ` [v1 07/12] net/enetc: Add support for multiple queues with RSS vanshika.shukla
2025-10-09 11:16 ` [v1 08/12] net/enetc: Add VF to PF messaging support and primary MAC setup vanshika.shukla
2025-10-15 21:53   ` Stephen Hemminger
2025-10-09 11:16 ` [v1 09/12] net/enetc: Add multicast and promiscuous mode support vanshika.shukla
2025-10-09 11:16 ` [v1 10/12] net/enetc: Add link speed and status support vanshika.shukla
2025-10-09 11:16 ` [v1 11/12] net/enetc: Add link status notification support vanshika.shukla
2025-10-09 11:16 ` [v1 12/12] net/enetc: Add MAC and VLAN filter support vanshika.shukla
2025-10-15 22:10 ` [v1 00/12] ENETC4 PMD support Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2024-10-18  7:26 vanshika.shukla
2024-10-18  7:26 ` [v1 02/12] net/enetc: Add RX and TX queue APIs for ENETC4 PMD vanshika.shukla
2024-10-20 23:40   ` Stephen Hemminger

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=20251015144218.0ae34a17@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=apeksha.gupta@nxp.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=sachin.saxena@nxp.com \
    --cc=vanshika.shukla@nxp.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).