From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 5/8] net/bnxt: add support for tx_descriptor_status
Date: Thu, 24 Aug 2017 11:29:53 -0500 [thread overview]
Message-ID: <20170824162956.62761-7-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20170824162956.62761-1-ajit.khaparde@broadcom.com>
add support for tx_descriptor_status dev_op
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1b8e4a9..088cf6a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1586,6 +1586,31 @@ bnxt_rx_descriptor_done_op(void *rx_queue, uint16_t offset)
return !!(CMP_VALID(rxcmp, offset, cpr->cp_ring_struct));
}
+static int
+bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
+{
+ struct bnxt_tx_queue *txq = (struct bnxt_tx_queue *)tx_queue;
+ struct bnxt_cp_ring_info *cpr;
+ struct tx_pkt_cmpl *txcmp;
+ uint32_t cons;
+
+ if (!txq)
+ return -EINVAL;
+
+ cpr = txq->cp_ring;
+
+ if (offset >= txq->nb_tx_desc)
+ return -EINVAL;
+
+ cons = RING_CMP(cpr->cp_ring_struct, offset);
+ txcmp = (struct tx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
+
+ if (CMP_VALID(txcmp, offset, cpr->cp_ring_struct))
+ return RTE_ETH_TX_DESC_DONE;
+
+ return RTE_ETH_TX_DESC_FULL;
+}
+
/*
* Initialization
*/
@@ -1638,6 +1663,7 @@ static const struct eth_dev_ops bnxt_dev_ops = {
.rx_queue_count = bnxt_rx_queue_count_op,
.rx_descriptor_status = bnxt_rx_descriptor_status_op,
.rx_descriptor_done = bnxt_rx_descriptor_done_op,
+ .tx_descriptor_status = bnxt_tx_descriptor_status_op,
};
static bool bnxt_vf_pciid(uint16_t id)
--
2.10.1 (Apple Git-78)
next prev parent reply other threads:[~2017-08-24 16:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 16:29 [dpdk-dev] [PATCH 0/8] bnxt patchset Ajit Khaparde
2017-08-24 16:29 ` [dpdk-dev] [PATCH 1/8] net/bnxt: add support for xstats get by id Ajit Khaparde
2017-08-29 16:10 ` Ferruh Yigit
2017-08-24 16:29 ` [dpdk-dev] [PATCH 2/8] net/bnxt: add support for rx_queue_count Ajit Khaparde
2017-08-29 16:10 ` Ferruh Yigit
2017-08-24 16:29 ` [dpdk-dev] [PATCH 3/8] net/bnxt: add support for rx_descriptor_status Ajit Khaparde
2017-08-29 16:11 ` Ferruh Yigit
2017-08-24 16:29 ` [dpdk-dev] [PATCH 4/8] net/bnxt: add support for rx_descriptor_done Ajit Khaparde
2017-08-29 16:11 ` Ferruh Yigit
2017-08-24 16:29 ` Ajit Khaparde [this message]
2017-08-29 16:12 ` [dpdk-dev] [PATCH 5/8] net/bnxt: add support for tx_descriptor_status Ferruh Yigit
2017-08-24 16:29 ` [dpdk-dev] [PATCH 6/8] net/bnxt: add new HWRM structures Ajit Khaparde
2017-08-24 16:29 ` [dpdk-dev] [PATCH 7/8] net/bnxt: fix HWRM_*() macros and locking Ajit Khaparde
2017-08-29 16:12 ` Ferruh Yigit
2017-08-24 16:29 ` [dpdk-dev] [PATCH 8/8] net/bnxt: add support for flow filter ops Ajit Khaparde
2017-08-29 16:16 ` Ferruh Yigit
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=20170824162956.62761-7-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
/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).