* [PATCH] net/iavf: support pre and post reset callbacks
@ 2026-01-13 15:17 Ciara Loftus
2026-01-13 15:51 ` Bruce Richardson
2026-01-14 13:21 ` [PATCH v2] " Ciara Loftus
0 siblings, 2 replies; 8+ messages in thread
From: Ciara Loftus @ 2026-01-13 15:17 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The user may want to perform some actions before and/or after a VF
reset, for example storing settings that may be lost during the reset
and restoring them after the reset. To facilitate this, introduce a
new function which allows the user to register either a pre or post
reset callback, which will be executed before or after the VF has been
reset. To unregister the callback, simply use the same function with a
null callback as argument.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
doc/guides/rel_notes/release_26_03.rst | 4 ++
drivers/net/intel/iavf/iavf.h | 15 +++++++
drivers/net/intel/iavf/iavf_ethdev.c | 62 ++++++++++++++++++++++++++
drivers/net/intel/iavf/rte_pmd_iavf.h | 24 ++++++++++
4 files changed, 105 insertions(+)
diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
index 15dabee7a1..770f9933ee 100644
--- a/doc/guides/rel_notes/release_26_03.rst
+++ b/doc/guides/rel_notes/release_26_03.rst
@@ -55,6 +55,10 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel iavf driver.**
+
+ * Added support for pre and post VF reset callbacks.
+
Removed Items
-------------
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index d78582e05c..5482472549 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -224,6 +224,17 @@ struct iavf_qtc_map {
uint16_t queue_count;
};
+enum iavf_reset_cb_type {
+ IAVF_RESET_CB_TYPE_PRE,
+ IAVF_RESET_CB_TYPE_POST,
+};
+
+struct iavf_reset_cb_arg {
+ uint16_t port_id;
+ int reset_status;
+ void *user_state;
+};
+
/* Structure to store private data specific for VF instance. */
struct iavf_info {
uint16_t num_queue_pairs;
@@ -257,6 +268,10 @@ struct iavf_info {
struct iavf_vsi vsi;
bool vf_reset; /* true for VF reset pending, false for no VF reset */
+ void (*pre_reset_cb)(struct iavf_reset_cb_arg *arg); /* Pre reset callback function ptr */
+ void (*post_reset_cb)(struct iavf_reset_cb_arg *arg); /* Post reset callback function ptr */
+ struct iavf_reset_cb_arg *pre_reset_cb_arg; /* Pre reset function argument */
+ struct iavf_reset_cb_arg *post_reset_cb_arg; /* Post reset function argument */
uint64_t flags;
uint8_t *rss_lut;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 15e49fe248..553f38a286 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3120,6 +3120,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
vf->in_reset_recovery = true;
iavf_set_no_poll(adapter, false);
+ /* Call the pre reset callback */
+ if (vf->pre_reset_cb)
+ (*vf->pre_reset_cb)(vf->pre_reset_cb_arg);
+
ret = iavf_dev_reset(dev);
if (ret)
goto error;
@@ -3144,6 +3148,13 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
error:
PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
exit:
+ /* Update the reset status */
+ if (vf->post_reset_cb_arg)
+ vf->post_reset_cb_arg->reset_status = ret;
+ /* Call the post reset callback */
+ if (vf->post_reset_cb)
+ (*vf->post_reset_cb)(vf->post_reset_cb_arg);
+
vf->in_reset_recovery = false;
iavf_set_no_poll(adapter, false);
@@ -3183,6 +3194,57 @@ rte_pmd_iavf_reinit(uint16_t port)
return 0;
}
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_reset_cb_register, 26.03)
+int
+rte_pmd_iavf_reset_cb_register(uint16_t port,
+ enum iavf_reset_cb_type cb_type,
+ void (*reset_cb)(struct iavf_reset_cb_arg *arg),
+ struct iavf_reset_cb_arg *reset_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+ dev = &rte_eth_devices[port];
+
+ if (!is_iavf_supported(dev)) {
+ PMD_DRV_LOG(ERR, "Cannot register callback, port %u is not an IAVF device.", port);
+ return -ENOTSUP;
+ }
+
+ if (reset_cb != NULL && reset_arg == NULL) {
+ PMD_DRV_LOG(ERR, "Cannot register callback on port %u, arg is NULL.", port);
+ return -EINVAL;
+ }
+
+ if (reset_arg != NULL)
+ reset_arg->port_id = port;
+
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+ if (vf->in_reset_recovery) {
+ PMD_DRV_LOG(ERR, "Cannot modify reset callback on port %u, VF is resetting.", port);
+ return -EBUSY;
+ }
+
+ switch (cb_type) {
+ case IAVF_RESET_CB_TYPE_PRE:
+ vf->pre_reset_cb = reset_cb;
+ vf->pre_reset_cb_arg = reset_arg;
+ break;
+ case IAVF_RESET_CB_TYPE_POST:
+ vf->post_reset_cb = reset_cb;
+ vf->post_reset_cb_arg = reset_arg;
+ break;
+ default:
+ PMD_DRV_LOG(ERR, "Invalid reset callback type: %d", cb_type);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
void
iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
{
diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
index dea1bd2789..365f8a3e6a 100644
--- a/drivers/net/intel/iavf/rte_pmd_iavf.h
+++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
@@ -20,6 +20,8 @@
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
+#include "iavf.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -109,6 +111,28 @@ extern uint64_t rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
__rte_experimental
int rte_pmd_iavf_reinit(uint16_t port);
+/**
+ * Register or unregister a pre or post reset event callback
+ *
+ * @param port
+ * The port identifier of the Ethernet device.
+ * @param cb_type
+ * The callback type, pre-reset (0) or post-reset (1).
+ * @param reset_cb
+ * The callback function that will be invoked by the driver.
+ * Pass NULL to unregister an existing callback.
+ * @param reset_arg
+ * The argument passed to the callback function.
+ * Can be NULL when unregistering (reset_cb is NULL).
+ * @return
+ * 0 if successful, otherwise if a failure occurs.
+ */
+__rte_experimental
+int rte_pmd_iavf_reset_cb_register(uint16_t port,
+ enum iavf_reset_cb_type cb_type,
+ void (*reset_cb)(struct iavf_reset_cb_arg *arg),
+ struct iavf_reset_cb_arg *reset_arg);
+
/**
* The mbuf dynamic field pointer for flexible descriptor's extraction metadata.
*/
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] net/iavf: support pre and post reset callbacks
2026-01-13 15:17 [PATCH] net/iavf: support pre and post reset callbacks Ciara Loftus
@ 2026-01-13 15:51 ` Bruce Richardson
2026-01-14 13:21 ` [PATCH v2] " Ciara Loftus
1 sibling, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-13 15:51 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Tue, Jan 13, 2026 at 03:17:57PM +0000, Ciara Loftus wrote:
> The user may want to perform some actions before and/or after a VF
> reset, for example storing settings that may be lost during the reset
> and restoring them after the reset. To facilitate this, introduce a
> new function which allows the user to register either a pre or post
> reset callback, which will be executed before or after the VF has been
> reset. To unregister the callback, simply use the same function with a
> null callback as argument.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Some review comments and suggestions inline below.
/Bruce
> ---
> doc/guides/rel_notes/release_26_03.rst | 4 ++
> drivers/net/intel/iavf/iavf.h | 15 +++++++
> drivers/net/intel/iavf/iavf_ethdev.c | 62 ++++++++++++++++++++++++++
> drivers/net/intel/iavf/rte_pmd_iavf.h | 24 ++++++++++
> 4 files changed, 105 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
> index 15dabee7a1..770f9933ee 100644
> --- a/doc/guides/rel_notes/release_26_03.rst
> +++ b/doc/guides/rel_notes/release_26_03.rst
> @@ -55,6 +55,10 @@ New Features
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* **Updated Intel iavf driver.**
> +
> + * Added support for pre and post VF reset callbacks.
> +
>
> Removed Items
> -------------
> diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
> index d78582e05c..5482472549 100644
> --- a/drivers/net/intel/iavf/iavf.h
> +++ b/drivers/net/intel/iavf/iavf.h
> @@ -224,6 +224,17 @@ struct iavf_qtc_map {
> uint16_t queue_count;
> };
>
> +enum iavf_reset_cb_type {
> + IAVF_RESET_CB_TYPE_PRE,
> + IAVF_RESET_CB_TYPE_POST,
> +};
I don't particularly like having the names end with "PRE" and "POST" on
their own. How about renaming to drop the "TYPE" and then adding in the
reset again at the end, so that it's pre-reset and post-reset, which tends
to read better IMHO: IAVF_RESET_CB_PRE_RESET, IAVF_RESET_CB_POST_RESET?
Perhaps there is better naming again that can be suggested?
> +
> +struct iavf_reset_cb_arg {
> + uint16_t port_id;
> + int reset_status;
> + void *user_state;
> +};
> +
I don't think we need this structure. When the user is setting up the
callback the only parameter they provide in this struct is the user_state.
Then for each callback, I'd make it have each parameter separately rather
than using a struct.
Semi-related, since the reset_status is going to be undefined for the
pre-reset callback, did you consider removing the reset_cb_type enum and
just using separate types and APIs for configuring pre and post-reset
callbacks?
void (*pre_reset_cb)(uint16_t port_id, void *user_param);
void (*post_reset_cb)(uint16_t port_id, int reset_state, void *user_param);
and then APIs
rte_pmd_iavf_register_pre_reset_cb(...)
rte_pmd_iavf_register_post_reset_cb(...)
Just a suggestion - if you prefer to keep patch as is, I have no strong
objections.
> /* Structure to store private data specific for VF instance. */
> struct iavf_info {
> uint16_t num_queue_pairs;
> @@ -257,6 +268,10 @@ struct iavf_info {
>
> struct iavf_vsi vsi;
> bool vf_reset; /* true for VF reset pending, false for no VF reset */
> + void (*pre_reset_cb)(struct iavf_reset_cb_arg *arg); /* Pre reset callback function ptr */
> + void (*post_reset_cb)(struct iavf_reset_cb_arg *arg); /* Post reset callback function ptr */
Normally we use typedefs for function pointers in DPDK. However, there may
be cases where we don't too, so no strong objection here.
> + struct iavf_reset_cb_arg *pre_reset_cb_arg; /* Pre reset function argument */
> + struct iavf_reset_cb_arg *post_reset_cb_arg; /* Post reset function argument */
> uint64_t flags;
>
> uint8_t *rss_lut;
> diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
> index 15e49fe248..553f38a286 100644
> --- a/drivers/net/intel/iavf/iavf_ethdev.c
> +++ b/drivers/net/intel/iavf/iavf_ethdev.c
> @@ -3120,6 +3120,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
> vf->in_reset_recovery = true;
> iavf_set_no_poll(adapter, false);
>
> + /* Call the pre reset callback */
> + if (vf->pre_reset_cb)
DPDK style guide says to always compare pointers explicitly with NULL.
> + (*vf->pre_reset_cb)(vf->pre_reset_cb_arg);
> +
Don't think we need the "*" or the brackets around the function pointer
here.
> ret = iavf_dev_reset(dev);
> if (ret)
> goto error;
> @@ -3144,6 +3148,13 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
> error:
> PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
> exit:
> + /* Update the reset status */
> + if (vf->post_reset_cb_arg)
> + vf->post_reset_cb_arg->reset_status = ret;
> + /* Call the post reset callback */
> + if (vf->post_reset_cb)
> + (*vf->post_reset_cb)(vf->post_reset_cb_arg);
> +
> vf->in_reset_recovery = false;
> iavf_set_no_poll(adapter, false);
>
> @@ -3183,6 +3194,57 @@ rte_pmd_iavf_reinit(uint16_t port)
> return 0;
> }
>
> +RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_reset_cb_register, 26.03)
> +int
> +rte_pmd_iavf_reset_cb_register(uint16_t port,
> + enum iavf_reset_cb_type cb_type,
> + void (*reset_cb)(struct iavf_reset_cb_arg *arg),
> + struct iavf_reset_cb_arg *reset_arg)
> +{
> + struct rte_eth_dev *dev;
> + struct iavf_info *vf;
> +
> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
> +
> + dev = &rte_eth_devices[port];
> +
> + if (!is_iavf_supported(dev)) {
> + PMD_DRV_LOG(ERR, "Cannot register callback, port %u is not an IAVF device.", port);
> + return -ENOTSUP;
> + }
> +
> + if (reset_cb != NULL && reset_arg == NULL) {
> + PMD_DRV_LOG(ERR, "Cannot register callback on port %u, arg is NULL.", port);
> + return -EINVAL;
> + }
> +
Minor nit, but I would check the parameters before doing any other later
checks, so suggest moving this up as a parameter check right after the
port id check.
> + if (reset_arg != NULL)
> + reset_arg->port_id = port;
> +
> + vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
> +
> + if (vf->in_reset_recovery) {
> + PMD_DRV_LOG(ERR, "Cannot modify reset callback on port %u, VF is resetting.", port);
> + return -EBUSY;
> + }
> +
> + switch (cb_type) {
> + case IAVF_RESET_CB_TYPE_PRE:
> + vf->pre_reset_cb = reset_cb;
> + vf->pre_reset_cb_arg = reset_arg;
> + break;
> + case IAVF_RESET_CB_TYPE_POST:
> + vf->post_reset_cb = reset_cb;
> + vf->post_reset_cb_arg = reset_arg;
> + break;
> + default:
> + PMD_DRV_LOG(ERR, "Invalid reset callback type: %d", cb_type);
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> void
> iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
> {
> diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
> index dea1bd2789..365f8a3e6a 100644
> --- a/drivers/net/intel/iavf/rte_pmd_iavf.h
> +++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
> @@ -20,6 +20,8 @@
> #include <rte_mbuf.h>
> #include <rte_mbuf_dyn.h>
>
> +#include "iavf.h"
> +
> #ifdef __cplusplus
> extern "C" {
> #endif
> @@ -109,6 +111,28 @@ extern uint64_t rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
> __rte_experimental
> int rte_pmd_iavf_reinit(uint16_t port);
>
> +/**
> + * Register or unregister a pre or post reset event callback
> + *
> + * @param port
> + * The port identifier of the Ethernet device.
> + * @param cb_type
> + * The callback type, pre-reset (0) or post-reset (1).
> + * @param reset_cb
> + * The callback function that will be invoked by the driver.
> + * Pass NULL to unregister an existing callback.
> + * @param reset_arg
> + * The argument passed to the callback function.
> + * Can be NULL when unregistering (reset_cb is NULL).
> + * @return
> + * 0 if successful, otherwise if a failure occurs.
> + */
> +__rte_experimental
> +int rte_pmd_iavf_reset_cb_register(uint16_t port,
> + enum iavf_reset_cb_type cb_type,
> + void (*reset_cb)(struct iavf_reset_cb_arg *arg),
> + struct iavf_reset_cb_arg *reset_arg);
> +
> /**
> * The mbuf dynamic field pointer for flexible descriptor's extraction metadata.
> */
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] net/iavf: support pre and post reset callbacks
2026-01-13 15:17 [PATCH] net/iavf: support pre and post reset callbacks Ciara Loftus
2026-01-13 15:51 ` Bruce Richardson
@ 2026-01-14 13:21 ` Ciara Loftus
2026-01-20 18:01 ` Bruce Richardson
2026-01-21 12:42 ` [PATCH v3] " Ciara Loftus
1 sibling, 2 replies; 8+ messages in thread
From: Ciara Loftus @ 2026-01-14 13:21 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The user may want to perform some actions before and/or after a VF
reset, for example storing settings that may be lost during the reset
and restoring them after the reset. To facilitate this, introduce two
new functions which allow the user to register either a pre or post
reset callback, which will be executed before or after the VF has been
reset. To unregister the callback, simply use the register functions
with a NULL callback and argument.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
v2:
* Changed the function parameters of each cb
* Created separate register functions for each type of cb
* Use typedefs for the callbacks
* Fixed some style issues
* Permit NULL cb args when registering, application may just want to be
notified of the event and not require further processing.
---
doc/guides/rel_notes/release_26_03.rst | 4 ++
drivers/net/intel/iavf/iavf.h | 8 +++
drivers/net/intel/iavf/iavf_ethdev.c | 80 ++++++++++++++++++++++++++
drivers/net/intel/iavf/rte_pmd_iavf.h | 42 ++++++++++++++
4 files changed, 134 insertions(+)
diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
index 15dabee7a1..770f9933ee 100644
--- a/doc/guides/rel_notes/release_26_03.rst
+++ b/doc/guides/rel_notes/release_26_03.rst
@@ -55,6 +55,10 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel iavf driver.**
+
+ * Added support for pre and post VF reset callbacks.
+
Removed Items
-------------
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index d78582e05c..50ca14e41c 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -100,6 +100,10 @@ struct iavf_adapter;
struct ci_rx_queue;
struct ci_tx_queue;
+/** Callback function pointer for pre VF reset event */
+typedef void (*iavf_pre_reset_cb_t)(uint16_t port_id, void *arg);
+/** Callback function pointer for post VF reset event */
+typedef void (*iavf_post_reset_cb_t)(uint16_t port_id, int reset_state, void *arg);
struct iavf_ipsec_crypto_stats {
uint64_t icount;
@@ -257,6 +261,10 @@ struct iavf_info {
struct iavf_vsi vsi;
bool vf_reset; /* true for VF reset pending, false for no VF reset */
+ iavf_pre_reset_cb_t pre_reset_cb; /* Pre reset callback function ptr */
+ iavf_post_reset_cb_t post_reset_cb; /* Post reset callback function ptr */
+ void *pre_reset_cb_arg; /* Pre reset callback argument */
+ void *post_reset_cb_arg; /* Post reset callback argument */
uint64_t flags;
uint8_t *rss_lut;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 15e49fe248..83e3486572 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3120,6 +3120,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
vf->in_reset_recovery = true;
iavf_set_no_poll(adapter, false);
+ /* Call the pre reset callback */
+ if (vf->pre_reset_cb != NULL)
+ vf->pre_reset_cb(dev->data->port_id, vf->pre_reset_cb_arg);
+
ret = iavf_dev_reset(dev);
if (ret)
goto error;
@@ -3144,6 +3148,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
error:
PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
exit:
+ /* Call the post reset callback */
+ if (vf->post_reset_cb != NULL)
+ vf->post_reset_cb(dev->data->port_id, ret, vf->post_reset_cb_arg);
+
vf->in_reset_recovery = false;
iavf_set_no_poll(adapter, false);
@@ -3183,6 +3191,78 @@ rte_pmd_iavf_reinit(uint16_t port)
return 0;
}
+static int
+iavf_validate_reset_cb(uint16_t port, void *cb, void *cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+ if (cb == NULL && cb_arg != NULL) {
+ PMD_DRV_LOG(ERR, "Cannot unregister reset cb on port %u, arg must be NULL.", port);
+ return -EINVAL;
+ }
+
+ dev = &rte_eth_devices[port];
+ if (!is_iavf_supported(dev)) {
+ PMD_DRV_LOG(ERR, "Cannot modify reset cb, port %u not an IAVF device.", port);
+ return -ENOTSUP;
+ }
+
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ if (vf->in_reset_recovery) {
+ PMD_DRV_LOG(ERR, "Cannot modify reset cb on port %u, VF is resetting.", port);
+ return -EBUSY;
+ }
+
+ return 0;
+}
+
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_pre_reset_cb, 26.03)
+int
+rte_pmd_iavf_register_pre_reset_cb(uint16_t port,
+ iavf_pre_reset_cb_t pre_reset_cb,
+ void *pre_reset_cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+ int ret;
+
+ ret = iavf_validate_reset_cb(port, pre_reset_cb, pre_reset_cb_arg);
+ if (ret)
+ return ret;
+
+ dev = &rte_eth_devices[port];
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf->pre_reset_cb = pre_reset_cb;
+ vf->pre_reset_cb_arg = pre_reset_cb_arg;
+
+ return 0;
+}
+
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_post_reset_cb, 26.03)
+int
+rte_pmd_iavf_register_post_reset_cb(uint16_t port,
+ iavf_post_reset_cb_t post_reset_cb,
+ void *post_reset_cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+ int ret;
+
+ ret = iavf_validate_reset_cb(port, post_reset_cb, post_reset_cb_arg);
+ if (ret)
+ return ret;
+
+ dev = &rte_eth_devices[port];
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf->post_reset_cb = post_reset_cb;
+ vf->post_reset_cb_arg = post_reset_cb_arg;
+
+ return 0;
+}
+
void
iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
{
diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
index dea1bd2789..d13417eb08 100644
--- a/drivers/net/intel/iavf/rte_pmd_iavf.h
+++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
@@ -20,6 +20,8 @@
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
+#include "iavf.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -109,6 +111,46 @@ extern uint64_t rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
__rte_experimental
int rte_pmd_iavf_reinit(uint16_t port);
+/**
+ * Register or unregister a pre reset event callback
+ *
+ * @param port
+ * The port identifier of the Ethernet device.
+ * @param pre_reset_cb
+ * The callback function that will be invoked by the driver prior to a reset.
+ * Pass NULL to unregister an existing callback.
+ * @param pre_reset_cb_arg
+ * The argument passed to the callback function.
+ * May be NULL when registering the callback if no argument is needed to the callback.
+ * Must be NULL when unregistering the callback.
+ * @return
+ * 0 if successful, otherwise if a failure occurs.
+ */
+__rte_experimental
+int rte_pmd_iavf_register_pre_reset_cb(uint16_t port,
+ iavf_pre_reset_cb_t pre_reset_cb,
+ void *pre_reset_cb_arg);
+
+/**
+ * Register or unregister a post reset event callback
+ *
+ * @param port
+ * The port identifier of the Ethernet device.
+ * @param post_reset_cb
+ * The callback function that will be invoked by the driver after a reset.
+ * Pass NULL to unregister an existing callback.
+ * @param post_reset_cb_arg
+ * The argument passed to the callback function.
+ * May be NULL when registering the callback if no argument is needed to the callback.
+ * Must be NULL when unregistering the callback.
+ * @return
+ * 0 if successful, otherwise if a failure occurs.
+ */
+__rte_experimental
+int rte_pmd_iavf_register_post_reset_cb(uint16_t port,
+ iavf_post_reset_cb_t post_reset_cb,
+ void *post_reset_cb_arg);
+
/**
* The mbuf dynamic field pointer for flexible descriptor's extraction metadata.
*/
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] net/iavf: support pre and post reset callbacks
2026-01-14 13:21 ` [PATCH v2] " Ciara Loftus
@ 2026-01-20 18:01 ` Bruce Richardson
2026-01-21 9:29 ` David Marchand
2026-01-21 12:42 ` [PATCH v3] " Ciara Loftus
1 sibling, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2026-01-20 18:01 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Wed, Jan 14, 2026 at 01:21:59PM +0000, Ciara Loftus wrote:
> The user may want to perform some actions before and/or after a VF
> reset, for example storing settings that may be lost during the reset
> and restoring them after the reset. To facilitate this, introduce two
> new functions which allow the user to register either a pre or post
> reset callback, which will be executed before or after the VF has been
> reset. To unregister the callback, simply use the register functions
> with a NULL callback and argument.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> v2:
> * Changed the function parameters of each cb
> * Created separate register functions for each type of cb
> * Use typedefs for the callbacks
> * Fixed some style issues
> * Permit NULL cb args when registering, application may just want to be
> notified of the event and not require further processing.
> ---
> doc/guides/rel_notes/release_26_03.rst | 4 ++
> drivers/net/intel/iavf/iavf.h | 8 +++
> drivers/net/intel/iavf/iavf_ethdev.c | 80 ++++++++++++++++++++++++++
> drivers/net/intel/iavf/rte_pmd_iavf.h | 42 ++++++++++++++
> 4 files changed, 134 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
> index 15dabee7a1..770f9933ee 100644
> --- a/doc/guides/rel_notes/release_26_03.rst
> +++ b/doc/guides/rel_notes/release_26_03.rst
> @@ -55,6 +55,10 @@ New Features
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* **Updated Intel iavf driver.**
> +
> + * Added support for pre and post VF reset callbacks.
> +
>
> Removed Items
> -------------
> diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
> index d78582e05c..50ca14e41c 100644
> --- a/drivers/net/intel/iavf/iavf.h
> +++ b/drivers/net/intel/iavf/iavf.h
> @@ -100,6 +100,10 @@ struct iavf_adapter;
> struct ci_rx_queue;
> struct ci_tx_queue;
>
> +/** Callback function pointer for pre VF reset event */
> +typedef void (*iavf_pre_reset_cb_t)(uint16_t port_id, void *arg);
> +/** Callback function pointer for post VF reset event */
> +typedef void (*iavf_post_reset_cb_t)(uint16_t port_id, int reset_state, void *arg);
>
> struct iavf_ipsec_crypto_stats {
> uint64_t icount;
> @@ -257,6 +261,10 @@ struct iavf_info {
>
> struct iavf_vsi vsi;
> bool vf_reset; /* true for VF reset pending, false for no VF reset */
> + iavf_pre_reset_cb_t pre_reset_cb; /* Pre reset callback function ptr */
> + iavf_post_reset_cb_t post_reset_cb; /* Post reset callback function ptr */
> + void *pre_reset_cb_arg; /* Pre reset callback argument */
> + void *post_reset_cb_arg; /* Post reset callback argument */
> uint64_t flags;
>
> uint8_t *rss_lut;
> diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
> index 15e49fe248..83e3486572 100644
> --- a/drivers/net/intel/iavf/iavf_ethdev.c
> +++ b/drivers/net/intel/iavf/iavf_ethdev.c
> @@ -3120,6 +3120,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
> vf->in_reset_recovery = true;
> iavf_set_no_poll(adapter, false);
>
> + /* Call the pre reset callback */
> + if (vf->pre_reset_cb != NULL)
> + vf->pre_reset_cb(dev->data->port_id, vf->pre_reset_cb_arg);
> +
> ret = iavf_dev_reset(dev);
> if (ret)
> goto error;
> @@ -3144,6 +3148,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
> error:
> PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
> exit:
> + /* Call the post reset callback */
> + if (vf->post_reset_cb != NULL)
> + vf->post_reset_cb(dev->data->port_id, ret, vf->post_reset_cb_arg);
> +
> vf->in_reset_recovery = false;
> iavf_set_no_poll(adapter, false);
>
> @@ -3183,6 +3191,78 @@ rte_pmd_iavf_reinit(uint16_t port)
> return 0;
> }
>
> +static int
> +iavf_validate_reset_cb(uint16_t port, void *cb, void *cb_arg)
> +{
> + struct rte_eth_dev *dev;
> + struct iavf_info *vf;
> +
> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
> +
> + if (cb == NULL && cb_arg != NULL) {
> + PMD_DRV_LOG(ERR, "Cannot unregister reset cb on port %u, arg must be NULL.", port);
> + return -EINVAL;
> + }
> +
> + dev = &rte_eth_devices[port];
> + if (!is_iavf_supported(dev)) {
> + PMD_DRV_LOG(ERR, "Cannot modify reset cb, port %u not an IAVF device.", port);
> + return -ENOTSUP;
> + }
> +
> + vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
> + if (vf->in_reset_recovery) {
> + PMD_DRV_LOG(ERR, "Cannot modify reset cb on port %u, VF is resetting.", port);
> + return -EBUSY;
> + }
> +
> + return 0;
> +}
> +
> +RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_pre_reset_cb, 26.03)
> +int
> +rte_pmd_iavf_register_pre_reset_cb(uint16_t port,
> + iavf_pre_reset_cb_t pre_reset_cb,
> + void *pre_reset_cb_arg)
> +{
> + struct rte_eth_dev *dev;
> + struct iavf_info *vf;
> + int ret;
> +
> + ret = iavf_validate_reset_cb(port, pre_reset_cb, pre_reset_cb_arg);
> + if (ret)
> + return ret;
> +
> + dev = &rte_eth_devices[port];
> + vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
> + vf->pre_reset_cb = pre_reset_cb;
> + vf->pre_reset_cb_arg = pre_reset_cb_arg;
> +
> + return 0;
> +}
> +
> +RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_post_reset_cb, 26.03)
> +int
> +rte_pmd_iavf_register_post_reset_cb(uint16_t port,
> + iavf_post_reset_cb_t post_reset_cb,
> + void *post_reset_cb_arg)
> +{
> + struct rte_eth_dev *dev;
> + struct iavf_info *vf;
> + int ret;
> +
> + ret = iavf_validate_reset_cb(port, post_reset_cb, post_reset_cb_arg);
> + if (ret)
> + return ret;
> +
> + dev = &rte_eth_devices[port];
> + vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
> + vf->post_reset_cb = post_reset_cb;
> + vf->post_reset_cb_arg = post_reset_cb_arg;
> +
> + return 0;
> +}
> +
> void
> iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
> {
> diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
> index dea1bd2789..d13417eb08 100644
> --- a/drivers/net/intel/iavf/rte_pmd_iavf.h
> +++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
> @@ -20,6 +20,8 @@
> #include <rte_mbuf.h>
> #include <rte_mbuf_dyn.h>
>
> +#include "iavf.h"
> +
This include is an issue, because it's an exported i.e. installed, header
including a private header that will not be installed as part of DPDK. This
gets picked up by running chkincs from test-meson-builds.sh script. [I'm
surprised this wasn't caught in the CI].
I think you may need to invert the dependency, the private iavf.h can
instead depend on the public rte_pmd_iavf.h header file.
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] net/iavf: support pre and post reset callbacks
2026-01-20 18:01 ` Bruce Richardson
@ 2026-01-21 9:29 ` David Marchand
2026-01-21 19:39 ` Aaron Conole
0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2026-01-21 9:29 UTC (permalink / raw)
To: Bruce Richardson, Aaron Conole; +Cc: Ciara Loftus, dev
On Tue, 20 Jan 2026 at 19:02, Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > void
> > iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
> > {
> > diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
> > index dea1bd2789..d13417eb08 100644
> > --- a/drivers/net/intel/iavf/rte_pmd_iavf.h
> > +++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
> > @@ -20,6 +20,8 @@
> > #include <rte_mbuf.h>
> > #include <rte_mbuf_dyn.h>
> >
> > +#include "iavf.h"
> > +
> This include is an issue, because it's an exported i.e. installed, header
> including a private header that will not be installed as part of DPDK. This
> gets picked up by running chkincs from test-meson-builds.sh script. [I'm
> surprised this wasn't caught in the CI].
Something looks wrong in the robot branch itself.
I don't see the patch in the associated branch.
https://github.com/ovsrobot/dpdk/commits/refs/heads/series_37048/
Otoh, pushing this patch in my own repo does raise a chkincs failure.
https://github.com/david-marchand/dpdk/actions/runs/21203869950/job/60995562483#step:19:5413
--
David Marchand
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] net/iavf: support pre and post reset callbacks
2026-01-14 13:21 ` [PATCH v2] " Ciara Loftus
2026-01-20 18:01 ` Bruce Richardson
@ 2026-01-21 12:42 ` Ciara Loftus
2026-01-23 11:53 ` Bruce Richardson
1 sibling, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2026-01-21 12:42 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The user may want to perform some actions before and/or after a VF
reset, for example storing settings that may be lost during the reset
and restoring them after the reset. To facilitate this, introduce two
new functions which allow the user to register either a pre or post
reset callback, which will be executed before or after the VF has been
reset. To unregister the callback, simply use the register functions
with a NULL callback and argument.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
v3:
* Fix build issue by removing iavf.h include in rte_pmd_iavf.h
---
doc/guides/rel_notes/release_26_03.rst | 4 ++
drivers/net/intel/iavf/iavf.h | 5 ++
drivers/net/intel/iavf/iavf_ethdev.c | 80 ++++++++++++++++++++++++++
drivers/net/intel/iavf/rte_pmd_iavf.h | 45 +++++++++++++++
4 files changed, 134 insertions(+)
diff --git a/doc/guides/rel_notes/release_26_03.rst b/doc/guides/rel_notes/release_26_03.rst
index a50f6ee231..09d9cc3813 100644
--- a/doc/guides/rel_notes/release_26_03.rst
+++ b/doc/guides/rel_notes/release_26_03.rst
@@ -55,6 +55,10 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Updated Intel iavf driver.**
+
+ * Added support for pre and post VF reset callbacks.
+
Removed Items
-------------
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index cbd7f036f3..39949acc11 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -15,6 +15,7 @@
#include <iavf_type.h>
#include "iavf_log.h"
+#include "rte_pmd_iavf.h"
#define IAVF_AQ_LEN 32
#define IAVF_AQ_BUF_SZ 4096
@@ -257,6 +258,10 @@ struct iavf_info {
struct iavf_vsi vsi;
bool vf_reset; /* true for VF reset pending, false for no VF reset */
+ iavf_pre_reset_cb_t pre_reset_cb; /* Pre reset callback function ptr */
+ iavf_post_reset_cb_t post_reset_cb; /* Post reset callback function ptr */
+ void *pre_reset_cb_arg; /* Pre reset callback argument */
+ void *post_reset_cb_arg; /* Post reset callback argument */
uint64_t flags;
uint8_t *rss_lut;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index ad48386343..802e095174 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3132,6 +3132,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
vf->in_reset_recovery = true;
iavf_set_no_poll(adapter, false);
+ /* Call the pre reset callback */
+ if (vf->pre_reset_cb != NULL)
+ vf->pre_reset_cb(dev->data->port_id, vf->pre_reset_cb_arg);
+
ret = iavf_dev_reset(dev);
if (ret)
goto error;
@@ -3156,6 +3160,10 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
error:
PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
exit:
+ /* Call the post reset callback */
+ if (vf->post_reset_cb != NULL)
+ vf->post_reset_cb(dev->data->port_id, ret, vf->post_reset_cb_arg);
+
vf->in_reset_recovery = false;
iavf_set_no_poll(adapter, false);
@@ -3195,6 +3203,78 @@ rte_pmd_iavf_reinit(uint16_t port)
return 0;
}
+static int
+iavf_validate_reset_cb(uint16_t port, void *cb, void *cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+ if (cb == NULL && cb_arg != NULL) {
+ PMD_DRV_LOG(ERR, "Cannot unregister reset cb on port %u, arg must be NULL.", port);
+ return -EINVAL;
+ }
+
+ dev = &rte_eth_devices[port];
+ if (!is_iavf_supported(dev)) {
+ PMD_DRV_LOG(ERR, "Cannot modify reset cb, port %u not an IAVF device.", port);
+ return -ENOTSUP;
+ }
+
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ if (vf->in_reset_recovery) {
+ PMD_DRV_LOG(ERR, "Cannot modify reset cb on port %u, VF is resetting.", port);
+ return -EBUSY;
+ }
+
+ return 0;
+}
+
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_pre_reset_cb, 26.03)
+int
+rte_pmd_iavf_register_pre_reset_cb(uint16_t port,
+ iavf_pre_reset_cb_t pre_reset_cb,
+ void *pre_reset_cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+ int ret;
+
+ ret = iavf_validate_reset_cb(port, pre_reset_cb, pre_reset_cb_arg);
+ if (ret)
+ return ret;
+
+ dev = &rte_eth_devices[port];
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf->pre_reset_cb = pre_reset_cb;
+ vf->pre_reset_cb_arg = pre_reset_cb_arg;
+
+ return 0;
+}
+
+RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_iavf_register_post_reset_cb, 26.03)
+int
+rte_pmd_iavf_register_post_reset_cb(uint16_t port,
+ iavf_post_reset_cb_t post_reset_cb,
+ void *post_reset_cb_arg)
+{
+ struct rte_eth_dev *dev;
+ struct iavf_info *vf;
+ int ret;
+
+ ret = iavf_validate_reset_cb(port, post_reset_cb, post_reset_cb_arg);
+ if (ret)
+ return ret;
+
+ dev = &rte_eth_devices[port];
+ vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf->post_reset_cb = post_reset_cb;
+ vf->post_reset_cb_arg = post_reset_cb_arg;
+
+ return 0;
+}
+
void
iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
{
diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
index dea1bd2789..df4e947e85 100644
--- a/drivers/net/intel/iavf/rte_pmd_iavf.h
+++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
@@ -24,6 +24,11 @@
extern "C" {
#endif
+/** Callback function pointer for pre VF reset event */
+typedef void (*iavf_pre_reset_cb_t)(uint16_t port_id, void *arg);
+/** Callback function pointer for post VF reset event */
+typedef void (*iavf_post_reset_cb_t)(uint16_t port_id, int reset_state, void *arg);
+
/**
* The supported network flexible descriptor's extraction metadata format.
*/
@@ -109,6 +114,46 @@ extern uint64_t rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
__rte_experimental
int rte_pmd_iavf_reinit(uint16_t port);
+/**
+ * Register or unregister a pre reset event callback
+ *
+ * @param port
+ * The port identifier of the Ethernet device.
+ * @param pre_reset_cb
+ * The callback function that will be invoked by the driver prior to a reset.
+ * Pass NULL to unregister an existing callback.
+ * @param pre_reset_cb_arg
+ * The argument passed to the callback function.
+ * May be NULL when registering the callback if no argument is needed to the callback.
+ * Must be NULL when unregistering the callback.
+ * @return
+ * 0 if successful, otherwise if a failure occurs.
+ */
+__rte_experimental
+int rte_pmd_iavf_register_pre_reset_cb(uint16_t port,
+ iavf_pre_reset_cb_t pre_reset_cb,
+ void *pre_reset_cb_arg);
+
+/**
+ * Register or unregister a post reset event callback
+ *
+ * @param port
+ * The port identifier of the Ethernet device.
+ * @param post_reset_cb
+ * The callback function that will be invoked by the driver after a reset.
+ * Pass NULL to unregister an existing callback.
+ * @param post_reset_cb_arg
+ * The argument passed to the callback function.
+ * May be NULL when registering the callback if no argument is needed to the callback.
+ * Must be NULL when unregistering the callback.
+ * @return
+ * 0 if successful, otherwise if a failure occurs.
+ */
+__rte_experimental
+int rte_pmd_iavf_register_post_reset_cb(uint16_t port,
+ iavf_post_reset_cb_t post_reset_cb,
+ void *post_reset_cb_arg);
+
/**
* The mbuf dynamic field pointer for flexible descriptor's extraction metadata.
*/
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] net/iavf: support pre and post reset callbacks
2026-01-21 9:29 ` David Marchand
@ 2026-01-21 19:39 ` Aaron Conole
0 siblings, 0 replies; 8+ messages in thread
From: Aaron Conole @ 2026-01-21 19:39 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, Ciara Loftus, dev
David Marchand <david.marchand@redhat.com> writes:
> On Tue, 20 Jan 2026 at 19:02, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
>> > void
>> > iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change)
>> > {
>> > diff --git a/drivers/net/intel/iavf/rte_pmd_iavf.h b/drivers/net/intel/iavf/rte_pmd_iavf.h
>> > index dea1bd2789..d13417eb08 100644
>> > --- a/drivers/net/intel/iavf/rte_pmd_iavf.h
>> > +++ b/drivers/net/intel/iavf/rte_pmd_iavf.h
>> > @@ -20,6 +20,8 @@
>> > #include <rte_mbuf.h>
>> > #include <rte_mbuf_dyn.h>
>> >
>> > +#include "iavf.h"
>> > +
>> This include is an issue, because it's an exported i.e. installed, header
>> including a private header that will not be installed as part of DPDK. This
>> gets picked up by running chkincs from test-meson-builds.sh script. [I'm
>> surprised this wasn't caught in the CI].
>
> Something looks wrong in the robot branch itself.
> I don't see the patch in the associated branch.
> https://github.com/ovsrobot/dpdk/commits/refs/heads/series_37048/
Weird... actually - not weird. I just checked a status report from that
week:
** There was another ozlabs outage, and that caused reports to be
malformed, leading to missing results. A recheck request should
work, but I need to get back to the python rework to fix this.
I think this probably had an issue applying and due to a database
corruption (which I fixed) had weird behavior when applying patches.
So it's possible that this patch got caught up in the bot breakages that
happened around the beginning of Dec.
> Otoh, pushing this patch in my own repo does raise a chkincs failure.
> https://github.com/david-marchand/dpdk/actions/runs/21203869950/job/60995562483#step:19:5413
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] net/iavf: support pre and post reset callbacks
2026-01-21 12:42 ` [PATCH v3] " Ciara Loftus
@ 2026-01-23 11:53 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2026-01-23 11:53 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Wed, Jan 21, 2026 at 12:42:50PM +0000, Ciara Loftus wrote:
> The user may want to perform some actions before and/or after a VF
> reset, for example storing settings that may be lost during the reset
> and restoring them after the reset. To facilitate this, introduce two
> new functions which allow the user to register either a pre or post
> reset callback, which will be executed before or after the VF has been
> reset. To unregister the callback, simply use the register functions
> with a NULL callback and argument.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-01-23 11:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 15:17 [PATCH] net/iavf: support pre and post reset callbacks Ciara Loftus
2026-01-13 15:51 ` Bruce Richardson
2026-01-14 13:21 ` [PATCH v2] " Ciara Loftus
2026-01-20 18:01 ` Bruce Richardson
2026-01-21 9:29 ` David Marchand
2026-01-21 19:39 ` Aaron Conole
2026-01-21 12:42 ` [PATCH v3] " Ciara Loftus
2026-01-23 11:53 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox