From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Tetsuya Mukawa <mtetsuyah@gmail.com>
Subject: [PATCH v3 1/3] net/null: cleanup info_get
Date: Thu, 8 Jan 2026 12:40:46 -0800 [thread overview]
Message-ID: <20260108204449.176087-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20260108204449.176087-1-stephen@networkplumber.org>
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@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
next prev parent reply other threads:[~2026-01-08 20:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-04 22:25 [PATCH] test: add a test for null PMD Stephen Hemminger
2026-01-05 14:49 ` Marat Khalili
2026-01-05 17:38 ` Stephen Hemminger
2026-01-06 16:47 ` [PATCH v2 0/2] net/null: add a test Stephen Hemminger
2026-01-06 16:47 ` [PATCH v2 1/2] test: add a test for null PMD Stephen Hemminger
2026-01-06 17:40 ` Marat Khalili
2026-01-06 18:01 ` Stephen Hemminger
2026-01-06 16:47 ` [PATCH v2 2/2] net/null: revise info_get Stephen Hemminger
2026-01-08 20:40 ` [PATCH v3 0/3] test: new test for null PMD Stephen Hemminger
2026-01-08 20:40 ` Stephen Hemminger [this message]
2026-01-08 20:40 ` [PATCH v3 2/3] test: allow larger packet sizes Stephen Hemminger
2026-01-09 15:00 ` Morten Brørup
2026-01-10 17:21 ` Stephen Hemminger
2026-01-08 20:40 ` [PATCH v3 3/3] test: add a test for null PMD Stephen Hemminger
2026-01-09 1:21 ` Stephen Hemminger
2026-01-10 17:22 ` [PATCH v4 0/3] null pmd minor cleanup and add test Stephen Hemminger
2026-01-10 17:22 ` [PATCH v4 1/3] net/null: cleanup info_get Stephen Hemminger
2026-01-10 17:22 ` [PATCH v4 2/3] test: generate larger packet bursts Stephen Hemminger
2026-01-10 17:22 ` [PATCH v4 3/3] test: add a test for null PMD Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260108204449.176087-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=mtetsuyah@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).