From: Sunil Kumar Kori Date: Mon, 27 May 2019 08:35:28 +0000 (+0530) Subject: ethdev: add default value for max segment X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a79e3088cab58f01ddfbf937c193a37154ac5296;p=dpdk.git ethdev: add default value for max segment 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 Acked-by: Andrew Rybchenko --- diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index e54239cb6b..8ac301608b 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -2548,6 +2548,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) .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 6ed560cda1..a8a4a7f845 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -2333,6 +2333,8 @@ void rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr); * .nb_max = UINT16_MAX, * .nb_min = 0, * .nb_align = 1, + * .nb_seg_max = UINT16_MAX, + * .nb_mtu_seg_max = UINT16_MAX, * }; * * device = dev->device