public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC 0/2] rte_flow API unit testing via null PMD
Date: Mon,  9 Feb 2026 12:05:41 -0800	[thread overview]
Message-ID: <20260209200648.182725-1-stephen@networkplumber.org> (raw)

The rte_flow API is an important DPDK interface but has no dedicated
unit tests. This series adds stub flow ops to the null PMD and a test
suite that exercises the public API without requiring hardware.

Patch 1 adds flow_ops to net_null that validate input structure and
reject all rules with specific error types and cause pointers.

Patch 2 adds flow_api_autotest with 31 test cases covering basic
operations and error handling.

Limitations:

- Only negative-path behaviour is tested since the null PMD rejects
   all rules. Positive-path coverage requires a PMD that installs
   flows.

 - The async template API, meters, and indirect actions can be
   covered with additional stubs in a follow-up series.

 - Aged flow testing requires a PMD that creates real rules and is
   outside the scope of the null PMD stub approach.

The test code and null PMD stub were generated with AI assistance
(Claude) and reviewed/edited by the author.

Stephen Hemminger (2):
  net/null: add stub flow ops for rte_flow API testing
  app/test: add rte_flow API unit tests

 app/test/meson.build            |    1 +
 app/test/test_flow_api.c        | 1015 +++++++++++++++++++++++++++++++
 drivers/net/null/meson.build    |    6 +-
 drivers/net/null/null_flow.c    |  237 ++++++++
 drivers/net/null/null_flow.h    |   12 +
 drivers/net/null/rte_eth_null.c |   12 +
 6 files changed, 1282 insertions(+), 1 deletion(-)
 create mode 100644 app/test/test_flow_api.c
 create mode 100644 drivers/net/null/null_flow.c
 create mode 100644 drivers/net/null/null_flow.h

-- 
2.51.0


             reply	other threads:[~2026-02-09 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 20:05 Stephen Hemminger [this message]
2026-02-09 20:05 ` [RFC 1/2] net/null: add stub flow ops for rte_flow API testing Stephen Hemminger
2026-02-09 20:05 ` [RFC 2/2] app/test: add rte_flow API unit tests 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=20260209200648.182725-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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