* [PATCH v2 00/10] Bus cleanup infrastructure and fixes
From: David Marchand @ 2026-06-18 15:28 UTC (permalink / raw)
To: dev; +Cc: thomas, stephen, bruce.richardson, fengchengwen, longli,
hemant.agrawal
In-Reply-To: <20260611094551.1514962-1-david.marchand@redhat.com>
This is a followup of the previous bus refactoring.
See https://inbox.dpdk.org/dev/CAJFAV8zvFpLwz8SY8DUUezyJyM43eRZ17Yj30ex808eHC4ZE=g@mail.gmail.com/.
This series refactors the bus cleanup infrastructure to reduce code
duplication and fix resource leaks in several bus drivers.
It should address the leak Thomas pointed at.
The first part of the series (patches 1-6) addresses several bugs and
inconsistencies:
- Documentation and log message inconsistencies from earlier bus
refactoring
- Device list management issues in dma/idxd and bus/vdev
- Resource leaks in PCI and VMBUS bus cleanup (mappings and interrupts)
- Deferred interrupt allocation to probe time (VMBUS)
The core infrastructure changes (patches 7-8) introduce the generic
cleanup framework:
- Refactors unplug operations to be the counterpart of probe_device
- Implements rte_bus_generic_cleanup() to centralize cleanup logic
- Adds .free_device operation to struct rte_bus
The final patches (9-10) convert the VMBUS bus to use the generic
cleanup helper.
After this series, most buses use the generic cleanup helper, eliminating
duplicated code and ensuring consistent cleanup behavior across the
codebase.
NXP bus drivers require more (leak) fixes and refactoring and
are left untouched.
--
David Marchand
Changes since v1:
- dropped all changes on DPAA and FSLMC bus,
- added one more cleanup on the first patch,
- changed coding style in rte_vdev_init,
- implemented explicit .free_device instead of hack for calling free(),
- reordered interrupt handle allocation in VMBUS bus,
David Marchand (10):
bus: fix reference to plug callback
dma/idxd: remove next pointer in bus specific device
bus/vdev: remove driver setting in probe
bus/pci: fix mapping leak in bus cleanup
bus/vmbus: fix interrupt leak in cleanup
bus/vmbus: allocate interrupt during probing
bus: align unplug with device probe
bus: implement cleanup in EAL
bus/vmbus: store name in bus specific device
bus/vmbus: support unplug
doc/guides/prog_guide/device_hotplug.rst | 20 ++++---
doc/guides/rel_notes/release_26_07.rst | 4 ++
drivers/bus/auxiliary/auxiliary_common.c | 54 ++++-------------
drivers/bus/cdx/cdx.c | 29 ++-------
drivers/bus/dpaa/dpaa_bus.c | 4 +-
drivers/bus/fslmc/fslmc_bus.c | 9 +--
drivers/bus/ifpga/ifpga_bus.c | 67 ++++++---------------
drivers/bus/pci/pci_common.c | 68 +++------------------
drivers/bus/platform/platform.c | 26 +++-----
drivers/bus/uacce/uacce.c | 59 +++---------------
drivers/bus/vdev/vdev.c | 76 +++++++++---------------
drivers/bus/vmbus/bus_vmbus_driver.h | 1 +
drivers/bus/vmbus/linux/vmbus_bus.c | 16 +----
drivers/bus/vmbus/vmbus_common.c | 58 +++++++++++-------
drivers/dma/idxd/idxd_bus.c | 1 -
lib/eal/common/eal_common_bus.c | 33 +++++++++-
lib/eal/common/eal_common_dev.c | 10 ++--
lib/eal/include/bus_driver.h | 51 +++++++++++-----
18 files changed, 222 insertions(+), 364 deletions(-)
--
2.53.0
^ permalink raw reply
* Re: [PATCH v3 1/1] pcapng: add user-supplied timestamp support
From: Stephen Hemminger @ 2026-06-18 15:22 UTC (permalink / raw)
To: Dawid Wesierski; +Cc: dev, thomas, Marek Kasiewicz
In-Reply-To: <20260618143819.310046-1-dawid.wesierski@intel.com>
On Thu, 18 Jun 2026 10:38:15 -0400
Dawid Wesierski <dawid.wesierski@intel.com> wrote:
> + * @param ts
> + * Packet timestamp in nanoseconds since the Unix epoch. If zero, the
> + * current TSC is captured and converted to epoch ns by
> + * rte_pcapng_write_packets() when the packet is written.
> *
It might help users if a helper rte_tsc_to_epoch() was exposed.
^ permalink raw reply
* Re: [PATCH v3 1/1] pcapng: add user-supplied timestamp support
From: Stephen Hemminger @ 2026-06-18 15:20 UTC (permalink / raw)
To: Dawid Wesierski; +Cc: dev, thomas, Marek Kasiewicz
In-Reply-To: <20260618144432.312767-1-dawid.wesierski@intel.com>
On Thu, 18 Jun 2026 10:44:29 -0400
Dawid Wesierski <dawid.wesierski@intel.com> wrote:
> +static inline struct rte_mbuf *
> rte_pcapng_copy(uint16_t port_id, uint32_t queue,
> const struct rte_mbuf *m, struct rte_mempool *mp,
> uint32_t length,
> - enum rte_pcapng_direction direction, const char *comment);
> + enum rte_pcapng_direction direction, const char *comment)
> +{
> + return rte_pcapng_copy_ts(port_id, queue, m, mp, length, direction,
> + comment, 0);
> +}
>
Switching from function to inline in header would cause ABI breakage.
New build would not have old function to runtime linking.
In this case, please just keep the old function name but add
a parameter using function versioning.
^ permalink raw reply
* Re: net/ice: VLAN mode changes after port reset or SIGKILL, VLAN RX offload broken
From: Taras Bilous @ 2026-06-18 14:43 UTC (permalink / raw)
To: dev
In-Reply-To: <CAL5H3VnP8CJbEaid9H5R+vKYd+-gooRDcixYy9xUR7myzsCa8w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6185 bytes --]
Hi,
A quick update on this issue.
I can no longer reproduce the problem with DPDK 25.11.2 on the following
NIC:
- Intel(R) Ethernet Network Adapter E810-CQDA2
- Ethernet Controller E810-C for QSFP (rev 02)
- Subsystem: Intel Ethernet Network Adapter E810-C-Q2
However, the issue is still reproducible with DPDK 25.11.2 on:
- E810-C 100GbE Controller
- Ethernet Controller E810-C for QSFP (rev 02)
- Subsystem: Intel Ethernet 100G 2P E810-C Adapter
The same test scenario was used in both cases.
Thanks,
Taras
On Tue, Feb 10, 2026 at 11:05 AM Taras Bilous <tarasb@interfacemasters.com>
wrote:
> Hi All,
>
> I am seeing multiple issues with net_ice where VLAN mode changes after a
> device reset or an ungraceful application exit, which then breaks RX VLAN
> offloading.
>
> The same NIC and the same DDP package behave correctly after a cold start,
> but switch to a different VLAN mode after either port reset (or
> rte_eth_dev_reset()) in testpmd or after killing the application with
> SIGKILL. After that, VLAN tags appear to be stripped in hardware, but VLAN
> metadata is no longer delivered to vlan_tci in mbuf structure.
>
> *My setup is the following:*
> Debian Bookworm
> Ethernet controller: Intel(R) Ethernet Controller E810-C for QSFP
> Firmware (NVM): 4.91 and 4.51 were tested
> DDP: ICE COMMS Package 1.3.55.0 and 1.3.50.0 were tested
> DPDK: 25.11
>
> *First scenario: port reset in testpmd*
>
>> :~$ sudo ./DPDK/dpdk-25.11.0/dpdk-25.11/build/app/dpdk-testpmd -l 0-15 -a
>> 0000:04:00.0 -a 0000:04:00.1 -- -i
>> EAL: Detected CPU lcores: 90
>> EAL: Detected NUMA nodes: 1
>> EAL: Detected static linkage of DPDK
>> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>> EAL: Selected IOVA mode 'PA'
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (double VLAN mode)
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (double VLAN mode)
>> Interactive-mode selected
>> Warning: NUMA should be configured manually by using --port-numa-config
>> and --ring-numa-config parameters along with --numa.
>> testpmd: create a new mbuf pool <mb_pool_0>: n=267456, size=2176, socket=0
>> testpmd: preferred mempool ops selected: ring_mp_mc
>> Configuring Port 0 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 0).
>> Configuring Port 1 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 1).
>> Port 0: link state change event
>> Port 0: link state change event
>> Checking link statuses...
>> Done
>> testpmd> port stop all
>> Stopping ports...
>> Checking link statuses...
>> Done
>> testpmd> port reset all
>> Resetting ports...
>> ETHDEV: Device with port_id=0 already stopped
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (single VLAN mode)
>> ETHDEV: Device with port_id=1 already stopped
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (single VLAN mode)
>
>
> After this reset, RX VLAN offload no longer behaves correctly. VLAN tags
> are stripped from packets, but VLAN TCI information is missing in the
> received mbufs vlan_tci fields.
>
> *Second scenario: killing the application with SIGKILL*
>
>> :~$ sudo ./DPDK/dpdk-25.11.0/dpdk-25.11/build/app/dpdk-testpmd -l 0-15 -a
>> 0000:04:00.0 -a 0000:04:00.1 -- -i
>> EAL: Detected CPU lcores: 90
>> EAL: Detected NUMA nodes: 1
>> EAL: Detected static linkage of DPDK
>> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>> EAL: Selected IOVA mode 'PA'
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (double VLAN mode)
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (double VLAN mode)
>> Interactive-mode selected
>> Warning: NUMA should be configured manually by using --port-numa-config
>> and --ring-numa-config parameters along with --numa.
>> testpmd: create a new mbuf pool <mb_pool_0>: n=267456, size=2176, socket=0
>> testpmd: preferred mempool ops selected: ring_mp_mc
>> Configuring Port 0 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 0).
>> Configuring Port 1 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 1).
>> Port 0: link state change event
>> Port 0: link state change event
>> Checking link statuses...
>> Done
>> testpmd> Killed
>>
>
>
>> :~$ sudo ./DPDK/dpdk-25.11.0/dpdk-25.11/build/app/dpdk-testpmd -l 0-15 -a
>> 0000:04:00.0 -a 0000:04:00.1 -- -i
>> EAL: Detected CPU lcores: 90
>> EAL: Detected NUMA nodes: 1
>> EAL: Detected static linkage of DPDK
>> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>> EAL: Selected IOVA mode 'PA'
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (single VLAN mode)
>> ICE_INIT: ice_load_pkg_type(): Active package is: 1.3.55.0, ICE COMMS
>> Package (single VLAN mode)
>> Interactive-mode selected
>> Warning: NUMA should be configured manually by using --port-numa-config
>> and --ring-numa-config parameters along with --numa.
>> testpmd: create a new mbuf pool <mb_pool_0>: n=267456, size=2176, socket=0
>> testpmd: preferred mempool ops selected: ring_mp_mc
>> Configuring Port 0 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 0).
>> Configuring Port 1 (socket 0)
>> ICE_DRIVER: ice_set_rx_function(): Using Vector AVX2 (port 1).
>> Port 0: link state change event
>> Port 0: link state change event
>> Checking link statuses...
>> Done
>> testpmd>
>
>
> At this point the behavior is the same as after port reset: RX VLAN
> offloading is broken.
>
> The observed RX VLAN offloading behavior then is very similar to the issue
> described in the following bug report, where VLAN stripping works but
> metadata is missing:
> https://bugs.dpdk.org/show_bug.cgi?id=1677
> The trigger is different, but the resulting VLAN RX offload behavior
> appears to be the same.
> I can reproduce this reliably and can provide more logs or information if
> needed.
>
> Best regards,
> Taras
>
[-- Attachment #2: Type: text/html, Size: 7221 bytes --]
^ permalink raw reply
* [PATCH] examples/ptp_tap_relay_sw: forbid shadowed variables
From: Thomas Monjalon @ 2026-06-18 14:25 UTC (permalink / raw)
To: dev; +Cc: Rajesh Kumar
By removing the compilation flag no_shadow_cflag,
it becomes forbidden to shadow a variable.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
examples/ptp_tap_relay_sw/meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/examples/ptp_tap_relay_sw/meson.build b/examples/ptp_tap_relay_sw/meson.build
index e78b284ad8..f9fb6780f7 100644
--- a/examples/ptp_tap_relay_sw/meson.build
+++ b/examples/ptp_tap_relay_sw/meson.build
@@ -10,4 +10,3 @@ sources = files(
'ptp_tap_relay_sw.c',
)
deps += ['net']
-cflags += no_shadow_cflag
--
2.54.0
^ permalink raw reply related
* [PATCH v2 7/7] net/intel: support header split mbuf callback
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Wire the new ethdev header split mbuf callback API into the ICE PMD.
A new dev_ops hook, hdrs_mbuf_set_cb, lets applications register a
callback (and private context) on a receive queue; the callback returns
a payload buffer (virtual address and IOVA) that overrides the default
mempool-backed payload mbuf for header split RX.
The callback is invoked at three allocation points in the ICE driver:
- initial queue setup (ice_alloc_rx_queue_mbufs),
- bulk buffer allocation (ice_rx_alloc_bufs),
- single-packet receive path (ice_recv_pkts).
This enables zero-copy RX for header split: the NIC DMAs the payload
directly into application-managed buffers (e.g., mapped frame buffers
with known IOVA), bypassing an extra memcpy from the mempool mbuf.
Depends on: "ethdev: add header split mbuf callback API"
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/common/rx.h | 2 +
drivers/net/intel/ice/ice_ethdev.c | 1 +
drivers/net/intel/ice/ice_rxtx.c | 63 ++++++++++++++++++++++++++++++
drivers/net/intel/ice/ice_rxtx.h | 2 +
4 files changed, 68 insertions(+)
diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
index e0bf520ebd..8abb2a3ce9 100644
--- a/drivers/net/intel/common/rx.h
+++ b/drivers/net/intel/common/rx.h
@@ -113,6 +113,8 @@ struct ci_rx_queue {
uint32_t hw_time_low; /* low 32 bits of timestamp */
int ts_offset; /* dynamic mbuf timestamp field offset */
uint64_t ts_flag; /* dynamic mbuf timestamp flag */
+ rte_eth_hdrs_mbuf_callback_fn hdrs_mbuf_cb; /* hdr split mbuf cb */
+ void *hdrs_mbuf_cb_priv; /* hdr split mbuf cb priv */
};
struct { /* iavf specific values */
const struct iavf_rxq_ops *ops; /**< queue ops */
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index ad9c49b339..353da8f2bd 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -282,6 +282,7 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
.dev_set_link_down = ice_dev_set_link_down,
.dev_led_on = ice_dev_led_on,
.dev_led_off = ice_dev_led_off,
+ .hdrs_mbuf_set_cb = ice_hdrs_mbuf_set_cb,
.rx_queue_start = ice_rx_queue_start,
.rx_queue_stop = ice_rx_queue_stop,
.tx_queue_start = ice_tx_queue_start,
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index 8d709125f7..867f595291 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -487,6 +487,17 @@ ice_alloc_rx_queue_mbufs(struct ci_rx_queue *rxq)
return -ENOMEM;
}
+ if (rxq->hdrs_mbuf_cb) {
+ struct rte_eth_hdrs_mbuf hdrs_mbuf = {0};
+ int ret = rxq->hdrs_mbuf_cb(rxq->hdrs_mbuf_cb_priv,
+ &hdrs_mbuf);
+
+ if (ret >= 0) {
+ mbuf_pay->buf_addr = hdrs_mbuf.buf_addr;
+ mbuf_pay->buf_iova = hdrs_mbuf.buf_iova;
+ }
+ }
+
mbuf_pay->next = NULL;
mbuf_pay->data_off = RTE_PKTMBUF_HEADROOM;
mbuf_pay->nb_segs = 1;
@@ -2126,6 +2137,16 @@ ice_rx_alloc_bufs(struct ci_rx_queue *rxq)
rxdp[i].read.pkt_addr = dma_addr;
} else {
mb->next = rxq->sw_split_buf[i].mbuf;
+ if (rxq->hdrs_mbuf_cb && mb->next) {
+ struct rte_eth_hdrs_mbuf hdrs_mbuf = {0};
+ int ret = rxq->hdrs_mbuf_cb(rxq->hdrs_mbuf_cb_priv,
+ &hdrs_mbuf);
+
+ if (ret >= 0) {
+ mb->next->buf_addr = hdrs_mbuf.buf_addr;
+ mb->next->buf_iova = hdrs_mbuf.buf_iova;
+ }
+ }
pay_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mb->next));
rxdp[i].read.hdr_addr = dma_addr;
rxdp[i].read.pkt_addr = pay_addr;
@@ -2810,6 +2831,17 @@ ice_recv_pkts(void *rx_queue,
break;
}
+ if (rxq->hdrs_mbuf_cb) {
+ struct rte_eth_hdrs_mbuf hdrs_mbuf = {0};
+ int ret = rxq->hdrs_mbuf_cb(rxq->hdrs_mbuf_cb_priv,
+ &hdrs_mbuf);
+
+ if (ret >= 0) {
+ nmb_pay->buf_addr = hdrs_mbuf.buf_addr;
+ nmb_pay->buf_iova = hdrs_mbuf.buf_iova;
+ }
+ }
+
nmb->next = nmb_pay;
nmb_pay->next = NULL;
@@ -4533,3 +4565,34 @@ ice_fdir_programming(struct ice_pf *pf, struct ice_fltr_desc *fdir_desc)
}
+
+int
+ice_hdrs_mbuf_set_cb(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+ void *priv, rte_eth_hdrs_mbuf_callback_fn cb)
+{
+ struct ci_rx_queue *rxq;
+
+ if (rx_queue_id >= dev->data->nb_rx_queues) {
+ PMD_DRV_LOG(ERR, "RX queue %u out of range", rx_queue_id);
+ return -EINVAL;
+ }
+
+ rxq = dev->data->rx_queues[rx_queue_id];
+ if (rxq == NULL) {
+ PMD_DRV_LOG(ERR, "RX queue %u not available or setup", rx_queue_id);
+ return -EINVAL;
+ }
+
+ if (rxq->hdrs_mbuf_cb) {
+ PMD_DRV_LOG(ERR, "RX queue %u has hdrs mbuf cb already",
+ rx_queue_id);
+ return -EEXIST;
+ }
+
+ rxq->hdrs_mbuf_cb_priv = priv;
+ rxq->hdrs_mbuf_cb = cb;
+ PMD_DRV_LOG(NOTICE, "RX queue %u register hdrs mbuf cb at %p",
+ rx_queue_id, cb);
+
+ return 0;
+}
diff --git a/drivers/net/intel/ice/ice_rxtx.h b/drivers/net/intel/ice/ice_rxtx.h
index 999b6b30d6..7ed114ee94 100644
--- a/drivers/net/intel/ice/ice_rxtx.h
+++ b/drivers/net/intel/ice/ice_rxtx.h
@@ -303,6 +303,8 @@ uint16_t ice_xmit_pkts_vec_avx512_offload(void *tx_queue,
int ice_fdir_programming(struct ice_pf *pf, struct ice_fltr_desc *fdir_desc);
int ice_tx_done_cleanup(void *txq, uint32_t free_cnt);
int ice_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc);
+int ice_hdrs_mbuf_set_cb(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+ void *priv, rte_eth_hdrs_mbuf_callback_fn cb);
enum rte_vect_max_simd ice_get_max_simd_bitwidth(void);
#define FDIR_PARSING_ENABLE_PER_QUEUE(ad, on) do { \
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 6/7] net/iavf: disable runtime queue setup capability
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Remove the advertisement of RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP
and RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP capabilities from the
iavf VF driver.
Runtime queue setup on E810 VFs causes queue state corruption when
queues are dynamically reconfigured while the hardware rate limiter
is actively pacing TX queues. Queue configuration messages to the PF
via virtchnl can race with ongoing TX operations, leading to undefined
behavior.
By not advertising these capabilities, all queues are configured at
port start and remain stable throughout the port lifecycle.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/iavf/iavf_ethdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index ec1ad02826..ab223e6afd 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1160,9 +1160,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->reta_size = vf->vf_res->rss_lut_size;
dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL;
dev_info->max_mac_addrs = IAVF_NUM_MACADDR_MAX;
- dev_info->dev_capa =
- RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
- RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
dev_info->rx_offload_capa =
RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 5/7] net/ice: timestamp all received packets when PTP is enabled
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
When PTP is enabled on the ICE PMD, hardware RX timestamps are only
applied to packets classified as IEEE 1588 (Ethertype 0x88F7). This
prevents applications from obtaining hardware timestamps on regular
UDP/IP traffic.
Remove the TIMESYNC packet type filter so that all received packets
get hardware timestamps when PTP is enabled. This is required for
time-sensitive networking applications that need per-packet arrival
timing on media traffic, such as ST 2110-21 receiver compliance
monitoring.
The change affects all three RX paths: scan, scattered, and single
packet receive functions.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/ice/ice_rxtx.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index c4b5454c53..8d709125f7 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -2023,8 +2023,7 @@ ice_rx_scan_hw_ring(struct ci_rx_queue *rxq)
pkt_flags |= rxq->ts_flag;
}
- if (ad->ptp_ena && ((mb->packet_type &
- RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_TIMESYNC)) {
+ if (ad->ptp_ena) {
rxq->time_high =
rte_le_to_cpu_32(rxdp[j].wb.flex_ts.ts_high);
mb->timesync = rxq->queue_id;
@@ -2390,8 +2389,7 @@ ice_recv_scattered_pkts(void *rx_queue,
pkt_flags |= rxq->ts_flag;
}
- if (ad->ptp_ena && ((first_seg->packet_type & RTE_PTYPE_L2_MASK)
- == RTE_PTYPE_L2_ETHER_TIMESYNC)) {
+ if (ad->ptp_ena) {
rxq->time_high =
rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
first_seg->timesync = rxq->queue_id;
@@ -2881,8 +2879,7 @@ ice_recv_pkts(void *rx_queue,
pkt_flags |= rxq->ts_flag;
}
- if (ad->ptp_ena && ((rxm->packet_type & RTE_PTYPE_L2_MASK) ==
- RTE_PTYPE_L2_ETHER_TIMESYNC)) {
+ if (ad->ptp_ena) {
rxq->time_high =
rte_le_to_cpu_32(rxd.wb.flex_ts.ts_high);
rxm->timesync = rxq->queue_id;
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 4/7] net/ice/base: reduce default scheduler burst size
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Reduce ICE_SCHED_DFLT_BURST_SIZE from 15 KB to 2 KB to improve
TX rate limiter granularity. The E810 TX scheduler uses a token
bucket algorithm where the burst size controls the maximum bytes
sent in a single burst before the rate limiter throttles.
A 15 KB burst allows micro-bursts of ~10 max-size frames, which
violates tight inter-packet spacing requirements in time-sensitive
networking applications such as SMPTE ST 2110-21 narrow-sender
compliance. Reducing to 2 KB forces near-constant-rate output
matching the configured shaper profile.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/ice/base/ice_type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/ice/base/ice_type.h b/drivers/net/intel/ice/base/ice_type.h
index 6d8c187689..39569ff3e3 100644
--- a/drivers/net/intel/ice/base/ice_type.h
+++ b/drivers/net/intel/ice/base/ice_type.h
@@ -1100,7 +1100,7 @@ enum ice_rl_type {
#define ICE_SCHED_NO_SHARED_RL_PROF_ID 0xFFFF
#define ICE_SCHED_DFLT_BW_WT 4
#define ICE_SCHED_INVAL_PROF_ID 0xFFFF
-#define ICE_SCHED_DFLT_BURST_SIZE (15 * 1024) /* in bytes (15k) */
+#define ICE_SCHED_DFLT_BURST_SIZE (2 * 1024) /* in bytes (2k) */
/* Access Macros for Tx Sched RL Profile data */
#define ICE_TXSCHED_GET_RL_PROF_ID(p) LE16_TO_CPU((p)->info.profile_id)
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 3/7] net/iavf: allow runtime queue rate limit configuration
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Allow per-queue bandwidth rate limiting to be configured without
stopping the port when only a single TC node and single QoS element
are involved. This enables dynamic session management where individual
queue pacing rates can be changed while other queues continue
transmitting.
Also fix the queue ID assignment in the bandwidth configuration to
use the actual TM node ID rather than a sequential counter index, and
only mark the TM hierarchy as committed when the port is stopped to
permit subsequent reconfiguration.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/iavf/iavf_tm.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_tm.c b/drivers/net/intel/iavf/iavf_tm.c
index 1cf7bfb106..43d7a44337 100644
--- a/drivers/net/intel/iavf/iavf_tm.c
+++ b/drivers/net/intel/iavf/iavf_tm.c
@@ -804,8 +804,10 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
int index = 0, node_committed = 0;
int i, ret_val = IAVF_SUCCESS;
- /* check if port is stopped */
- if (adapter->stopped != 1) {
+ /* check if port is stopped, except for setting queue bandwidth */
+ if (vf->tm_conf.nb_tc_node != 1 &&
+ vf->qos_cap->num_elem != 1 &&
+ adapter->stopped != 1) {
PMD_DRV_LOG(ERR, "Please stop port first");
ret_val = IAVF_ERR_NOT_READY;
goto err;
@@ -856,7 +858,7 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
q_tc_mapping->tc[tm_node->tc].req.queue_count++;
if (tm_node->shaper_profile) {
- q_bw->cfg[node_committed].queue_id = node_committed;
+ q_bw->cfg[node_committed].queue_id = tm_node->id;
q_bw->cfg[node_committed].shaper.peak =
tm_node->shaper_profile->profile.peak.rate /
1000 * IAVF_BITS_PER_BYTE;
@@ -900,7 +902,8 @@ static int iavf_hierarchy_commit(struct rte_eth_dev *dev,
goto fail_clear;
vf->qtc_map = qtc_map;
- vf->tm_conf.committed = true;
+ if (adapter->stopped == 1)
+ vf->tm_conf.committed = true;
return ret_val;
fail_clear:
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 2/7] net/iavf: increase max ring descriptors to hardware limit
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
The Intel E810 hardware supports up to 8160 (8K - 32) descriptors per
TX/RX ring, but IAVF_MAX_RING_DESC caps it at 4096. Applications that
need deep descriptor rings for hardware rate-limited pacing (e.g.,
ST2110 video with thousands of packets per frame) cannot queue enough
packets before the pacing epoch begins.
Increase IAVF_MAX_RING_DESC to the hardware maximum of 8160 to allow
full utilization of the ring depth on E810 VFs.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 8449236d4d..22ea415f44 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -16,7 +16,7 @@
/* In QLEN must be whole number of 32 descriptors. */
#define IAVF_ALIGN_RING_DESC 32
#define IAVF_MIN_RING_DESC 64
-#define IAVF_MAX_RING_DESC 4096
+#define IAVF_MAX_RING_DESC (8192 - 32)
#define IAVF_DMA_MEM_ALIGN 4096
/* Base address of the HW descriptor ring should be 128B aligned. */
#define IAVF_RING_BASE_ALIGN 128
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 1/7] ethdev: add header split mbuf callback API
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260618144442.312844-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Add rte_eth_hdrs_set_mbuf_callback() that allows applications to
register a callback providing custom payload mbufs for header split RX
mode. When registered, a PMD that supports header split is expected to
call this callback at mbuf allocation points to obtain user-provided
payload buffers instead of allocating from the mempool.
This enables zero-copy RX for header split: the NIC DMAs the payload
directly into application-managed buffers (e.g., mapped frame buffers
with known IOVA), bypassing an extra memcpy from the mempool mbuf.
A new struct rte_eth_hdrs_mbuf describes the payload buffer (virtual
address and IOVA), and the new dev_ops hook hdrs_mbuf_set_cb lets each
PMD wire the callback to its receive queue state.
The API is marked experimental and exported with version 26.07.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
lib/ethdev/ethdev_driver.h | 10 +++++++++
lib/ethdev/rte_ethdev.c | 17 ++++++++++++++
lib/ethdev/rte_ethdev.h | 46 ++++++++++++++++++++++++++++++++++++++
3 files changed, 73 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 0f336f9567..b48681268c 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -1292,6 +1292,13 @@ typedef int (*eth_cman_config_set_t)(struct rte_eth_dev *dev,
typedef int (*eth_cman_config_get_t)(struct rte_eth_dev *dev,
struct rte_eth_cman_config *config);
+/** @internal
+ * Set header split payload mbuf callback for a receive queue.
+ */
+typedef int (*eth_hdrs_mbuf_set_cb_t)(struct rte_eth_dev *dev,
+ uint16_t rx_queue_id, void *priv,
+ rte_eth_hdrs_mbuf_callback_fn cb);
+
/**
* @internal
* Dump Rx descriptor info to a file.
@@ -1652,6 +1659,9 @@ struct eth_dev_ops {
/** Dump Tx descriptor info */
eth_tx_descriptor_dump_t eth_tx_descriptor_dump;
+ /** Set header split mbuf callback */
+ eth_hdrs_mbuf_set_cb_t hdrs_mbuf_set_cb;
+
/** Get congestion management information */
eth_cman_info_get_t cman_info_get;
/** Initialize congestion management structure with default values */
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 9efeaf77cb..d5820ccd22 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -7316,6 +7316,23 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
return ret;
}
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_eth_hdrs_set_mbuf_callback, 26.07)
+int
+rte_eth_hdrs_set_mbuf_callback(uint16_t port_id, uint16_t rx_queue_id,
+ void *priv, rte_eth_hdrs_mbuf_callback_fn cb)
+{
+ struct rte_eth_dev *dev;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ dev = &rte_eth_devices[port_id];
+
+ if (dev->dev_ops->hdrs_mbuf_set_cb == NULL)
+ return -ENOTSUP;
+
+ return eth_err(port_id,
+ dev->dev_ops->hdrs_mbuf_set_cb(dev, rx_queue_id, priv, cb));
+}
+
RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_eth_dev_priv_dump, 22.03)
int
rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index ee400b386f..dbf2c23a35 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -6985,6 +6985,52 @@ rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
return rte_eth_tx_buffer_flush(port_id, queue_id, buffer);
}
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice.
+ *
+ * Buffer descriptor for header split payload mbuf callback.
+ */
+struct rte_eth_hdrs_mbuf {
+ void *buf_addr; /**< Virtual address of payload buffer. */
+ rte_iova_t buf_iova; /**< IOVA of payload buffer. */
+};
+
+/**
+ * Callback function type for providing custom payload mbufs
+ * in header split mode.
+ *
+ * @param priv
+ * User-provided private context.
+ * @param mbuf
+ * Pointer to buffer descriptor to be filled by the callback.
+ * @return
+ * 0 on success, negative errno on failure.
+ */
+typedef int (*rte_eth_hdrs_mbuf_callback_fn)(void *priv,
+ struct rte_eth_hdrs_mbuf *mbuf);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice.
+ *
+ * Register a callback to provide custom payload mbufs for header split RX.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param rx_queue_id
+ * The index of the receive queue.
+ * @param priv
+ * User-provided private context passed to the callback.
+ * @param cb
+ * Callback function that provides payload buffer descriptors.
+ * @return
+ * 0 on success, negative errno on failure.
+ */
+__rte_experimental
+int rte_eth_hdrs_set_mbuf_callback(uint16_t port_id, uint16_t rx_queue_id,
+ void *priv, rte_eth_hdrs_mbuf_callback_fn cb);
+
/**
* @warning
* @b EXPERIMENTAL: this API may change, or be removed, without prior notice
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v2 0/7] Intel network drivers enhancements
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, Marek Kasiewicz
In-Reply-To: <20260608164059.65420-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
This series introduces several improvements to Intel iavf and ice
drivers, including a new ethdev API for header split mbuf callbacks,
increased ring descriptors, and improved PTP timestamping.
Marek Kasiewicz (7):
ethdev: add header split mbuf callback API
net/iavf: increase max ring descriptors to hardware limit
net/iavf: allow runtime queue rate limit configuration
net/ice/base: reduce default scheduler burst size
net/ice: timestamp all received packets when PTP is enabled
net/iavf: disable runtime queue setup capability
net/intel: support header split mbuf callback
drivers/net/intel/common/rx.h | 2 +
drivers/net/intel/iavf/iavf_ethdev.c | 3 --
drivers/net/intel/iavf/iavf_rxtx.h | 2 +-
drivers/net/intel/iavf/iavf_tm.c | 11 ++--
drivers/net/intel/ice/base/ice_type.h | 2 +-
drivers/net/intel/ice/ice_ethdev.c | 1 +
drivers/net/intel/ice/ice_rxtx.c | 72 ++++++++++++++++++++++++---
drivers/net/intel/ice/ice_rxtx.h | 2 +
lib/ethdev/ethdev_driver.h | 15 +++++++
lib/ethdev/rte_ethdev.c | 51 ++++++++++++++++++++++
lib/ethdev/rte_ethdev.h | 7 +++
11 files changed, 153 insertions(+), 15 deletions(-)
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply
* [PATCH v3 1/1] pcapng: add user-supplied timestamp support
From: Dawid Wesierski @ 2026-06-18 14:44 UTC (permalink / raw)
To: dev; +Cc: stephen, thomas, Marek Kasiewicz, Dawid Wesierski
In-Reply-To: <20260608164059.65420-1-dawid.wesierski@intel.com>
From: Marek Kasiewicz <marek.kasiewicz@intel.com>
Add rte_pcapng_copy_ts() which accepts a timestamp parameter in
nanoseconds since the Unix epoch. When non-zero, the supplied value is
used directly. This allows applications to provide hardware PTP
timestamps from the NIC, enabling accurate packet capture with
PTP-domain timing rather than host-local TSC values.
The existing rte_pcapng_copy() function is preserved as a static
inline wrapper that passes zero, keeping the original TSC-based
behaviour for callers that do not have a hardware timestamp.
To support both timestamp sources, the per-mbuf timestamp now carries
a sentinel bit: when rte_pcapng_copy_ts() is called with ts == 0 it
stores the current TSC with bit 63 set. rte_pcapng_write_packets()
detects the sentinel, clears it and converts TSC -> epoch ns using
the per-file clock before writing. A timestamp supplied by the caller
has bit 63 clear and is written unchanged. The sentinel space is safe
because the TSC counter does not reach bit 63 for centuries and
epoch-ns values stay below bit 63 until the year 2554.
Signed-off-by: Marek Kasiewicz <marek.kasiewicz@intel.com>
Signed-off-by: Dawid Wesierski <dawid.wesierski@intel.com>
---
.mailmap | 2 ++
lib/pcapng/rte_pcapng.c | 42 +++++++++++++++++++++++++++-------------
lib/pcapng/rte_pcapng.h | 43 +++++++++++++++++++++++++++++++++++++++--
3 files changed, 72 insertions(+), 15 deletions(-)
diff --git a/.mailmap b/.mailmap
index 4001e5fb0e..a7d97a631e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -366,6 +366,7 @@ David Zeng <zengxhsh@cn.ibm.com>
Davide Caratti <dcaratti@redhat.com>
Dawid Gorecki <dgr@semihalf.com>
Dawid Jurczak <dawid_jurek@vp.pl>
+Dawid Wesierski <dawid.wesierski@intel.com> Wesierski, Dawid <dawid.wesierski@intel.com>
Dawid Zielinski <dawid.zielinski@intel.com>
Dawid Łukwiński <dawid.lukwinski@intel.com>
Daxue Gao <daxuex.gao@intel.com>
@@ -1014,6 +1015,7 @@ Marcin Wilk <marcin.wilk@caviumnetworks.com>
Marcin Wojtas <mw@semihalf.com>
Marcin Zapolski <marcinx.a.zapolski@intel.com>
Marco Varlese <mvarlese@suse.de>
+Marek Kasiewicz <marek.kasiewicz@intel.com>
Marek Mical <marekx.mical@intel.com>
Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
Maria Lingemark <maria.lingemark@ericsson.com>
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index b5d1026891..29090a2ae4 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -546,14 +546,14 @@ pcapng_vlan_insert(struct rte_mbuf *m, uint16_t ether_type, uint16_t tci)
*/
/* Make a copy of original mbuf with pcapng header and options */
-RTE_EXPORT_SYMBOL(rte_pcapng_copy)
+RTE_EXPORT_SYMBOL(rte_pcapng_copy_ts)
struct rte_mbuf *
-rte_pcapng_copy(uint16_t port_id, uint32_t queue,
+rte_pcapng_copy_ts(uint16_t port_id, uint32_t queue,
const struct rte_mbuf *md,
struct rte_mempool *mp,
uint32_t length,
enum rte_pcapng_direction direction,
- const char *comment)
+ const char *comment, uint64_t ts)
{
struct pcapng_enhance_packet_block *epb;
uint32_t orig_len, pkt_len, padding, flags;
@@ -690,8 +690,20 @@ rte_pcapng_copy(uint16_t port_id, uint32_t queue,
/* Interface index is filled in later during write */
mc->port = port_id;
- /* Put timestamp in cycles here - adjust in packet write */
- timestamp = rte_get_tsc_cycles();
+ /*
+ * Timestamp handling:
+ * - If the caller supplied an explicit timestamp (ts != 0), it is
+ * already in nanoseconds since the Unix epoch, so store it as-is.
+ * - If the caller did not (ts == 0), store the current TSC and set
+ * the high bit as a sentinel so rte_pcapng_write_packets() knows
+ * it must convert TSC -> epoch ns at write time. The TSC counter
+ * will not reach bit 63 for centuries, and epoch-ns values stay
+ * below bit 63 until the year 2554, so the bit is safe to use.
+ */
+ if (ts != 0)
+ timestamp = ts;
+ else
+ timestamp = rte_get_tsc_cycles() | (UINT64_C(1) << 63);
epb->timestamp_hi = timestamp >> 32;
epb->timestamp_lo = (uint32_t)timestamp;
epb->capture_length = pkt_len;
@@ -720,7 +732,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
for (i = 0; i < nb_pkts; i++) {
struct rte_mbuf *m = pkts[i];
struct pcapng_enhance_packet_block *epb;
- uint64_t cycles, timestamp;
+ uint64_t timestamp;
/* sanity check that is really a pcapng mbuf */
epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
@@ -738,14 +750,18 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
}
/*
- * When data is captured by pcapng_copy the current TSC is stored.
- * Adjust the value recorded in file to PCAP epoch units.
+ * If rte_pcapng_copy[_ts]() stored a TSC value (high bit set
+ * as sentinel), convert it to nanoseconds since the Unix epoch
+ * using the per-file clock. Otherwise the timestamp is already
+ * in epoch ns and is written unchanged.
*/
- cycles = (uint64_t)epb->timestamp_hi << 32;
- cycles += epb->timestamp_lo;
- timestamp = tsc_to_ns_epoch(&self->clock, cycles);
- epb->timestamp_hi = timestamp >> 32;
- epb->timestamp_lo = (uint32_t)timestamp;
+ timestamp = ((uint64_t)epb->timestamp_hi << 32) | epb->timestamp_lo;
+ if (timestamp & (UINT64_C(1) << 63)) {
+ timestamp &= ~(UINT64_C(1) << 63);
+ timestamp = tsc_to_ns_epoch(&self->clock, timestamp);
+ epb->timestamp_hi = timestamp >> 32;
+ epb->timestamp_lo = (uint32_t)timestamp;
+ }
/*
* Handle case of highly fragmented and large burst size
diff --git a/lib/pcapng/rte_pcapng.h b/lib/pcapng/rte_pcapng.h
index d8d328f710..975e7996f0 100644
--- a/lib/pcapng/rte_pcapng.h
+++ b/lib/pcapng/rte_pcapng.h
@@ -109,7 +109,7 @@ enum rte_pcapng_direction {
};
/**
- * Format an mbuf for writing to file.
+ * Format an mbuf with time stamp for writing to file.
*
* @param port_id
* The Ethernet port on which packet was received
@@ -129,16 +129,55 @@ enum rte_pcapng_direction {
* @param comment
* Optional per packet comment.
* Truncated to UINT16_MAX characters.
+ * @param ts
+ * Packet timestamp in nanoseconds since the Unix epoch. If zero, the
+ * current TSC is captured and converted to epoch ns by
+ * rte_pcapng_write_packets() when the packet is written.
*
* @return
* - The pointer to the new mbuf formatted for pcapng_write
* - NULL on error such as invalid port or out of memory.
*/
struct rte_mbuf *
+rte_pcapng_copy_ts(uint16_t port_id, uint32_t queue,
+ const struct rte_mbuf *m, struct rte_mempool *mp,
+ uint32_t length,
+ enum rte_pcapng_direction direction, const char *comment, uint64_t ts);
+
+/**
+ * Format an mbuf for writing to file.
+ *
+ * @param port_id
+ * The Ethernet port on which packet was received
+ * or is going to be transmitted.
+ * @param queue
+ * The queue on the Ethernet port where packet was received
+ * or is going to be transmitted.
+ * @param mp
+ * The mempool from which the "clone" mbufs are allocated.
+ * @param m
+ * The mbuf to copy
+ * @param length
+ * The upper limit on bytes to copy. Passing UINT32_MAX
+ * means all data (after offset).
+ * @param direction
+ * The direction of the packer: receive, transmit or unknown.
+ * @param comment
+ * Packet comment.
+ *
+ * @return
+ * - The pointer to the new mbuf formatted for pcapng_write
+ * - NULL if allocation fails.
+ */
+static inline struct rte_mbuf *
rte_pcapng_copy(uint16_t port_id, uint32_t queue,
const struct rte_mbuf *m, struct rte_mempool *mp,
uint32_t length,
- enum rte_pcapng_direction direction, const char *comment);
+ enum rte_pcapng_direction direction, const char *comment)
+{
+ return rte_pcapng_copy_ts(port_id, queue, m, mp, length, direction,
+ comment, 0);
+}
/**
--
2.47.3
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
^ permalink raw reply related
* [PATCH v1 17/17] net/dpaa: fix mbuf leak in SG fd creation
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
In dpaa_eth_mbuf_to_sg_fd(), when the allocated temp mbuf does not
have sufficient space for the SG entries, the function returned -1
without freeing 'temp', causing a memory leak. Free 'temp' before
returning the error.
Fixes: 8cffdcbe85 ("net/dpaa: support scattered Rx")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_rxtx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 1cda68e5af..f2011ceebb 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -990,6 +990,7 @@ dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
if (temp->buf_len < ((mbuf->nb_segs * sizeof(struct qm_sg_entry))
+ temp->data_off)) {
DPAA_PMD_ERR("Insufficient space in mbuf for SG entries");
+ rte_pktmbuf_free(temp);
return -1;
}
--
2.43.0
^ permalink raw reply related
* [PATCH v1 16/17] net/dpaa: fix null l3_len check in checksum offload
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
In dpaa_checksum(), if mbuf->l3_len is zero the L4 header pointer
calculation (l3_hdr + mbuf->l3_len) will point to the start of the
L3 header rather than the L4 header, leading to incorrect checksum
computation on a corrupt or uninitialized packet. Add an early
return guard when l3_len is zero.
Fixes: 5a8cf1bef7 ("net/dpaa: support checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_rxtx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index c5e393159a..1cda68e5af 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -377,6 +377,8 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
struct rte_ipv6_hdr *ipv6_hdr = (struct rte_ipv6_hdr *)l3_hdr;
DPAA_DP_LOG(DEBUG, "Calculating checksum for mbuf: %p", mbuf);
+ if (mbuf->l3_len == 0)
+ return;
if (((mbuf->packet_type & RTE_PTYPE_L3_MASK) == RTE_PTYPE_L3_IPV4) ||
((mbuf->packet_type & RTE_PTYPE_L3_MASK) ==
--
2.43.0
^ permalink raw reply related
* [PATCH v1 15/17] net/dpaa: fix wrong buffer in xstats get by id
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
In dpaa_xstats_get_by_id(), fman_if_bmi_stats_get_all() was called
with 'values' (the output array) instead of 'values_copy' (the
scratch buffer). This caused the BMI stats to overwrite already
computed xstat values and then the subsequent loop would copy
garbage from values_copy into the output.
Pass 'values_copy' as intended so that BMI stats are fetched into
the scratch buffer and then correctly indexed into 'values'.
Fixes: d2536b006d ("bus/dpaa: add port buffer manager stats")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index eaeb4221c9..a221406cbf 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -928,7 +928,7 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
values[i] =
values_copy[dpaa_xstats_strings[i].offset / 8];
- fman_if_bmi_stats_get_all(dev->process_private, values);
+ fman_if_bmi_stats_get_all(dev->process_private, values_copy);
for (j = 0; i < stat_cnt; i++, j++)
values[i] = values_copy[j];
--
2.43.0
^ permalink raw reply related
* [PATCH v1 14/17] net/dpaa: remove duplicate ptype entries
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
RTE_PTYPE_L4_TCP and RTE_PTYPE_L4_UDP were listed twice in the
supported ptypes array returned by dpaa_supported_ptypes_get().
Remove the duplicate entries.
Fixes: ec503d8fa7 ("net/dpaa: update supported ptypes")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 921566123d..eaeb4221c9 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -406,8 +406,6 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev, size_t *no_of_elements)
RTE_PTYPE_L4_TCP,
RTE_PTYPE_L4_UDP,
RTE_PTYPE_L4_FRAG,
- RTE_PTYPE_L4_TCP,
- RTE_PTYPE_L4_UDP,
RTE_PTYPE_L4_SCTP,
RTE_PTYPE_TUNNEL_ESP,
RTE_PTYPE_TUNNEL_GRE,
--
2.43.0
^ permalink raw reply related
* [PATCH v1 13/17] net/dpaa: fix xstat string typos in BMI stats table
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
Fix two issues in the xstats name table:
- 'rx_frame_discrad_count' is a misspelling, correct to
'rx_frame_discard_count'
- 'rx_out_of_buffer_discard ' has a trailing space, remove it
Fixes: d2536b006d ("bus/dpaa: add port buffer manager stats")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 3d3f2773a1..921566123d 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -135,11 +135,11 @@ static const struct rte_dpaa_xstats_name_off dpaa_xstats_strings[] = {
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rlfc)},
{"rx_filter_frames_count",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rffc)},
- {"rx_frame_discrad_count",
+ {"rx_frame_discard_count",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rfdc)},
{"rx_frame_list_dma_err_count",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rfldec)},
- {"rx_out_of_buffer_discard ",
+ {"rx_out_of_buffer_discard",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rodc)},
{"rx_buf_diallocate",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rbdc)},
--
2.43.0
^ permalink raw reply related
* [PATCH v1 12/17] net/dpaa: fix xstat name for tx undersized counter
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
The xstat entry mapping to 'tund' (TX undersized) was incorrectly
labeled as 'rx_undersized'. Fix the prefix to 'tx_undersized'.
Fixes: b21ed3e2a1 ("net/dpaa: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c143e66f77..3d3f2773a1 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -125,7 +125,7 @@ static const struct rte_dpaa_xstats_name_off dpaa_xstats_strings[] = {
offsetof(struct dpaa_if_stats, terr)},
{"tx_vlan_frame",
offsetof(struct dpaa_if_stats, tvlan)},
- {"rx_undersized",
+ {"tx_undersized",
offsetof(struct dpaa_if_stats, tund)},
{"rx_frame_counter",
offsetof(struct dpaa_if_rx_bmi_stats, fmbm_rfrc)},
--
2.43.0
^ permalink raw reply related
* [PATCH v1 11/17] net/dpaa: fix coverity reported issues
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable, Vanshika Shukla
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Fix several issues reported by Coverity static analysis:
- Add missing null checks in dpaa_flow.c
- Fix potential resource leak in dpaa_qdma.c
Fixes: e7665de896 ("net/dpaa: fix resource leak")
Cc: stable@dpdk.org
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/dma/dpaa/dpaa_qdma.c | 7 ++++++-
drivers/net/dpaa/dpaa_flow.c | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index 74e23d2ee5..faf4a7bafe 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2021-2024 NXP
+ * Copyright 2021-2026 NXP
*/
#include <bus_dpaa_driver.h>
@@ -827,6 +827,11 @@ fsl_qdma_enqueue_desc_sg(struct fsl_qdma_queue *fsl_queue)
}
}
+ if (num == 0 || num > FSL_QDMA_SG_MAX_ENTRY) {
+ DPAA_QDMA_ERR("Invalid scatter-gather entry count: num=%u", num);
+ return -EINVAL;
+ }
+
ft->desc_ssge[num - 1].final = 1;
ft->desc_dsge[num - 1].final = 1;
csgf_src->length = total_len;
diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c
index 417b9b6fbb..f21950f64d 100644
--- a/drivers/net/dpaa/dpaa_flow.c
+++ b/drivers/net/dpaa/dpaa_flow.c
@@ -81,6 +81,10 @@ static void fm_prev_cleanup(void)
devid = fm_model.device_order[i];
/* FM Port Open */
fm_model.fm_port_params[devid].h_fm = fm_info.fman_handle;
+ if (dpaa_intf.port_handle) {
+ fm_port_close(dpaa_intf.port_handle);
+ dpaa_intf.port_handle = NULL;
+ }
dpaa_intf.port_handle =
fm_port_open(&fm_model.fm_port_params[devid]);
dpaa_intf.scheme_handle[0] = create_device(fm_info.pcd_handle,
--
2.43.0
^ permalink raw reply related
* [PATCH v1 10/17] net/dpaa: fix invalid check on interrupt unregister
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable, Gagandeep Singh
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
From: Gagandeep Singh <g.singh@nxp.com>
Fix an incorrect condition check when unregistering the interrupt
handler during device stop. The check was using the wrong
comparison which could cause the unregister to be skipped.
Fixes: 9c99878aa1 ("log: introduce logtype register macro")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 9a9c5ee817..c143e66f77 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -559,7 +559,7 @@ static int dpaa_eth_dev_close(struct rte_eth_dev *dev)
}
ret = rte_intr_callback_unregister(intr_handle,
dpaa_interrupt_handler, (void *)dev);
- if (ret) {
+ if (ret < 0) {
DPAA_PMD_WARN("%s: unregister interrupt failed(%d)",
dev->data->name, ret);
}
--
2.43.0
^ permalink raw reply related
* [PATCH v1 09/17] net/dpaa: fix device remove
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable, Gagandeep Singh
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
From: Gagandeep Singh <g.singh@nxp.com>
Add a check to avoid closing a device that is already closed,
preventing a double-close condition during device removal.
Fixes: 78ea4b4fcb ("bus/dpaa: improve cleanup")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 424458857e..9a9c5ee817 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2674,18 +2674,19 @@ static int
rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev)
{
struct rte_eth_dev *eth_dev;
- int ret;
+ int ret = 0;
PMD_INIT_FUNC_TRACE();
eth_dev = dpaa_dev->eth_dev;
- dpaa_eth_dev_close(eth_dev);
- ret = rte_eth_dev_release_port(eth_dev);
+ if (eth_dev->state != RTE_ETH_DEV_UNUSED) {
+ dpaa_eth_dev_close(eth_dev);
+ ret = rte_eth_dev_release_port(eth_dev);
+ }
dpaa_valid_dev--;
- if (!dpaa_valid_dev) {
+ if (!dpaa_valid_dev)
rte_mempool_free(dpaa_tx_sg_pool);
- dpaa_finish();
- }
+
return ret;
}
--
2.43.0
^ permalink raw reply related
* [PATCH v1 08/17] bus/dpaa: fix device probe issue
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable, Gagandeep Singh
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
From: Gagandeep Singh <g.singh@nxp.com>
Remove an unintended early return in the LS1043 SoC version
check that was preventing device probing from completing
successfully on LS1043 platforms.
Fixes: 164e9e13e5 ("bus/dpaa: enhance SoC version")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index ee467b94d5..0ed617c72f 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
- * Copyright 2017-2025 NXP
+ * Copyright 2017-2026 NXP
*
*/
/* System headers */
@@ -725,10 +725,8 @@ rte_dpaa_bus_scan(void)
}
/* Disabling the default push mode for LS1043A */
- if (dpaa_bus.svr_ver == SVR_LS1043A_FAMILY) {
+ if (dpaa_bus.svr_ver == SVR_LS1043A_FAMILY)
dpaa_bus.max_push_rxq_num = 0;
- return 0;
- }
penv = getenv("DPAA_PUSH_QUEUES_NUMBER");
if (penv)
--
2.43.0
^ permalink raw reply related
* [PATCH v1 07/17] bus/dpaa: fix fd leak for ccsr mmap
From: Hemant Agrawal @ 2026-06-18 14:11 UTC (permalink / raw)
To: stephen, david.marchand, dev; +Cc: stable, Jun Yang
In-Reply-To: <20260618141151.3990283-1-hemant.agrawal@nxp.com>
The CCSR file descriptor was kept open after mmap() was done.
Close the fd immediately after mmap() as it is no longer needed,
preventing a file descriptor leak.
Fixes: 8e253882cd ("bus/dpaa: support interrupt portal based fd")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
drivers/bus/dpaa/base/qbman/bman_driver.c | 3 ++-
drivers/bus/dpaa/base/qbman/qman_driver.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index 23e44ac10b..71a2028383 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -145,7 +145,7 @@ void bman_thread_irq(void)
int bman_init_ccsr(const struct device_node *node)
{
- static int ccsr_map_fd;
+ int ccsr_map_fd;
uint64_t phys_addr;
const uint32_t *bman_addr;
uint64_t regs_size;
@@ -169,6 +169,7 @@ int bman_init_ccsr(const struct device_node *node)
bman_ccsr_map = mmap(NULL, regs_size, PROT_READ |
PROT_WRITE, MAP_SHARED, ccsr_map_fd, phys_addr);
+ close(ccsr_map_fd);
if (bman_ccsr_map == MAP_FAILED) {
pr_err("Can not map BMan CCSR base Bman: "
"0x%x Phys: 0x%" PRIx64 " size 0x%" PRIu64,
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 3bab8b8337..45b094e0c6 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
*
* Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2017-2022, 2025 NXP
+ * Copyright 2017-2022, 2025-2026 NXP
*
*/
@@ -270,7 +270,7 @@ int qman_global_init(void)
const struct device_node *dt_node;
size_t lenp;
const u32 *chanid;
- static int ccsr_map_fd;
+ int ccsr_map_fd;
const uint32_t *qman_addr;
uint64_t phys_addr;
uint64_t regs_size;
@@ -358,9 +358,9 @@ int qman_global_init(void)
pr_err("Can not open /dev/mem for qman ccsr map\n");
return ccsr_map_fd;
}
-
qman_ccsr_map = mmap(NULL, regs_size, PROT_READ | PROT_WRITE,
MAP_SHARED, ccsr_map_fd, phys_addr);
+ close(ccsr_map_fd);
if (qman_ccsr_map == MAP_FAILED) {
pr_err("Can not map qman ccsr base\n");
return -EINVAL;
--
2.43.0
^ permalink raw reply related
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