* [PATCH v2 2/4] net/bonding: check mode before setting dedicated queues
From: Stephen Hemminger @ 2026-05-28 23:59 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, stable, Chas Williams, Min Hu (Connor),
Declan Doherty, Tomasz Kulasek
In-Reply-To: <20260529000157.235931-1-stephen@networkplumber.org>
The calls to enable and disable dedicated queues are missing
check for mode.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index eba713e381..d1f30229d0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1725,7 +1725,6 @@ RTE_EXPORT_SYMBOL(rte_eth_bond_8023ad_dedicated_queues_enable)
int
rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
{
- int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
@@ -1742,17 +1741,19 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
if (dev->data->dev_started)
return -1;
+ if (internals->mode != BONDING_MODE_8023AD)
+ return -1;
+
internals->mode4.dedicated_queues.enabled = 1;
bond_ethdev_mode_set(dev, internals->mode);
- return retval;
+ return 0;
}
RTE_EXPORT_SYMBOL(rte_eth_bond_8023ad_dedicated_queues_disable)
int
rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
{
- int retval = 0;
struct rte_eth_dev *dev;
struct bond_dev_private *internals;
@@ -1766,9 +1767,12 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
if (dev->data->dev_started)
return -1;
+ if (internals->mode != BONDING_MODE_8023AD)
+ return -1;
+
internals->mode4.dedicated_queues.enabled = 0;
bond_ethdev_mode_set(dev, internals->mode);
- return retval;
+ return 0;
}
--
2.53.0
^ permalink raw reply related
* [PATCH v2 1/4] net/bonding: make 8023ad enable function void
From: Stephen Hemminger @ 2026-05-28 23:59 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Chas Williams, Min Hu (Connor)
In-Reply-To: <20260529000157.235931-1-stephen@networkplumber.org>
The function never returns an error. Cleanup the call sites.
The 8023ad disable function was never implemented,
remove prototype.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bonding/eth_bond_8023ad_private.h | 17 +----------------
drivers/net/bonding/rte_eth_bond_8023ad.c | 4 +---
drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++----
3 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/drivers/net/bonding/eth_bond_8023ad_private.h b/drivers/net/bonding/eth_bond_8023ad_private.h
index ab7d15f81a..bd7a5848de 100644
--- a/drivers/net/bonding/eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/eth_bond_8023ad_private.h
@@ -209,25 +209,10 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
* @internal
*
* Enables 802.1AX mode and all active members on bonding interface.
- *
- * @param dev Bonding interface
- * @return
- * 0 on success, negative value otherwise.
*/
-int
+void
bond_mode_8023ad_enable(struct rte_eth_dev *dev);
-/**
- * @internal
- *
- * Disables 802.1AX mode of the bonding interface and members.
- *
- * @param dev Bonding interface
- * @return
- * 0 on success, negative value otherwise.
- */
-int bond_mode_8023ad_disable(struct rte_eth_dev *dev);
-
/**
* @internal
*
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index ba88f6d261..eba713e381 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1287,7 +1287,7 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
bond_mode_8023ad_start(dev);
}
-int
+void
bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
{
struct bond_dev_private *internals = bond_dev->data->dev_private;
@@ -1296,8 +1296,6 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
for (i = 0; i < internals->active_member_count; i++)
bond_mode_8023ad_activate_member(bond_dev,
internals->active_members[i]);
-
- return 0;
}
int
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 96725071da..7fcb3ec7d7 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1619,8 +1619,7 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
eth_dev->rx_pkt_burst = bond_ethdev_rx_burst;
break;
case BONDING_MODE_8023AD:
- if (bond_mode_8023ad_enable(eth_dev) != 0)
- return -1;
+ bond_mode_8023ad_enable(eth_dev);
if (internals->mode4.dedicated_queues.enabled == 0) {
eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_8023ad;
@@ -1641,13 +1640,13 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_active_backup;
break;
case BONDING_MODE_ALB:
- if (bond_mode_alb_enable(eth_dev) != 0)
- return -1;
+ bond_mode_alb_enable(eth_dev);
eth_dev->tx_pkt_burst = bond_ethdev_tx_burst_alb;
eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_alb;
break;
default:
+ RTE_BOND_LOG(ERR, "Invalid mode %#x", mode);
return -1;
}
--
2.53.0
^ permalink raw reply related
* [PATCH v2 0/4] net/bond: fixes and cleanup
From: Stephen Hemminger @ 2026-05-28 23:59 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
In-Reply-To: <20260417165530.653328-1-stephen@networkplumber.org>
Automated analysis of the bonding found a few minor things.
The bug fix is in patch 3 for secondary process crash does rx/tx.
The cleanups are in handling of 8023ad mode setting
and the logging macros.
v2 - feedback about the mode setting and log messages
Stephen Hemminger (4):
net/bonding: make 8023ad enable function void
net/bonding: check mode before setting dedicated queues
net/bonding: prevent crash on Rx/Tx from secondary process
net/bonding: remove redundant function names from log
drivers/net/bonding/eth_bond_8023ad_private.h | 17 +----
drivers/net/bonding/rte_eth_bond_8023ad.c | 16 ++--
drivers/net/bonding/rte_eth_bond_api.c | 4 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 73 ++++++++++++++-----
4 files changed, 67 insertions(+), 43 deletions(-)
--
2.53.0
^ permalink raw reply
* RE: [RFC] doc, devtools: discourage new __rte_always_inline
From: Morten Brørup @ 2026-05-28 21:39 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: Thomas Monjalon
In-Reply-To: <20260527163734.599602-1-stephen@networkplumber.org>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, 27 May 2026 18.38
>
> Modern compilers at -O2 make good inlining decisions for small
> static inline functions; forced inlining via __rte_always_inline
> should be reserved for cases where it is required for correctness
> or for documented measured performance reasons.
>
> Document the policy in the coding style guide and add a
> checkpatches.sh entry that warns when new uses of the attribute
> are introduced.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Plenty of code in DPDK is based on ancient compiler behavior; let's not add new code based on old compiler behavior.
I guess developers keep blindly adding __rte_always_inline, only because it's already everywhere.
Good initiative to stop that bad habit.
Slightly extreme forbidding it in checkpatches.sh, but it's probably the only way to force people to stop and think.
> ---
> devtools/checkpatches.sh | 8 ++++++++
> doc/guides/contributing/coding_style.rst | 25 +++++++++++++++++++++++-
> 2 files changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
> index f5dd77443f..2a3d364178 100755
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -137,6 +137,14 @@ check_forbidden_additions() { # <patch>
> -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk
> \
> "$1" || res=1
>
> + # forbid new use of __rte_always_inline
> + awk -v FOLDERS="lib drivers app examples" \
> + -v EXPRESSIONS='\\<__rte_always_inline\\>' \
> + -v RET_ON_FAIL=1 \
> + -v MESSAGE='Adding __rte_always_inline; prefer plain
> inline' \
> + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk
> \
> + "$1" || res=1
> +
> # refrain from using compiler __rte_atomic_thread_fence()
> # It should be avoided on x86 for SMP case.
> awk -v FOLDERS="lib drivers app examples" \
> diff --git a/doc/guides/contributing/coding_style.rst
> b/doc/guides/contributing/coding_style.rst
> index 243a3c2959..97e459853c 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -747,11 +747,34 @@ Static Variables and Functions
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> * All functions and variables that are local to a file must be
> declared as ``static`` because it can often help the compiler to do
> some optimizations (such as, inlining the code).
> -* Functions that should be inlined should to be declared as ``static
> inline`` and can be defined in a .c or a .h file.
> +* Functions that should be inlined should be declared as ``static
> inline`` and can be defined in a .c or a .h file.
>
> .. note::
> Static functions defined in a header file must be declared as
> ``static inline`` in order to prevent compiler warnings about the
> function being unused.
>
> +Use of ``__rte_always_inline``
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +The ``__rte_always_inline`` attribute forces the compiler to inline a
> function regardless of its size or call-graph heuristics.
> +Prefer plain ``inline`` (or no annotation at all for static functions)
> and let the compiler decide.
> +Modern compilers at ``-O2`` make good inlining decisions for small
> ``static inline`` functions in headers,
> +and forced inlining can hurt performance by inflating function bodies,
> increasing register pressure, and overriding profile-guided
> optimization.
> +
> +``__rte_always_inline`` should only be used when one of the following
> applies:
> +
> +* The function contains ``__builtin_constant_p`` checks that gate a
__builtin_constant_p -> __rte_constant
> constant-folded fast path, and the optimization is lost if the function
> is not inlined into the caller.
> + Examples include byte-order helpers and length-dispatched
> copy/compare routines.
> +
> +* The function wraps inline assembly or a compiler intrinsic whose
> correctness depends on being inlined into the caller's register context
> (for example, intrinsics requiring a compile-time constant argument).
> +
> +* Measurement on a representative workload shows that the annotation
> is required to retain performance, and the reason is documented in the
> commit message that introduces it.
> +
> +Each use must be justified at the point it is introduced. Adding
> ``__rte_always_inline`` because nearby code uses it is not a
> justification;
> +if the constant or intrinsic that requires inlining is several call
> levels up the call chain,
> +restructure the code rather than annotating the entire chain.
Please add something similar to the description of the macro in rte_common.h.
> +
> +The complementary attribute ``__rte_noinline`` is useful for
> explicitly marking cold paths (error handling, initialization, slow-
> path fallbacks) where outlining the function can reduce instruction-
> cache pressure on the hot path.
Same comment:
Please add something similar to the description of the macro in rte_common.h.
<feature creep>
Many macros in rte_common.h have insufficient descriptions.
</feature creep>
> +
> Const Attribute
> ~~~~~~~~~~~~~~~
>
> --
> 2.53.0
With comments above fixed,
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply
* [RFC 8/8] net/txgbe: privatize legacy flow director types
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
The txgbe driver inherited its flow director representation from
ixgbe (it derives from the same hardware lineage) and uses the
same legacy ethdev types (struct rte_eth_fdir_conf, enum
rte_fdir_mode, and related) as its internal IR for translating
rte_flow rules into hardware programming state. These types are
scheduled for removal from ethdev in DPDK 26.11.
Clone the relevant types into txgbe_ethdev.h with a txgbe-private
prefix so the driver no longer depends on the legacy ABI. The
embedded rte_eth_ipv4_flow / rte_eth_ipv6_flow types are cloned
too since they live in the same removal candidate set.
Unlike ixgbe, txgbe base/ does not pre-declare an
enum txgbe_fdir_pballoc_type, so the cloned one is defined here.
txgbe uses the integer value of pballoc directly in the table-
size calculation
(1024 << (fdir_conf->pballoc + 1)) - 2
so the enum values match the original ethdev numbering
(64K=0, 128K=1, 256K=2). pballoc is set explicitly from devargs
in txgbe_handle_devarg(), so no extra initialization is required.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/txgbe/txgbe_ethdev.c | 6 +-
drivers/net/txgbe/txgbe_ethdev.h | 101 +++++++++++++++++++++-
drivers/net/txgbe/txgbe_fdir.c | 78 ++++++++---------
drivers/net/txgbe/txgbe_flow.c | 24 ++---
drivers/net/txgbe/txgbe_rxtx_vec_common.h | 4 +-
5 files changed, 155 insertions(+), 58 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 5d360f8305..258ec4d97c 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -524,7 +524,7 @@ txgbe_handle_devarg(__rte_unused const char *key, const char *value,
static void
txgbe_parse_devargs(struct rte_eth_dev *dev)
{
- struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
+ struct txgbe_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_devargs *devargs = pci_dev->device.devargs;
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
@@ -934,7 +934,7 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev)
int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
{
- struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(eth_dev);
+ struct txgbe_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(eth_dev);
struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(eth_dev);
char fdir_hash_name[RTE_HASH_NAMESIZE];
u16 max_fdir_num = (1024 << (fdir_conf->pballoc + 1)) - 2;
@@ -1834,7 +1834,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)
txgbe_configure_port(dev);
txgbe_configure_dcb(dev);
- if (TXGBE_DEV_FDIR_CONF(dev)->mode != RTE_FDIR_MODE_NONE) {
+ if (TXGBE_DEV_FDIR_CONF(dev)->mode != TXGBE_FDIR_MODE_NONE) {
err = txgbe_fdir_configure(dev);
if (err)
goto error;
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 189fbac541..1f4ce4f3b8 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -83,6 +83,103 @@
/*
* Information about the fdir mode.
*/
+/*
+ * Privatized flow director configuration types.
+ *
+ * Cloned from <rte_eth_ctrl.h> and <ethdev_driver.h> so that txgbe no
+ * longer depends on the legacy ethdev flow director ABI, which is
+ * scheduled for removal in DPDK 26.11. Semantics unchanged; only the
+ * names are txgbe-private.
+ *
+ * NB: txgbe uses the integer value of pballoc directly in
+ * (1024 << (fdir_conf->pballoc + 1)) - 2
+ * to size the HW filter table. The enum values therefore match the
+ * original ethdev numbering (64K=0, 128K=1, 256K=2).
+ */
+#define TXGBE_FDIR_MAX_FLEXLEN 16 /**< Max length of flexbytes. */
+
+struct txgbe_ipv4_flow {
+ uint32_t src_ip;
+ uint32_t dst_ip;
+ uint8_t tos;
+ uint8_t ttl;
+ uint8_t proto;
+};
+
+struct txgbe_ipv6_flow {
+ uint32_t src_ip[4];
+ uint32_t dst_ip[4];
+ uint8_t tc;
+ uint8_t proto;
+ uint8_t hop_limits;
+};
+
+struct txgbe_fdir_masks {
+ uint16_t vlan_tci_mask;
+ struct txgbe_ipv4_flow ipv4_mask;
+ struct txgbe_ipv6_flow ipv6_mask;
+ uint16_t src_port_mask;
+ uint16_t dst_port_mask;
+ uint8_t mac_addr_byte_mask;
+ uint32_t tunnel_id_mask;
+ uint8_t tunnel_type_mask;
+};
+
+enum txgbe_payload_type {
+ TXGBE_PAYLOAD_UNKNOWN = 0,
+ TXGBE_RAW_PAYLOAD,
+ TXGBE_L2_PAYLOAD,
+ TXGBE_L3_PAYLOAD,
+ TXGBE_L4_PAYLOAD,
+ TXGBE_PAYLOAD_MAX = 8,
+};
+
+struct txgbe_flex_payload_cfg {
+ enum txgbe_payload_type type;
+ uint16_t src_offset[TXGBE_FDIR_MAX_FLEXLEN];
+};
+
+struct txgbe_fdir_flex_mask {
+ uint16_t flow_type;
+ uint8_t mask[TXGBE_FDIR_MAX_FLEXLEN];
+};
+
+struct txgbe_fdir_flex_conf {
+ uint16_t nb_payloads;
+ uint16_t nb_flexmasks;
+ struct txgbe_flex_payload_cfg flex_set[TXGBE_PAYLOAD_MAX];
+ struct txgbe_fdir_flex_mask flex_mask[RTE_ETH_FLOW_MAX];
+};
+
+enum txgbe_fdir_mode {
+ TXGBE_FDIR_MODE_NONE = 0,
+ TXGBE_FDIR_MODE_SIGNATURE,
+ TXGBE_FDIR_MODE_PERFECT,
+ TXGBE_FDIR_MODE_PERFECT_MAC_VLAN,
+ TXGBE_FDIR_MODE_PERFECT_TUNNEL,
+};
+
+enum txgbe_fdir_pballoc_type {
+ TXGBE_FDIR_PBALLOC_64K = 0,
+ TXGBE_FDIR_PBALLOC_128K,
+ TXGBE_FDIR_PBALLOC_256K,
+};
+
+enum txgbe_fdir_status_mode {
+ TXGBE_FDIR_NO_REPORT_STATUS = 0,
+ TXGBE_FDIR_REPORT_STATUS,
+ TXGBE_FDIR_REPORT_STATUS_ALWAYS,
+};
+
+struct txgbe_fdir_conf {
+ enum txgbe_fdir_mode mode;
+ enum txgbe_fdir_pballoc_type pballoc;
+ enum txgbe_fdir_status_mode status;
+ uint8_t drop_queue;
+ struct txgbe_fdir_masks mask;
+ struct txgbe_fdir_flex_conf flex_conf;
+};
+
struct txgbe_hw_fdir_mask {
uint16_t vlan_tci_mask;
uint32_t src_ipv4_mask;
@@ -111,7 +208,7 @@ struct txgbe_fdir_rule {
struct txgbe_atr_input input; /* key of fdir filter */
bool b_spec; /* If TRUE, input, fdirflags, queue have meaning. */
bool b_mask; /* If TRUE, mask has meaning. */
- enum rte_fdir_mode mode; /* IP, MAC VLAN, Tunnel */
+ enum txgbe_fdir_mode mode; /* IP, MAC VLAN, Tunnel */
uint32_t fdirflags; /* drop or forward */
uint32_t soft_id; /* an unique value for this rule */
uint8_t queue; /* assigned rx queue */
@@ -352,7 +449,7 @@ struct txgbe_tm_conf {
struct txgbe_adapter {
struct txgbe_hw hw;
struct txgbe_hw_stats stats;
- struct rte_eth_fdir_conf fdir_conf;
+ struct txgbe_fdir_conf fdir_conf;
struct txgbe_hw_fdir_info fdir;
struct txgbe_interrupt intr;
struct txgbe_stat_mappings stat_mappings;
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index 67f586ffc7..ded01341a4 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -102,22 +102,22 @@ txgbe_fdir_enable(struct txgbe_hw *hw, uint32_t fdirctrl)
* flexbytes matching field, and drop queue (only for perfect matching mode).
*/
static inline int
-configure_fdir_flags(const struct rte_eth_fdir_conf *conf,
+configure_fdir_flags(const struct txgbe_fdir_conf *conf,
uint32_t *fdirctrl, uint32_t *flex)
{
*fdirctrl = 0;
*flex = 0;
switch (conf->pballoc) {
- case RTE_ETH_FDIR_PBALLOC_64K:
+ case TXGBE_FDIR_PBALLOC_64K:
/* 8k - 1 signature filters */
*fdirctrl |= TXGBE_FDIRCTL_BUF_64K;
break;
- case RTE_ETH_FDIR_PBALLOC_128K:
+ case TXGBE_FDIR_PBALLOC_128K:
/* 16k - 1 signature filters */
*fdirctrl |= TXGBE_FDIRCTL_BUF_128K;
break;
- case RTE_ETH_FDIR_PBALLOC_256K:
+ case TXGBE_FDIR_PBALLOC_256K:
/* 32k - 1 signature filters */
*fdirctrl |= TXGBE_FDIRCTL_BUF_256K;
break;
@@ -129,14 +129,14 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf,
/* status flags: write hash & swindex in the rx descriptor */
switch (conf->status) {
- case RTE_FDIR_NO_REPORT_STATUS:
+ case TXGBE_FDIR_NO_REPORT_STATUS:
/* do nothing, default mode */
break;
- case RTE_FDIR_REPORT_STATUS:
+ case TXGBE_FDIR_REPORT_STATUS:
/* report status when the packet matches a fdir rule */
*fdirctrl |= TXGBE_FDIRCTL_REPORT_MATCH;
break;
- case RTE_FDIR_REPORT_STATUS_ALWAYS:
+ case TXGBE_FDIR_REPORT_STATUS_ALWAYS:
/* always report status */
*fdirctrl |= TXGBE_FDIRCTL_REPORT_ALWAYS;
break;
@@ -150,9 +150,9 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf,
*flex |= TXGBE_FDIRFLEXCFG_OFST(TXGBE_DEFAULT_FLEXBYTES_OFFSET / 2);
switch (conf->mode) {
- case RTE_FDIR_MODE_SIGNATURE:
+ case TXGBE_FDIR_MODE_SIGNATURE:
break;
- case RTE_FDIR_MODE_PERFECT:
+ case TXGBE_FDIR_MODE_PERFECT:
*fdirctrl |= TXGBE_FDIRCTL_PERFECT;
*fdirctrl |= TXGBE_FDIRCTL_DROPQP(conf->drop_queue);
break;
@@ -179,7 +179,7 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev)
{
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
struct txgbe_hw_fdir_info *info = TXGBE_DEV_FDIR(dev);
- enum rte_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ enum txgbe_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
/*
* mask VM pool and DIPv6 since there are currently not supported
* mask FLEX byte, it will be set in flex_conf
@@ -190,8 +190,8 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- if (mode != RTE_FDIR_MODE_SIGNATURE &&
- mode != RTE_FDIR_MODE_PERFECT) {
+ if (mode != TXGBE_FDIR_MODE_SIGNATURE &&
+ mode != TXGBE_FDIR_MODE_PERFECT) {
PMD_DRV_LOG(ERR, "Not supported fdir mode - %d!", mode);
return -ENOTSUP;
}
@@ -232,14 +232,14 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev)
static int
txgbe_fdir_store_input_mask(struct rte_eth_dev *dev)
{
- struct rte_eth_fdir_masks *input_mask = &TXGBE_DEV_FDIR_CONF(dev)->mask;
- enum rte_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ struct txgbe_fdir_masks *input_mask = &TXGBE_DEV_FDIR_CONF(dev)->mask;
+ enum txgbe_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
struct txgbe_hw_fdir_info *info = TXGBE_DEV_FDIR(dev);
uint16_t dst_ipv6m = 0;
uint16_t src_ipv6m = 0;
- if (mode != RTE_FDIR_MODE_SIGNATURE &&
- mode != RTE_FDIR_MODE_PERFECT) {
+ if (mode != TXGBE_FDIR_MODE_SIGNATURE &&
+ mode != TXGBE_FDIR_MODE_PERFECT) {
PMD_DRV_LOG(ERR, "Not supported fdir mode - %d!", mode);
return -ENOTSUP;
}
@@ -304,12 +304,12 @@ txgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,
static int
txgbe_set_fdir_flex_conf(struct rte_eth_dev *dev, uint32_t flex)
{
- const struct rte_eth_fdir_flex_conf *conf =
+ const struct txgbe_fdir_flex_conf *conf =
&TXGBE_DEV_FDIR_CONF(dev)->flex_conf;
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
struct txgbe_hw_fdir_info *info = TXGBE_DEV_FDIR(dev);
- const struct rte_eth_flex_payload_cfg *flex_cfg;
- const struct rte_eth_fdir_flex_mask *flex_mask;
+ const struct txgbe_flex_payload_cfg *flex_cfg;
+ const struct txgbe_fdir_flex_mask *flex_mask;
uint16_t flexbytes = 0;
uint16_t i;
@@ -322,7 +322,7 @@ txgbe_set_fdir_flex_conf(struct rte_eth_dev *dev, uint32_t flex)
for (i = 0; i < conf->nb_payloads; i++) {
flex_cfg = &conf->flex_set[i];
- if (flex_cfg->type != RTE_ETH_RAW_PAYLOAD) {
+ if (flex_cfg->type != TXGBE_RAW_PAYLOAD) {
PMD_DRV_LOG(ERR, "unsupported payload type.");
return -EINVAL;
}
@@ -375,13 +375,13 @@ txgbe_fdir_configure(struct rte_eth_dev *dev)
int err;
uint32_t fdirctrl, flex, pbsize;
int i;
- enum rte_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ enum txgbe_fdir_mode mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
PMD_INIT_FUNC_TRACE();
/* supports mac-vlan and tunnel mode */
- if (mode != RTE_FDIR_MODE_SIGNATURE &&
- mode != RTE_FDIR_MODE_PERFECT)
+ if (mode != TXGBE_FDIR_MODE_SIGNATURE &&
+ mode != TXGBE_FDIR_MODE_PERFECT)
return -ENOSYS;
err = configure_fdir_flags(TXGBE_DEV_FDIR_CONF(dev), &fdirctrl, &flex);
@@ -531,15 +531,15 @@ txgbe_atr_compute_hash(struct txgbe_atr_input *atr_input,
static uint32_t
atr_compute_perfect_hash(struct txgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc)
+ enum txgbe_fdir_pballoc_type pballoc)
{
uint32_t bucket_hash;
bucket_hash = txgbe_atr_compute_hash(input,
TXGBE_ATR_BUCKET_HASH_KEY);
- if (pballoc == RTE_ETH_FDIR_PBALLOC_256K)
+ if (pballoc == TXGBE_FDIR_PBALLOC_256K)
bucket_hash &= PERFECT_BUCKET_256KB_HASH_MASK;
- else if (pballoc == RTE_ETH_FDIR_PBALLOC_128K)
+ else if (pballoc == TXGBE_FDIR_PBALLOC_128K)
bucket_hash &= PERFECT_BUCKET_128KB_HASH_MASK;
else
bucket_hash &= PERFECT_BUCKET_64KB_HASH_MASK;
@@ -574,15 +574,15 @@ txgbe_fdir_check_cmd_complete(struct txgbe_hw *hw, uint32_t *fdircmd)
*/
static uint32_t
atr_compute_signature_hash(struct txgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc)
+ enum txgbe_fdir_pballoc_type pballoc)
{
uint32_t bucket_hash, sig_hash;
bucket_hash = txgbe_atr_compute_hash(input,
TXGBE_ATR_BUCKET_HASH_KEY);
- if (pballoc == RTE_ETH_FDIR_PBALLOC_256K)
+ if (pballoc == TXGBE_FDIR_PBALLOC_256K)
bucket_hash &= SIG_BUCKET_256KB_HASH_MASK;
- else if (pballoc == RTE_ETH_FDIR_PBALLOC_128K)
+ else if (pballoc == TXGBE_FDIR_PBALLOC_128K)
bucket_hash &= SIG_BUCKET_128KB_HASH_MASK;
else
bucket_hash &= SIG_BUCKET_64KB_HASH_MASK;
@@ -603,7 +603,7 @@ static int
fdir_write_perfect_filter(struct txgbe_hw *hw,
struct txgbe_atr_input *input, uint8_t queue,
uint32_t fdircmd, uint32_t fdirhash,
- enum rte_fdir_mode mode)
+ enum txgbe_fdir_mode mode)
{
uint32_t fdirport, fdirflex;
int err = 0;
@@ -830,14 +830,14 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
bool is_perfect = FALSE;
int err;
struct txgbe_hw_fdir_info *info = TXGBE_DEV_FDIR(dev);
- enum rte_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ enum txgbe_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
struct txgbe_fdir_filter *node;
- if (fdir_mode == RTE_FDIR_MODE_NONE ||
+ if (fdir_mode == TXGBE_FDIR_MODE_NONE ||
fdir_mode != rule->mode)
return -ENOTSUP;
- if (fdir_mode >= RTE_FDIR_MODE_PERFECT)
+ if (fdir_mode >= TXGBE_FDIR_MODE_PERFECT)
is_perfect = TRUE;
txgbe_fdir_mask_input(&info->mask, &rule->input);
@@ -1021,7 +1021,7 @@ txgbevf_fdir_filter_program(struct rte_eth_dev *dev,
uint32_t fdirhash;
int ret;
- if (rule->mode != RTE_FDIR_MODE_PERFECT ||
+ if (rule->mode != TXGBE_FDIR_MODE_PERFECT ||
rule->fdirflags == TXGBE_FDIRPICMD_DROP)
return -ENOTSUP;
@@ -1109,10 +1109,10 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev)
struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(dev);
struct txgbe_fdir_filter *node;
bool is_perfect = FALSE;
- enum rte_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
+ enum txgbe_fdir_mode fdir_mode = TXGBE_DEV_FDIR_CONF(dev)->mode;
- if (fdir_mode >= RTE_FDIR_MODE_PERFECT &&
- fdir_mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
+ if (fdir_mode >= TXGBE_FDIR_MODE_PERFECT &&
+ fdir_mode <= TXGBE_FDIR_MODE_PERFECT_TUNNEL)
is_perfect = TRUE;
if (is_perfect) {
@@ -1139,7 +1139,7 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev)
int
txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
{
- struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
+ struct txgbe_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(dev);
struct txgbe_fdir_filter *fdir_filter;
struct txgbe_fdir_filter *filter_flag;
@@ -1150,7 +1150,7 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
memset(fdir_info->hash_map, 0,
sizeof(struct txgbe_fdir_filter *) *
((1024 << (fdir_conf->pballoc + 1)) - 2));
- fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ fdir_conf->mode = TXGBE_FDIR_MODE_NONE;
filter_flag = TAILQ_FIRST(&fdir_info->fdir_list);
while ((fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list))) {
TAILQ_REMOVE(&fdir_info->fdir_list,
diff --git a/drivers/net/txgbe/txgbe_flow.c b/drivers/net/txgbe/txgbe_flow.c
index a97588e57a..8470bf78af 100644
--- a/drivers/net/txgbe/txgbe_flow.c
+++ b/drivers/net/txgbe/txgbe_flow.c
@@ -1412,7 +1412,7 @@ txgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr,
rule->queue = act_q->index;
} else { /* drop */
/* signature mode does not support drop action. */
- if (rule->mode == RTE_FDIR_MODE_SIGNATURE) {
+ if (rule->mode == TXGBE_FDIR_MODE_SIGNATURE) {
memset(rule, 0, sizeof(struct txgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1646,9 +1646,9 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
}
if (signature_match(pattern))
- rule->mode = RTE_FDIR_MODE_SIGNATURE;
+ rule->mode = TXGBE_FDIR_MODE_SIGNATURE;
else
- rule->mode = RTE_FDIR_MODE_PERFECT;
+ rule->mode = TXGBE_FDIR_MODE_PERFECT;
/*Not supported last point for range*/
if (item->last) {
@@ -1678,7 +1678,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
/* Ether type should be masked. */
if (eth_mask->hdr.ether_type ||
- rule->mode == RTE_FDIR_MODE_SIGNATURE) {
+ rule->mode == TXGBE_FDIR_MODE_SIGNATURE) {
memset(rule, 0, sizeof(struct txgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
@@ -1687,7 +1687,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
}
/* If ethernet has meaning, it means MAC VLAN mode. */
- rule->mode = RTE_FDIR_MODE_PERFECT_MAC_VLAN;
+ rule->mode = TXGBE_FDIR_MODE_PERFECT_MAC_VLAN;
/**
* src MAC address must be masked,
@@ -1718,7 +1718,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,
* IPv6 is not supported.
*/
item = next_no_fuzzy_pattern(pattern, item);
- if (rule->mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
+ if (rule->mode == TXGBE_FDIR_MODE_PERFECT_MAC_VLAN) {
if (item->type != RTE_FLOW_ITEM_TYPE_VLAN) {
memset(rule, 0, sizeof(struct txgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
@@ -2282,7 +2282,7 @@ txgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
return -rte_errno;
}
- rule->mode = RTE_FDIR_MODE_PERFECT;
+ rule->mode = TXGBE_FDIR_MODE_PERFECT;
ptid = TXGBE_PTID_PKT_TUN;
/* Skip MAC. */
@@ -2949,7 +2949,7 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
int ret;
- struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
+ struct txgbe_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
ret = txgbe_parse_fdir_filter_normal(dev, attr, pattern,
actions, rule, error);
@@ -2965,11 +2965,11 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,
if (!txgbe_is_pf(TXGBE_DEV_HW(dev)))
return ret;
- if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
+ if (fdir_conf->mode == TXGBE_FDIR_MODE_NONE) {
fdir_conf->mode = rule->mode;
ret = txgbe_fdir_configure(dev);
if (ret) {
- fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ fdir_conf->mode = TXGBE_FDIR_MODE_NONE;
return ret;
}
} else if (fdir_conf->mode != rule->mode) {
@@ -3562,7 +3562,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev,
struct txgbe_fdir_rule_ele *fdir_rule_ptr;
struct txgbe_flow_mem *txgbe_flow_mem_ptr;
struct txgbe_hw_fdir_info *fdir_info = TXGBE_DEV_FDIR(dev);
- struct rte_eth_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
+ struct txgbe_fdir_conf *fdir_conf = TXGBE_DEV_FDIR_CONF(dev);
struct txgbe_rss_conf_ele *rss_filter_ptr;
switch (filter_type) {
@@ -3625,7 +3625,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev,
fdir_info->mask_added = false;
fdir_info->flex_relative = false;
fdir_info->flex_bytes_offset = 0;
- fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ fdir_conf->mode = TXGBE_FDIR_MODE_NONE;
}
}
break;
diff --git a/drivers/net/txgbe/txgbe_rxtx_vec_common.h b/drivers/net/txgbe/txgbe_rxtx_vec_common.h
index 00847d087b..c6144cad70 100644
--- a/drivers/net/txgbe/txgbe_rxtx_vec_common.h
+++ b/drivers/net/txgbe/txgbe_rxtx_vec_common.h
@@ -299,10 +299,10 @@ static inline int
txgbe_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
- struct rte_eth_fdir_conf *fconf = TXGBE_DEV_FDIR_CONF(dev);
+ struct txgbe_fdir_conf *fconf = TXGBE_DEV_FDIR_CONF(dev);
/* no fdir support */
- if (fconf->mode != RTE_FDIR_MODE_NONE)
+ if (fconf->mode != TXGBE_FDIR_MODE_NONE)
return -1;
return 0;
--
2.53.0
^ permalink raw reply related
* [RFC 7/8] net/ixgbe: privatize legacy flow director types
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
The ixgbe driver uses several legacy ethdev flow director types
(struct rte_eth_fdir_conf, enum rte_fdir_mode, and related) from
<rte_eth_ctrl.h> and <ethdev_driver.h> as its internal IR for
translating rte_flow rules into hardware programming state. These
types are scheduled for removal from ethdev in DPDK 26.11.
Clone the relevant types into ixgbe_ethdev.h with an ixgbe-private
prefix so the driver no longer depends on the legacy ABI. The
embedded rte_eth_ipv4_flow / rte_eth_ipv6_flow types are cloned
too since they live in the same removal candidate set.
enum ixgbe_fdir_pballoc_type already exists in the Intel base
driver (drivers/net/intel/ixgbe/base/ixgbe_type.h) and is reused
as-is. Its values are NONE=0, 64K=1, 128K=2, 256K=3, whereas the
ethdev enum started at 64K=0. The adapter's pballoc field was
previously zero-initialized and relied on the ethdev convention
that 0 means 64K; initialize it explicitly in eth_ixgbe_dev_init()
to preserve that behavior under the base enum.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 +-
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 95 +++++++++++++-
drivers/net/intel/ixgbe/ixgbe_fdir.c | 124 +++++++++---------
drivers/net/intel/ixgbe/ixgbe_flow.c | 28 ++--
.../net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 4 +-
5 files changed, 177 insertions(+), 86 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
index 9dc015dfff..20b7b91cc3 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
@@ -1471,6 +1471,14 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
/* drop queue is always fixed */
IXGBE_DEV_FDIR_CONF(eth_dev)->drop_queue = IXGBE_FDIR_DROP_QUEUE;
+ /*
+ * Initialize pballoc to 64K. The base driver's
+ * enum ixgbe_fdir_pballoc_type uses NONE=0, 64K=1, ... so an
+ * uninitialized (zero) pballoc would be rejected by
+ * configure_fdir_flags(); set it explicitly here.
+ */
+ IXGBE_DEV_FDIR_CONF(eth_dev)->pballoc = IXGBE_FDIR_PBALLOC_64K;
+
return 0;
}
@@ -2618,7 +2626,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
struct ixgbe_adapter *adapter =
IXGBE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(adapter);
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
struct ixgbe_vf_info *vfinfo =
*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
@@ -2723,7 +2731,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
/* Configure DCB hw */
ixgbe_configure_dcb(dev);
- if (fdir_conf->mode != RTE_FDIR_MODE_NONE) {
+ if (fdir_conf->mode != IXGBE_FDIR_MODE_NONE) {
struct ixgbe_hw_fdir_info *info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter);
err = ixgbe_fdir_configure(adapter, fdir_conf, &info->mask);
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
index c290f04611..2fc9f8433e 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
@@ -143,8 +143,91 @@
IXGBE_LINK_SPEED_10GB_FULL)
/*
- * Information about the fdir mode.
+ * Privatized flow director configuration types.
+ *
+ * These were cloned from <rte_eth_ctrl.h> and <ethdev_driver.h> so that
+ * ixgbe no longer depends on the legacy ethdev flow director ABI, which
+ * is scheduled for removal in DPDK 26.11. The semantics are unchanged;
+ * only the names are ixgbe-private.
*/
+#define IXGBE_FDIR_MAX_FLEXLEN 16 /**< Max length of flexbytes. */
+
+struct ixgbe_ipv4_flow {
+ uint32_t src_ip;
+ uint32_t dst_ip;
+ uint8_t tos;
+ uint8_t ttl;
+ uint8_t proto;
+};
+
+struct ixgbe_ipv6_flow {
+ uint32_t src_ip[4];
+ uint32_t dst_ip[4];
+ uint8_t tc;
+ uint8_t proto;
+ uint8_t hop_limits;
+};
+
+struct ixgbe_fdir_masks {
+ uint16_t vlan_tci_mask;
+ struct ixgbe_ipv4_flow ipv4_mask;
+ struct ixgbe_ipv6_flow ipv6_mask;
+ uint16_t src_port_mask;
+ uint16_t dst_port_mask;
+ uint8_t mac_addr_byte_mask;
+ uint32_t tunnel_id_mask;
+ uint8_t tunnel_type_mask;
+};
+
+enum ixgbe_payload_type {
+ IXGBE_PAYLOAD_UNKNOWN = 0,
+ IXGBE_RAW_PAYLOAD,
+ IXGBE_L2_PAYLOAD,
+ IXGBE_L3_PAYLOAD,
+ IXGBE_L4_PAYLOAD,
+ IXGBE_PAYLOAD_MAX = 8,
+};
+
+struct ixgbe_flex_payload_cfg {
+ enum ixgbe_payload_type type;
+ uint16_t src_offset[IXGBE_FDIR_MAX_FLEXLEN];
+};
+
+struct ixgbe_fdir_flex_mask {
+ uint16_t flow_type;
+ uint8_t mask[IXGBE_FDIR_MAX_FLEXLEN];
+};
+
+struct ixgbe_fdir_flex_conf {
+ uint16_t nb_payloads;
+ uint16_t nb_flexmasks;
+ struct ixgbe_flex_payload_cfg flex_set[IXGBE_PAYLOAD_MAX];
+ struct ixgbe_fdir_flex_mask flex_mask[RTE_ETH_FLOW_MAX];
+};
+
+enum ixgbe_fdir_mode {
+ IXGBE_FDIR_MODE_NONE = 0,
+ IXGBE_FDIR_MODE_SIGNATURE,
+ IXGBE_FDIR_MODE_PERFECT,
+ IXGBE_FDIR_MODE_PERFECT_MAC_VLAN,
+ IXGBE_FDIR_MODE_PERFECT_TUNNEL,
+};
+
+enum ixgbe_fdir_status_mode {
+ IXGBE_FDIR_NO_REPORT_STATUS = 0,
+ IXGBE_FDIR_REPORT_STATUS,
+ IXGBE_FDIR_REPORT_STATUS_ALWAYS,
+};
+
+struct ixgbe_fdir_conf {
+ enum ixgbe_fdir_mode mode;
+ enum ixgbe_fdir_pballoc_type pballoc;
+ enum ixgbe_fdir_status_mode status;
+ uint8_t drop_queue;
+ struct ixgbe_fdir_masks mask;
+ struct ixgbe_fdir_flex_conf flex_conf;
+};
+
struct ixgbe_hw_fdir_mask {
uint16_t vlan_tci_mask;
uint32_t src_ipv4_mask;
@@ -176,7 +259,7 @@ struct ixgbe_fdir_rule {
union ixgbe_atr_input ixgbe_fdir; /* key of fdir filter*/
bool b_spec; /* If TRUE, ixgbe_fdir, fdirflags, queue have meaning. */
bool b_mask; /* If TRUE, mask has meaning. */
- enum rte_fdir_mode mode; /* IP, MAC VLAN, Tunnel */
+ enum ixgbe_fdir_mode mode; /* IP, MAC VLAN, Tunnel */
uint32_t fdirflags; /* drop or forward */
uint32_t soft_id; /* an unique value for this rule */
uint8_t queue; /* assigned rx queue */
@@ -468,7 +551,7 @@ struct ixgbe_adapter {
struct ixgbe_hw_stats stats;
struct ixgbe_macsec_stats macsec_stats;
struct ixgbe_macsec_setting macsec_setting;
- struct rte_eth_fdir_conf fdir_conf;
+ struct ixgbe_fdir_conf fdir_conf;
struct ixgbe_hw_fdir_info fdir;
struct ixgbe_interrupt intr;
struct ixgbe_stat_mapping_registers stat_mappings;
@@ -706,15 +789,15 @@ void ixgbe_filterlist_flush(struct rte_eth_dev *dev);
* Flow director function prototypes
*/
int ixgbe_fdir_configure(struct ixgbe_adapter *adapter,
- const struct rte_eth_fdir_conf *fdir_conf,
+ const struct ixgbe_fdir_conf *fdir_conf,
const struct ixgbe_hw_fdir_mask *fdir_mask);
int ixgbe_fdir_set_input_mask(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode);
+ enum ixgbe_fdir_mode mode);
int ixgbe_fdir_set_flexbytes_offset(struct ixgbe_adapter *adapter,
uint16_t offset);
int ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
- struct rte_eth_fdir_conf *fdir_conf,
+ struct ixgbe_fdir_conf *fdir_conf,
struct ixgbe_fdir_rule *rule,
bool del, bool update);
void ixgbe_configure_dcb(struct rte_eth_dev *dev);
diff --git a/drivers/net/intel/ixgbe/ixgbe_fdir.c b/drivers/net/intel/ixgbe/ixgbe_fdir.c
index 20cc72ffcd..69fd8c674c 100644
--- a/drivers/net/intel/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/intel/ixgbe/ixgbe_fdir.c
@@ -81,23 +81,23 @@
static int fdir_erase_filter_82599(struct ixgbe_hw *hw, uint32_t fdirhash);
static int fdir_set_input_mask_82599(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode);
+ enum ixgbe_fdir_mode mode);
static int fdir_set_input_mask_x550(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode);
+ enum ixgbe_fdir_mode mode);
static int ixgbe_set_fdir_flex_conf(struct ixgbe_adapter *adapter,
- const struct rte_eth_fdir_flex_conf *conf, uint32_t *fdirctrl);
+ const struct ixgbe_fdir_flex_conf *conf, uint32_t *fdirctrl);
static int fdir_enable_82599(struct ixgbe_hw *hw, uint32_t fdirctrl);
static uint32_t ixgbe_atr_compute_hash_82599(union ixgbe_atr_input *atr_input,
uint32_t key);
static uint32_t atr_compute_sig_hash_82599(union ixgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc);
+ enum ixgbe_fdir_pballoc_type pballoc);
static uint32_t atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc);
+ enum ixgbe_fdir_pballoc_type pballoc);
static int fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
union ixgbe_atr_input *input, uint8_t queue,
uint32_t fdircmd, uint32_t fdirhash,
- enum rte_fdir_mode mode);
+ enum ixgbe_fdir_mode mode);
static int fdir_add_signature_filter_82599(struct ixgbe_hw *hw,
union ixgbe_atr_input *input, u8 queue, uint32_t fdircmd,
uint32_t fdirhash);
@@ -164,20 +164,20 @@ fdir_enable_82599(struct ixgbe_hw *hw, uint32_t fdirctrl)
* flexbytes matching field, and drop queue (only for perfect matching mode).
*/
static inline int
-configure_fdir_flags(const struct rte_eth_fdir_conf *conf, uint32_t *fdirctrl)
+configure_fdir_flags(const struct ixgbe_fdir_conf *conf, uint32_t *fdirctrl)
{
*fdirctrl = 0;
switch (conf->pballoc) {
- case RTE_ETH_FDIR_PBALLOC_64K:
+ case IXGBE_FDIR_PBALLOC_64K:
/* 8k - 1 signature filters */
*fdirctrl |= IXGBE_FDIRCTRL_PBALLOC_64K;
break;
- case RTE_ETH_FDIR_PBALLOC_128K:
+ case IXGBE_FDIR_PBALLOC_128K:
/* 16k - 1 signature filters */
*fdirctrl |= IXGBE_FDIRCTRL_PBALLOC_128K;
break;
- case RTE_ETH_FDIR_PBALLOC_256K:
+ case IXGBE_FDIR_PBALLOC_256K:
/* 32k - 1 signature filters */
*fdirctrl |= IXGBE_FDIRCTRL_PBALLOC_256K;
break;
@@ -189,14 +189,14 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf, uint32_t *fdirctrl)
/* status flags: write hash & swindex in the rx descriptor */
switch (conf->status) {
- case RTE_FDIR_NO_REPORT_STATUS:
+ case IXGBE_FDIR_NO_REPORT_STATUS:
/* do nothing, default mode */
break;
- case RTE_FDIR_REPORT_STATUS:
+ case IXGBE_FDIR_REPORT_STATUS:
/* report status when the packet matches a fdir rule */
*fdirctrl |= IXGBE_FDIRCTRL_REPORT_STATUS;
break;
- case RTE_FDIR_REPORT_STATUS_ALWAYS:
+ case IXGBE_FDIR_REPORT_STATUS_ALWAYS:
/* always report status */
*fdirctrl |= IXGBE_FDIRCTRL_REPORT_STATUS_ALWAYS;
break;
@@ -209,14 +209,14 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf, uint32_t *fdirctrl)
*fdirctrl |= (IXGBE_DEFAULT_FLEXBYTES_OFFSET / sizeof(uint16_t)) <<
IXGBE_FDIRCTRL_FLEX_SHIFT;
- if (conf->mode >= RTE_FDIR_MODE_PERFECT &&
- conf->mode <= RTE_FDIR_MODE_PERFECT_TUNNEL) {
+ if (conf->mode >= IXGBE_FDIR_MODE_PERFECT &&
+ conf->mode <= IXGBE_FDIR_MODE_PERFECT_TUNNEL) {
*fdirctrl |= IXGBE_FDIRCTRL_PERFECT_MATCH;
*fdirctrl |= (conf->drop_queue << IXGBE_FDIRCTRL_DROP_Q_SHIFT);
- if (conf->mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)
+ if (conf->mode == IXGBE_FDIR_MODE_PERFECT_MAC_VLAN)
*fdirctrl |= (IXGBE_FDIRCTRL_FILTERMODE_MACVLAN
<< IXGBE_FDIRCTRL_FILTERMODE_SHIFT);
- else if (conf->mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
+ else if (conf->mode == IXGBE_FDIR_MODE_PERFECT_TUNNEL)
*fdirctrl |= (IXGBE_FDIRCTRL_FILTERMODE_CLOUD
<< IXGBE_FDIRCTRL_FILTERMODE_SHIFT);
}
@@ -249,12 +249,12 @@ reverse_fdir_bitmasks(uint16_t hi_dword, uint16_t lo_dword)
/*
* This references ixgbe_fdir_set_input_mask_82599() in base/ixgbe_82599.c,
- * but makes use of the rte_fdir_masks structure to see which bits to set.
+ * but makes use of the ixgbe_fdir_masks structure to see which bits to set.
*/
static int
fdir_set_input_mask_82599(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode)
+ enum ixgbe_fdir_mode mode)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(adapter);
/*
@@ -317,7 +317,7 @@ fdir_set_input_mask_82599(struct ixgbe_adapter *adapter,
reg = IXGBE_PCI_REG_ADDR(hw, IXGBE_FDIRDIP4M);
*reg = ~(mask->dst_ipv4_mask);
- if (mode == RTE_FDIR_MODE_SIGNATURE) {
+ if (mode == IXGBE_FDIR_MODE_SIGNATURE) {
/*
* Store source and destination IPv6 masks (bit reversed)
*/
@@ -332,12 +332,12 @@ fdir_set_input_mask_82599(struct ixgbe_adapter *adapter,
/*
* This references ixgbe_fdir_set_input_mask_82599() in base/ixgbe_82599.c,
- * but makes use of the rte_fdir_masks structure to see which bits to set.
+ * but makes use of the ixgbe_fdir_masks structure to see which bits to set.
*/
static int
fdir_set_input_mask_x550(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode)
+ enum ixgbe_fdir_mode mode)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(adapter);
/* mask VM pool and DIPv6 since there are currently not supported
@@ -351,7 +351,7 @@ fdir_set_input_mask_x550(struct ixgbe_adapter *adapter,
PMD_INIT_FUNC_TRACE();
/* set the default UDP port for VxLAN */
- if (mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
+ if (mode == IXGBE_FDIR_MODE_PERFECT_TUNNEL)
IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, RTE_VXLAN_DEFAULT_PORT);
/* some bits must be set for mac vlan or tunnel mode */
@@ -375,11 +375,11 @@ fdir_set_input_mask_x550(struct ixgbe_adapter *adapter,
fdiripv6m = ((u32)0xFFFFU << IXGBE_FDIRIP6M_DIPM_SHIFT);
fdiripv6m |= IXGBE_FDIRIP6M_ALWAYS_MASK;
- if (mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)
+ if (mode == IXGBE_FDIR_MODE_PERFECT_MAC_VLAN)
fdiripv6m |= IXGBE_FDIRIP6M_TUNNEL_TYPE |
IXGBE_FDIRIP6M_TNI_VNI;
- if (mode == RTE_FDIR_MODE_PERFECT_TUNNEL) {
+ if (mode == IXGBE_FDIR_MODE_PERFECT_TUNNEL) {
fdiripv6m |= IXGBE_FDIRIP6M_INNER_MAC;
mac_mask = mask->mac_addr_byte_mask &
(IXGBE_FDIRIP6M_INNER_MAC >>
@@ -428,13 +428,13 @@ fdir_set_input_mask_x550(struct ixgbe_adapter *adapter,
int
ixgbe_fdir_set_input_mask(struct ixgbe_adapter *adapter,
const struct ixgbe_hw_fdir_mask *mask,
- enum rte_fdir_mode mode)
+ enum ixgbe_fdir_mode mode)
{
- if (mode >= RTE_FDIR_MODE_SIGNATURE &&
- mode <= RTE_FDIR_MODE_PERFECT)
+ if (mode >= IXGBE_FDIR_MODE_SIGNATURE &&
+ mode <= IXGBE_FDIR_MODE_PERFECT)
return fdir_set_input_mask_82599(adapter, mask, mode);
- else if (mode >= RTE_FDIR_MODE_PERFECT_MAC_VLAN &&
- mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
+ else if (mode >= IXGBE_FDIR_MODE_PERFECT_MAC_VLAN &&
+ mode <= IXGBE_FDIR_MODE_PERFECT_TUNNEL)
return fdir_set_input_mask_x550(adapter, mask, mode);
PMD_DRV_LOG(ERR, "Not supported fdir mode - %d!", mode);
@@ -493,13 +493,13 @@ ixgbe_fdir_set_flexbytes_offset(struct ixgbe_adapter *adapter, uint16_t offset)
*/
static int
ixgbe_set_fdir_flex_conf(struct ixgbe_adapter *adapter,
- const struct rte_eth_fdir_flex_conf *conf, uint32_t *fdirctrl)
+ const struct ixgbe_fdir_flex_conf *conf, uint32_t *fdirctrl)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(adapter);
struct ixgbe_hw_fdir_info *info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter);
- const struct rte_eth_flex_payload_cfg *flex_cfg;
- const struct rte_eth_fdir_flex_mask *flex_mask;
+ const struct ixgbe_flex_payload_cfg *flex_cfg;
+ const struct ixgbe_fdir_flex_mask *flex_mask;
uint32_t fdirm;
uint16_t flexbytes = 0;
uint16_t i;
@@ -513,7 +513,7 @@ ixgbe_set_fdir_flex_conf(struct ixgbe_adapter *adapter,
for (i = 0; i < conf->nb_payloads; i++) {
flex_cfg = &conf->flex_set[i];
- if (flex_cfg->type != RTE_ETH_RAW_PAYLOAD) {
+ if (flex_cfg->type != IXGBE_RAW_PAYLOAD) {
PMD_DRV_LOG(ERR, "unsupported payload type.");
return -EINVAL;
}
@@ -556,14 +556,14 @@ ixgbe_set_fdir_flex_conf(struct ixgbe_adapter *adapter,
int
ixgbe_fdir_configure(struct ixgbe_adapter *adapter,
- const struct rte_eth_fdir_conf *fdir_conf,
+ const struct ixgbe_fdir_conf *fdir_conf,
const struct ixgbe_hw_fdir_mask *fdir_mask)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(adapter);
int err;
uint32_t fdirctrl, pbsize;
int i;
- enum rte_fdir_mode mode = fdir_conf->mode;
+ enum ixgbe_fdir_mode mode = fdir_conf->mode;
PMD_INIT_FUNC_TRACE();
@@ -580,8 +580,8 @@ ixgbe_fdir_configure(struct ixgbe_adapter *adapter,
hw->mac.type != ixgbe_mac_X550EM_x &&
hw->mac.type != ixgbe_mac_X550EM_a &&
hw->mac.type != ixgbe_mac_E610 &&
- mode != RTE_FDIR_MODE_SIGNATURE &&
- mode != RTE_FDIR_MODE_PERFECT)
+ mode != IXGBE_FDIR_MODE_SIGNATURE &&
+ mode != IXGBE_FDIR_MODE_PERFECT)
return -ENOSYS;
err = configure_fdir_flags(fdir_conf, &fdirctrl);
@@ -733,13 +733,13 @@ ixgbe_atr_compute_hash_82599(union ixgbe_atr_input *atr_input,
static uint32_t
atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc)
+ enum ixgbe_fdir_pballoc_type pballoc)
{
- if (pballoc == RTE_ETH_FDIR_PBALLOC_256K)
+ if (pballoc == IXGBE_FDIR_PBALLOC_256K)
return ixgbe_atr_compute_hash_82599(input,
IXGBE_ATR_BUCKET_HASH_KEY) &
PERFECT_BUCKET_256KB_HASH_MASK;
- else if (pballoc == RTE_ETH_FDIR_PBALLOC_128K)
+ else if (pballoc == IXGBE_FDIR_PBALLOC_128K)
return ixgbe_atr_compute_hash_82599(input,
IXGBE_ATR_BUCKET_HASH_KEY) &
PERFECT_BUCKET_128KB_HASH_MASK;
@@ -776,15 +776,15 @@ ixgbe_fdir_check_cmd_complete(struct ixgbe_hw *hw, uint32_t *fdircmd)
*/
static uint32_t
atr_compute_sig_hash_82599(union ixgbe_atr_input *input,
- enum rte_eth_fdir_pballoc_type pballoc)
+ enum ixgbe_fdir_pballoc_type pballoc)
{
uint32_t bucket_hash, sig_hash;
- if (pballoc == RTE_ETH_FDIR_PBALLOC_256K)
+ if (pballoc == IXGBE_FDIR_PBALLOC_256K)
bucket_hash = ixgbe_atr_compute_hash_82599(input,
IXGBE_ATR_BUCKET_HASH_KEY) &
SIG_BUCKET_256KB_HASH_MASK;
- else if (pballoc == RTE_ETH_FDIR_PBALLOC_128K)
+ else if (pballoc == IXGBE_FDIR_PBALLOC_128K)
bucket_hash = ixgbe_atr_compute_hash_82599(input,
IXGBE_ATR_BUCKET_HASH_KEY) &
SIG_BUCKET_128KB_HASH_MASK;
@@ -809,7 +809,7 @@ static int
fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
union ixgbe_atr_input *input, uint8_t queue,
uint32_t fdircmd, uint32_t fdirhash,
- enum rte_fdir_mode mode)
+ enum ixgbe_fdir_mode mode)
{
uint32_t fdirport, fdirvlan;
u32 addr_low, addr_high;
@@ -817,7 +817,7 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
int err = 0;
volatile uint32_t *reg;
- if (mode == RTE_FDIR_MODE_PERFECT) {
+ if (mode == IXGBE_FDIR_MODE_PERFECT) {
/* record the IPv4 address (big-endian)
* can not use IXGBE_WRITE_REG.
*/
@@ -831,8 +831,8 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
fdirport <<= IXGBE_FDIRPORT_DESTINATION_SHIFT;
fdirport |= IXGBE_NTOHS(input->formatted.src_port);
IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, fdirport);
- } else if (mode >= RTE_FDIR_MODE_PERFECT_MAC_VLAN &&
- mode <= RTE_FDIR_MODE_PERFECT_TUNNEL) {
+ } else if (mode >= IXGBE_FDIR_MODE_PERFECT_MAC_VLAN &&
+ mode <= IXGBE_FDIR_MODE_PERFECT_TUNNEL) {
/* for mac vlan and tunnel modes */
addr_low = ((u32)input->formatted.inner_mac[0] |
((u32)input->formatted.inner_mac[1] << 8) |
@@ -841,7 +841,7 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
addr_high = ((u32)input->formatted.inner_mac[4] |
((u32)input->formatted.inner_mac[5] << 8));
- if (mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
+ if (mode == IXGBE_FDIR_MODE_PERFECT_MAC_VLAN) {
IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(0), addr_low);
IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(1), addr_high);
IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2), 0);
@@ -1035,7 +1035,7 @@ ixgbe_remove_fdir_filter(struct ixgbe_hw_fdir_info *fdir_info,
int
ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
- struct rte_eth_fdir_conf *fdir_conf,
+ struct ixgbe_fdir_conf *fdir_conf,
struct ixgbe_fdir_rule *rule,
bool del,
bool update)
@@ -1048,11 +1048,11 @@ ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
int err;
struct ixgbe_hw_fdir_info *info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter);
- enum rte_fdir_mode fdir_mode = fdir_conf->mode;
+ enum ixgbe_fdir_mode fdir_mode = fdir_conf->mode;
struct ixgbe_fdir_filter *node;
bool add_node = FALSE;
- if (fdir_mode == RTE_FDIR_MODE_NONE ||
+ if (fdir_mode == IXGBE_FDIR_MODE_NONE ||
fdir_mode != rule->mode)
return -ENOTSUP;
@@ -1073,16 +1073,16 @@ ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
IXGBE_ATR_FLOW_TYPE_IPV6) &&
(info->mask.src_port_mask != 0 ||
info->mask.dst_port_mask != 0) &&
- (rule->mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN &&
- rule->mode != RTE_FDIR_MODE_PERFECT_TUNNEL)) {
+ (rule->mode != IXGBE_FDIR_MODE_PERFECT_MAC_VLAN &&
+ rule->mode != IXGBE_FDIR_MODE_PERFECT_TUNNEL)) {
PMD_DRV_LOG(ERR, "By this device,"
" IPv4 is not supported without"
" L4 protocol and ports masked!");
return -ENOTSUP;
}
- if (fdir_mode >= RTE_FDIR_MODE_PERFECT &&
- fdir_mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
+ if (fdir_mode >= IXGBE_FDIR_MODE_PERFECT &&
+ fdir_mode <= IXGBE_FDIR_MODE_PERFECT_TUNNEL)
is_perfect = TRUE;
if (is_perfect) {
@@ -1207,15 +1207,15 @@ void
ixgbe_fdir_filter_restore(struct rte_eth_dev *dev)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
struct ixgbe_hw_fdir_info *fdir_info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
struct ixgbe_fdir_filter *node;
bool is_perfect = FALSE;
- enum rte_fdir_mode fdir_mode = fdir_conf->mode;
+ enum ixgbe_fdir_mode fdir_mode = fdir_conf->mode;
- if (fdir_mode >= RTE_FDIR_MODE_PERFECT &&
- fdir_mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
+ if (fdir_mode >= IXGBE_FDIR_MODE_PERFECT &&
+ fdir_mode <= IXGBE_FDIR_MODE_PERFECT_TUNNEL)
is_perfect = TRUE;
if (is_perfect) {
@@ -1242,7 +1242,7 @@ ixgbe_fdir_filter_restore(struct rte_eth_dev *dev)
int
ixgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
{
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
struct ixgbe_hw_fdir_info *fdir_info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
struct ixgbe_fdir_filter *fdir_filter;
@@ -1267,7 +1267,7 @@ ixgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)
fdir_info->mask = (struct ixgbe_hw_fdir_mask){0};
fdir_info->flex_bytes_offset = 0;
fdir_info->mask_added = FALSE;
- fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ fdir_conf->mode = IXGBE_FDIR_MODE_NONE;
if (had_flows)
ret = ixgbe_fdir_flush(dev);
diff --git a/drivers/net/intel/ixgbe/ixgbe_flow.c b/drivers/net/intel/ixgbe/ixgbe_flow.c
index 9038aae001..e990126b5f 100644
--- a/drivers/net/intel/ixgbe/ixgbe_flow.c
+++ b/drivers/net/intel/ixgbe/ixgbe_flow.c
@@ -1501,7 +1501,7 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr,
rule->queue = act_q->index;
} else { /* drop */
/* signature mode does not support drop action. */
- if (rule->mode == RTE_FDIR_MODE_SIGNATURE) {
+ if (rule->mode == IXGBE_FDIR_MODE_SIGNATURE) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1727,9 +1727,9 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
}
if (signature_match(pattern))
- rule->mode = RTE_FDIR_MODE_SIGNATURE;
+ rule->mode = IXGBE_FDIR_MODE_SIGNATURE;
else
- rule->mode = RTE_FDIR_MODE_PERFECT;
+ rule->mode = IXGBE_FDIR_MODE_PERFECT;
/*Not supported last point for range*/
if (item->last) {
@@ -1772,7 +1772,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
/* Ether type should be masked. */
if (eth_mask->hdr.ether_type ||
- rule->mode == RTE_FDIR_MODE_SIGNATURE) {
+ rule->mode == IXGBE_FDIR_MODE_SIGNATURE) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
@@ -1781,7 +1781,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
}
/* If ethernet has meaning, it means MAC VLAN mode. */
- rule->mode = RTE_FDIR_MODE_PERFECT_MAC_VLAN;
+ rule->mode = IXGBE_FDIR_MODE_PERFECT_MAC_VLAN;
/**
* src MAC address must be masked,
@@ -1812,7 +1812,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
* IPv6 is not supported.
*/
item = next_no_fuzzy_pattern(pattern, item);
- if (rule->mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
+ if (rule->mode == IXGBE_FDIR_MODE_PERFECT_MAC_VLAN) {
if (item->type != RTE_FLOW_ITEM_TYPE_VLAN) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
rte_flow_error_set(error, EINVAL,
@@ -1955,7 +1955,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
* 2. not support last
* 3. mask must not null
*/
- if (rule->mode != RTE_FDIR_MODE_SIGNATURE ||
+ if (rule->mode != IXGBE_FDIR_MODE_SIGNATURE ||
item->last ||
!item->mask) {
memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
@@ -2432,7 +2432,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
return -rte_errno;
}
- rule->mode = RTE_FDIR_MODE_PERFECT_TUNNEL;
+ rule->mode = IXGBE_FDIR_MODE_PERFECT_TUNNEL;
/* Skip MAC. */
if (item->type == RTE_FLOW_ITEM_TYPE_ETH) {
@@ -2920,8 +2920,8 @@ ixgbe_fdir_flow_program(struct rte_eth_dev *dev,
bool *first_mask,
struct rte_flow_error *error)
{
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
- struct rte_eth_fdir_conf local_fdir_conf = *fdir_conf;
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf local_fdir_conf = *fdir_conf;
struct ixgbe_hw_fdir_info *fdir_info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter);
int ret;
@@ -2935,7 +2935,7 @@ ixgbe_fdir_flow_program(struct rte_eth_dev *dev,
local_fdir_conf.mode = fdir_rule->mode;
/* Configure FDIR mode if this is the first filter */
- if (fdir_conf->mode == RTE_FDIR_MODE_NONE) {
+ if (fdir_conf->mode == IXGBE_FDIR_MODE_NONE) {
ret = ixgbe_fdir_configure(adapter, &local_fdir_conf, &fdir_rule->mask);
if (ret) {
return rte_flow_error_set(error, EINVAL,
@@ -3249,7 +3249,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
ret = ixgbe_parse_fdir_filter(dev, attr, pattern,
actions, &fdir_rule, error);
if (!ret) {
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
bool first_mask = false;
ret = ixgbe_fdir_flow_program(dev, adapter, &fdir_rule,
@@ -3420,7 +3420,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
struct ixgbe_filter_ele_base *flow_mem_base;
struct ixgbe_hw_fdir_info *fdir_info =
IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter);
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
struct ixgbe_rss_conf_ele *rss_filter_ptr;
/* Validate ownership before touching HW/SW state. */
@@ -3487,7 +3487,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
fdir_info->mask_added = false;
fdir_info->mask = (struct ixgbe_hw_fdir_mask){0};
fdir_info->flex_bytes_offset = 0;
- fdir_conf->mode = RTE_FDIR_MODE_NONE;
+ fdir_conf->mode = IXGBE_FDIR_MODE_NONE;
}
}
break;
diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c b/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
index c42b8fc96b..d2dd640893 100644
--- a/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
+++ b/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
@@ -120,10 +120,10 @@ int __rte_cold
ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
- struct rte_eth_fdir_conf *fconf = IXGBE_DEV_FDIR_CONF(dev);
+ struct ixgbe_fdir_conf *fconf = IXGBE_DEV_FDIR_CONF(dev);
/* no fdir support */
- if (fconf->mode != RTE_FDIR_MODE_NONE)
+ if (fconf->mode != IXGBE_FDIR_MODE_NONE)
return -1;
for (uint16_t i = 0; i < dev->data->nb_rx_queues; i++) {
--
2.53.0
^ permalink raw reply related
* [RFC 6/8] doc: announce legacy flow director deprecation
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
Add the formal deprecation notice for the legacy flow director API
and the matching 26.07 release note.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
doc/guides/rel_notes/release_26_07.rst | 14 ++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d152e76fdc..5e2949d153 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -131,6 +131,13 @@ Deprecation Notices
The legacy actions should be removed
once ``MODIFY_FIELD`` alternative is implemented in drivers.
+* ethdev: Legacy flow director API will be removed in DPDK 26.11.
+ This affects: flow director data structures in ``rte_eth_ctrl.h``
+ (``rte_eth_fdir_*`` and ``rte_fdir_*`` types and the associated
+ ``RTE_ETH_FDIR_*`` / ``RTE_FDIR_*`` macros) and the driver-facing
+ definitions in ``ethdev_driver.h`` (``struct rte_eth_fdir_conf``,
+ ``enum rte_eth_fdir_pballoc_type``, ``enum rte_fdir_status_mode``).
+
* cryptodev: Support for OpenSSL versions earlier than 3.0 is deprecated
and will be removed. OpenSSL 1.1.1 reached end-of-life in September 2023.
The minimum supported OpenSSL version will be 3.0,
diff --git a/doc/guides/rel_notes/release_26_07.rst b/doc/guides/rel_notes/release_26_07.rst
index 8b4f8401e2..06689cdcca 100644
--- a/doc/guides/rel_notes/release_26_07.rst
+++ b/doc/guides/rel_notes/release_26_07.rst
@@ -100,6 +100,18 @@ Removed Items
Also, make sure to start the actual text at the margin.
=======================================================
+* Removed legacy flow director artifacts that depended on deprecated API.
+ Users should use ``rte_flow`` API and testpmd ``flow``
+ command instead.
+
+ * app/testpmd: ``show port fdir``, ``clear port fdir``,
+ ``flow_director_filter``, ``port config ... pctype mapping ...``,
+ and ``port config ... hash_inset|fdir_inset|fdir_flx_inset ...``.
+
+ * net/i40e, net/ixgbe: the experimental
+ ``rte_pmd_{i40e,ixgbe}_get_fdir_info()`` and
+ ``rte_pmd_{i40e,ixgbe}_get_fdir_stats()`` functions.
+
API Changes
-----------
@@ -116,6 +128,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* Deprecated the legacy flow director API; removal scheduled for
+ DPDK 26.11. Use the ``rte_flow`` API instead.
ABI Changes
-----------
--
2.53.0
^ permalink raw reply related
* [RFC 5/8] net/ixgbe: remove experimental FDIR API
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
Remove the flow director related private APIs in ixgbe.
These APIs are experimental therefore they can be removed
without deprecation warning.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 5 -
drivers/net/intel/ixgbe/ixgbe_fdir.c | 117 ------------------------
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c | 34 -------
drivers/net/intel/ixgbe/rte_pmd_ixgbe.h | 32 -------
4 files changed, 188 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
index 5d3243cb4d..c290f04611 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
@@ -717,11 +717,6 @@ int ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
struct rte_eth_fdir_conf *fdir_conf,
struct ixgbe_fdir_rule *rule,
bool del, bool update);
-void ixgbe_fdir_info_get(struct rte_eth_dev *dev,
- struct rte_eth_fdir_info *fdir_info);
-void ixgbe_fdir_stats_get(struct rte_eth_dev *dev,
- struct rte_eth_fdir_stats *fdir_stats);
-
void ixgbe_configure_dcb(struct rte_eth_dev *dev);
int
diff --git a/drivers/net/intel/ixgbe/ixgbe_fdir.c b/drivers/net/intel/ixgbe/ixgbe_fdir.c
index b32dc54287..20cc72ffcd 100644
--- a/drivers/net/intel/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/intel/ixgbe/ixgbe_fdir.c
@@ -1202,123 +1202,6 @@ ixgbe_fdir_flush(struct rte_eth_dev *dev)
return ret;
}
-#define FDIRENTRIES_NUM_SHIFT 10
-void
-ixgbe_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir_info)
-{
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
- struct ixgbe_hw_fdir_info *info =
- IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
- uint32_t fdirctrl, max_num;
- uint8_t offset;
-
- fdirctrl = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
- offset = ((fdirctrl & IXGBE_FDIRCTRL_FLEX_MASK) >>
- IXGBE_FDIRCTRL_FLEX_SHIFT) * sizeof(uint16_t);
-
- fdir_info->mode = fdir_conf->mode;
- max_num = (1 << (FDIRENTRIES_NUM_SHIFT +
- (fdirctrl & FDIRCTRL_PBALLOC_MASK)));
- if (fdir_info->mode >= RTE_FDIR_MODE_PERFECT &&
- fdir_info->mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
- fdir_info->guarant_spc = max_num;
- else if (fdir_info->mode == RTE_FDIR_MODE_SIGNATURE)
- fdir_info->guarant_spc = max_num * 4;
-
- fdir_info->mask.vlan_tci_mask = info->mask.vlan_tci_mask;
- fdir_info->mask.ipv4_mask.src_ip = info->mask.src_ipv4_mask;
- fdir_info->mask.ipv4_mask.dst_ip = info->mask.dst_ipv4_mask;
- IPV6_MASK_TO_ADDR(info->mask.src_ipv6_mask,
- fdir_info->mask.ipv6_mask.src_ip);
- IPV6_MASK_TO_ADDR(info->mask.dst_ipv6_mask,
- fdir_info->mask.ipv6_mask.dst_ip);
- fdir_info->mask.src_port_mask = info->mask.src_port_mask;
- fdir_info->mask.dst_port_mask = info->mask.dst_port_mask;
- fdir_info->mask.mac_addr_byte_mask = info->mask.mac_addr_byte_mask;
- fdir_info->mask.tunnel_id_mask = info->mask.tunnel_id_mask;
- fdir_info->mask.tunnel_type_mask = info->mask.tunnel_type_mask;
- fdir_info->max_flexpayload = IXGBE_FDIR_MAX_FLEX_LEN;
-
- if (fdir_info->mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN ||
- fdir_info->mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
- fdir_info->flow_types_mask[0] = 0ULL;
- else
- fdir_info->flow_types_mask[0] = IXGBE_FDIR_FLOW_TYPES;
- for (uint32_t i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++)
- fdir_info->flow_types_mask[i] = 0ULL;
-
- fdir_info->flex_payload_unit = sizeof(uint16_t);
- fdir_info->max_flex_payload_segment_num = 1;
- fdir_info->flex_payload_limit = IXGBE_MAX_FLX_SOURCE_OFF;
- fdir_info->flex_conf.nb_payloads = 1;
- fdir_info->flex_conf.flex_set[0].type = RTE_ETH_RAW_PAYLOAD;
- fdir_info->flex_conf.flex_set[0].src_offset[0] = offset;
- fdir_info->flex_conf.flex_set[0].src_offset[1] = offset + 1;
- fdir_info->flex_conf.nb_flexmasks = 1;
- fdir_info->flex_conf.flex_mask[0].flow_type = RTE_ETH_FLOW_UNKNOWN;
- fdir_info->flex_conf.flex_mask[0].mask[0] =
- (uint8_t)(info->mask.flex_bytes_mask & 0x00FF);
- fdir_info->flex_conf.flex_mask[0].mask[1] =
- (uint8_t)((info->mask.flex_bytes_mask & 0xFF00) >> 8);
-}
-
-void
-ixgbe_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *fdir_stats)
-{
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
- struct ixgbe_hw_fdir_info *info =
- IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
- uint32_t reg, max_num;
- enum rte_fdir_mode fdir_mode = fdir_conf->mode;
-
- /* Get the information from registers */
- reg = IXGBE_READ_REG(hw, IXGBE_FDIRFREE);
- info->collision = (uint16_t)((reg & IXGBE_FDIRFREE_COLL_MASK) >>
- IXGBE_FDIRFREE_COLL_SHIFT);
- info->free = (uint16_t)((reg & IXGBE_FDIRFREE_FREE_MASK) >>
- IXGBE_FDIRFREE_FREE_SHIFT);
-
- reg = IXGBE_READ_REG(hw, IXGBE_FDIRLEN);
- info->maxhash = (uint16_t)((reg & IXGBE_FDIRLEN_MAXHASH_MASK) >>
- IXGBE_FDIRLEN_MAXHASH_SHIFT);
- info->maxlen = (uint8_t)((reg & IXGBE_FDIRLEN_MAXLEN_MASK) >>
- IXGBE_FDIRLEN_MAXLEN_SHIFT);
-
- reg = IXGBE_READ_REG(hw, IXGBE_FDIRUSTAT);
- info->remove += (reg & IXGBE_FDIRUSTAT_REMOVE_MASK) >>
- IXGBE_FDIRUSTAT_REMOVE_SHIFT;
- info->add += (reg & IXGBE_FDIRUSTAT_ADD_MASK) >>
- IXGBE_FDIRUSTAT_ADD_SHIFT;
-
- reg = IXGBE_READ_REG(hw, IXGBE_FDIRFSTAT) & 0xFFFF;
- info->f_remove += (reg & IXGBE_FDIRFSTAT_FREMOVE_MASK) >>
- IXGBE_FDIRFSTAT_FREMOVE_SHIFT;
- info->f_add += (reg & IXGBE_FDIRFSTAT_FADD_MASK) >>
- IXGBE_FDIRFSTAT_FADD_SHIFT;
-
- /* Copy the new information in the fdir parameter */
- fdir_stats->collision = info->collision;
- fdir_stats->free = info->free;
- fdir_stats->maxhash = info->maxhash;
- fdir_stats->maxlen = info->maxlen;
- fdir_stats->remove = info->remove;
- fdir_stats->add = info->add;
- fdir_stats->f_remove = info->f_remove;
- fdir_stats->f_add = info->f_add;
-
- reg = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
- max_num = (1 << (FDIRENTRIES_NUM_SHIFT +
- (reg & FDIRCTRL_PBALLOC_MASK)));
- if (fdir_mode >= RTE_FDIR_MODE_PERFECT &&
- fdir_mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
- fdir_stats->guarant_cnt = max_num - fdir_stats->free;
- else if (fdir_mode == RTE_FDIR_MODE_SIGNATURE)
- fdir_stats->guarant_cnt = max_num * 4 - fdir_stats->free;
-
-}
-
/* restore flow director filter */
void
ixgbe_fdir_filter_restore(struct rte_eth_dev *dev)
diff --git a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
index 30dec57be8..c1f923b100 100644
--- a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
@@ -1176,37 +1176,3 @@ rte_pmd_ixgbe_mdio_unlocked_write(uint16_t port, uint32_t reg_addr,
return 0;
}
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_ixgbe_get_fdir_info, 20.08)
-int
-rte_pmd_ixgbe_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info)
-{
- struct rte_eth_dev *dev;
-
- RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
- dev = &rte_eth_devices[port];
- if (!is_ixgbe_supported(dev))
- return -ENOTSUP;
-
- ixgbe_fdir_info_get(dev, fdir_info);
-
- return 0;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_ixgbe_get_fdir_stats, 20.08)
-int
-rte_pmd_ixgbe_get_fdir_stats(uint16_t port,
- struct rte_eth_fdir_stats *fdir_stats)
-{
- struct rte_eth_dev *dev;
-
- RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
- dev = &rte_eth_devices[port];
- if (!is_ixgbe_supported(dev))
- return -ENOTSUP;
-
- ixgbe_fdir_stats_get(dev, fdir_stats);
-
- return 0;
-}
diff --git a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
index 7ca1126cfb..74bb5aa140 100644
--- a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
@@ -724,36 +724,4 @@ enum {
int
rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable);
-/**
- * Get port fdir info
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param fdir_info
- * The fdir info of the port
- * @return
- * - (0) if successful.
- * - (-ENODEV) if *port* invalid.
- * - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_ixgbe_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info);
-
-/**
- * Get port fdir status
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param fdir_stats
- * The fdir status of the port
- * @return
- * - (0) if successful.
- * - (-ENODEV) if *port* invalid.
- * - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_ixgbe_get_fdir_stats(uint16_t port,
- struct rte_eth_fdir_stats *fdir_stats);
#endif /* _PMD_IXGBE_H_ */
--
2.53.0
^ permalink raw reply related
* [RFC 4/8] net/i40e: remove experimental FDIR API
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
Remove the flow director related private APIs in i40e.
These APIs are experimental, therefore they can be removed
without deprecation warning.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/i40e/i40e_ethdev.c | 4 +-
drivers/net/intel/i40e/i40e_ethdev.h | 4 -
drivers/net/intel/i40e/i40e_fdir.c | 140 --------------------------
drivers/net/intel/i40e/i40e_flow.c | 3 +-
drivers/net/intel/i40e/rte_pmd_i40e.c | 34 -------
drivers/net/intel/i40e/rte_pmd_i40e.h | 33 ------
6 files changed, 3 insertions(+), 215 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index e818b6fc7c..207339cc8d 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -9309,8 +9309,8 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
};
/**
- * Flow director supports only fields defined in
- * union rte_eth_fdir_flow.
+ * Flow director supports only fields reachable through
+ * rte_flow item patterns.
*/
static const uint64_t valid_fdir_inset_table[] = {
[I40E_FILTER_PCTYPE_FRAG_IPV4] =
diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h
index d57c53f661..fecbd67f15 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.h
+++ b/drivers/net/intel/i40e/i40e_ethdev.h
@@ -1366,10 +1366,6 @@ enum i40e_filter_pctype
uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
enum i40e_filter_pctype pctype);
int i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len);
-void i40e_fdir_info_get(struct rte_eth_dev *dev,
- struct rte_eth_fdir_info *fdir);
-void i40e_fdir_stats_get(struct rte_eth_dev *dev,
- struct rte_eth_fdir_stats *stat);
int i40e_select_filter_input_set(struct i40e_hw *hw,
struct rte_eth_input_set_conf *conf,
enum rte_filter_type filter);
diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c
index ad256a5a11..c1acf389bf 100644
--- a/drivers/net/intel/i40e/i40e_fdir.c
+++ b/drivers/net/intel/i40e/i40e_fdir.c
@@ -1793,146 +1793,6 @@ i40e_fdir_flush(struct rte_eth_dev *dev)
return 0;
}
-static inline void
-i40e_fdir_info_get_flex_set(struct i40e_pf *pf,
- struct rte_eth_flex_payload_cfg *flex_set,
- uint16_t *num)
-{
- struct i40e_fdir_flex_pit *flex_pit;
- struct rte_eth_flex_payload_cfg *ptr = flex_set;
- uint16_t src, dst, size, j, k;
- uint8_t i, layer_idx;
-
- for (layer_idx = I40E_FLXPLD_L2_IDX;
- layer_idx <= I40E_FLXPLD_L4_IDX;
- layer_idx++) {
- if (layer_idx == I40E_FLXPLD_L2_IDX)
- ptr->type = RTE_ETH_L2_PAYLOAD;
- else if (layer_idx == I40E_FLXPLD_L3_IDX)
- ptr->type = RTE_ETH_L3_PAYLOAD;
- else if (layer_idx == I40E_FLXPLD_L4_IDX)
- ptr->type = RTE_ETH_L4_PAYLOAD;
-
- for (i = 0; i < I40E_MAX_FLXPLD_FIED; i++) {
- flex_pit = &pf->fdir.flex_set[layer_idx *
- I40E_MAX_FLXPLD_FIED + i];
- if (flex_pit->size == 0)
- continue;
- src = flex_pit->src_offset * sizeof(uint16_t);
- dst = flex_pit->dst_offset * sizeof(uint16_t);
- size = flex_pit->size * sizeof(uint16_t);
- for (j = src, k = dst; j < src + size; j++, k++)
- ptr->src_offset[k] = j;
- }
- (*num)++;
- ptr++;
- }
-}
-
-static inline void
-i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
- struct rte_eth_fdir_flex_mask *flex_mask,
- uint16_t *num)
-{
- struct i40e_fdir_flex_mask *mask;
- struct rte_eth_fdir_flex_mask *ptr = flex_mask;
- uint16_t flow_type;
- uint8_t i, j;
- uint16_t off_bytes, mask_tmp;
-
- for (i = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
- i <= I40E_FILTER_PCTYPE_L2_PAYLOAD;
- i++) {
- mask = &pf->fdir.flex_mask[i];
- flow_type = i40e_pctype_to_flowtype(pf->adapter,
- (enum i40e_filter_pctype)i);
- if (flow_type == RTE_ETH_FLOW_UNKNOWN)
- continue;
-
- for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) {
- if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) {
- ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX;
- ptr->mask[j * sizeof(uint16_t) + 1] = UINT8_MAX;
- } else {
- ptr->mask[j * sizeof(uint16_t)] = 0x0;
- ptr->mask[j * sizeof(uint16_t) + 1] = 0x0;
- }
- }
- for (j = 0; j < I40E_FDIR_BITMASK_NUM_WORD; j++) {
- off_bytes = mask->bitmask[j].offset * sizeof(uint16_t);
- mask_tmp = ~mask->bitmask[j].mask;
- ptr->mask[off_bytes] &= I40E_HI_BYTE(mask_tmp);
- ptr->mask[off_bytes + 1] &= I40E_LO_BYTE(mask_tmp);
- }
- ptr->flow_type = flow_type;
- ptr++;
- (*num)++;
- }
-}
-
-/*
- * i40e_fdir_info_get - get information of Flow Director
- * @pf: ethernet device to get info from
- * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with
- * the flow director information.
- */
-void
-i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir)
-{
- struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
- struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- uint16_t num_flex_set = 0;
- uint16_t num_flex_mask = 0;
- uint16_t i;
-
- fdir->mode = RTE_FDIR_MODE_NONE;
-
- fdir->guarant_spc =
- (uint32_t)hw->func_caps.fd_filters_guaranteed;
- fdir->best_spc =
- (uint32_t)hw->func_caps.fd_filters_best_effort;
- fdir->max_flexpayload = I40E_FDIR_MAX_FLEX_LEN;
- fdir->flow_types_mask[0] = I40E_FDIR_FLOWS;
- for (i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++)
- fdir->flow_types_mask[i] = 0ULL;
- fdir->flex_payload_unit = sizeof(uint16_t);
- fdir->flex_bitmask_unit = sizeof(uint16_t);
- fdir->max_flex_payload_segment_num = I40E_MAX_FLXPLD_FIED;
- fdir->flex_payload_limit = I40E_MAX_FLX_SOURCE_OFF;
- fdir->max_flex_bitmask_num = I40E_FDIR_BITMASK_NUM_WORD;
-
- i40e_fdir_info_get_flex_set(pf,
- fdir->flex_conf.flex_set,
- &num_flex_set);
- i40e_fdir_info_get_flex_mask(pf,
- fdir->flex_conf.flex_mask,
- &num_flex_mask);
-
- fdir->flex_conf.nb_payloads = num_flex_set;
- fdir->flex_conf.nb_flexmasks = num_flex_mask;
-}
-
-/*
- * i40e_fdir_stat_get - get statistics of Flow Director
- * @pf: ethernet device to get info from
- * @stat: a pointer to a structure of type *rte_eth_fdir_stats* to be filled with
- * the flow director statistics.
- */
-void
-i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat)
-{
- struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
- struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- uint32_t fdstat;
-
- fdstat = I40E_READ_REG(hw, I40E_PFQF_FDSTAT);
- stat->guarant_cnt =
- (uint32_t)((fdstat & I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >>
- I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT);
- stat->best_cnt =
- (uint32_t)((fdstat & I40E_PFQF_FDSTAT_BEST_CNT_MASK) >>
- I40E_PFQF_FDSTAT_BEST_CNT_SHIFT);
-}
/* Restore flow director filter */
void
diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c
index c8eaa2b2e5..1ebc3e8fef 100644
--- a/drivers/net/intel/i40e/i40e_flow.c
+++ b/drivers/net/intel/i40e/i40e_flow.c
@@ -2461,8 +2461,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
for (i = 0; i < raw_spec->length; i++) {
j = i + next_dst_off;
- if (j >= RTE_ETH_FDIR_MAX_FLEXLEN ||
- j >= I40E_FDIR_MAX_FLEX_LEN)
+ if (j >= I40E_FDIR_MAX_FLEX_LEN)
break;
filter->input.flow_ext.flexbytes[j] =
raw_spec->pattern[i];
diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.c b/drivers/net/intel/i40e/rte_pmd_i40e.c
index 2e7943ef8b..e47c1aa9d7 100644
--- a/drivers/net/intel/i40e/rte_pmd_i40e.c
+++ b/drivers/net/intel/i40e/rte_pmd_i40e.c
@@ -3219,40 +3219,6 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype,
return 0;
}
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_info, 20.08)
-int
-rte_pmd_i40e_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info)
-{
- struct rte_eth_dev *dev;
-
- RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
- dev = &rte_eth_devices[port];
- if (!is_i40e_supported(dev))
- return -ENOTSUP;
-
- i40e_fdir_info_get(dev, fdir_info);
-
- return 0;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_stats, 20.08)
-int
-rte_pmd_i40e_get_fdir_stats(uint16_t port, struct rte_eth_fdir_stats *fdir_stat)
-{
- struct rte_eth_dev *dev;
-
- RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
- dev = &rte_eth_devices[port];
- if (!is_i40e_supported(dev))
- return -ENOTSUP;
-
- i40e_fdir_stats_get(dev, fdir_stat);
-
- return 0;
-}
-
RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_set_gre_key_len, 20.08)
int
rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len)
diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.h b/drivers/net/intel/i40e/rte_pmd_i40e.h
index 5dcca91264..097ff4b58d 100644
--- a/drivers/net/intel/i40e/rte_pmd_i40e.h
+++ b/drivers/net/intel/i40e/rte_pmd_i40e.h
@@ -1145,39 +1145,6 @@ rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx)
return 0;
}
-/**
- * Get port fdir info
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param fdir_info
- * The fdir info of the port
- * @return
- * - (0) if successful.
- * - (-ENODEV) if *port* invalid.
- * - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_i40e_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info);
-
-/**
- * Get port fdir status
- *
- * @param port
- * The port identifier of the Ethernet device.
- * @param fdir_stat
- * The fdir status of the port
- * @return
- * - (0) if successful.
- * - (-ENODEV) if *port* invalid.
- * - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_i40e_get_fdir_stats(uint16_t port,
- struct rte_eth_fdir_stats *fdir_stat);
-
/**
* Set GRE key length
*
--
2.53.0
^ permalink raw reply related
* [RFC 3/8] net/i40e: deprecate legacy flow filter API
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
The i40e PMD-private filter configuration API in rte_pmd_i40e.h predates
the rte_flow API and duplicates functionality now expressed as rte_flow
rules. Mark the legacy entry points as deprecated so they can be removed
in DPDK 26.11.
The two functions taking public rte_eth_fdir_* types
(rte_pmd_i40e_get_fdir_info, rte_pmd_i40e_get_fdir_stats) are already
marked __rte_experimental and will be removed alongside the ethdev
fdir struct family in 26.11; they need no separate deprecation notice.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/rel_notes/deprecation.rst | 3 +
drivers/net/intel/i40e/rte_pmd_i40e.h | 80 ++++++++++++++++++++++++++-
2 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 17f90a6352..d152e76fdc 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -158,3 +158,6 @@ Deprecation Notices
* net/iavf: The dynamic mbuf field used to detect LLDP packets on the
transmit path in the iavf PMD will be removed in a future release.
After removal, only packet type-based detection will be supported.
+
+* net/i40e: The legacy filter configuration API in ``rte_pmd_i40e.h``,
+ superseded by the ``rte_flow`` API, will be removed in DPDK 26.11.
diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.h b/drivers/net/intel/i40e/rte_pmd_i40e.h
index 5af7e2330f..5dcca91264 100644
--- a/drivers/net/intel/i40e/rte_pmd_i40e.h
+++ b/drivers/net/intel/i40e/rte_pmd_i40e.h
@@ -229,6 +229,9 @@ struct rte_pmd_i40e_queue_regions {
};
/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ *
* Behavior will be taken if raw packet template is matched.
*/
enum rte_pmd_i40e_pkt_template_behavior {
@@ -238,7 +241,10 @@ enum rte_pmd_i40e_pkt_template_behavior {
};
/**
- * Flow director report status
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ *
+ * Flow director report status.
* It defines what will be reported if raw packet template is matched.
*/
enum rte_pmd_i40e_pkt_template_status {
@@ -253,6 +259,9 @@ enum rte_pmd_i40e_pkt_template_status {
};
/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ *
* A structure used to define an action when raw packet template is matched.
*/
struct rte_pmd_i40e_pkt_template_action {
@@ -271,6 +280,9 @@ struct rte_pmd_i40e_pkt_template_action {
};
/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ *
* A structure used to define the input for raw packet template.
*/
struct rte_pmd_i40e_pkt_template_input {
@@ -283,6 +295,9 @@ struct rte_pmd_i40e_pkt_template_input {
};
/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ *
* A structure used to define the configuration parameters
* for raw packet template.
*/
@@ -295,6 +310,10 @@ struct rte_pmd_i40e_pkt_template_conf {
uint32_t soft_id;
};
+/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ */
enum rte_pmd_i40e_inset_type {
INSET_NONE = 0,
INSET_HASH,
@@ -307,6 +326,10 @@ struct rte_pmd_i40e_inset_mask {
uint16_t mask;
};
+/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ */
struct rte_pmd_i40e_inset {
uint64_t inset;
struct rte_pmd_i40e_inset_mask mask[2];
@@ -326,7 +349,12 @@ struct rte_pmd_i40e_inset {
* - (-ENODEV) if *port* invalid.
* - (-EINVAL) if *conf* invalid.
* - (-ENOTSUP) not supported by firmware.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_flow_add_del_packet_template(
uint16_t port,
const struct rte_pmd_i40e_pkt_template_conf *conf,
@@ -865,6 +893,10 @@ int rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
#define RTE_PMD_I40E_PCTYPE_MAX 64
#define RTE_PMD_I40E_FLOW_TYPE_MAX 64
+/**
+ * @deprecated
+ * Superseded by the rte_flow API; will be removed in DPDK 26.11.
+ */
struct rte_pmd_i40e_flow_type_mapping {
uint16_t flow_type; /**< software defined flow type*/
uint64_t pctype; /**< hardware defined pctype */
@@ -886,7 +918,12 @@ struct rte_pmd_i40e_flow_type_mapping {
* keep other PCTYPEs mapping unchanged.
* -(!0) overwrite referred PCTYPE mapping,
* set other PCTYPEs maps to PCTYPE_INVALID.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_flow_type_mapping_update(
uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items,
@@ -903,7 +940,12 @@ int rte_pmd_i40e_flow_type_mapping_update(
* the base address of the array to store returned items.
* array should be allocated by caller with minimum size of
* RTE_PMD_I40E_FLOW_TYPE_MAX items
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_flow_type_mapping_get(
uint16_t port,
struct rte_pmd_i40e_flow_type_mapping *mapping_items);
@@ -914,7 +956,12 @@ int rte_pmd_i40e_flow_type_mapping_get(
*
* @param port
* pointer to port identifier of the device
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port);
/**
@@ -946,6 +993,12 @@ int rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
int rte_pmd_i40e_rss_queue_region_conf(uint16_t port_id,
enum rte_pmd_i40e_queue_region_op op_type, void *arg);
+/**
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
+ */
+__rte_deprecated
int rte_pmd_i40e_cfg_hash_inset(uint16_t port,
uint64_t pctype, uint64_t inset);
@@ -965,7 +1018,12 @@ int rte_pmd_i40e_cfg_hash_inset(uint16_t port,
* - (-ENODEV) if *port* invalid.
* - (-EINVAL) if bad parameter.
* - (-ENOTSUP) if operation not supported.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_inset_get(uint16_t port, uint8_t pctype,
struct rte_pmd_i40e_inset *inset,
enum rte_pmd_i40e_inset_type inset_type);
@@ -986,7 +1044,12 @@ int rte_pmd_i40e_inset_get(uint16_t port, uint8_t pctype,
* - (-ENODEV) if *port* invalid.
* - (-EINVAL) if bad parameter.
* - (-ENOTSUP) if operation not supported.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
int rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype,
struct rte_pmd_i40e_inset *inset,
enum rte_pmd_i40e_inset_type inset_type);
@@ -1001,7 +1064,12 @@ int rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype,
* @return
* - (1) if set.
* - (0) if cleared.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
static inline int
rte_pmd_i40e_inset_field_get(uint64_t inset, uint8_t field_idx)
{
@@ -1027,7 +1095,12 @@ rte_pmd_i40e_inset_field_get(uint64_t inset, uint8_t field_idx)
* @return
* - (-1) if failed.
* - (0) if success.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
static inline int
rte_pmd_i40e_inset_field_set(uint64_t *inset, uint8_t field_idx)
{
@@ -1052,7 +1125,12 @@ rte_pmd_i40e_inset_field_set(uint64_t *inset, uint8_t field_idx)
* @return
* - (-1) if failed.
* - (0) if success.
+ *
+ * @deprecated
+ * This function is superseded by the rte_flow API and will be removed
+ * in DPDK 26.11.
*/
+__rte_deprecated
static inline int
rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx)
{
--
2.53.0
^ permalink raw reply related
* [RFC 2/8] net/i40e: remove testpmd flow filter commands
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
Remove the testpmd commands that drive the i40e PMD-private legacy
flow filter API, which is being deprecated in DPDK 26.07 and removed
in 26.11.
flow_director_filter
Drove rte_pmd_i40e_flow_add_del_packet_template().
port config <port_id> pctype <pctype_id>
hash_inset|fdir_inset|fdir_flx_inset get|set|clear field
port config <port_id> pctype <pctype_id>
hash_inset|fdir_inset|fdir_flx_inset clear all
Drove the rte_pmd_i40e_inset_get/set and inset_field_*
helpers.
show port <port_id> pctype mapping
port config <port_id> pctype mapping reset
port config <port_id> pctype mapping update ...
Drove rte_pmd_i40e_flow_type_mapping_get/reset/update().
The visually-similar "ptype mapping" commands (ptype mapping
get/replace/reset/update) are preserved — they drive the unrelated
rte_pmd_i40e_ptype_mapping_* DDP packet-type mapping API, which is
not in scope for this series. The naming collision between "pctype
mapping" (legacy flow-type mapping, removed here) and "ptype mapping"
(DDP packet-type mapping, kept) was a long-standing source of
confusion.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/nics/i40e.rst | 70 +--
drivers/net/intel/i40e/i40e_testpmd.c | 642 --------------------------
2 files changed, 4 insertions(+), 708 deletions(-)
diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index e67498aef4..0aae5b4d82 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -399,52 +399,6 @@ Add a rule to direct ``ipv4-udp`` packet whose ``dst_ip=2.2.2.5, src_ip=2.2.2.3,
dst is 2.2.2.5 / udp src is 32 dst is 32 / end \
actions mark id 1 / queue index 1 / end
-Check the flow director status:
-
-.. code-block:: console
-
- testpmd> show port fdir 0
-
- ######################## FDIR infos for port 0 ####################
- MODE: PERFECT
- SUPPORTED FLOW TYPE: ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other
- ipv6-frag ipv6-tcp ipv6-udp ipv6-sctp ipv6-other
- l2_payload
- FLEX PAYLOAD INFO:
- max_len: 16 payload_limit: 480
- payload_unit: 2 payload_seg: 3
- bitmask_unit: 2 bitmask_num: 2
- MASK:
- vlan_tci: 0x0000,
- src_ipv4: 0x00000000,
- dst_ipv4: 0x00000000,
- src_port: 0x0000,
- dst_port: 0x0000
- src_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000,
- dst_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000
- FLEX PAYLOAD SRC OFFSET:
- L2_PAYLOAD: 0 1 2 3 4 5 6 ...
- L3_PAYLOAD: 0 1 2 3 4 5 6 ...
- L4_PAYLOAD: 0 1 2 3 4 5 6 ...
- FLEX MASK CFG:
- ipv4-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv4-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv4-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv4-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv4-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv6-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv6-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv6-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv6-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- ipv6-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- l2_payload: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- guarant_count: 1 best_count: 0
- guarant_space: 512 best_space: 7168
- collision: 0 free: 0
- maxhash: 0 maxlen: 0
- add: 0 remove: 0
- f_add: 0 f_remove: 0
-
Floating VEB
~~~~~~~~~~~~~
@@ -613,19 +567,10 @@ Limitations or Known issues
MPLS packet classification
~~~~~~~~~~~~~~~~~~~~~~~~~~
-For firmware versions prior to 5.0, MPLS packets are not recognized by the NIC.
-The L2 Payload flow type in flow director can be used to classify MPLS packet
-by using a command in testpmd like:
-
- testpmd> flow_director_filter 0 mode IP add flow l2_payload ether \
- 0x8847 flexbytes () fwd pf queue <N> fd_id <M>
-
-With the NIC firmware version 5.0 or greater, some limited MPLS support
-is added: Native MPLS (MPLS in Ethernet) skip is implemented, while no
-new packet type, no classification or offload are possible. With this change,
-L2 Payload flow type in flow director cannot be used to classify MPLS packet
-as with previous firmware versions. Meanwhile, the Ethertype filter can be
-used to classify MPLS packet by using a command in testpmd like:
+With NIC firmware version 5.0 or greater, native MPLS (MPLS in
+Ethernet) skip is implemented, although no new packet type, no
+classification, and no offload are possible.
+The Ethertype filter can be used to classify MPLS packets via testpmd::
testpmd> flow create 0 ingress pattern eth type is 0x8847 / end \
actions queue index <M> / end
@@ -878,13 +823,6 @@ Reset ptype mapping table::
testpmd> ptype mapping reset (port_id)
-show port pctype mapping
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-List all items from the pctype mapping table::
-
- testpmd> show port (port_id) pctype mapping
-
High Performance of Small Packets on 40GbE NIC
----------------------------------------------
diff --git a/drivers/net/intel/i40e/i40e_testpmd.c b/drivers/net/intel/i40e/i40e_testpmd.c
index 21f596297b..3943287ca9 100644
--- a/drivers/net/intel/i40e/i40e_testpmd.c
+++ b/drivers/net/intel/i40e/i40e_testpmd.c
@@ -464,149 +464,6 @@ static cmdline_parse_inst_t cmd_show_queue_region_info_all = {
},
};
-/* *** deal with flow director filter *** */
-struct cmd_flow_director_result {
- cmdline_fixed_string_t flow_director_filter;
- portid_t port_id;
- cmdline_fixed_string_t mode;
- cmdline_fixed_string_t mode_value;
- cmdline_fixed_string_t ops;
- cmdline_fixed_string_t flow;
- cmdline_fixed_string_t flow_type;
- cmdline_fixed_string_t drop;
- cmdline_fixed_string_t queue;
- uint16_t queue_id;
- cmdline_fixed_string_t fd_id;
- uint32_t fd_id_value;
- cmdline_fixed_string_t packet;
- char filepath[];
-};
-
-static void
-cmd_flow_director_filter_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl, __rte_unused void *data)
-{
- struct cmd_flow_director_result *res = parsed_result;
- int ret = 0;
- struct rte_pmd_i40e_flow_type_mapping
- mapping[RTE_PMD_I40E_FLOW_TYPE_MAX];
- struct rte_pmd_i40e_pkt_template_conf conf;
- uint16_t flow_type = str_to_flowtype(res->flow_type);
- uint16_t i, port = res->port_id;
- uint8_t add;
-
- memset(&conf, 0, sizeof(conf));
-
- if (flow_type == RTE_ETH_FLOW_UNKNOWN) {
- fprintf(stderr, "Invalid flow type specified.\n");
- return;
- }
- ret = rte_pmd_i40e_flow_type_mapping_get(res->port_id,
- mapping);
- if (ret)
- return;
- if (mapping[flow_type].pctype == 0ULL) {
- fprintf(stderr, "Invalid flow type specified.\n");
- return;
- }
- for (i = 0; i < RTE_PMD_I40E_PCTYPE_MAX; i++) {
- if (mapping[flow_type].pctype & (1ULL << i)) {
- conf.input.pctype = i;
- break;
- }
- }
-
- conf.input.packet = open_file(res->filepath,
- &conf.input.length);
- if (!conf.input.packet)
- return;
- if (!strcmp(res->drop, "drop"))
- conf.action.behavior =
- RTE_PMD_I40E_PKT_TEMPLATE_REJECT;
- else
- conf.action.behavior =
- RTE_PMD_I40E_PKT_TEMPLATE_ACCEPT;
- conf.action.report_status =
- RTE_PMD_I40E_PKT_TEMPLATE_REPORT_ID;
- conf.action.rx_queue = res->queue_id;
- conf.soft_id = res->fd_id_value;
- add = strcmp(res->ops, "del") ? 1 : 0;
- ret = rte_pmd_i40e_flow_add_del_packet_template(port,
- &conf,
- add);
- if (ret < 0)
- fprintf(stderr, "flow director config error: (%s)\n",
- strerror(-ret));
- close_file(conf.input.packet);
-}
-
-static cmdline_parse_token_string_t cmd_flow_director_filter =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- flow_director_filter, "flow_director_filter");
-static cmdline_parse_token_num_t cmd_flow_director_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_ops =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- ops, "add#del#update");
-static cmdline_parse_token_string_t cmd_flow_director_flow =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- flow, "flow");
-static cmdline_parse_token_string_t cmd_flow_director_flow_type =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- flow_type, NULL);
-static cmdline_parse_token_string_t cmd_flow_director_drop =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- drop, "drop#fwd");
-static cmdline_parse_token_string_t cmd_flow_director_queue =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- queue, "queue");
-static cmdline_parse_token_num_t cmd_flow_director_queue_id =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
- queue_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_flow_director_fd_id =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- fd_id, "fd_id");
-static cmdline_parse_token_num_t cmd_flow_director_fd_id_value =
- TOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,
- fd_id_value, RTE_UINT32);
-static cmdline_parse_token_string_t cmd_flow_director_mode =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- mode, "mode");
-static cmdline_parse_token_string_t cmd_flow_director_mode_raw =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- mode_value, "raw");
-static cmdline_parse_token_string_t cmd_flow_director_packet =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- packet, "packet");
-static cmdline_parse_token_string_t cmd_flow_director_filepath =
- TOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,
- filepath, NULL);
-
-static cmdline_parse_inst_t cmd_add_del_raw_flow_director = {
- .f = cmd_flow_director_filter_parsed,
- .data = NULL,
- .help_str = "flow_director_filter ... : Add or delete a raw flow "
- "director entry on NIC",
- .tokens = {
- (void *)&cmd_flow_director_filter,
- (void *)&cmd_flow_director_port_id,
- (void *)&cmd_flow_director_mode,
- (void *)&cmd_flow_director_mode_raw,
- (void *)&cmd_flow_director_ops,
- (void *)&cmd_flow_director_flow,
- (void *)&cmd_flow_director_flow_type,
- (void *)&cmd_flow_director_drop,
- (void *)&cmd_flow_director_queue,
- (void *)&cmd_flow_director_queue_id,
- (void *)&cmd_flow_director_fd_id,
- (void *)&cmd_flow_director_fd_id_value,
- (void *)&cmd_flow_director_packet,
- (void *)&cmd_flow_director_filepath,
- NULL,
- },
-};
-
/* VF unicast promiscuous mode configuration */
/* Common result structure for VF unicast promiscuous mode */
@@ -1670,469 +1527,6 @@ static cmdline_parse_inst_t cmd_ddp_get_list = {
},
};
-/* Configure input set */
-struct cmd_cfg_input_set_result {
- cmdline_fixed_string_t port;
- cmdline_fixed_string_t cfg;
- portid_t port_id;
- cmdline_fixed_string_t pctype;
- uint8_t pctype_id;
- cmdline_fixed_string_t inset_type;
- cmdline_fixed_string_t opt;
- cmdline_fixed_string_t field;
- uint8_t field_idx;
-};
-
-static void
-cmd_cfg_input_set_parsed(__rte_unused void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_cfg_input_set_result *res = parsed_result;
- enum rte_pmd_i40e_inset_type inset_type = INSET_NONE;
- struct rte_pmd_i40e_inset inset;
- int ret = -ENOTSUP;
-
- if (!all_ports_stopped()) {
- fprintf(stderr, "Please stop all ports first\n");
- return;
- }
-
- if (!strcmp(res->inset_type, "hash_inset"))
- inset_type = INSET_HASH;
- else if (!strcmp(res->inset_type, "fdir_inset"))
- inset_type = INSET_FDIR;
- else if (!strcmp(res->inset_type, "fdir_flx_inset"))
- inset_type = INSET_FDIR_FLX;
- ret = rte_pmd_i40e_inset_get(res->port_id, res->pctype_id, &inset, inset_type);
- if (ret) {
- fprintf(stderr, "Failed to get input set.\n");
- return;
- }
-
- if (!strcmp(res->opt, "get")) {
- ret = rte_pmd_i40e_inset_field_get(inset.inset, res->field_idx);
- if (ret)
- printf("Field index %d is enabled.\n", res->field_idx);
- else
- printf("Field index %d is disabled.\n", res->field_idx);
- return;
- }
-
- if (!strcmp(res->opt, "set"))
- ret = rte_pmd_i40e_inset_field_set(&inset.inset, res->field_idx);
- else if (!strcmp(res->opt, "clear"))
- ret = rte_pmd_i40e_inset_field_clear(&inset.inset, res->field_idx);
- if (ret) {
- fprintf(stderr, "Failed to configure input set field.\n");
- return;
- }
-
- ret = rte_pmd_i40e_inset_set(res->port_id, res->pctype_id, &inset, inset_type);
- if (ret) {
- fprintf(stderr, "Failed to set input set.\n");
- return;
- }
-
- if (ret == -ENOTSUP)
- fprintf(stderr, "Function not supported\n");
-}
-
-static cmdline_parse_token_string_t cmd_cfg_input_set_port =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- port, "port");
-static cmdline_parse_token_string_t cmd_cfg_input_set_cfg =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- cfg, "config");
-static cmdline_parse_token_num_t cmd_cfg_input_set_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_cfg_input_set_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_cfg_input_set_pctype =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- pctype, "pctype");
-static cmdline_parse_token_num_t cmd_cfg_input_set_pctype_id =
- TOKEN_NUM_INITIALIZER(struct cmd_cfg_input_set_result,
- pctype_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_cfg_input_set_inset_type =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- inset_type, "hash_inset#fdir_inset#fdir_flx_inset");
-static cmdline_parse_token_string_t cmd_cfg_input_set_opt =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- opt, "get#set#clear");
-static cmdline_parse_token_string_t cmd_cfg_input_set_field =
- TOKEN_STRING_INITIALIZER(struct cmd_cfg_input_set_result,
- field, "field");
-static cmdline_parse_token_num_t cmd_cfg_input_set_field_idx =
- TOKEN_NUM_INITIALIZER(struct cmd_cfg_input_set_result,
- field_idx, RTE_UINT8);
-
-static cmdline_parse_inst_t cmd_cfg_input_set = {
- .f = cmd_cfg_input_set_parsed,
- .data = NULL,
- .help_str = "port config <port_id> pctype <pctype_id> hash_inset|"
- "fdir_inset|fdir_flx_inset get|set|clear field <field_idx>",
- .tokens = {
- (void *)&cmd_cfg_input_set_port,
- (void *)&cmd_cfg_input_set_cfg,
- (void *)&cmd_cfg_input_set_port_id,
- (void *)&cmd_cfg_input_set_pctype,
- (void *)&cmd_cfg_input_set_pctype_id,
- (void *)&cmd_cfg_input_set_inset_type,
- (void *)&cmd_cfg_input_set_opt,
- (void *)&cmd_cfg_input_set_field,
- (void *)&cmd_cfg_input_set_field_idx,
- NULL,
- },
-};
-
-/* Clear input set */
-struct cmd_clear_input_set_result {
- cmdline_fixed_string_t port;
- cmdline_fixed_string_t cfg;
- portid_t port_id;
- cmdline_fixed_string_t pctype;
- uint8_t pctype_id;
- cmdline_fixed_string_t inset_type;
- cmdline_fixed_string_t clear;
- cmdline_fixed_string_t all;
-};
-
-static void
-cmd_clear_input_set_parsed(__rte_unused void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_clear_input_set_result *res = parsed_result;
- enum rte_pmd_i40e_inset_type inset_type = INSET_NONE;
- struct rte_pmd_i40e_inset inset;
- int ret = -ENOTSUP;
-
- if (!all_ports_stopped()) {
- fprintf(stderr, "Please stop all ports first\n");
- return;
- }
-
- if (!strcmp(res->inset_type, "hash_inset"))
- inset_type = INSET_HASH;
- else if (!strcmp(res->inset_type, "fdir_inset"))
- inset_type = INSET_FDIR;
- else if (!strcmp(res->inset_type, "fdir_flx_inset"))
- inset_type = INSET_FDIR_FLX;
-
- memset(&inset, 0, sizeof(inset));
-
- ret = rte_pmd_i40e_inset_set(res->port_id, res->pctype_id, &inset, inset_type);
- if (ret) {
- fprintf(stderr, "Failed to clear input set.\n");
- return;
- }
-
- if (ret == -ENOTSUP)
- fprintf(stderr, "Function not supported\n");
-}
-
-static cmdline_parse_token_string_t cmd_clear_input_set_port =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- port, "port");
-static cmdline_parse_token_string_t cmd_clear_input_set_cfg =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- cfg, "config");
-static cmdline_parse_token_num_t cmd_clear_input_set_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_clear_input_set_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_clear_input_set_pctype =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- pctype, "pctype");
-static cmdline_parse_token_num_t cmd_clear_input_set_pctype_id =
- TOKEN_NUM_INITIALIZER(struct cmd_clear_input_set_result,
- pctype_id, RTE_UINT8);
-static cmdline_parse_token_string_t cmd_clear_input_set_inset_type =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- inset_type, "hash_inset#fdir_inset#fdir_flx_inset");
-static cmdline_parse_token_string_t cmd_clear_input_set_clear =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- clear, "clear");
-static cmdline_parse_token_string_t cmd_clear_input_set_all =
- TOKEN_STRING_INITIALIZER(struct cmd_clear_input_set_result,
- all, "all");
-
-static cmdline_parse_inst_t cmd_clear_input_set = {
- .f = cmd_clear_input_set_parsed,
- .data = NULL,
- .help_str = "port config <port_id> pctype <pctype_id> hash_inset|"
- "fdir_inset|fdir_flx_inset clear all",
- .tokens = {
- (void *)&cmd_clear_input_set_port,
- (void *)&cmd_clear_input_set_cfg,
- (void *)&cmd_clear_input_set_port_id,
- (void *)&cmd_clear_input_set_pctype,
- (void *)&cmd_clear_input_set_pctype_id,
- (void *)&cmd_clear_input_set_inset_type,
- (void *)&cmd_clear_input_set_clear,
- (void *)&cmd_clear_input_set_all,
- NULL,
- },
-};
-
-/* port config pctype mapping reset */
-
-/* Common result structure for port config pctype mapping reset */
-struct cmd_pctype_mapping_reset_result {
- cmdline_fixed_string_t port;
- cmdline_fixed_string_t config;
- portid_t port_id;
- cmdline_fixed_string_t pctype;
- cmdline_fixed_string_t mapping;
- cmdline_fixed_string_t reset;
-};
-
-/* Common CLI fields for port config pctype mapping reset*/
-static cmdline_parse_token_string_t cmd_pctype_mapping_reset_port =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- port, "port");
-static cmdline_parse_token_string_t cmd_pctype_mapping_reset_config =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- config, "config");
-static cmdline_parse_token_num_t cmd_pctype_mapping_reset_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_pctype_mapping_reset_pctype =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- pctype, "pctype");
-static cmdline_parse_token_string_t cmd_pctype_mapping_reset_mapping =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- mapping, "mapping");
-static cmdline_parse_token_string_t cmd_pctype_mapping_reset_reset =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_reset_result,
- reset, "reset");
-
-static void
-cmd_pctype_mapping_reset_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_pctype_mapping_reset_result *res = parsed_result;
- int ret = -ENOTSUP;
-
- if (port_id_is_invalid(res->port_id, ENABLED_WARN))
- return;
-
- ret = rte_pmd_i40e_flow_type_mapping_reset(res->port_id);
- switch (ret) {
- case 0:
- break;
- case -ENODEV:
- fprintf(stderr, "invalid port_id %d\n", res->port_id);
- break;
- case -ENOTSUP:
- fprintf(stderr, "function not implemented\n");
- break;
- default:
- fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
- }
-}
-
-static cmdline_parse_inst_t cmd_pctype_mapping_reset = {
- .f = cmd_pctype_mapping_reset_parsed,
- .data = NULL,
- .help_str = "port config <port_id> pctype mapping reset",
- .tokens = {
- (void *)&cmd_pctype_mapping_reset_port,
- (void *)&cmd_pctype_mapping_reset_config,
- (void *)&cmd_pctype_mapping_reset_port_id,
- (void *)&cmd_pctype_mapping_reset_pctype,
- (void *)&cmd_pctype_mapping_reset_mapping,
- (void *)&cmd_pctype_mapping_reset_reset,
- NULL,
- },
-};
-
-/* show port pctype mapping */
-
-/* Common result structure for show port pctype mapping */
-struct cmd_pctype_mapping_get_result {
- cmdline_fixed_string_t show;
- cmdline_fixed_string_t port;
- portid_t port_id;
- cmdline_fixed_string_t pctype;
- cmdline_fixed_string_t mapping;
-};
-
-/* Common CLI fields for pctype mapping get */
-static cmdline_parse_token_string_t cmd_pctype_mapping_get_show =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_get_result,
- show, "show");
-static cmdline_parse_token_string_t cmd_pctype_mapping_get_port =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_get_result,
- port, "port");
-static cmdline_parse_token_num_t cmd_pctype_mapping_get_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_pctype_mapping_get_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_pctype_mapping_get_pctype =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_get_result,
- pctype, "pctype");
-static cmdline_parse_token_string_t cmd_pctype_mapping_get_mapping =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_get_result,
- mapping, "mapping");
-
-static void
-cmd_pctype_mapping_get_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_pctype_mapping_get_result *res = parsed_result;
- int ret = -ENOTSUP;
- struct rte_pmd_i40e_flow_type_mapping
- mapping[RTE_PMD_I40E_FLOW_TYPE_MAX];
- int i, j, first_pctype;
-
- if (port_id_is_invalid(res->port_id, ENABLED_WARN))
- return;
-
- ret = rte_pmd_i40e_flow_type_mapping_get(res->port_id, mapping);
- switch (ret) {
- case 0:
- break;
- case -ENODEV:
- fprintf(stderr, "invalid port_id %d\n", res->port_id);
- return;
- case -ENOTSUP:
- fprintf(stderr, "function not implemented\n");
- return;
- default:
- fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
- return;
- }
-
- for (i = 0; i < RTE_PMD_I40E_FLOW_TYPE_MAX; i++) {
- if (mapping[i].pctype != 0ULL) {
- first_pctype = 1;
-
- printf("pctype: ");
- for (j = 0; j < RTE_PMD_I40E_PCTYPE_MAX; j++) {
- if (mapping[i].pctype & (1ULL << j)) {
- printf(first_pctype ? "%02d" : ",%02d", j);
- first_pctype = 0;
- }
- }
- printf(" -> flowtype: %02d\n", mapping[i].flow_type);
- }
- }
-}
-
-static cmdline_parse_inst_t cmd_pctype_mapping_get = {
- .f = cmd_pctype_mapping_get_parsed,
- .data = NULL,
- .help_str = "show port <port_id> pctype mapping",
- .tokens = {
- (void *)&cmd_pctype_mapping_get_show,
- (void *)&cmd_pctype_mapping_get_port,
- (void *)&cmd_pctype_mapping_get_port_id,
- (void *)&cmd_pctype_mapping_get_pctype,
- (void *)&cmd_pctype_mapping_get_mapping,
- NULL,
- },
-};
-
-/* port config pctype mapping update */
-
-/* Common result structure for port config pctype mapping update */
-struct cmd_pctype_mapping_update_result {
- cmdline_fixed_string_t port;
- cmdline_fixed_string_t config;
- portid_t port_id;
- cmdline_fixed_string_t pctype;
- cmdline_fixed_string_t mapping;
- cmdline_fixed_string_t update;
- cmdline_fixed_string_t pctype_list;
- uint16_t flow_type;
-};
-
-/* Common CLI fields for pctype mapping update*/
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_port =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- port, "port");
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_config =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- config, "config");
-static cmdline_parse_token_num_t cmd_pctype_mapping_update_port_id =
- TOKEN_NUM_INITIALIZER(struct cmd_pctype_mapping_update_result,
- port_id, RTE_UINT16);
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_pctype =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- pctype, "pctype");
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_mapping =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- mapping, "mapping");
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_update =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- update, "update");
-static cmdline_parse_token_string_t cmd_pctype_mapping_update_pc_type =
- TOKEN_STRING_INITIALIZER(struct cmd_pctype_mapping_update_result,
- pctype_list, NULL);
-static cmdline_parse_token_num_t cmd_pctype_mapping_update_flow_type =
- TOKEN_NUM_INITIALIZER(struct cmd_pctype_mapping_update_result,
- flow_type, RTE_UINT16);
-
-static void
-cmd_pctype_mapping_update_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_pctype_mapping_update_result *res = parsed_result;
- int ret = -ENOTSUP;
- struct rte_pmd_i40e_flow_type_mapping mapping;
- unsigned int i;
- unsigned int nb_item;
- unsigned int pctype_list[RTE_PMD_I40E_PCTYPE_MAX];
-
- if (port_id_is_invalid(res->port_id, ENABLED_WARN))
- return;
-
- nb_item = parse_item_list(res->pctype_list, "pctypes", RTE_PMD_I40E_PCTYPE_MAX,
- pctype_list, 1);
- mapping.flow_type = res->flow_type;
- for (i = 0, mapping.pctype = 0ULL; i < nb_item; i++)
- mapping.pctype |= (1ULL << pctype_list[i]);
- ret = rte_pmd_i40e_flow_type_mapping_update(res->port_id,
- &mapping,
- 1,
- 0);
- switch (ret) {
- case 0:
- break;
- case -EINVAL:
- fprintf(stderr, "invalid pctype or flow type\n");
- break;
- case -ENODEV:
- fprintf(stderr, "invalid port_id %d\n", res->port_id);
- break;
- case -ENOTSUP:
- fprintf(stderr, "function not implemented\n");
- break;
- default:
- fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
- }
-}
-
-static cmdline_parse_inst_t cmd_pctype_mapping_update = {
- .f = cmd_pctype_mapping_update_parsed,
- .data = NULL,
- .help_str = "port config <port_id> pctype mapping update"
- " <pctype_id_0,[pctype_id_1]*> <flowtype_id>",
- .tokens = {
- (void *)&cmd_pctype_mapping_update_port,
- (void *)&cmd_pctype_mapping_update_config,
- (void *)&cmd_pctype_mapping_update_port_id,
- (void *)&cmd_pctype_mapping_update_pctype,
- (void *)&cmd_pctype_mapping_update_mapping,
- (void *)&cmd_pctype_mapping_update_update,
- (void *)&cmd_pctype_mapping_update_pc_type,
- (void *)&cmd_pctype_mapping_update_flow_type,
- NULL,
- },
-};
-
/* ptype mapping get */
/* Common result structure for ptype mapping get */
@@ -2553,13 +1947,6 @@ static struct testpmd_driver_commands i40e_cmds = {
"show port (port_id) queue-region\n"
" show all queue region related configuration info\n",
},
- {
- &cmd_add_del_raw_flow_director,
- "flow_director_filter (port_id) mode raw (add|del|update)"
- " flow (flow_id) (drop|fwd) queue (queue_id)"
- " fd_id (fd_id_value) packet (packet file name)\n"
- " Add/Del a raw type flow director filter.\n",
- },
{
&cmd_set_vf_promisc,
"set vf promisc (port_id) (vf_id) (on|off)\n"
@@ -2620,19 +2007,6 @@ static struct testpmd_driver_commands i40e_cmds = {
"ddp get info (profile_path)\n"
" Get ddp profile information.\n",
},
- {
- &cmd_cfg_input_set,
- "port config (port_id) pctype (pctype_id) hash_inset|"
- "fdir_inset|fdir_flx_inset get|set|clear field\n"
- " (field_idx)\n"
- " Configure RSS|FDIR|FDIR_FLX input set for some pctype\n",
- },
- {
- &cmd_clear_input_set,
- "port config (port_id) pctype (pctype_id) hash_inset|"
- "fdir_inset|fdir_flx_inset clear all\n"
- " Clear RSS|FDIR|FDIR_FLX input set completely for some pctype\n",
- },
{
&cmd_ptype_mapping_get,
"ptype mapping get (port_id) (valid_only)\n"
@@ -2653,22 +2027,6 @@ static struct testpmd_driver_commands i40e_cmds = {
"ptype mapping update (port_id) (hw_ptype) (sw_ptype)\n"
" Update a ptype mapping item on a port\n",
},
- {
- &cmd_pctype_mapping_get,
- "show port (port_id) pctype mapping\n"
- " Get flow ptype to pctype mapping on a port\n",
- },
- {
- &cmd_pctype_mapping_reset,
- "port config (port_id) pctype mapping reset\n"
- " Reset flow type to pctype mapping on a port\n",
- },
- {
- &cmd_pctype_mapping_update,
- "port config (port_id) pctype mapping update"
- " (pctype_id_0[,pctype_id_1]*) (flow_type_id)\n"
- " Update a flow type to pctype mapping item on a port\n",
- },
{
&cmd_config_src_prune_all,
"port config all i40e_src_prune (on|off)\n"
--
2.53.0
^ permalink raw reply related
* [RFC 1/8] app/testpmd: remove support for flow director
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Aman Singh
In-Reply-To: <20260528213816.562910-1-stephen@networkplumber.org>
The flow director API is deprecated and will be removed in 26.11.
Remove it from testpmd now since testpmd CLI is not a stable API.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/cmdline.c | 21 +--
app/test-pmd/config.c | 163 --------------------
app/test-pmd/testpmd.h | 3 -
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 -----
4 files changed, 6 insertions(+), 217 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index cc9c462498..a5022bde04 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -163,7 +163,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"Display:\n"
"--------\n\n"
- "show port (info|stats|summary|xstats|fdir|dcb_tc) (port_id|all)\n"
+ "show port (info|stats|summary|xstats|dcb_tc) (port_id|all)\n"
" Display information for port_id, or all.\n\n"
"show port info (port_id) representor\n"
@@ -189,7 +189,7 @@ static void cmd_help_long_parsed(void *parsed_result,
"show port (port_id) rss-hash [key | algorithm]\n"
" Display the RSS hash functions, RSS hash key and RSS hash algorithms of port\n\n"
- "clear port (info|stats|xstats|fdir) (port_id|all)\n"
+ "clear port (info|stats|xstats) (port_id|all)\n"
" Clear information for port_id, or all.\n\n"
"show (rxq|txq) info (port_id) (queue_id)\n"
@@ -7510,11 +7510,6 @@ static void cmd_showportall_parsed(void *parsed_result,
else if (!strcmp(res->what, "xstats"))
RTE_ETH_FOREACH_DEV(i)
nic_xstats_display(i);
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
- else if (!strcmp(res->what, "fdir"))
- RTE_ETH_FOREACH_DEV(i)
- fdir_get_infos(i);
-#endif
else if (!strcmp(res->what, "dcb_tc"))
RTE_ETH_FOREACH_DEV(i)
port_dcb_info_display(i);
@@ -7527,14 +7522,14 @@ static cmdline_parse_token_string_t cmd_showportall_port =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port");
static cmdline_parse_token_string_t cmd_showportall_what =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what,
- "info#summary#stats#xstats#fdir#dcb_tc");
+ "info#summary#stats#xstats#dcb_tc");
static cmdline_parse_token_string_t cmd_showportall_all =
TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all");
static cmdline_parse_inst_t cmd_showportall = {
.f = cmd_showportall_parsed,
.data = NULL,
.help_str = "show|clear port "
- "info|summary|stats|xstats|fdir|dcb_tc all",
+ "info|summary|stats|xstats|dcb_tc all",
.tokens = {
(void *)&cmd_showportall_show,
(void *)&cmd_showportall_port,
@@ -7572,10 +7567,6 @@ static void cmd_showport_parsed(void *parsed_result,
nic_stats_display(res->portnum);
else if (!strcmp(res->what, "xstats"))
nic_xstats_display(res->portnum);
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
- else if (!strcmp(res->what, "fdir"))
- fdir_get_infos(res->portnum);
-#endif
else if (!strcmp(res->what, "dcb_tc"))
port_dcb_info_display(res->portnum);
}
@@ -7587,7 +7578,7 @@ static cmdline_parse_token_string_t cmd_showport_port =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port");
static cmdline_parse_token_string_t cmd_showport_what =
TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
- "info#summary#stats#xstats#fdir#dcb_tc");
+ "info#summary#stats#xstats#dcb_tc");
static cmdline_parse_token_num_t cmd_showport_portnum =
TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16);
@@ -7595,7 +7586,7 @@ static cmdline_parse_inst_t cmd_showport = {
.f = cmd_showport_parsed,
.data = NULL,
.help_str = "show|clear port "
- "info|summary|stats|xstats|fdir|dcb_tc "
+ "info|summary|stats|xstats|dcb_tc "
"<port_id>",
.tokens = {
(void *)&cmd_showport_show,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index c950793aaf..12fc679250 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -7041,169 +7041,6 @@ flowtype_to_str(uint16_t flow_type)
return NULL;
}
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
-static inline void
-print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
-{
- struct rte_eth_flex_payload_cfg *cfg;
- uint32_t i, j;
-
- for (i = 0; i < flex_conf->nb_payloads; i++) {
- cfg = &flex_conf->flex_set[i];
- if (cfg->type == RTE_ETH_RAW_PAYLOAD)
- printf("\n RAW: ");
- else if (cfg->type == RTE_ETH_L2_PAYLOAD)
- printf("\n L2_PAYLOAD: ");
- else if (cfg->type == RTE_ETH_L3_PAYLOAD)
- printf("\n L3_PAYLOAD: ");
- else if (cfg->type == RTE_ETH_L4_PAYLOAD)
- printf("\n L4_PAYLOAD: ");
- else
- printf("\n UNKNOWN PAYLOAD(%u): ", cfg->type);
- for (j = 0; j < num; j++)
- printf(" %-5u", cfg->src_offset[j]);
- }
- printf("\n");
-}
-
-static inline void
-print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
-{
- struct rte_eth_fdir_flex_mask *mask;
- uint32_t i, j;
- const char *p;
-
- for (i = 0; i < flex_conf->nb_flexmasks; i++) {
- mask = &flex_conf->flex_mask[i];
- p = flowtype_to_str(mask->flow_type);
- printf("\n %s:\t", p ? p : "unknown");
- for (j = 0; j < num; j++)
- printf(" %02x", mask->mask[j]);
- }
- printf("\n");
-}
-
-static inline void
-print_fdir_flow_type(uint32_t flow_types_mask)
-{
- int i;
- const char *p;
-
- for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) {
- if (!(flow_types_mask & (1 << i)))
- continue;
- p = flowtype_to_str(i);
- if (p)
- printf(" %s", p);
- else
- printf(" unknown");
- }
- printf("\n");
-}
-
-static int
-get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info,
- struct rte_eth_fdir_stats *fdir_stat)
-{
- int ret = -ENOTSUP;
-
-#ifdef RTE_NET_I40E
- if (ret == -ENOTSUP) {
- ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info);
- if (!ret)
- ret = rte_pmd_i40e_get_fdir_stats(port_id, fdir_stat);
- }
-#endif
-#ifdef RTE_NET_IXGBE
- if (ret == -ENOTSUP) {
- ret = rte_pmd_ixgbe_get_fdir_info(port_id, fdir_info);
- if (!ret)
- ret = rte_pmd_ixgbe_get_fdir_stats(port_id, fdir_stat);
- }
-#endif
- switch (ret) {
- case 0:
- break;
- case -ENOTSUP:
- fprintf(stderr, "\n FDIR is not supported on port %-2d\n",
- port_id);
- break;
- default:
- fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
- break;
- }
- return ret;
-}
-
-void
-fdir_get_infos(portid_t port_id)
-{
- struct rte_eth_fdir_stats fdir_stat;
- struct rte_eth_fdir_info fdir_info;
-
- static const char *fdir_stats_border = "########################";
-
- if (port_id_is_invalid(port_id, ENABLED_WARN))
- return;
-
- memset(&fdir_info, 0, sizeof(fdir_info));
- memset(&fdir_stat, 0, sizeof(fdir_stat));
- if (get_fdir_info(port_id, &fdir_info, &fdir_stat))
- return;
-
- printf("\n %s FDIR infos for port %-2d %s\n",
- fdir_stats_border, port_id, fdir_stats_border);
- printf(" MODE: ");
- if (fdir_info.mode == RTE_FDIR_MODE_PERFECT)
- printf(" PERFECT\n");
- else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)
- printf(" PERFECT-MAC-VLAN\n");
- else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
- printf(" PERFECT-TUNNEL\n");
- else if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE)
- printf(" SIGNATURE\n");
- else
- printf(" DISABLE\n");
- if (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN
- && fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) {
- printf(" SUPPORTED FLOW TYPE: ");
- print_fdir_flow_type(fdir_info.flow_types_mask[0]);
- }
- printf(" FLEX PAYLOAD INFO:\n");
- printf(" max_len: %-10"PRIu32" payload_limit: %-10"PRIu32"\n"
- " payload_unit: %-10"PRIu32" payload_seg: %-10"PRIu32"\n"
- " bitmask_unit: %-10"PRIu32" bitmask_num: %-10"PRIu32"\n",
- fdir_info.max_flexpayload, fdir_info.flex_payload_limit,
- fdir_info.flex_payload_unit,
- fdir_info.max_flex_payload_segment_num,
- fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num);
- if (fdir_info.flex_conf.nb_payloads > 0) {
- printf(" FLEX PAYLOAD SRC OFFSET:");
- print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload);
- }
- if (fdir_info.flex_conf.nb_flexmasks > 0) {
- printf(" FLEX MASK CFG:");
- print_fdir_flex_mask(&fdir_info.flex_conf, fdir_info.max_flexpayload);
- }
- printf(" guarant_count: %-10"PRIu32" best_count: %"PRIu32"\n",
- fdir_stat.guarant_cnt, fdir_stat.best_cnt);
- printf(" guarant_space: %-10"PRIu32" best_space: %"PRIu32"\n",
- fdir_info.guarant_spc, fdir_info.best_spc);
- printf(" collision: %-10"PRIu32" free: %"PRIu32"\n"
- " maxhash: %-10"PRIu32" maxlen: %"PRIu32"\n"
- " add: %-10"PRIu64" remove: %"PRIu64"\n"
- " f_add: %-10"PRIu64" f_remove: %"PRIu64"\n",
- fdir_stat.collision, fdir_stat.free,
- fdir_stat.maxhash, fdir_stat.maxlen,
- fdir_stat.add, fdir_stat.remove,
- fdir_stat.f_add, fdir_stat.f_remove);
- printf(" %s############################%s\n",
- fdir_stats_border, fdir_stats_border);
-}
-
-#endif /* RTE_NET_I40E || RTE_NET_IXGBE */
-
void
set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
{
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1a54535470..0a4ab188bb 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -1185,9 +1185,6 @@ int all_ports_stopped(void);
int port_is_stopped(portid_t port_id);
int port_is_started(portid_t port_id);
void pmd_test_exit(void);
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-void fdir_get_infos(portid_t port_id);
-#endif
void port_rss_reta_info(portid_t port_id,
struct rte_eth_rss_reta_entry64 *reta_conf,
uint16_t nb_entries);
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f99b29b423..1d079f521a 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2266,42 +2266,6 @@ Where the threshold type can be:
These threshold options are also available from the command-line.
-port config pctype mapping
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Reset pctype mapping table::
-
- testpmd> port config (port_id) pctype mapping reset
-
-Update hardware defined pctype to software defined flow type mapping table::
-
- testpmd> port config (port_id) pctype mapping update (pctype_id_0[,pctype_id_1]*) (flow_type_id)
-
-where:
-
-* ``pctype_id_x``: hardware pctype id as index of bit in bitmask value of the pctype mapping table.
-
-* ``flow_type_id``: software flow type id as the index of the pctype mapping table.
-
-port config input set
-~~~~~~~~~~~~~~~~~~~~~
-
-Config RSS/FDIR/FDIR flexible payload input set for some pctype::
-
- testpmd> port config (port_id) pctype (pctype_id) \
- (hash_inset|fdir_inset|fdir_flx_inset) \
- (get|set|clear) field (field_idx)
-
-Clear RSS/FDIR/FDIR flexible payload input set for some pctype::
-
- testpmd> port config (port_id) pctype (pctype_id) \
- (hash_inset|fdir_inset|fdir_flx_inset) clear all
-
-where:
-
-* ``pctype_id``: hardware packet classification types.
-* ``field_idx``: hardware field index.
-
port config udp_tunnel_port
~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
2.53.0
^ permalink raw reply related
* [RFC 0/8] retire legacy flow director API
From: Stephen Hemminger @ 2026-05-28 21:37 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The flow director (fdir) configuration API in <rte_eth_ctrl.h> was
superseded by rte_flow in 17.05 but never removed. This series
finishes the job: 26.07 retires the user-facing surface and
decouples driver internals from the public ABI; the 26.11
deprecation notice covers the public ABI removal itself.
User-visible changes in 26.07:
- testpmd commands gone: `show port fdir`, `clear port fdir`,
`flow_director_filter`, `port config ... pctype mapping ...`,
and `port config ... hash_inset|fdir_inset|fdir_flx_inset ...`.
Use the `flow` command instead.
- Experimental functions gone:
rte_pmd_{i40e,ixgbe}_get_fdir_info() and
rte_pmd_{i40e,ixgbe}_get_fdir_stats(). Removed early to give
out-of-tree callers a build-time signal ahead of 26.11.
- <rte_pmd_i40e.h> filter configuration entry points are marked
__rte_deprecated. -Werror sources will need
-Wno-deprecated-declarations, or migration to rte_flow, before
26.11.
Scheduled for 26.11 (announced in deprecation.rst):
- Flow director types in <rte_eth_ctrl.h> and the driver-facing
definitions in <ethdev_driver.h>.
- PMD-private filter API in <rte_pmd_i40e.h>.
The ixgbe and txgbe patches at the tail privatize internals that
still used the legacy types — mechanical rename, no behavior
change, so the 26.11 struct removal can proceed without further
per-driver coupling.
The mbuf-side fdir metadata (RTE_MBUF_F_RX_FDIR* flags and the
hash.fdir field) is unaffected — it is used by the rte_flow MARK
and FLAG actions, not part of the legacy filter API.
Stephen Hemminger (8):
app/testpmd: remove support for flow director
net/i40e: remove testpmd flow filter commands
net/i40e: deprecate legacy flow filter API
net/i40e: remove experimental FDIR API
net/ixgbe: remove experimental FDIR API
doc: announce legacy flow director deprecation
net/ixgbe: privatize legacy flow director types
net/txgbe: privatize legacy flow director types
app/test-pmd/cmdline.c | 21 +-
app/test-pmd/config.c | 163 -----
app/test-pmd/testpmd.h | 3 -
doc/guides/nics/i40e.rst | 70 +-
doc/guides/rel_notes/deprecation.rst | 10 +
doc/guides/rel_notes/release_26_07.rst | 14 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 -
drivers/net/intel/i40e/i40e_ethdev.c | 4 +-
drivers/net/intel/i40e/i40e_ethdev.h | 4 -
drivers/net/intel/i40e/i40e_fdir.c | 140 ----
drivers/net/intel/i40e/i40e_flow.c | 3 +-
drivers/net/intel/i40e/i40e_testpmd.c | 642 ------------------
drivers/net/intel/i40e/rte_pmd_i40e.c | 34 -
drivers/net/intel/i40e/rte_pmd_i40e.h | 113 ++-
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 +-
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 100 ++-
drivers/net/intel/ixgbe/ixgbe_fdir.c | 241 ++-----
drivers/net/intel/ixgbe/ixgbe_flow.c | 28 +-
.../net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 4 +-
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c | 34 -
drivers/net/intel/ixgbe/rte_pmd_ixgbe.h | 32 -
drivers/net/txgbe/txgbe_ethdev.c | 6 +-
drivers/net/txgbe/txgbe_ethdev.h | 101 ++-
drivers/net/txgbe/txgbe_fdir.c | 78 +--
drivers/net/txgbe/txgbe_flow.c | 24 +-
drivers/net/txgbe/txgbe_rxtx_vec_common.h | 4 +-
26 files changed, 448 insertions(+), 1473 deletions(-)
--
2.53.0
^ permalink raw reply
* Re: [PATCH] examples: Fix vm_power_manager scratch area to /run/dpdk/powermanager
From: Stephen Hemminger @ 2026-05-28 21:10 UTC (permalink / raw)
To: Sudheendra Sampath; +Cc: dev, Anatoly Burakov, Sivaprasad Tummala
In-Reply-To: <20260528190449.66254-1-giveback4fun@gmail.com>
On Thu, 28 May 2026 19:04:48 +0000
Sudheendra Sampath <giveback4fun@gmail.com> wrote:
> This patch for bug 1832 will do the following:
> 1. If /run/dpdk is not present, it will create it first with and
> then create powermanager directory underneath it.
> 2. If /run/dpdk is present, it will verify it is actually a directory
> before creating subdirectory, powermanager.
>
> All directory permissions are 0700.
>
> Signed-off-by: Sudheendra Sampath <giveback4fun@gmail.com>
> ---
Lots of issues with hardcoding the path here.
Longer explanation from AI review.
Thanks for the patch. A few issues to address before this can be merged:
Two correctness bugs in the new recovery block:
- After creating the directories, d is still NULL but the code falls through to readdir(d). The recovery path must call opendir() again (and return -1 if that also fails) before the readdir loop.
- path_stat is only populated when stat() succeeds. The S_ISDIR(path_stat.st_mode) check runs on uninitialised memory when stat() returned an error and mkdir() was used. Restructure as if (stat(...) == 0) { check S_ISDIR } else { mkdir }.
Other items:
- doc/guides/sample_app_ug/vm_power_management.rst still references /tmp/powermonitor/ in several places; code and docs need to change together.
- Hardcoding /run/dpdk does not follow the DPDK runtime-dir convention and breaks non-root usage.
Please consider using rte_eal_get_runtime_dir() (or at least the same getuid() / RUNTIME_DIRECTORY logic as eal_create_runtime_dir()) instead.
- Subject says "powermanager" but the path is "powermonitor".
- The two new RTE_LOG messages are missing trailing "\n".
- Please add a proper Fixes: tag (12-char hash) for the commit that introduced /tmp/powermonitor.
Stephen
^ permalink raw reply
* Re: [v6 0/2] net/hinic3: Fix the hinic3 driver issue
From: Stephen Hemminger @ 2026-05-28 21:00 UTC (permalink / raw)
To: Feifei Wang; +Cc: dev
In-Reply-To: <20260528130122.1213-1-wff_light@vip.163.com>
On Thu, 28 May 2026 21:01:18 +0800
Feifei Wang <wff_light@vip.163.com> wrote:
> v1: The RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO flag is added to support the VXLAN TSO function
>
> v2: Modify the commit information issue and supplement the commit information
>
> v3: Revise review comments. First, deterine whether the hardware supports it, then add the flag bit
>
> v4: Fix the compilation error caused by leading spaces
>
> v5: Add fix tag
>
> v6: MOdify SP230 NIC vf device id
>
> Feifei Wang (2):
> net/hinic3: Fix VXLAN TSO issue
> net/hinic3: Modify SP230 VF device id
>
> drivers/net/hinic3/base/hinic3_csr.h | 2 +-
> drivers/net/hinic3/hinic3_ethdev.c | 8 ++++++--
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
Applied to next-net.
Needed to add Fixes, and fix the Signed-off-by mail address on second patch.
^ permalink raw reply
* [PATCH] net/iavf: fix vectorization high ping latency
From: Anurag Mandal @ 2026-05-28 20:51 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, vladimir.medvedkin, Anurag Mandal, stable
High ping latency is observed when icmp echo requests are
sent from a VPP VF and icmp echo replies get delayed by
~3 seconds which at times, also results in packet loss.
With WB_ON_ITR, the descriptor writeback interval lives in
the IAVF_VFINT_ITRN1 register. This register only resets
during a VF reset, so it could be left with a stale or
uninitialized value causing unreliable or high latency
writeback like high ping latency with VPP VF.
This patch fixes the issue by adding explicit reinitialization
of the separate ITR index interval register (IAVF_VFINT_ITRN1)
to a known 2us value and does not rely on the dynamic control
register (IAVF_VFINT_DYN_CTLN1) for the same.
Also, added a low interval value of 2us in IAVF_VFINT_DYN_CTLN1
ITR index 0 ensuring prompt writeback in polling mode
regardless of what the PF's adaptive algorithm has set in ITRN.
Fixes: ead06572bd8f ("net/iavf: fix performance with writeback policy")
Fixes: a08f9cb698c3 ("net/iavf: fix Rx queue interrupt setting")
Cc: stable@dpdk.org
Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index bdf650b822..971c10cefe 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -862,6 +862,16 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev *dev,
(0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
(2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
+ /* The interval value lives in the separate IAVF_VFINT_ITRN1
+ * index register, which is only cleared on a VF reset
+ * It is not implicitly re-initialized by the DYN_CTLN1 write
+ * above, so if it was left dirty by a previous configuration,
+ * program it explicitly here to the same 2us interval for
+ * ITR index 0.
+ */
+ IAVF_WRITE_REG(hw,
+ IAVF_VFINT_ITRN1(0, vf->msix_base - 1),
+ 2UL);
/* debug - check for success! the return value
* should be 2, offset is 0x2800
*/
@@ -2078,9 +2088,16 @@ iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
return -EIO;
}
+ /* Set the ITR for index zero, to 2us to make sure that
+ * sufficient time for aggregation to occur, but not to
+ * increase the latency drastically.
+ */
+
IAVF_WRITE_REG(hw,
IAVF_VFINT_DYN_CTLN1(msix_intr - IAVF_RX_VEC_START),
- IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK);
+ (0 << IAVF_VFINT_DYN_CTLN1_ITR_INDX_SHIFT) |
+ IAVF_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
+ (2UL << IAVF_VFINT_DYN_CTLN1_INTERVAL_SHIFT));
IAVF_WRITE_FLUSH(hw);
return 0;
--
2.25.1
^ permalink raw reply related
* RE: [RFC v3 2/3] lib: add fastmem library
From: Morten Brørup @ 2026-05-28 19:56 UTC (permalink / raw)
To: Varghese, Vipin, Bruce Richardson, Mattias Rönnblom, dev
Cc: Konstantin Ananyev, Mattias Rönnblom, Yogaraj Baskaravel,
Stephen Hemminger
In-Reply-To: <DS0PR12MB6608CB2B4897A5CB91D2D1C482092@DS0PR12MB6608.namprd12.prod.outlook.com>
> From: Varghese, Vipin [mailto:Vipin.Varghese@amd.com]
> Sent: Thursday, 28 May 2026 16.45
>
> Public
>
> Hi @Morten Brørup
>
> <snipped>
>
> >
> > > +/**
> > > + * Pre-reserve backing memory.
> > > + *
> > > + * Ensures that at least @p size bytes of memzone-backed memory
> are
> > > + * available to the allocator on @p socket_id, reserving
> additional
> > > + * memzones from EAL as needed to reach that total. Subsequent
> > > + * allocations served from the pre-reserved memory do not incur
> > > + * memzone-reservation cost.
> > > + *
> > > + * The reservation is cumulative: repeated calls to
> > > + * rte_fastmem_reserve() with the same @p socket_id grow the
> > > + * reservation monotonically. Reserved memory is never returned to
> > > + * the system during the allocator's lifetime.
> > > + *
> > > + * A typical use is to call rte_fastmem_reserve() once at
> > > + * application startup, with a size chosen to cover the expected
> > > + * steady-state working set. Allocations and frees during
> > > + * steady-state operation then avoid memzone reservations
> entirely.
> > > + *
> > > + * @param size
> > > + * The minimum amount of backing memory, in bytes, to make
> > > + * available on @p socket_id. The allocator may reserve more than
> > > + * the requested amount due to internal rounding (e.g., to
> memzone
> > > + * or block granularity).
> > > + *
> > > + * @param socket_id
> > > + * The NUMA socket on which to reserve memory, or SOCKET_ID_ANY
> > > + * to leave the choice to the allocator. With SOCKET_ID_ANY, the
> > > + * allocator starts on the calling lcore's socket (or the first
> > > + * configured socket if the caller is not bound to one) and falls
> > > + * back to other sockets if the preferred socket cannot satisfy
> > > + * the reservation.
> > > + *
> > > + * @return
> > > + * - 0: Success.
> > > + * - -ENOMEM: Insufficient huge-page memory to satisfy the
> request.
> > > + * - -EINVAL: Invalid @p socket_id.
> > > + */
> > > +__rte_experimental
> > > +int
> > > +rte_fastmem_reserve(size_t size, int socket_id);
> >
> > @Bruce,
> > I vaguely recall that we discussed something about busses and sockets
> a long time
> > ago, but I cannot remember the details.
> > Is socket_id the right type (and parameter name) to identify a memory
> bus?
> >
> > @Vipin,
> > You have been working on topology awareness. Same question to you:
> > Is socket_id the right type (and parameter name) to identify a memory
> bus?
>
> Short answer: socket_id is no longer a precise or sufficient
> abstraction to represent a memory bus.
> Based on the topology work with libhwloc, we’ve observed the following
> across Ampere, Intel, and AMD platforms:
>
> Features like SNC (Sub-NUMA Clustering) on Intel and NPS (NUMA Per
> Socket) on AMD change how socket_id maps to hardware.
> In these modes:
>
> 1) A single physical socket can expose multiple NUMA domains.
> 2)These NUMA domains align more closely with memory controller
> groupings (i.e., memory buses) rather than the full socket.
>
>
> Depending on the architecture:
> a) Memory controllers may be collocated with compute cores or placed on
> separate tiles.
> b) As a result, socket_id can represent different scopes (full socket
> vs. sub-socket domains), making it inconsistent.
>
>
>
> Hence practically: In some configurations, socket_id ≈ memory domain.
> In others, it is coarser than the actual memory bus topology.
>
> To address this ambiguity, in the topology patches (v5/v6), we are
> moving toward clearer separation:
>
> a. Cache domains (L1/L2/L3/L4) for compute locality
> b. NUMA domains (memory + IO) as the unit for allocation locality
>
> This direction better reflects real hardware and avoids overloading
> socket_id with multiple meanings.
>
> Happy to align this with the topology model we’re introducing so the
> abstraction remains consistent going forward.
> Thanks,
> Vipin
Thank you for the quick and detailed response, Vipin!
I haven't looked deeply into the v5/v6 topology patches yet (it's on my TODO list).
The rte_fastmem library builds on top of the rte_memzone library.
So, if the rte_memzone library is updated to replace the meaning of its "socket_id" parameter with some NUMA domain identifier (we better rename the "socket_id" to a new name "numa_domain_id"), then the rte_fastmem library could remain unaffected, and its "socket_id" parameter would be passed on directly to the rte_memzone library's "numa_domain_id"?
This is my conclusion: At this point, proper support for allocating memory in specific NUMA domains is an rte_memzone library issue, and nothing to worry about for the rte_fastmem library - it will be automatically supported in rte_fastmem when supported by rte_memzone.
^ permalink raw reply
* [PATCH] examples: Fix vm_power_manager scratch area to /run/dpdk/powermanager
From: Sudheendra Sampath @ 2026-05-28 19:04 UTC (permalink / raw)
To: dev; +Cc: Sudheendra Sampath, Anatoly Burakov, Sivaprasad Tummala
This patch for bug 1832 will do the following:
1. If /run/dpdk is not present, it will create it first with and
then create powermanager directory underneath it.
2. If /run/dpdk is present, it will verify it is actually a directory
before creating subdirectory, powermanager.
All directory permissions are 0700.
Signed-off-by: Sudheendra Sampath <giveback4fun@gmail.com>
---
examples/vm_power_manager/channel_manager.c | 27 ++++++++++++++++++++-
examples/vm_power_manager/channel_manager.h | 2 +-
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index b69449c61d..60d767ea98 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -420,8 +420,33 @@ add_all_channels(const char *vm_name)
if (d == NULL) {
RTE_LOG(ERR, CHANNEL_MANAGER, "Error opening directory '%s': %s\n",
CHANNEL_MGR_SOCKET_PATH, strerror(errno));
- return -1;
+
+ const char *run_dpdk = "/run/dpdk";
+ struct stat path_stat;
+ int ret;
+
+ if (stat(run_dpdk, &path_stat) != 0) {
+ ret = mkdir(run_dpdk, 0700);
+ if (ret < 0 && errno != EEXIST) {
+ RTE_LOG(ERR, CHANNEL_MANAGER, "Error creating '%s': %s",
+ run_dpdk, strerror(errno));
+ return -1;
+ }
+ }
+
+ /* Make sure /run/dpdk is a directory */
+ if (!S_ISDIR(path_stat.st_mode)) {
+ return -1;
+ }
+
+ ret = mkdir(CHANNEL_MGR_SOCKET_PATH, 0700);
+ if (ret < 0 && errno != EEXIST) {
+ RTE_LOG(ERR, CHANNEL_MANAGER, "Error creating '%s': %s",
+ CHANNEL_MGR_SOCKET_PATH, strerror(errno));
+ return -1;
+ }
}
+
while ((dir = readdir(d)) != NULL) {
if (!strncmp(dir->d_name, ".", 1) ||
!strncmp(dir->d_name, "..", 2))
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index 6f70539815..5fc93ae0be 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -22,7 +22,7 @@ extern "C" {
#define CHANNEL_MGR_DEFAULT_HV_PATH "qemu:///system"
/* File socket directory */
-#define CHANNEL_MGR_SOCKET_PATH "/tmp/powermonitor/"
+#define CHANNEL_MGR_SOCKET_PATH "/run/dpdk/powermonitor/"
/* FIFO file name template */
#define CHANNEL_MGR_FIFO_PATTERN_NAME "fifo"
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] doc: announce removal of flow director
From: Stephen Hemminger @ 2026-05-28 18:29 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
In-Reply-To: <ED4MTOXhQ4iCVj0Gg4IMwg@monjalon.net>
On Thu, 28 May 2026 20:19:15 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 28/05/2026 19:00, Stephen Hemminger:
> > There are still leftover bits in ethdev related to flow director (fdir).
> > Will be removing these in 26.11 so give final notice.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> > +* ethdev: The legacy filtering data structures in ``rte_eth_ctrl.h``,
> > + including the flow director (FDIR) types (``rte_eth_fdir_*``, ``rte_fdir_*``)
> > + and the ntuple/ethertype/SYN/tunnel/input-set filter types, are superseded
> > + by the ``rte_flow`` API and will be removed in DPDK 26.11. The associated
> > + driver-facing definitions in ``ethdev_driver.h`` (``RTE_ETH_FILTER_FDIR``,
> > + ``struct rte_eth_fdir_conf``, ``enum rte_eth_fdir_pballoc_type``,
> > + ``enum rte_fdir_status_mode``) will be removed at the same time.
>
> The problem is that some drivers rely on these structures for rte_flow.
>
> Note: this file is big, please keep it sorted by moving this
> close to other ethdev and flow deprecations.
There are three cases of drivers using fdir:
- simple ones which are just borrowing things like rte_filter_type
addressing these is trivial; mostly just keep rte_filter_type for now
- Intel ones like i40e and ixgbe which still expose fdir api's.
Can deprecate the PMD API's and move the fdir structures into intel commonc code.
- drivers where fdir was used in variable names but never really used the infrastructure.
Will have proposed patches in a few days.
^ permalink raw reply
* Re: [EXTERNAL] Re: [PATCH v3 0/2] net/mana: add device reset support
From: Stephen Hemminger @ 2026-05-28 18:24 UTC (permalink / raw)
To: Wei Hu; +Cc: Wei Hu, dev@dpdk.org, Long Li
In-Reply-To: <SE3P153MB18483B2B0A91A49747176C88BB092@SE3P153MB1848.APCP153.PROD.OUTLOOK.COM>
On Thu, 28 May 2026 07:30:03 +0000
Wei Hu <weh@microsoft.com> wrote:
> > so they are invisible to rte_rcu_qsbr_check in the primary, and
> > the secondary MP handler (mana_mp_reset_enter) does not call
> > qsbr_check at all -- it just sets db_page = NULL and munmaps.
> >
> > The dev_state check at the top of secondary tx_burst is racy:
> > the page can be munmapped after the in-loop read of db_page but
> > before the doorbell write at the bottom. The "All secondary
> > threads are quiescent" log line in mana_mp_reset_enter is not
> > true.
> >
> > The secondary needs a real reader-side primitive -- its own
> > qsbr with secondary lcore registration, or an rwlock the MP
> > handler takes before munmap.
> >
>
> Thanks for the v3 review, @Stephen. I will send out v4 to incorporate most
> of the review comments except for this one.
>
> The review on this point is not correct. Here I am providing analysis from
> AI and my own test results to show why.
>
> The concern is that "rte_rcu_qsbr_thread_register is only called
> from mana_dev_configure, which the secondary never runs", so
> secondary tids are unregistered and invisible to rte_rcu_qsbr_check.
Thanks, I have become way to familiar with AI reaching false conclusions.
^ permalink raw reply
* Re: [PATCH] doc: announce removal of flow director
From: Thomas Monjalon @ 2026-05-28 18:19 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
In-Reply-To: <20260528170059.155964-1-stephen@networkplumber.org>
28/05/2026 19:00, Stephen Hemminger:
> There are still leftover bits in ethdev related to flow director (fdir).
> Will be removing these in 26.11 so give final notice.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> +* ethdev: The legacy filtering data structures in ``rte_eth_ctrl.h``,
> + including the flow director (FDIR) types (``rte_eth_fdir_*``, ``rte_fdir_*``)
> + and the ntuple/ethertype/SYN/tunnel/input-set filter types, are superseded
> + by the ``rte_flow`` API and will be removed in DPDK 26.11. The associated
> + driver-facing definitions in ``ethdev_driver.h`` (``RTE_ETH_FILTER_FDIR``,
> + ``struct rte_eth_fdir_conf``, ``enum rte_eth_fdir_pballoc_type``,
> + ``enum rte_fdir_status_mode``) will be removed at the same time.
The problem is that some drivers rely on these structures for rte_flow.
Note: this file is big, please keep it sorted by moving this
close to other ethdev and flow deprecations.
^ permalink raw reply
* Re: [PATCH v15 0/6] Add AI code review tools and AGENTS
From: Thomas Monjalon @ 2026-05-28 18:09 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
In-Reply-To: <20260521224550.927338-1-stephen@networkplumber.org>
22/05/2026 00:44, Stephen Hemminger:
> Add guidelines and tooling for AI-assisted code review of DPDK
> patches.
>
> AGENTS.md provides a two-tier review framework: correctness bugs
> (resource leaks, use-after-free, race conditions) are reported at
> >=50% confidence; style issues require >80% with false positive
> suppression. Mechanical checks handled by checkpatches.sh are
> excluded to avoid redundant findings.
>
> The analyze-patch.py and review-doc.py scripts support multiple AI
> providers (Anthropic, OpenAI, xAI, Google) with mbox splitting,
> prompt caching, direct SMTP sending, and token usage tracking with
> optional cost estimation.
>
> v15 - reflow AGENTS per doc guidelines
> - reduce redundancy in AGENTS (i.e don't overlap other tools)
> - move scripts to devtools/ai
> - move common code from scripts to one file
> - incorporate AI and human reviews
Applied with minor adjustments, thanks.
Note: as discussed together, I've renamed analyze-patch.py
to review-patch.py for consistency.
Let's see how the community use and improve this new tooling.
^ permalink raw reply
* [PATCH] doc: announce removal of flow director
From: Stephen Hemminger @ 2026-05-28 17:00 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There are still leftover bits in ethdev related to flow director (fdir).
Will be removing these in 26.11 so give final notice.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/rel_notes/deprecation.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 17f90a6352..f9f1d97f78 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -158,3 +158,11 @@ Deprecation Notices
* net/iavf: The dynamic mbuf field used to detect LLDP packets on the
transmit path in the iavf PMD will be removed in a future release.
After removal, only packet type-based detection will be supported.
+
+* ethdev: The legacy filtering data structures in ``rte_eth_ctrl.h``,
+ including the flow director (FDIR) types (``rte_eth_fdir_*``, ``rte_fdir_*``)
+ and the ntuple/ethertype/SYN/tunnel/input-set filter types, are superseded
+ by the ``rte_flow`` API and will be removed in DPDK 26.11. The associated
+ driver-facing definitions in ``ethdev_driver.h`` (``RTE_ETH_FILTER_FDIR``,
+ ``struct rte_eth_fdir_conf``, ``enum rte_eth_fdir_pballoc_type``,
+ ``enum rte_fdir_status_mode``) will be removed at the same time.
--
2.53.0
^ permalink raw reply related
* Re: [PATCH v5 04/27] net/intel/common: add common flow attr validation
From: Bruce Richardson @ 2026-05-28 15:09 UTC (permalink / raw)
To: Burakov, Anatoly; +Cc: dev
In-Reply-To: <a98ae9f0-fce3-49b9-a4df-d76e08696c2c@intel.com>
On Thu, May 28, 2026 at 04:13:59PM +0200, Burakov, Anatoly wrote:
> On 5/28/2026 3:13 PM, Bruce Richardson wrote:
> > On Thu, May 28, 2026 at 02:39:47PM +0200, Burakov, Anatoly wrote:
> > > On 5/27/2026 3:28 PM, Bruce Richardson wrote:
> > > > On Mon, May 25, 2026 at 03:06:23PM +0100, Anatoly Burakov wrote:
> > > > > There are a lot of commonalities between what kinds of flow attr each Intel
> > > > > driver supports. Add a helper function that will validate attr based on
> > > > > common requirements and (optional) parameter checks.
> > > > >
> > > > > Things we check for:
> > > > > - Rejecting NULL attr (obviously)
> > > > > - Default to ingress flows
> > > > > - Transfer, group, priority, and egress are not allowed unless requested
> > > > >
> > > > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > > > > ---
> > > > > drivers/net/intel/common/flow_check.h | 69 +++++++++++++++++++++++++++
> > > > > 1 file changed, 69 insertions(+)
> > > > >
> > > > > diff --git a/drivers/net/intel/common/flow_check.h b/drivers/net/intel/common/flow_check.h
> > > > > index 74fb28ae3d..0572028664 100644
> > > > > --- a/drivers/net/intel/common/flow_check.h
> > > > > +++ b/drivers/net/intel/common/flow_check.h
> > > > > @@ -54,6 +54,7 @@ ci_flow_action_type_in_list(const enum rte_flow_action_type type,
> > > > > /* Forward declarations */
> > > > > struct ci_flow_actions;
> > > > > struct ci_flow_actions_check_param;
> > > > > +struct ci_flow_attr_check_param;
> > > > > static inline const char *
> > > > > ci_flow_action_type_to_str(enum rte_flow_action_type type)
> > > > > @@ -271,6 +272,74 @@ ci_flow_check_actions(const struct rte_flow_action *actions,
> > > > > return parsed_actions->count == 0 ? -EINVAL : 0;
> > > > > }
> > > > > +/**
> > > > > + * Parameter structure for attr check.
> > > > > + */
> > > > > +struct ci_flow_attr_check_param {
> > > > > + bool allow_priority; /**< True if priority attribute is allowed. */
> > > > > + bool allow_transfer; /**< True if transfer attribute is allowed. */
> > > > > + bool allow_group; /**< True if group attribute is allowed. */
> > > > > + bool expect_egress; /**< True if egress attribute is expected. */
> > > > > +};
> > > > > +
> > > > > +/**
> > > > > + * Validate rte_flow_attr structure against specified constraints.
> > > > > + *
> > > > > + * @param attr Pointer to rte_flow_attr structure to validate.
> > > > > + * @param attr_param Pointer to ci_flow_attr_check_param structure specifying constraints.
> > > > > + * @param error Pointer to rte_flow_error structure for error reporting.
> > > > > + *
> > > > > + * @return 0 on success, negative errno on failure.
> > > > > + */
> > > > > +static inline int
> > > > > +ci_flow_check_attr(const struct rte_flow_attr *attr,
> > > > > + const struct ci_flow_attr_check_param *attr_param,
> > > > > + struct rte_flow_error *error)
> > > > > +{
> > > > > + if (attr == NULL) {
> > > > > + return rte_flow_error_set(error, EINVAL,
> > > > > + RTE_FLOW_ERROR_TYPE_ATTR, attr,
> > > > > + "NULL attribute");
> > > > > + }
> > > > > +
> > > > > + /* Direction must be either ingress or egress */
> > > > > + if (attr->ingress == attr->egress) {
> > > > > + return rte_flow_error_set(error, EINVAL,
> > > > > + RTE_FLOW_ERROR_TYPE_ATTR, attr,
> > > > > + "Either ingress or egress must be set");
> > > > > + }
> > > > > +
> > > > > + /* Expect ingress by default */
> > > > > + if (attr->egress && (attr_param == NULL || !attr_param->expect_egress)) {
> > > > > + return rte_flow_error_set(error, EINVAL,
> > > > > + RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, attr,
> > > > > + "Egress not supported");
> > > > > + }
> > > >
> > > > I think "allow_egress" is possibly a better name here. "expect_egress"
> > > > implies that egress must be present, but the logic here seems to be only
> > > > allowing egress if the flag is provided.
> > >
> > > No, the check right above this prevents unspecified egress *if* ingress is
> > > also specified.
> >
> > So the error message above should be "Either ingress or egress must be set,
> > but not both"?
>
> Sure, yes, a rulle cannot be both egress and ingress.
>
> >
> > > Meaning, one of egress/ingress *must* be specified, and if
> > > it's egress, it is only allowed when we are expecting egress.
> > >
> > Yes, so it's either ingress or egress but egress is only allowed in some
> > cases. But nothing in this check prevents ingress alone when expect_egress
> > is set, so egress is allowed but not required, so I still think
> > "allow_egress" is a better name. "expect_egress" is a bit ambivilent, in
> > that it's unclear how strong that expectation is - is it an error, or just
> > a warning if the expectation is not met, for example?
>
> Rules cannot be both ingress and egress, and they cannot be neither ingress
> and egress. That leaves two options: either the rule is ingress, or the rule
> is egress.
>
> If the rule isn't ingress, it by definition will be egress in order to pass
> earlier checks. The intent is also that a rule that is "expected to be
> egress" must be egress to be accepted.
>
> However, now that I think of it, you're right in that the condition is
> subtly wrong. By default, we expect the rule to be ingress (i.e. not setting
> "expect egress" implies we are expecting ingress), but we only *check* if
> the rule is egress - we would *not* check if the rule is egress. I think the
> condition should be replaced with:
>
> 1) if attr_param == NULL, rule *cannot* ever be expected to be egress
> because we specify egress expectations in attr_param - so, rule being egress
> when attr_param == NULL is an error
> 2) if attr_param != NULL, egress *must* match expect_egress
>
> So, basically:
>
> if ((attr_param == NULL && attr->egress) || (attr->egress !=
> attr_param->expect_egress)
>
> this should better match the intent.
>
Yes, that is clearer. In this case, is "expect_egress" better renamed to
"egress_only" or "require_egress" to make it clear it's an absolute
requirement?
Also, just a suggestion for readability's sake, maybe merge the conditions
for checking ingress and egress but not both or neither into explicit check
branches for each case for clarity.
if (attr_param != NULL && attr_param->require_egress) {
/* this must be an egress rule, ingress unset, egress set */
if (attr->ingress != 0 || attr->egress != 1)
....
} else {
/* this must be an ingress rule, ingress set, egress unset */
if (attr->ingress != 1 || attr->egress != 0)
....
}
/Bruce
^ permalink raw reply
* RE: [RFC v3 2/3] lib: add fastmem library
From: Varghese, Vipin @ 2026-05-28 14:45 UTC (permalink / raw)
To: Morten Brørup, Bruce Richardson, Mattias Rönnblom,
dev@dpdk.org
Cc: Konstantin Ananyev, Mattias Rönnblom, Yogaraj Baskaravel,
Stephen Hemminger
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F658AD@smartserver.smartshare.dk>
Public
Hi @Morten Brørup
<snipped>
>
> > +/**
> > + * Pre-reserve backing memory.
> > + *
> > + * Ensures that at least @p size bytes of memzone-backed memory are
> > + * available to the allocator on @p socket_id, reserving additional
> > + * memzones from EAL as needed to reach that total. Subsequent
> > + * allocations served from the pre-reserved memory do not incur
> > + * memzone-reservation cost.
> > + *
> > + * The reservation is cumulative: repeated calls to
> > + * rte_fastmem_reserve() with the same @p socket_id grow the
> > + * reservation monotonically. Reserved memory is never returned to
> > + * the system during the allocator's lifetime.
> > + *
> > + * A typical use is to call rte_fastmem_reserve() once at
> > + * application startup, with a size chosen to cover the expected
> > + * steady-state working set. Allocations and frees during
> > + * steady-state operation then avoid memzone reservations entirely.
> > + *
> > + * @param size
> > + * The minimum amount of backing memory, in bytes, to make
> > + * available on @p socket_id. The allocator may reserve more than
> > + * the requested amount due to internal rounding (e.g., to memzone
> > + * or block granularity).
> > + *
> > + * @param socket_id
> > + * The NUMA socket on which to reserve memory, or SOCKET_ID_ANY
> > + * to leave the choice to the allocator. With SOCKET_ID_ANY, the
> > + * allocator starts on the calling lcore's socket (or the first
> > + * configured socket if the caller is not bound to one) and falls
> > + * back to other sockets if the preferred socket cannot satisfy
> > + * the reservation.
> > + *
> > + * @return
> > + * - 0: Success.
> > + * - -ENOMEM: Insufficient huge-page memory to satisfy the request.
> > + * - -EINVAL: Invalid @p socket_id.
> > + */
> > +__rte_experimental
> > +int
> > +rte_fastmem_reserve(size_t size, int socket_id);
>
> @Bruce,
> I vaguely recall that we discussed something about busses and sockets a long time
> ago, but I cannot remember the details.
> Is socket_id the right type (and parameter name) to identify a memory bus?
>
> @Vipin,
> You have been working on topology awareness. Same question to you:
> Is socket_id the right type (and parameter name) to identify a memory bus?
Short answer: socket_id is no longer a precise or sufficient abstraction to represent a memory bus.
Based on the topology work with libhwloc, we’ve observed the following across Ampere, Intel, and AMD platforms:
Features like SNC (Sub-NUMA Clustering) on Intel and NPS (NUMA Per Socket) on AMD change how socket_id maps to hardware.
In these modes:
1) A single physical socket can expose multiple NUMA domains.
2)These NUMA domains align more closely with memory controller groupings (i.e., memory buses) rather than the full socket.
Depending on the architecture:
a) Memory controllers may be collocated with compute cores or placed on separate tiles.
b) As a result, socket_id can represent different scopes (full socket vs. sub-socket domains), making it inconsistent.
Hence practically: In some configurations, socket_id ≈ memory domain. In others, it is coarser than the actual memory bus topology.
To address this ambiguity, in the topology patches (v5/v6), we are moving toward clearer separation:
a. Cache domains (L1/L2/L3/L4) for compute locality
b. NUMA domains (memory + IO) as the unit for allocation locality
This direction better reflects real hardware and avoids overloading socket_id with multiple meanings.
Happy to align this with the topology model we’re introducing so the abstraction remains consistent going forward.
Thanks,
Vipin
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox