summaryrefslogtreecommitdiff
path: root/drivers/net/ena
diff options
context:
space:
mode:
authorRafal Kozik <rk@semihalf.com>2018-06-07 11:43:11 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2018-06-14 19:27:50 +0200
commit92680dc220a072e2776a862fa2b6f61cb8767944 (patch)
treeabd16c9fb97083e928c8ac0f156699c46811560f /drivers/net/ena
parent2061fe41f212a804ec76b9afedc12c8c982dc96d (diff)
downloaddpdk-next-eventdev-92680dc220a072e2776a862fa2b6f61cb8767944.zip
dpdk-next-eventdev-92680dc220a072e2776a862fa2b6f61cb8767944.tar.gz
dpdk-next-eventdev-92680dc220a072e2776a862fa2b6f61cb8767944.tar.xz
net/ena: add info about max number of Tx/Rx descriptors
In function ena_infos_get driver provides information about minimal and maximal number of Rx and Tx descriptors. Signed-off-by: Rafal Kozik <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
Diffstat (limited to 'drivers/net/ena')
-rw-r--r--drivers/net/ena/ena_ethdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index cdefcd3..a88de2e 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -85,6 +85,9 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define ENA_MAX_RING_DESC ENA_DEFAULT_RING_SIZE
+#define ENA_MIN_RING_DESC 128
+
enum ethtool_stringset {
ETH_SS_TEST = 0,
ETH_SS_STATS,
@@ -1740,6 +1743,16 @@ static void ena_infos_get(struct rte_eth_dev *dev,
adapter->tx_supported_offloads = tx_feat;
adapter->rx_supported_offloads = rx_feat;
+
+ dev_info->rx_desc_lim.nb_max = ENA_MAX_RING_DESC;
+ dev_info->rx_desc_lim.nb_min = ENA_MIN_RING_DESC;
+
+ dev_info->tx_desc_lim.nb_max = ENA_MAX_RING_DESC;
+ dev_info->tx_desc_lim.nb_min = ENA_MIN_RING_DESC;
+ dev_info->tx_desc_lim.nb_seg_max = RTE_MIN(ENA_PKT_MAX_BUFS,
+ feat.max_queues.max_packet_tx_descs);
+ dev_info->tx_desc_lim.nb_mtu_seg_max = RTE_MIN(ENA_PKT_MAX_BUFS,
+ feat.max_queues.max_packet_tx_descs);
}
static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,