[PATCH v3 1/3] net/null: cleanup info_get
Stephen Hemminger
stephen at networkplumber.org
Thu Jan 8 21:40:46 CET 2026
The info_get callback doesn't need to check its args
since already done by ethdev. The maximum packet size allowed
by this dummy driver is limited only by the maximum values
in mbuf fields.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/net/null/rte_eth_null.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 46e7e7bd8c..3e743a23a9 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -298,17 +298,12 @@ static int
eth_dev_info(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info)
{
- struct pmd_internals *internals;
-
- if ((dev == NULL) || (dev_info == NULL))
- return -EINVAL;
+ struct pmd_internals *internals = dev->data->dev_private;
- internals = dev->data->dev_private;
dev_info->max_mac_addrs = 1;
- dev_info->max_rx_pktlen = (uint32_t)-1;
+ dev_info->max_rx_pktlen = UINT32_MAX;
dev_info->max_rx_queues = RTE_DIM(internals->rx_null_queues);
dev_info->max_tx_queues = RTE_DIM(internals->tx_null_queues);
- dev_info->min_rx_bufsize = 0;
dev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_MULTI_SEGS | RTE_ETH_TX_OFFLOAD_MT_LOCKFREE;
dev_info->reta_size = internals->reta_size;
--
2.51.0
More information about the dev
mailing list