* [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API
@ 2020-03-02 8:16 asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API asomalap
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: asomalap @ 2020-03-02 8:16 UTC (permalink / raw)
To: dev; +Cc: Ravi1.Kumar
From: Amaranath Somalapuram <asomalap@amd.com>
Adding API for axgbe_rxq_info_get, axgbe_txq_info_get
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index d0b6f091f..887b4829d 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -44,6 +44,10 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
static int axgbe_dev_xstats_reset(struct rte_eth_dev *dev);
static int axgbe_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
+static void axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_rxq_info *qinfo);
+static void axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_txq_info *qinfo);
struct axgbe_xstats {
char name[RTE_ETH_XSTATS_NAME_SIZE];
@@ -170,6 +174,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
.rx_queue_release = axgbe_dev_rx_queue_release,
.tx_queue_setup = axgbe_dev_tx_queue_setup,
.tx_queue_release = axgbe_dev_tx_queue_release,
+ .rxq_info_get = axgbe_rxq_info_get,
+ .txq_info_get = axgbe_txq_info_get,
};
static int axgbe_phy_reset(struct axgbe_port *pdata)
@@ -816,6 +822,30 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
return 0;
}
+void
+axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_rxq_info *qinfo)
+{
+ struct axgbe_rx_queue *rxq;
+
+ rxq = dev->data->rx_queues[queue_id];
+ qinfo->mp = rxq->mb_pool;
+ qinfo->scattered_rx = dev->data->scattered_rx;
+ qinfo->nb_desc = rxq->nb_desc;
+ qinfo->conf.rx_free_thresh = rxq->free_thresh;
+}
+
+void
+axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_txq_info *qinfo)
+{
+ struct axgbe_tx_queue *txq;
+
+ txq = dev->data->tx_queues[queue_id];
+ qinfo->nb_desc = txq->nb_desc;
+ qinfo->conf.tx_free_thresh = txq->free_thresh;
+}
+
static void axgbe_get_all_hw_features(struct axgbe_port *pdata)
{
unsigned int mac_hfr0, mac_hfr1, mac_hfr2;
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API
2020-03-02 8:16 [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API asomalap
@ 2020-03-02 8:16 ` asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 3/3] net/axgbe: support for rxq and txq descriptor status API asomalap
2020-03-14 18:16 ` [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API Kumar, Ravi1
2 siblings, 0 replies; 7+ messages in thread
From: asomalap @ 2020-03-02 8:16 UTC (permalink / raw)
To: dev; +Cc: Ravi1.Kumar
From: Amaranath Somalapuram <asomalap@amd.com>
Adding api for eth_dev_supported_ptypes_get_t
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 37 ++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 887b4829d..70b198f79 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -48,6 +48,7 @@ static void axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
struct rte_eth_rxq_info *qinfo);
static void axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
struct rte_eth_txq_info *qinfo);
+const uint32_t *axgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev);
struct axgbe_xstats {
char name[RTE_ETH_XSTATS_NAME_SIZE];
@@ -176,6 +177,7 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
.tx_queue_release = axgbe_dev_tx_queue_release,
.rxq_info_get = axgbe_rxq_info_get,
.txq_info_get = axgbe_txq_info_get,
+ .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get,
};
static int axgbe_phy_reset(struct axgbe_port *pdata)
@@ -845,6 +847,41 @@ axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
qinfo->nb_desc = txq->nb_desc;
qinfo->conf.tx_free_thresh = txq->free_thresh;
}
+const uint32_t *
+axgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+{
+ static const uint32_t ptypes[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L2_ETHER_TIMESYNC,
+ RTE_PTYPE_L2_ETHER_LLDP,
+ RTE_PTYPE_L2_ETHER_ARP,
+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_L4_FRAG,
+ RTE_PTYPE_L4_ICMP,
+ RTE_PTYPE_L4_NONFRAG,
+ RTE_PTYPE_L4_SCTP,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_TUNNEL_GRENAT,
+ RTE_PTYPE_TUNNEL_IP,
+ RTE_PTYPE_INNER_L2_ETHER,
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN,
+ RTE_PTYPE_INNER_L4_FRAG,
+ RTE_PTYPE_INNER_L4_ICMP,
+ RTE_PTYPE_INNER_L4_NONFRAG,
+ RTE_PTYPE_INNER_L4_SCTP,
+ RTE_PTYPE_INNER_L4_TCP,
+ RTE_PTYPE_INNER_L4_UDP,
+ RTE_PTYPE_UNKNOWN
+ };
+
+ if (dev->rx_pkt_burst == axgbe_recv_pkts)
+ return ptypes;
+ return NULL;
+}
static void axgbe_get_all_hw_features(struct axgbe_port *pdata)
{
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v1 3/3] net/axgbe: support for rxq and txq descriptor status API
2020-03-02 8:16 [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API asomalap
@ 2020-03-02 8:16 ` asomalap
2020-03-14 18:16 ` [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API Kumar, Ravi1
2 siblings, 0 replies; 7+ messages in thread
From: asomalap @ 2020-03-02 8:16 UTC (permalink / raw)
To: dev; +Cc: Ravi1.Kumar
From: Amaranath Somalapuram <asomalap@amd.com>
Adding API axgbe_dev_rx_descriptor_status, axgbe_dev_tx_descriptor_status
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 2 ++
drivers/net/axgbe/axgbe_rxtx.c | 46 ++++++++++++++++++++++++++++++++
drivers/net/axgbe/axgbe_rxtx.h | 2 ++
3 files changed, 50 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 70b198f79..58facee6a 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -178,6 +178,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
.rxq_info_get = axgbe_rxq_info_get,
.txq_info_get = axgbe_txq_info_get,
.dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get,
+ .rx_descriptor_status = axgbe_dev_rx_descriptor_status,
+ .tx_descriptor_status = axgbe_dev_tx_descriptor_status,
};
static int axgbe_phy_reset(struct axgbe_port *pdata)
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 96055c25b..cd02bc044 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -673,3 +673,49 @@ void axgbe_dev_clear_queues(struct rte_eth_dev *dev)
}
}
}
+
+int
+axgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
+{
+ struct axgbe_rx_queue *rxq = rx_queue;
+ volatile union axgbe_rx_desc *desc;
+ uint16_t idx;
+
+
+ if (unlikely(offset >= rxq->nb_desc))
+ return -EINVAL;
+
+ if (offset >= rxq->nb_desc - rxq->dirty)
+ return RTE_ETH_RX_DESC_UNAVAIL;
+
+ idx = AXGBE_GET_DESC_IDX(rxq, rxq->cur);
+ desc = &rxq->desc[idx + offset];
+
+ if (!AXGMAC_GET_BITS_LE(desc->write.desc3, RX_NORMAL_DESC3, OWN))
+ return RTE_ETH_RX_DESC_DONE;
+
+ return RTE_ETH_RX_DESC_AVAIL;
+}
+
+int
+axgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset)
+{
+ struct axgbe_tx_queue *txq = tx_queue;
+ volatile struct axgbe_tx_desc *desc;
+ uint16_t idx;
+
+
+ if (unlikely(offset >= txq->nb_desc))
+ return -EINVAL;
+
+ if (offset >= txq->nb_desc - txq->dirty)
+ return RTE_ETH_TX_DESC_UNAVAIL;
+
+ idx = AXGBE_GET_DESC_IDX(txq, txq->dirty + txq->free_batch_cnt - 1);
+ desc = &txq->desc[idx + offset];
+
+ if (!AXGMAC_GET_BITS_LE(desc->desc3, TX_NORMAL_DESC3, OWN))
+ return RTE_ETH_TX_DESC_DONE;
+
+ return RTE_ETH_TX_DESC_FULL;
+}
diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h
index a21537df9..933312078 100644
--- a/drivers/net/axgbe/axgbe_rxtx.h
+++ b/drivers/net/axgbe/axgbe_rxtx.h
@@ -183,5 +183,7 @@ uint16_t axgbe_recv_pkts_threshold_refresh(void *rx_queue,
struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
void axgbe_dev_clear_queues(struct rte_eth_dev *dev);
+int axgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
+int axgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
#endif /* _AXGBE_RXTX_H_ */
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API
2020-03-02 8:16 [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 3/3] net/axgbe: support for rxq and txq descriptor status API asomalap
@ 2020-03-14 18:16 ` Kumar, Ravi1
2020-03-16 13:32 ` Ferruh Yigit
2 siblings, 1 reply; 7+ messages in thread
From: Kumar, Ravi1 @ 2020-03-14 18:16 UTC (permalink / raw)
To: Somalapuram, Amaranath, dev; +Cc: ferruh.yigit
[AMD Public Use]
For series,
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
>From: Amaranath Somalapuram <asomalap@amd.com>
>
>Adding API for axgbe_rxq_info_get, axgbe_txq_info_get
>
>Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
>---
> drivers/net/axgbe/axgbe_ethdev.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
>diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
>index d0b6f091f..887b4829d 100644
>--- a/drivers/net/axgbe/axgbe_ethdev.c
>+++ b/drivers/net/axgbe/axgbe_ethdev.c
>@@ -44,6 +44,10 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, static int axgbe_dev_xstats_reset(struct rte_eth_dev *dev); static int axgbe_dev_info_get(struct rte_eth_dev *dev,
> struct rte_eth_dev_info *dev_info);
>+static void axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
>+ struct rte_eth_rxq_info *qinfo);
>+static void axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
>+ struct rte_eth_txq_info *qinfo);
>
> struct axgbe_xstats {
> char name[RTE_ETH_XSTATS_NAME_SIZE];
>@@ -170,6 +174,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
> .rx_queue_release = axgbe_dev_rx_queue_release,
> .tx_queue_setup = axgbe_dev_tx_queue_setup,
> .tx_queue_release = axgbe_dev_tx_queue_release,
>+ .rxq_info_get = axgbe_rxq_info_get,
>+ .txq_info_get = axgbe_txq_info_get,
> };
>
> static int axgbe_phy_reset(struct axgbe_port *pdata) @@ -816,6 +822,30 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
> return 0;
> }
>
>+void
>+axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
>+ struct rte_eth_rxq_info *qinfo)
>+{
>+ struct axgbe_rx_queue *rxq;
>+
>+ rxq = dev->data->rx_queues[queue_id];
>+ qinfo->mp = rxq->mb_pool;
>+ qinfo->scattered_rx = dev->data->scattered_rx;
>+ qinfo->nb_desc = rxq->nb_desc;
>+ qinfo->conf.rx_free_thresh = rxq->free_thresh; }
>+
>+void
>+axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
>+ struct rte_eth_txq_info *qinfo)
>+{
>+ struct axgbe_tx_queue *txq;
>+
>+ txq = dev->data->tx_queues[queue_id];
>+ qinfo->nb_desc = txq->nb_desc;
>+ qinfo->conf.tx_free_thresh = txq->free_thresh; }
>+
> static void axgbe_get_all_hw_features(struct axgbe_port *pdata) {
> unsigned int mac_hfr0, mac_hfr1, mac_hfr2;
>--
>2.17.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API
2020-03-14 18:16 ` [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API Kumar, Ravi1
@ 2020-03-16 13:32 ` Ferruh Yigit
0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2020-03-16 13:32 UTC (permalink / raw)
To: Kumar, Ravi1, Somalapuram, Amaranath, dev
On 3/14/2020 6:16 PM, Kumar, Ravi1 wrote:
> [AMD Public Use]
<...>
>
>> From: Amaranath Somalapuram <asomalap@amd.com>
>>
>> Adding API for axgbe_rxq_info_get, axgbe_txq_info_get
>>
>> Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
>
> For series,
> Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API
2020-02-28 10:44 asomalap
@ 2020-02-28 12:23 ` Ferruh Yigit
0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2020-02-28 12:23 UTC (permalink / raw)
To: asomalap, dev; +Cc: Ravi1.Kumar
On 2/28/2020 10:44 AM, asomalap@amd.com wrote:
> From: Amaranath Somalapuram <asomalap@amd.com>
>
> Adding API for axgbe_rxq_info_get, axgbe_txq_info_get
>
> Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
Hi Amaranath,
I guess you are sending patches one by one, which each end up being a new
thread, makes harder for the maintainer to follow them.
Can you please double check the "Contributing Code to DPDK":
https://doc.dpdk.org/guides/contributing/patches.html
''Shallow threading (--thread --no-chain-reply-to) is preferred for a patch
series.''
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API
@ 2020-02-28 10:44 asomalap
2020-02-28 12:23 ` Ferruh Yigit
0 siblings, 1 reply; 7+ messages in thread
From: asomalap @ 2020-02-28 10:44 UTC (permalink / raw)
To: dev; +Cc: Ravi1.Kumar
From: Amaranath Somalapuram <asomalap@amd.com>
Adding API for axgbe_rxq_info_get, axgbe_txq_info_get
Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index d0b6f091f..887b4829d 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -44,6 +44,10 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
static int axgbe_dev_xstats_reset(struct rte_eth_dev *dev);
static int axgbe_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
+static void axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_rxq_info *qinfo);
+static void axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_txq_info *qinfo);
struct axgbe_xstats {
char name[RTE_ETH_XSTATS_NAME_SIZE];
@@ -170,6 +174,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
.rx_queue_release = axgbe_dev_rx_queue_release,
.tx_queue_setup = axgbe_dev_tx_queue_setup,
.tx_queue_release = axgbe_dev_tx_queue_release,
+ .rxq_info_get = axgbe_rxq_info_get,
+ .txq_info_get = axgbe_txq_info_get,
};
static int axgbe_phy_reset(struct axgbe_port *pdata)
@@ -816,6 +822,30 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
return 0;
}
+void
+axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_rxq_info *qinfo)
+{
+ struct axgbe_rx_queue *rxq;
+
+ rxq = dev->data->rx_queues[queue_id];
+ qinfo->mp = rxq->mb_pool;
+ qinfo->scattered_rx = dev->data->scattered_rx;
+ qinfo->nb_desc = rxq->nb_desc;
+ qinfo->conf.rx_free_thresh = rxq->free_thresh;
+}
+
+void
+axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+ struct rte_eth_txq_info *qinfo)
+{
+ struct axgbe_tx_queue *txq;
+
+ txq = dev->data->tx_queues[queue_id];
+ qinfo->nb_desc = txq->nb_desc;
+ qinfo->conf.tx_free_thresh = txq->free_thresh;
+}
+
static void axgbe_get_all_hw_features(struct axgbe_port *pdata)
{
unsigned int mac_hfr0, mac_hfr1, mac_hfr2;
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-16 13:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 8:16 [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API asomalap
2020-03-02 8:16 ` [dpdk-dev] [PATCH v1 3/3] net/axgbe: support for rxq and txq descriptor status API asomalap
2020-03-14 18:16 ` [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info API Kumar, Ravi1
2020-03-16 13:32 ` Ferruh Yigit
-- strict thread matches above, loose matches on Subject: below --
2020-02-28 10:44 asomalap
2020-02-28 12:23 ` Ferruh Yigit
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).