* [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method
@ 2026-08-10 14:03 Ciara Loftus
2026-08-10 14:03 ` [PATCH 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ciara Loftus @ 2026-08-10 14:03 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Prior to this commit two methods existed for triggering LLDP packet
transmission in the driver: the dynamic mbuf field method and the mbuf
packet-type method. This commit removes the dynamic mbuf field method. The
dynfield method required applications to tag every LLDP packet manually,
whereas the packet-type method gives the driver the opportunity to tag LLDP
packets automatically on the Rx path, leaving no work to be done by the
application to explicitly flag a packet as LLDP before transmission.
The per-queue LLDP state is reduced from the tri-state 'lldp_mode' to a
single 'lldp_enabled' boolean. The testpmd command 'set tx lldp on'
whose purpose was to enable the dynfield lldp method is removed. The
ptype lldp method is enabled via the enable_ptype_lldp devarg (as has
always been the case since support was introduced):
-a 0000:xx:xx.x,enable_ptype_lldp=1
The deprecation notice for the dynfield is removed and the driver
documentation is updated.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
doc/guides/nics/intel_vf.rst | 29 +--------
doc/guides/rel_notes/deprecation.rst | 4 --
doc/guides/rel_notes/release_26_11.rst | 5 ++
drivers/net/intel/common/tx.h | 2 +-
drivers/net/intel/iavf/iavf_ethdev.c | 28 +--------
drivers/net/intel/iavf/iavf_rxtx.c | 15 ++---
drivers/net/intel/iavf/iavf_rxtx.h | 17 +-----
drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 22 +++----
drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 22 +++----
drivers/net/intel/iavf/iavf_testpmd.c | 61 -------------------
10 files changed, 43 insertions(+), 162 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index 8f8ce32cac..e635c1fac2 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -682,38 +682,13 @@ Diagnostic Utilities
Tx LLDP Testing
~~~~~~~~~~~~~~~
-There are two methods to trigger LLDP packet transmission from the VF.
-
-The first (and recommended) method is to set the ``packet_type`` of the mbuf
-to ``RTE_PTYPE_L2_ETHER_LLDP``.
+To trigger LLDP packet transmission from the VF, set the ``packet_type``
+of the mbuf to ``RTE_PTYPE_L2_ETHER_LLDP``.
This, in conjunction with enabling the ``enable_ptype_lldp`` devarg
will cause such packets to be transmitted::
-a 0000:xx:xx.x,enable_ptype_lldp=1
-An alternative method is to register an mbuf dynfield ``IAVF_TX_LLDP_DYNFIELD``
-before ``dev_start``.
-This dynfield needs to be set to 1 when preparing an LLDP packet intended for transmission.
-
-.. note::
-
- The dynamic mbuf field method is deprecated and will be removed in a future release.
- Users should migrate to the ``enable_ptype_lldp`` devarg and mbuf LLDP ptype method
- described above.
-
-For ``dpdk-testpmd`` application, the dynamic mbuf field is registered
-when the following command is issued:
-
-Usage::
-
- testpmd> set tx lldp on
-
-One must then stop and restart the port for it to take effect.
-These requirements only apply for the dynamic mbuf field method;
-no special steps are needed for the ``enable_ptype_lldp`` devarg method.
-If both methods are enabled, the ptype based method will take precedence
-over the dynamic mbuf field method.
-
Limitations or Knowing issues
-----------------------------
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 6ad7698c6b..a3cf544982 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -167,10 +167,6 @@ Deprecation Notices
``drivers/bus/vmbus/rte_bus_vmbus.h`` will become internal to DPDK.
Those API functions are used internally by DPDK core and netvsc PMD.
-* 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/iavf: The ``auto_reconfig`` devarg is deprecated
and will be removed in a future release.
It allows disabling the automatic restoration of device settings
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index c8cc86295d..8dc82c016d 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -77,6 +77,11 @@ Removed Items
``rte_rib6_is_equal``
* table: ``RTE_LPM_IPV6_ADDR_SIZE``
+* net/iavf: Removed the dynamic mbuf field method for detecting LLDP packets
+ on the transmit path, along with the ``set tx lldp on`` testpmd command.
+ The only remaining method for detecting LLDP packets is by using the mbuf
+ packet type in conjunction with the ``enable_ptype_lldp`` devarg.
+
API Changes
-----------
diff --git a/drivers/net/intel/common/tx.h b/drivers/net/intel/common/tx.h
index 5fe71aed12..55757d34d7 100644
--- a/drivers/net/intel/common/tx.h
+++ b/drivers/net/intel/common/tx.h
@@ -197,7 +197,7 @@ struct ci_tx_queue {
uint8_t vlan_flag;
uint8_t tc;
bool use_ctx; /* with ctx info, each pkt needs two descriptors */
- uint8_t lldp_mode; /* ptype or dynfield */
+ bool lldp_enabled;
};
struct { /* ixgbe specific values */
const struct ixgbe_txq_ops *ops;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index d601ec3b6a..fddbd06bbc 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -48,7 +48,6 @@
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
uint64_t iavf_timestamp_dynflag;
int iavf_timestamp_dynfield_offset = -1;
-int rte_pmd_iavf_tx_lldp_dynfield_offset = -1;
static const char * const iavf_valid_args[] = {
IAVF_PROTO_XTR_ARG,
@@ -1026,28 +1025,10 @@ iavf_dev_start(struct rte_eth_dev *dev)
}
}
- /* Check Tx LLDP dynfield */
- rte_pmd_iavf_tx_lldp_dynfield_offset =
- rte_mbuf_dynfield_lookup(IAVF_TX_LLDP_DYNFIELD, NULL);
- if (rte_pmd_iavf_tx_lldp_dynfield_offset > 0) {
- PMD_DRV_LOG(WARNING,
- "Using a dynamic mbuf field to identify LLDP packets is deprecated. "
- "Set the 'enable_ptype_lldp' driver option and mbuf LLDP ptypes instead.");
- if (adapter->devargs.enable_ptype_lldp)
- PMD_DRV_LOG(WARNING,
- "Both ptype and dynfield LLDP enabled; ptype takes precedence.");
- }
-
for (uint16_t i = 0; i < dev->data->nb_tx_queues; i++) {
struct ci_tx_queue *txq = dev->data->tx_queues[i];
- if (txq) {
- if (adapter->devargs.enable_ptype_lldp)
- txq->lldp_mode = IAVF_LLDP_PTYPE;
- else if (rte_pmd_iavf_tx_lldp_dynfield_offset > 0)
- txq->lldp_mode = IAVF_LLDP_DYNFIELD;
- else
- txq->lldp_mode = IAVF_LLDP_DISABLED;
- }
+ if (txq)
+ txq->lldp_enabled = adapter->devargs.enable_ptype_lldp;
}
if (iavf_init_queues(dev) != 0) {
@@ -3018,11 +2999,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
*/
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
iavf_set_rx_function(eth_dev);
- /* LLDP may have been enabled by the primary process. Store the offset before
- * setting the TX function because it may be used in the selection function.
- */
- rte_pmd_iavf_tx_lldp_dynfield_offset =
- rte_mbuf_dynfield_lookup(IAVF_TX_LLDP_DYNFIELD, NULL);
iavf_set_tx_function(eth_dev);
return 0;
}
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 4f2ffe6188..c15486fa28 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -2325,7 +2325,7 @@ iavf_recv_pkts_bulk_alloc(void *rx_queue,
/* Check if the context descriptor is needed for TX offloading */
static inline uint16_t
-iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, uint8_t lldp_mode)
+iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t flags = mb->ol_flags;
if (flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG |
@@ -2336,7 +2336,7 @@ iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, uint8_t lld
vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
return 1;
- if (IAVF_CHECK_TX_LLDP(mb, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(mb, lldp_enabled))
return 1;
return 0;
@@ -2524,7 +2524,8 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
const struct ci_tx_queue *txq,
uint64_t *qw0, uint64_t *qw1)
{
- uint8_t iavf_vlan_flag, lldp_mode;
+ uint8_t iavf_vlan_flag;
+ bool lldp_enabled;
uint16_t cd_l2tag2 = 0;
uint64_t cd_type_cmd = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t cd_tunneling_params = 0;
@@ -2532,10 +2533,10 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
/* Use IAVF-specific flags from txq */
iavf_vlan_flag = txq->vlan_flag;
- lldp_mode = txq->lldp_mode;
+ lldp_enabled = txq->lldp_enabled;
/* Check if context descriptor is needed using existing IAVF logic */
- if (!iavf_calc_context_desc(mbuf, iavf_vlan_flag, lldp_mode))
+ if (!iavf_calc_context_desc(mbuf, iavf_vlan_flag, lldp_enabled))
return 0;
/* Get IPsec metadata if needed */
@@ -2567,7 +2568,7 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
}
/* LLDP switching field */
- if (IAVF_CHECK_TX_LLDP(mbuf, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(mbuf, lldp_enabled))
cd_type_cmd |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
/* Tunneling field */
@@ -3927,7 +3928,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
if (iavf_tx_vec_dev_check(dev) != -1)
req_features.simd_width = iavf_get_max_simd_bitwidth();
- if (adapter->devargs.enable_ptype_lldp || rte_pmd_iavf_tx_lldp_dynfield_offset > 0)
+ if (adapter->devargs.enable_ptype_lldp)
req_features.ctx_desc = true;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 22ea415f44..6ad7182ef7 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -155,23 +155,12 @@
#define IAVF_TX_OFFLOAD_NOTSUP_MASK \
(RTE_MBUF_F_TX_OFFLOAD_MASK ^ IAVF_TX_OFFLOAD_MASK)
-#define IAVF_TX_LLDP_DYNFIELD "intel_pmd_dynfield_tx_lldp"
-
-/* LLDP Tx modes */
-#define IAVF_LLDP_DISABLED 0
-#define IAVF_LLDP_PTYPE 1
-#define IAVF_LLDP_DYNFIELD 2
-
-#define IAVF_CHECK_TX_LLDP(m, lldp_mode) \
- ((lldp_mode) && \
- ((((lldp_mode) == IAVF_LLDP_PTYPE) && \
- ((m)->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_LLDP) || \
- (((lldp_mode) == IAVF_LLDP_DYNFIELD) && \
- *RTE_MBUF_DYNFIELD((m), rte_pmd_iavf_tx_lldp_dynfield_offset, uint8_t *))))
+#define IAVF_CHECK_TX_LLDP(m, ptype_lldp_enabled) \
+ ((ptype_lldp_enabled) && \
+ ((m)->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_LLDP)
extern uint64_t iavf_timestamp_dynflag;
extern int iavf_timestamp_dynfield_offset;
-extern int rte_pmd_iavf_tx_lldp_dynfield_offset;
typedef void (*iavf_rxd_to_pkt_fields_t)(struct ci_rx_queue *rxq,
struct rte_mbuf *mb,
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
index 9341d8412f..715805c65a 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
@@ -1903,7 +1903,7 @@ iavf_fill_ctx_desc_tunneling_field(volatile uint64_t *qw0,
static __rte_always_inline void
ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
- uint64_t flags, bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ uint64_t flags, bool offload, uint8_t vlan_flag, bool ptype_lldp_enabled)
{
uint64_t high_ctx_qw = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t low_ctx_qw = 0;
@@ -1924,7 +1924,7 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
}
#endif
}
- if (IAVF_CHECK_TX_LLDP(pkt, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt, ptype_lldp_enabled))
high_ctx_qw |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
uint64_t high_data_qw = (IAVF_TX_DESC_DTYPE_DATA |
((uint64_t)flags << IAVF_TXD_QW1_CMD_SHIFT) |
@@ -1941,14 +1941,14 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
static __rte_always_inline void
ctx_vtx(volatile struct ci_tx_desc *txdp,
struct rte_mbuf **pkt, uint16_t nb_pkts, uint64_t flags,
- bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ bool offload, uint8_t vlan_flag, bool ptype_lldp_enabled)
{
uint64_t hi_data_qw_tmpl = (IAVF_TX_DESC_DTYPE_DATA |
((uint64_t)flags << IAVF_TXD_QW1_CMD_SHIFT));
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, ptype_lldp_enabled);
nb_pkts--; txdp++; pkt++;
}
@@ -1985,7 +1985,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[1], ptype_lldp_enabled))
hi_ctx_qw1 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
#ifdef IAVF_TX_VLAN_QINQ_OFFLOAD
@@ -2006,7 +2006,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[0], ptype_lldp_enabled))
hi_ctx_qw0 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
if (offload) {
@@ -2029,7 +2029,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
if (nb_pkts)
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, ptype_lldp_enabled);
}
static __rte_always_inline uint16_t
@@ -2043,7 +2043,7 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
/* bit2 is reserved and must be set to 1 according to Spec */
uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
- uint8_t lldp_mode = txq->lldp_mode;
+ bool lldp_enabled = txq->lldp_enabled;
if (txq->nb_tx_free < txq->tx_free_thresh)
ci_tx_free_bufs_vec(txq, iavf_tx_desc_done, true);
@@ -2066,10 +2066,10 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = n >> 1;
ci_tx_backlog_entry_vec(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_enabled);
tx_pkts += (nb_mbuf - 1);
txdp += (n - 2);
- ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_enabled);
nb_commit = (uint16_t)(nb_commit - n);
@@ -2083,7 +2083,7 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = nb_commit >> 1;
ci_tx_backlog_entry_vec(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_enabled);
tx_id = (uint16_t)(tx_id + nb_commit);
if (tx_id > txq->tx_next_rs) {
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
index 83ba635062..dfbbea80f7 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
@@ -2047,7 +2047,7 @@ iavf_fill_ctx_desc_tunnelling_field(volatile uint64_t *qw0,
static __rte_always_inline void
ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
- uint64_t flags, bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ uint64_t flags, bool offload, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t high_ctx_qw = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t low_ctx_qw = 0;
@@ -2068,7 +2068,7 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
}
#endif
}
- if (IAVF_CHECK_TX_LLDP(pkt, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt, lldp_enabled))
high_ctx_qw |= IAVF_TX_CTX_DESC_SWTCH_UPLINK
<< IAVF_TXD_CTX_QW1_CMD_SHIFT;
uint64_t high_data_qw = (CI_TX_DESC_DTYPE_DATA |
@@ -2086,13 +2086,13 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
static __rte_always_inline void
ctx_vtx(volatile struct ci_tx_desc *txdp,
struct rte_mbuf **pkt, uint16_t nb_pkts, uint64_t flags,
- bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ bool offload, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t hi_data_qw_tmpl = (CI_TX_DESC_DTYPE_DATA | (flags << CI_TXD_QW1_CMD_S));
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_enabled);
nb_pkts--; txdp++; pkt++;
}
@@ -2125,7 +2125,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_enabled))
hi_ctx_qw1 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK
<< CI_TXD_QW1_CMD_S;
@@ -2145,7 +2145,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_enabled))
hi_ctx_qw0 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << CI_TXD_QW1_CMD_S;
if (offload) {
@@ -2165,7 +2165,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
if (nb_pkts)
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_enabled);
}
static __rte_always_inline uint16_t
@@ -2246,7 +2246,7 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
/* bit2 is reserved and must be set to 1 according to Spec */
uint64_t flags = CI_TX_DESC_CMD_EOP | CI_TX_DESC_CMD_ICRC;
uint64_t rs = CI_TX_DESC_CMD_RS | flags;
- uint8_t lldp_mode = txq->lldp_mode;
+ bool lldp_enabled = txq->lldp_enabled;
if (txq->nb_tx_free < txq->tx_free_thresh)
ci_tx_free_bufs_vec(txq, iavf_tx_desc_done, true);
@@ -2269,10 +2269,10 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = n >> 1;
tx_backlog_entry_avx512(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_enabled);
tx_pkts += (nb_mbuf - 1);
txdp += (n - 2);
- ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_enabled);
nb_commit = (uint16_t)(nb_commit - n);
@@ -2286,7 +2286,7 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = nb_commit >> 1;
tx_backlog_entry_avx512(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_enabled);
tx_id = (uint16_t)(tx_id + nb_commit);
if (tx_id > txq->tx_next_rs) {
diff --git a/drivers/net/intel/iavf/iavf_testpmd.c b/drivers/net/intel/iavf/iavf_testpmd.c
index 4731d0b61b..f3b932da04 100644
--- a/drivers/net/intel/iavf/iavf_testpmd.c
+++ b/drivers/net/intel/iavf/iavf_testpmd.c
@@ -2,7 +2,6 @@
* Copyright(c) 2010-2016 Intel Corporation.
*/
-#include <stdalign.h>
#include <stdlib.h>
#include <rte_pmd_iavf.h>
@@ -14,61 +13,6 @@
#include "testpmd.h"
#include "iavf_rxtx.h"
-struct cmd_enable_tx_lldp_result {
- cmdline_fixed_string_t set;
- cmdline_fixed_string_t tx;
- cmdline_fixed_string_t lldp;
- cmdline_fixed_string_t what;
-};
-
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_set =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- set, "set");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_tx =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- tx, "tx");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_lldp =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- lldp, "lldp");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_what =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- what, "on#off");
-
-static void
-cmd_enable_tx_lldp_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl, __rte_unused void *data)
-{
- struct cmd_enable_tx_lldp_result *res = parsed_result;
- const struct rte_mbuf_dynfield iavf_tx_lldp_dynfield = {
- .name = IAVF_TX_LLDP_DYNFIELD,
- .size = sizeof(uint8_t),
- .align = alignof(uint8_t),
- .flags = 0
- };
- int offset;
-
- if (strncmp(res->what, "on", 2) == 0) {
- offset = rte_mbuf_dynfield_register(&iavf_tx_lldp_dynfield);
- printf("rte_pmd_iavf_tx_lldp_dynfield_offset: %d", offset);
- if (offset < 0)
- fprintf(stderr,
- "rte mbuf dynfield register failed, offset: %d", offset);
- }
-}
-
-static cmdline_parse_inst_t cmd_enable_tx_lldp = {
- .f = cmd_enable_tx_lldp_parsed,
- .data = NULL,
- .help_str = "set iavf tx lldp on|off",
- .tokens = {
- (void *)&cmd_enable_tx_lldp_set,
- (void *)&cmd_enable_tx_lldp_tx,
- (void *)&cmd_enable_tx_lldp_lldp,
- (void *)&cmd_enable_tx_lldp_what,
- NULL,
- },
-};
-
struct cmd_reinit_result {
cmdline_fixed_string_t port;
cmdline_fixed_string_t reinit;
@@ -117,11 +61,6 @@ static cmdline_parse_inst_t cmd_reinit = {
static struct testpmd_driver_commands iavf_cmds = {
.commands = {
- {
- &cmd_enable_tx_lldp,
- "set tx lldp (on|off)\n"
- " Set iavf Tx lldp packet(currently only supported on)\n\n",
- },
{
&cmd_reinit,
"port reinit (port_id)\n"
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] net/iavf: rename LLDP Tx devarg
2026-08-10 14:03 [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Ciara Loftus
@ 2026-08-10 14:03 ` Ciara Loftus
2026-08-13 15:50 ` Bruce Richardson
2026-08-13 15:30 ` [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
2026-08-14 12:37 ` [PATCH v2 " Ciara Loftus
2 siblings, 1 reply; 9+ messages in thread
From: Ciara Loftus @ 2026-08-10 14:03 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Now that the dynamic mbuf field method has been removed, packet type is
the only mechanism used to detect LLDP packets on the transmit path.
Using the word 'ptype' in the 'enable_ptype_lldp' devarg is therefore
unnecessary and an implementation detail that no longer needs to be
exposed to users.
Add an 'enable_lldp' devarg but keep 'enable_ptype_lldp' as a deprecated
alias that maps to the same setting and emits a warning when used. If
both are supplied, 'enable_lldp' takes precedence. The
'enable_ptype_lldp' devarg will be removed in a future release.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
doc/guides/nics/intel_vf.rst | 9 +++++++--
doc/guides/rel_notes/deprecation.rst | 3 +++
doc/guides/rel_notes/release_26_11.rst | 7 ++++++-
drivers/net/intel/iavf/iavf.h | 2 +-
drivers/net/intel/iavf/iavf_ethdev.c | 20 +++++++++++++++++---
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
6 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index e635c1fac2..cb3a5a7079 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -684,10 +684,15 @@ Tx LLDP Testing
To trigger LLDP packet transmission from the VF, set the ``packet_type``
of the mbuf to ``RTE_PTYPE_L2_ETHER_LLDP``.
-This, in conjunction with enabling the ``enable_ptype_lldp`` devarg
+This, in conjunction with enabling the ``enable_lldp`` devarg
will cause such packets to be transmitted::
- -a 0000:xx:xx.x,enable_ptype_lldp=1
+ -a 0000:xx:xx.x,enable_lldp=1
+
+.. note::
+
+ The ``enable_ptype_lldp`` devarg is a deprecated alias for ``enable_lldp``
+ and will be removed in a future release.
Limitations or Knowing issues
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a3cf544982..6e2d067adb 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -173,3 +173,6 @@ Deprecation Notices
after a VF reset, but this is of questionable value
since most applications expect their settings to be preserved
transparently across a reset.
+
+* net/iavf: The ``enable_ptype_lldp`` devarg is deprecated and will be
+ removed in a future release. Use the ``enable_lldp`` devarg instead.
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index 8dc82c016d..f110c4dffa 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -55,6 +55,11 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel iavf driver.**
+
+ * Added the ``enable_lldp`` devarg to enable LLDP packet transmission.
+ The ``enable_ptype_lldp`` devarg is retained as a deprecated alias.
+
Removed Items
-------------
@@ -80,7 +85,7 @@ Removed Items
* net/iavf: Removed the dynamic mbuf field method for detecting LLDP packets
on the transmit path, along with the ``set tx lldp on`` testpmd command.
The only remaining method for detecting LLDP packets is by using the mbuf
- packet type in conjunction with the ``enable_ptype_lldp`` devarg.
+ packet type in conjunction with the ``enable_lldp`` devarg.
API Changes
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 293adaf6c9..dc33ba5a4b 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -326,7 +326,7 @@ struct iavf_devargs {
int auto_reconfig;
int no_poll_on_link_down;
uint64_t mbuf_check;
- int enable_ptype_lldp;
+ int enable_lldp;
};
struct iavf_security_ctx;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index fddbd06bbc..244f4052aa 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -45,6 +45,8 @@
#define IAVF_ENABLE_AUTO_RECONFIG_ARG "auto_reconfig"
#define IAVF_NO_POLL_ON_LINK_DOWN_ARG "no-poll-on-link-down"
#define IAVF_MBUF_CHECK_ARG "mbuf_check"
+#define IAVF_ENABLE_LLDP_ARG "enable_lldp"
+/* Deprecated alias for IAVF_ENABLE_LLDP_ARG. */
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
uint64_t iavf_timestamp_dynflag;
int iavf_timestamp_dynfield_offset = -1;
@@ -57,6 +59,7 @@ static const char * const iavf_valid_args[] = {
IAVF_ENABLE_AUTO_RECONFIG_ARG,
IAVF_NO_POLL_ON_LINK_DOWN_ARG,
IAVF_MBUF_CHECK_ARG,
+ IAVF_ENABLE_LLDP_ARG,
IAVF_ENABLE_PTYPE_LLDP_ARG,
NULL
};
@@ -1028,7 +1031,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
for (uint16_t i = 0; i < dev->data->nb_tx_queues; i++) {
struct ci_tx_queue *txq = dev->data->tx_queues[i];
if (txq)
- txq->lldp_enabled = adapter->devargs.enable_ptype_lldp;
+ txq->lldp_enabled = adapter->devargs.enable_lldp;
}
if (iavf_init_queues(dev) != 0) {
@@ -2517,8 +2520,19 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
if (ret)
goto bail;
- ret = rte_kvargs_process(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG,
- &parse_bool, &ad->devargs.enable_ptype_lldp);
+ /* Deprecated alias: same behaviour as enable_lldp. */
+ if (rte_kvargs_count(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG) > 0) {
+ PMD_INIT_LOG(WARNING,
+ "devarg '%s' is deprecated, use '%s' instead",
+ IAVF_ENABLE_PTYPE_LLDP_ARG, IAVF_ENABLE_LLDP_ARG);
+ ret = rte_kvargs_process(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG,
+ &parse_bool, &ad->devargs.enable_lldp);
+ if (ret)
+ goto bail;
+ }
+
+ ret = rte_kvargs_process(kvlist, IAVF_ENABLE_LLDP_ARG,
+ &parse_bool, &ad->devargs.enable_lldp);
if (ret)
goto bail;
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index c15486fa28..e2c8686ab0 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3928,7 +3928,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
if (iavf_tx_vec_dev_check(dev) != -1)
req_features.simd_width = iavf_get_max_simd_bitwidth();
- if (adapter->devargs.enable_ptype_lldp)
+ if (adapter->devargs.enable_lldp)
req_features.ctx_desc = true;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method
2026-08-10 14:03 [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Ciara Loftus
2026-08-10 14:03 ` [PATCH 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
@ 2026-08-13 15:30 ` Bruce Richardson
2026-08-14 12:37 ` [PATCH v2 " Ciara Loftus
2 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-08-13 15:30 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Mon, Aug 10, 2026 at 02:03:53PM +0000, Ciara Loftus wrote:
> Prior to this commit two methods existed for triggering LLDP packet
> transmission in the driver: the dynamic mbuf field method and the mbuf
> packet-type method. This commit removes the dynamic mbuf field method. The
> dynfield method required applications to tag every LLDP packet manually,
> whereas the packet-type method gives the driver the opportunity to tag LLDP
> packets automatically on the Rx path, leaving no work to be done by the
> application to explicitly flag a packet as LLDP before transmission.
>
> The per-queue LLDP state is reduced from the tri-state 'lldp_mode' to a
> single 'lldp_enabled' boolean. The testpmd command 'set tx lldp on'
> whose purpose was to enable the dynfield lldp method is removed. The
> ptype lldp method is enabled via the enable_ptype_lldp devarg (as has
> always been the case since support was introduced):
>
> -a 0000:xx:xx.x,enable_ptype_lldp=1
>
> The deprecation notice for the dynfield is removed and the driver
> documentation is updated.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> doc/guides/nics/intel_vf.rst | 29 +--------
> doc/guides/rel_notes/deprecation.rst | 4 --
> doc/guides/rel_notes/release_26_11.rst | 5 ++
> drivers/net/intel/common/tx.h | 2 +-
> drivers/net/intel/iavf/iavf_ethdev.c | 28 +--------
> drivers/net/intel/iavf/iavf_rxtx.c | 15 ++---
> drivers/net/intel/iavf/iavf_rxtx.h | 17 +-----
> drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 22 +++----
> drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 22 +++----
> drivers/net/intel/iavf/iavf_testpmd.c | 61 -------------------
> 10 files changed, 43 insertions(+), 162 deletions(-)
>
Good cleanup, thanks.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] net/iavf: rename LLDP Tx devarg
2026-08-10 14:03 ` [PATCH 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
@ 2026-08-13 15:50 ` Bruce Richardson
2026-08-14 12:44 ` Loftus, Ciara
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2026-08-13 15:50 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Mon, Aug 10, 2026 at 02:03:54PM +0000, Ciara Loftus wrote:
> Now that the dynamic mbuf field method has been removed, packet type is
> the only mechanism used to detect LLDP packets on the transmit path.
> Using the word 'ptype' in the 'enable_ptype_lldp' devarg is therefore
> unnecessary and an implementation detail that no longer needs to be
> exposed to users.
>
> Add an 'enable_lldp' devarg but keep 'enable_ptype_lldp' as a deprecated
> alias that maps to the same setting and emits a warning when used. If
> both are supplied, 'enable_lldp' takes precedence. The
> 'enable_ptype_lldp' devarg will be removed in a future release.
>
I wonder if it's just better to implement a hard failure for use of the
legacy devarg? The old devarg was only present for a release or two, so
shouldn't be that common and its use implies an app or script running an
app that hasn't been properly updated to latest release.
Also, is it worth throwing a warning on dev probe or start if the LLDP
dynamic mbuf field is present? It's again a sign that an app hasn't been
updated properly. [I don't think we can hard-fail in this case].
/Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] net/iavf: remove Tx LLDP dynfield method
2026-08-10 14:03 [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Ciara Loftus
2026-08-10 14:03 ` [PATCH 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
2026-08-13 15:30 ` [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
@ 2026-08-14 12:37 ` Ciara Loftus
2026-08-14 12:37 ` [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
2026-08-14 15:08 ` [PATCH v2 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
2 siblings, 2 replies; 9+ messages in thread
From: Ciara Loftus @ 2026-08-14 12:37 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus, Bruce Richardson
Prior to this commit two methods existed for triggering LLDP packet
transmission in the driver: the dynamic mbuf field method and the mbuf
packet-type method. This commit removes the dynamic mbuf field method. The
dynfield method required applications to tag every LLDP packet manually,
whereas the packet-type method gives the driver the opportunity to tag LLDP
packets automatically on the Rx path, leaving no work to be done by the
application to explicitly flag a packet as LLDP before transmission.
The per-queue LLDP state is reduced from the tri-state 'lldp_mode' to a
single 'lldp_enabled' boolean. The testpmd command 'set tx lldp on'
whose purpose was to enable the dynfield lldp method is removed. The
ptype lldp method is enabled via the enable_ptype_lldp devarg (as has
always been the case since support was introduced):
-a 0000:xx:xx.x,enable_ptype_lldp=1
The deprecation notice for the dynfield is removed and the driver
documentation is updated.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
* Added warning if dynfield is registered
---
doc/guides/nics/intel_vf.rst | 29 +--------
doc/guides/rel_notes/deprecation.rst | 4 --
doc/guides/rel_notes/release_26_11.rst | 5 ++
drivers/net/intel/common/tx.h | 2 +-
drivers/net/intel/iavf/iavf_ethdev.c | 30 ++-------
drivers/net/intel/iavf/iavf_rxtx.c | 15 ++---
drivers/net/intel/iavf/iavf_rxtx.h | 17 +-----
drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 22 +++----
drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 22 +++----
drivers/net/intel/iavf/iavf_testpmd.c | 61 -------------------
10 files changed, 47 insertions(+), 160 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index 8f8ce32cac..e635c1fac2 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -682,38 +682,13 @@ Diagnostic Utilities
Tx LLDP Testing
~~~~~~~~~~~~~~~
-There are two methods to trigger LLDP packet transmission from the VF.
-
-The first (and recommended) method is to set the ``packet_type`` of the mbuf
-to ``RTE_PTYPE_L2_ETHER_LLDP``.
+To trigger LLDP packet transmission from the VF, set the ``packet_type``
+of the mbuf to ``RTE_PTYPE_L2_ETHER_LLDP``.
This, in conjunction with enabling the ``enable_ptype_lldp`` devarg
will cause such packets to be transmitted::
-a 0000:xx:xx.x,enable_ptype_lldp=1
-An alternative method is to register an mbuf dynfield ``IAVF_TX_LLDP_DYNFIELD``
-before ``dev_start``.
-This dynfield needs to be set to 1 when preparing an LLDP packet intended for transmission.
-
-.. note::
-
- The dynamic mbuf field method is deprecated and will be removed in a future release.
- Users should migrate to the ``enable_ptype_lldp`` devarg and mbuf LLDP ptype method
- described above.
-
-For ``dpdk-testpmd`` application, the dynamic mbuf field is registered
-when the following command is issued:
-
-Usage::
-
- testpmd> set tx lldp on
-
-One must then stop and restart the port for it to take effect.
-These requirements only apply for the dynamic mbuf field method;
-no special steps are needed for the ``enable_ptype_lldp`` devarg method.
-If both methods are enabled, the ptype based method will take precedence
-over the dynamic mbuf field method.
-
Limitations or Knowing issues
-----------------------------
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 6ad7698c6b..a3cf544982 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -167,10 +167,6 @@ Deprecation Notices
``drivers/bus/vmbus/rte_bus_vmbus.h`` will become internal to DPDK.
Those API functions are used internally by DPDK core and netvsc PMD.
-* 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/iavf: The ``auto_reconfig`` devarg is deprecated
and will be removed in a future release.
It allows disabling the automatic restoration of device settings
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index c8cc86295d..8dc82c016d 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -77,6 +77,11 @@ Removed Items
``rte_rib6_is_equal``
* table: ``RTE_LPM_IPV6_ADDR_SIZE``
+* net/iavf: Removed the dynamic mbuf field method for detecting LLDP packets
+ on the transmit path, along with the ``set tx lldp on`` testpmd command.
+ The only remaining method for detecting LLDP packets is by using the mbuf
+ packet type in conjunction with the ``enable_ptype_lldp`` devarg.
+
API Changes
-----------
diff --git a/drivers/net/intel/common/tx.h b/drivers/net/intel/common/tx.h
index 5fe71aed12..55757d34d7 100644
--- a/drivers/net/intel/common/tx.h
+++ b/drivers/net/intel/common/tx.h
@@ -197,7 +197,7 @@ struct ci_tx_queue {
uint8_t vlan_flag;
uint8_t tc;
bool use_ctx; /* with ctx info, each pkt needs two descriptors */
- uint8_t lldp_mode; /* ptype or dynfield */
+ bool lldp_enabled;
};
struct { /* ixgbe specific values */
const struct ixgbe_txq_ops *ops;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index d601ec3b6a..5d9d889a08 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -48,7 +48,6 @@
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
uint64_t iavf_timestamp_dynflag;
int iavf_timestamp_dynfield_offset = -1;
-int rte_pmd_iavf_tx_lldp_dynfield_offset = -1;
static const char * const iavf_valid_args[] = {
IAVF_PROTO_XTR_ARG,
@@ -1026,28 +1025,16 @@ iavf_dev_start(struct rte_eth_dev *dev)
}
}
- /* Check Tx LLDP dynfield */
- rte_pmd_iavf_tx_lldp_dynfield_offset =
- rte_mbuf_dynfield_lookup(IAVF_TX_LLDP_DYNFIELD, NULL);
- if (rte_pmd_iavf_tx_lldp_dynfield_offset > 0) {
+ /* Warn if an application still registers the removed LLDP Tx dynfield. */
+ if (rte_mbuf_dynfield_lookup("intel_pmd_dynfield_tx_lldp", NULL) >= 0)
PMD_DRV_LOG(WARNING,
- "Using a dynamic mbuf field to identify LLDP packets is deprecated. "
- "Set the 'enable_ptype_lldp' driver option and mbuf LLDP ptypes instead.");
- if (adapter->devargs.enable_ptype_lldp)
- PMD_DRV_LOG(WARNING,
- "Both ptype and dynfield LLDP enabled; ptype takes precedence.");
- }
+ "Tx LLDP dynamic mbuf field is no longer supported. "
+ "Use enable_ptype_lldp devarg and packet type instead.");
for (uint16_t i = 0; i < dev->data->nb_tx_queues; i++) {
struct ci_tx_queue *txq = dev->data->tx_queues[i];
- if (txq) {
- if (adapter->devargs.enable_ptype_lldp)
- txq->lldp_mode = IAVF_LLDP_PTYPE;
- else if (rte_pmd_iavf_tx_lldp_dynfield_offset > 0)
- txq->lldp_mode = IAVF_LLDP_DYNFIELD;
- else
- txq->lldp_mode = IAVF_LLDP_DISABLED;
- }
+ if (txq)
+ txq->lldp_enabled = adapter->devargs.enable_ptype_lldp;
}
if (iavf_init_queues(dev) != 0) {
@@ -3018,11 +3005,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
*/
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
iavf_set_rx_function(eth_dev);
- /* LLDP may have been enabled by the primary process. Store the offset before
- * setting the TX function because it may be used in the selection function.
- */
- rte_pmd_iavf_tx_lldp_dynfield_offset =
- rte_mbuf_dynfield_lookup(IAVF_TX_LLDP_DYNFIELD, NULL);
iavf_set_tx_function(eth_dev);
return 0;
}
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 4f2ffe6188..c15486fa28 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -2325,7 +2325,7 @@ iavf_recv_pkts_bulk_alloc(void *rx_queue,
/* Check if the context descriptor is needed for TX offloading */
static inline uint16_t
-iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, uint8_t lldp_mode)
+iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t flags = mb->ol_flags;
if (flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG |
@@ -2336,7 +2336,7 @@ iavf_calc_context_desc(const struct rte_mbuf *mb, uint8_t vlan_flag, uint8_t lld
vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
return 1;
- if (IAVF_CHECK_TX_LLDP(mb, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(mb, lldp_enabled))
return 1;
return 0;
@@ -2524,7 +2524,8 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
const struct ci_tx_queue *txq,
uint64_t *qw0, uint64_t *qw1)
{
- uint8_t iavf_vlan_flag, lldp_mode;
+ uint8_t iavf_vlan_flag;
+ bool lldp_enabled;
uint16_t cd_l2tag2 = 0;
uint64_t cd_type_cmd = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t cd_tunneling_params = 0;
@@ -2532,10 +2533,10 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
/* Use IAVF-specific flags from txq */
iavf_vlan_flag = txq->vlan_flag;
- lldp_mode = txq->lldp_mode;
+ lldp_enabled = txq->lldp_enabled;
/* Check if context descriptor is needed using existing IAVF logic */
- if (!iavf_calc_context_desc(mbuf, iavf_vlan_flag, lldp_mode))
+ if (!iavf_calc_context_desc(mbuf, iavf_vlan_flag, lldp_enabled))
return 0;
/* Get IPsec metadata if needed */
@@ -2567,7 +2568,7 @@ iavf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
}
/* LLDP switching field */
- if (IAVF_CHECK_TX_LLDP(mbuf, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(mbuf, lldp_enabled))
cd_type_cmd |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
/* Tunneling field */
@@ -3927,7 +3928,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
if (iavf_tx_vec_dev_check(dev) != -1)
req_features.simd_width = iavf_get_max_simd_bitwidth();
- if (adapter->devargs.enable_ptype_lldp || rte_pmd_iavf_tx_lldp_dynfield_offset > 0)
+ if (adapter->devargs.enable_ptype_lldp)
req_features.ctx_desc = true;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 22ea415f44..6ad7182ef7 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -155,23 +155,12 @@
#define IAVF_TX_OFFLOAD_NOTSUP_MASK \
(RTE_MBUF_F_TX_OFFLOAD_MASK ^ IAVF_TX_OFFLOAD_MASK)
-#define IAVF_TX_LLDP_DYNFIELD "intel_pmd_dynfield_tx_lldp"
-
-/* LLDP Tx modes */
-#define IAVF_LLDP_DISABLED 0
-#define IAVF_LLDP_PTYPE 1
-#define IAVF_LLDP_DYNFIELD 2
-
-#define IAVF_CHECK_TX_LLDP(m, lldp_mode) \
- ((lldp_mode) && \
- ((((lldp_mode) == IAVF_LLDP_PTYPE) && \
- ((m)->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_LLDP) || \
- (((lldp_mode) == IAVF_LLDP_DYNFIELD) && \
- *RTE_MBUF_DYNFIELD((m), rte_pmd_iavf_tx_lldp_dynfield_offset, uint8_t *))))
+#define IAVF_CHECK_TX_LLDP(m, ptype_lldp_enabled) \
+ ((ptype_lldp_enabled) && \
+ ((m)->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_LLDP)
extern uint64_t iavf_timestamp_dynflag;
extern int iavf_timestamp_dynfield_offset;
-extern int rte_pmd_iavf_tx_lldp_dynfield_offset;
typedef void (*iavf_rxd_to_pkt_fields_t)(struct ci_rx_queue *rxq,
struct rte_mbuf *mb,
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
index 9341d8412f..715805c65a 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
@@ -1903,7 +1903,7 @@ iavf_fill_ctx_desc_tunneling_field(volatile uint64_t *qw0,
static __rte_always_inline void
ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
- uint64_t flags, bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ uint64_t flags, bool offload, uint8_t vlan_flag, bool ptype_lldp_enabled)
{
uint64_t high_ctx_qw = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t low_ctx_qw = 0;
@@ -1924,7 +1924,7 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
}
#endif
}
- if (IAVF_CHECK_TX_LLDP(pkt, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt, ptype_lldp_enabled))
high_ctx_qw |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
uint64_t high_data_qw = (IAVF_TX_DESC_DTYPE_DATA |
((uint64_t)flags << IAVF_TXD_QW1_CMD_SHIFT) |
@@ -1941,14 +1941,14 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
static __rte_always_inline void
ctx_vtx(volatile struct ci_tx_desc *txdp,
struct rte_mbuf **pkt, uint16_t nb_pkts, uint64_t flags,
- bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ bool offload, uint8_t vlan_flag, bool ptype_lldp_enabled)
{
uint64_t hi_data_qw_tmpl = (IAVF_TX_DESC_DTYPE_DATA |
((uint64_t)flags << IAVF_TXD_QW1_CMD_SHIFT));
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, ptype_lldp_enabled);
nb_pkts--; txdp++; pkt++;
}
@@ -1985,7 +1985,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[1], ptype_lldp_enabled))
hi_ctx_qw1 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
#ifdef IAVF_TX_VLAN_QINQ_OFFLOAD
@@ -2006,7 +2006,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[0], ptype_lldp_enabled))
hi_ctx_qw0 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << IAVF_TXD_CTX_QW1_CMD_SHIFT;
if (offload) {
@@ -2029,7 +2029,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
if (nb_pkts)
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, ptype_lldp_enabled);
}
static __rte_always_inline uint16_t
@@ -2043,7 +2043,7 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
/* bit2 is reserved and must be set to 1 according to Spec */
uint64_t flags = IAVF_TX_DESC_CMD_EOP | IAVF_TX_DESC_CMD_ICRC;
uint64_t rs = IAVF_TX_DESC_CMD_RS | flags;
- uint8_t lldp_mode = txq->lldp_mode;
+ bool lldp_enabled = txq->lldp_enabled;
if (txq->nb_tx_free < txq->tx_free_thresh)
ci_tx_free_bufs_vec(txq, iavf_tx_desc_done, true);
@@ -2066,10 +2066,10 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = n >> 1;
ci_tx_backlog_entry_vec(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_enabled);
tx_pkts += (nb_mbuf - 1);
txdp += (n - 2);
- ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_enabled);
nb_commit = (uint16_t)(nb_commit - n);
@@ -2083,7 +2083,7 @@ iavf_xmit_fixed_burst_vec_avx2_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = nb_commit >> 1;
ci_tx_backlog_entry_vec(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_enabled);
tx_id = (uint16_t)(tx_id + nb_commit);
if (tx_id > txq->tx_next_rs) {
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
index 83ba635062..dfbbea80f7 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
@@ -2047,7 +2047,7 @@ iavf_fill_ctx_desc_tunnelling_field(volatile uint64_t *qw0,
static __rte_always_inline void
ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
- uint64_t flags, bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ uint64_t flags, bool offload, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t high_ctx_qw = IAVF_TX_DESC_DTYPE_CONTEXT;
uint64_t low_ctx_qw = 0;
@@ -2068,7 +2068,7 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
}
#endif
}
- if (IAVF_CHECK_TX_LLDP(pkt, lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt, lldp_enabled))
high_ctx_qw |= IAVF_TX_CTX_DESC_SWTCH_UPLINK
<< IAVF_TXD_CTX_QW1_CMD_SHIFT;
uint64_t high_data_qw = (CI_TX_DESC_DTYPE_DATA |
@@ -2086,13 +2086,13 @@ ctx_vtx1(volatile struct ci_tx_desc *txdp, struct rte_mbuf *pkt,
static __rte_always_inline void
ctx_vtx(volatile struct ci_tx_desc *txdp,
struct rte_mbuf **pkt, uint16_t nb_pkts, uint64_t flags,
- bool offload, uint8_t vlan_flag, uint8_t lldp_mode)
+ bool offload, uint8_t vlan_flag, bool lldp_enabled)
{
uint64_t hi_data_qw_tmpl = (CI_TX_DESC_DTYPE_DATA | (flags << CI_TXD_QW1_CMD_S));
/* if unaligned on 32-bit boundary, do one to align */
if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_enabled);
nb_pkts--; txdp++; pkt++;
}
@@ -2125,7 +2125,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[1], lldp_enabled))
hi_ctx_qw1 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK
<< CI_TXD_QW1_CMD_S;
@@ -2145,7 +2145,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
}
#endif
- if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_mode))
+ if (IAVF_CHECK_TX_LLDP(pkt[0], lldp_enabled))
hi_ctx_qw0 |= IAVF_TX_CTX_DESC_SWTCH_UPLINK << CI_TXD_QW1_CMD_S;
if (offload) {
@@ -2165,7 +2165,7 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
}
if (nb_pkts)
- ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *pkt, flags, offload, vlan_flag, lldp_enabled);
}
static __rte_always_inline uint16_t
@@ -2246,7 +2246,7 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
/* bit2 is reserved and must be set to 1 according to Spec */
uint64_t flags = CI_TX_DESC_CMD_EOP | CI_TX_DESC_CMD_ICRC;
uint64_t rs = CI_TX_DESC_CMD_RS | flags;
- uint8_t lldp_mode = txq->lldp_mode;
+ bool lldp_enabled = txq->lldp_enabled;
if (txq->nb_tx_free < txq->tx_free_thresh)
ci_tx_free_bufs_vec(txq, iavf_tx_desc_done, true);
@@ -2269,10 +2269,10 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = n >> 1;
tx_backlog_entry_avx512(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf - 1, flags, offload, txq->vlan_flag, lldp_enabled);
tx_pkts += (nb_mbuf - 1);
txdp += (n - 2);
- ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx1(txdp, *tx_pkts++, rs, offload, txq->vlan_flag, lldp_enabled);
nb_commit = (uint16_t)(nb_commit - n);
@@ -2286,7 +2286,7 @@ iavf_xmit_fixed_burst_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
nb_mbuf = nb_commit >> 1;
tx_backlog_entry_avx512(txep, tx_pkts, nb_mbuf);
- ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_mode);
+ ctx_vtx(txdp, tx_pkts, nb_mbuf, flags, offload, txq->vlan_flag, lldp_enabled);
tx_id = (uint16_t)(tx_id + nb_commit);
if (tx_id > txq->tx_next_rs) {
diff --git a/drivers/net/intel/iavf/iavf_testpmd.c b/drivers/net/intel/iavf/iavf_testpmd.c
index 4731d0b61b..f3b932da04 100644
--- a/drivers/net/intel/iavf/iavf_testpmd.c
+++ b/drivers/net/intel/iavf/iavf_testpmd.c
@@ -2,7 +2,6 @@
* Copyright(c) 2010-2016 Intel Corporation.
*/
-#include <stdalign.h>
#include <stdlib.h>
#include <rte_pmd_iavf.h>
@@ -14,61 +13,6 @@
#include "testpmd.h"
#include "iavf_rxtx.h"
-struct cmd_enable_tx_lldp_result {
- cmdline_fixed_string_t set;
- cmdline_fixed_string_t tx;
- cmdline_fixed_string_t lldp;
- cmdline_fixed_string_t what;
-};
-
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_set =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- set, "set");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_tx =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- tx, "tx");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_lldp =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- lldp, "lldp");
-static cmdline_parse_token_string_t cmd_enable_tx_lldp_what =
- TOKEN_STRING_INITIALIZER(struct cmd_enable_tx_lldp_result,
- what, "on#off");
-
-static void
-cmd_enable_tx_lldp_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl, __rte_unused void *data)
-{
- struct cmd_enable_tx_lldp_result *res = parsed_result;
- const struct rte_mbuf_dynfield iavf_tx_lldp_dynfield = {
- .name = IAVF_TX_LLDP_DYNFIELD,
- .size = sizeof(uint8_t),
- .align = alignof(uint8_t),
- .flags = 0
- };
- int offset;
-
- if (strncmp(res->what, "on", 2) == 0) {
- offset = rte_mbuf_dynfield_register(&iavf_tx_lldp_dynfield);
- printf("rte_pmd_iavf_tx_lldp_dynfield_offset: %d", offset);
- if (offset < 0)
- fprintf(stderr,
- "rte mbuf dynfield register failed, offset: %d", offset);
- }
-}
-
-static cmdline_parse_inst_t cmd_enable_tx_lldp = {
- .f = cmd_enable_tx_lldp_parsed,
- .data = NULL,
- .help_str = "set iavf tx lldp on|off",
- .tokens = {
- (void *)&cmd_enable_tx_lldp_set,
- (void *)&cmd_enable_tx_lldp_tx,
- (void *)&cmd_enable_tx_lldp_lldp,
- (void *)&cmd_enable_tx_lldp_what,
- NULL,
- },
-};
-
struct cmd_reinit_result {
cmdline_fixed_string_t port;
cmdline_fixed_string_t reinit;
@@ -117,11 +61,6 @@ static cmdline_parse_inst_t cmd_reinit = {
static struct testpmd_driver_commands iavf_cmds = {
.commands = {
- {
- &cmd_enable_tx_lldp,
- "set tx lldp (on|off)\n"
- " Set iavf Tx lldp packet(currently only supported on)\n\n",
- },
{
&cmd_reinit,
"port reinit (port_id)\n"
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg
2026-08-14 12:37 ` [PATCH v2 " Ciara Loftus
@ 2026-08-14 12:37 ` Ciara Loftus
2026-08-14 13:08 ` Bruce Richardson
2026-08-14 15:08 ` [PATCH v2 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
1 sibling, 1 reply; 9+ messages in thread
From: Ciara Loftus @ 2026-08-14 12:37 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Now that the dynamic mbuf field method has been removed, packet type is
the only mechanism used to detect LLDP packets on the transmit path.
Using the word 'ptype' in the 'enable_ptype_lldp' devarg is therefore
unnecessary and an implementation detail that no longer needs to be
exposed to users.
Rename the devarg to 'enable_lldp'. The old 'enable_ptype_lldp' name is
rejected with an error directing the user to the new name. This is
considered safe because the old devarg name only featured in one
release.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
* Hard fail instead of warning when old devarg is used
---
doc/guides/nics/intel_vf.rst | 9 +++++++--
doc/guides/rel_notes/release_26_11.rst | 7 ++++++-
drivers/net/intel/iavf/iavf.h | 2 +-
drivers/net/intel/iavf/iavf_ethdev.c | 17 +++++++++++++----
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
5 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/doc/guides/nics/intel_vf.rst b/doc/guides/nics/intel_vf.rst
index e635c1fac2..a075167d5f 100644
--- a/doc/guides/nics/intel_vf.rst
+++ b/doc/guides/nics/intel_vf.rst
@@ -684,10 +684,15 @@ Tx LLDP Testing
To trigger LLDP packet transmission from the VF, set the ``packet_type``
of the mbuf to ``RTE_PTYPE_L2_ETHER_LLDP``.
-This, in conjunction with enabling the ``enable_ptype_lldp`` devarg
+This, in conjunction with enabling the ``enable_lldp`` devarg
will cause such packets to be transmitted::
- -a 0000:xx:xx.x,enable_ptype_lldp=1
+ -a 0000:xx:xx.x,enable_lldp=1
+
+.. note::
+
+ The ``enable_lldp`` devarg was previously named ``enable_ptype_lldp``.
+ The old name is no longer accepted.
Limitations or Knowing issues
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index 8dc82c016d..438610b468 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -55,6 +55,11 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel iavf driver.**
+
+ * Renamed the ``enable_ptype_lldp`` devarg to ``enable_lldp``.
+ The old name is no longer accepted.
+
Removed Items
-------------
@@ -80,7 +85,7 @@ Removed Items
* net/iavf: Removed the dynamic mbuf field method for detecting LLDP packets
on the transmit path, along with the ``set tx lldp on`` testpmd command.
The only remaining method for detecting LLDP packets is by using the mbuf
- packet type in conjunction with the ``enable_ptype_lldp`` devarg.
+ packet type in conjunction with the ``enable_lldp`` devarg.
API Changes
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 293adaf6c9..dc33ba5a4b 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -326,7 +326,7 @@ struct iavf_devargs {
int auto_reconfig;
int no_poll_on_link_down;
uint64_t mbuf_check;
- int enable_ptype_lldp;
+ int enable_lldp;
};
struct iavf_security_ctx;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 5d9d889a08..ad30930492 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -45,6 +45,7 @@
#define IAVF_ENABLE_AUTO_RECONFIG_ARG "auto_reconfig"
#define IAVF_NO_POLL_ON_LINK_DOWN_ARG "no-poll-on-link-down"
#define IAVF_MBUF_CHECK_ARG "mbuf_check"
+#define IAVF_ENABLE_LLDP_ARG "enable_lldp"
#define IAVF_ENABLE_PTYPE_LLDP_ARG "enable_ptype_lldp"
uint64_t iavf_timestamp_dynflag;
int iavf_timestamp_dynfield_offset = -1;
@@ -57,6 +58,7 @@ static const char * const iavf_valid_args[] = {
IAVF_ENABLE_AUTO_RECONFIG_ARG,
IAVF_NO_POLL_ON_LINK_DOWN_ARG,
IAVF_MBUF_CHECK_ARG,
+ IAVF_ENABLE_LLDP_ARG,
IAVF_ENABLE_PTYPE_LLDP_ARG,
NULL
};
@@ -1029,12 +1031,12 @@ iavf_dev_start(struct rte_eth_dev *dev)
if (rte_mbuf_dynfield_lookup("intel_pmd_dynfield_tx_lldp", NULL) >= 0)
PMD_DRV_LOG(WARNING,
"Tx LLDP dynamic mbuf field is no longer supported. "
- "Use enable_ptype_lldp devarg and packet type instead.");
+ "Use enable_lldp devarg and packet type instead.");
for (uint16_t i = 0; i < dev->data->nb_tx_queues; i++) {
struct ci_tx_queue *txq = dev->data->tx_queues[i];
if (txq)
- txq->lldp_enabled = adapter->devargs.enable_ptype_lldp;
+ txq->lldp_enabled = adapter->devargs.enable_lldp;
}
if (iavf_init_queues(dev) != 0) {
@@ -2523,8 +2525,15 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
if (ret)
goto bail;
- ret = rte_kvargs_process(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG,
- &parse_bool, &ad->devargs.enable_ptype_lldp);
+ if (rte_kvargs_count(kvlist, IAVF_ENABLE_PTYPE_LLDP_ARG) > 0) {
+ PMD_INIT_LOG(ERR, "devarg '%s' has been renamed to '%s'",
+ IAVF_ENABLE_PTYPE_LLDP_ARG, IAVF_ENABLE_LLDP_ARG);
+ ret = -EINVAL;
+ goto bail;
+ }
+
+ ret = rte_kvargs_process(kvlist, IAVF_ENABLE_LLDP_ARG,
+ &parse_bool, &ad->devargs.enable_lldp);
if (ret)
goto bail;
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index c15486fa28..e2c8686ab0 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3928,7 +3928,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
if (iavf_tx_vec_dev_check(dev) != -1)
req_features.simd_width = iavf_get_max_simd_bitwidth();
- if (adapter->devargs.enable_ptype_lldp)
+ if (adapter->devargs.enable_lldp)
req_features.ctx_desc = true;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] net/iavf: rename LLDP Tx devarg
2026-08-13 15:50 ` Bruce Richardson
@ 2026-08-14 12:44 ` Loftus, Ciara
0 siblings, 0 replies; 9+ messages in thread
From: Loftus, Ciara @ 2026-08-14 12:44 UTC (permalink / raw)
To: Richardson, Bruce; +Cc: dev@dpdk.org
> Subject: Re: [PATCH 2/2] net/iavf: rename LLDP Tx devarg
>
> On Mon, Aug 10, 2026 at 02:03:54PM +0000, Ciara Loftus wrote:
> > Now that the dynamic mbuf field method has been removed, packet type is
> > the only mechanism used to detect LLDP packets on the transmit path.
> > Using the word 'ptype' in the 'enable_ptype_lldp' devarg is therefore
> > unnecessary and an implementation detail that no longer needs to be
> > exposed to users.
> >
> > Add an 'enable_lldp' devarg but keep 'enable_ptype_lldp' as a deprecated
> > alias that maps to the same setting and emits a warning when used. If
> > both are supplied, 'enable_lldp' takes precedence. The
> > 'enable_ptype_lldp' devarg will be removed in a future release.
> >
> I wonder if it's just better to implement a hard failure for use of the
> legacy devarg? The old devarg was only present for a release or two, so
> shouldn't be that common and its use implies an app or script running an
> app that hasn't been properly updated to latest release.
>
> Also, is it worth throwing a warning on dev probe or start if the LLDP
> dynamic mbuf field is present? It's again a sign that an app hasn't been
> updated properly. [I don't think we can hard-fail in this case].
+1 for both recommendations. I've posted a v2 with those implemented.
Thanks,
Ciara
>
> /Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg
2026-08-14 12:37 ` [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
@ 2026-08-14 13:08 ` Bruce Richardson
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-08-14 13:08 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Fri, Aug 14, 2026 at 12:37:53PM +0000, Ciara Loftus wrote:
> Now that the dynamic mbuf field method has been removed, packet type is
> the only mechanism used to detect LLDP packets on the transmit path.
> Using the word 'ptype' in the 'enable_ptype_lldp' devarg is therefore
> unnecessary and an implementation detail that no longer needs to be
> exposed to users.
>
> Rename the devarg to 'enable_lldp'. The old 'enable_ptype_lldp' name is
> rejected with an error directing the user to the new name. This is
> considered safe because the old devarg name only featured in one
> release.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> * Hard fail instead of warning when old devarg is used
> ---
> doc/guides/nics/intel_vf.rst | 9 +++++++--
> doc/guides/rel_notes/release_26_11.rst | 7 ++++++-
> drivers/net/intel/iavf/iavf.h | 2 +-
> drivers/net/intel/iavf/iavf_ethdev.c | 17 +++++++++++++----
> drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
> 5 files changed, 28 insertions(+), 9 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] net/iavf: remove Tx LLDP dynfield method
2026-08-14 12:37 ` [PATCH v2 " Ciara Loftus
2026-08-14 12:37 ` [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
@ 2026-08-14 15:08 ` Bruce Richardson
1 sibling, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-08-14 15:08 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Fri, Aug 14, 2026 at 12:37:52PM +0000, Ciara Loftus wrote:
> Prior to this commit two methods existed for triggering LLDP packet
> transmission in the driver: the dynamic mbuf field method and the mbuf
> packet-type method. This commit removes the dynamic mbuf field method. The
> dynfield method required applications to tag every LLDP packet manually,
> whereas the packet-type method gives the driver the opportunity to tag LLDP
> packets automatically on the Rx path, leaving no work to be done by the
> application to explicitly flag a packet as LLDP before transmission.
>
> The per-queue LLDP state is reduced from the tri-state 'lldp_mode' to a
> single 'lldp_enabled' boolean. The testpmd command 'set tx lldp on'
> whose purpose was to enable the dynfield lldp method is removed. The
> ptype lldp method is enabled via the enable_ptype_lldp devarg (as has
> always been the case since support was introduced):
>
> -a 0000:xx:xx.x,enable_ptype_lldp=1
>
> The deprecation notice for the dynfield is removed and the driver
> documentation is updated.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> * Added warning if dynfield is registered
> ---
> doc/guides/nics/intel_vf.rst | 29 +--------
> doc/guides/rel_notes/deprecation.rst | 4 --
> doc/guides/rel_notes/release_26_11.rst | 5 ++
> drivers/net/intel/common/tx.h | 2 +-
> drivers/net/intel/iavf/iavf_ethdev.c | 30 ++-------
> drivers/net/intel/iavf/iavf_rxtx.c | 15 ++---
> drivers/net/intel/iavf/iavf_rxtx.h | 17 +-----
> drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 22 +++----
> drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 22 +++----
> drivers/net/intel/iavf/iavf_testpmd.c | 61 -------------------
> 10 files changed, 47 insertions(+), 160 deletions(-)
>
Patchset applied to dpdk-next-net-intel
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-08-14 15:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 14:03 [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Ciara Loftus
2026-08-10 14:03 ` [PATCH 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
2026-08-13 15:50 ` Bruce Richardson
2026-08-14 12:44 ` Loftus, Ciara
2026-08-13 15:30 ` [PATCH 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
2026-08-14 12:37 ` [PATCH v2 " Ciara Loftus
2026-08-14 12:37 ` [PATCH v2 2/2] net/iavf: rename LLDP Tx devarg Ciara Loftus
2026-08-14 13:08 ` Bruce Richardson
2026-08-14 15:08 ` [PATCH v2 1/2] net/iavf: remove Tx LLDP dynfield method Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox