[dpdk-dev] [PATCH 1/2] lib/librte_ethdev: add in default value of rte_eth_dev_info
Sunil Kumar Kori
skori at marvell.com
Mon May 27 10:35:28 CEST 2019
rte_eth_dev_info structure exposes, nb_seg_max & nb_mtu_seg_max
to provide maximum number of supported segments for a given platform.
Defining UINT16_MAX as default value of above mentioned variables to
expose support of infinite/maximum segments.
Based on above values, application can decide best size for buffers
while creating mbuf pool.
Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
---
lib/librte_ethdev/rte_ethdev.c | 2 ++
lib/librte_ethdev/rte_ethdev.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index d7cfa3d..6933757 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2543,6 +2543,8 @@ struct rte_eth_dev *
.nb_max = UINT16_MAX,
.nb_min = 0,
.nb_align = 1,
+ .nb_seg_max = UINT16_MAX,
+ .nb_mtu_seg_max = UINT16_MAX,
};
RTE_ETH_VALID_PORTID_OR_RET(port_id);
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 1f35e1d..6bd30b1 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2333,6 +2333,8 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
* .nb_max = UINT16_MAX,
* .nb_min = 0,
* .nb_align = 1,
+ * .nb_seg_max = UINT16_MAX,
+ * .nb_mtu_seg_max = UINT16_MAX,
* };
*
* device = dev->device
--
1.8.3.1
More information about the dev
mailing list