patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: patch 'net/e1000: fix crashes in secondary processes' has been queued to stable release 22.11.8
Date: Fri,  7 Mar 2025 12:24:12 +0000	[thread overview]
Message-ID: <20250307122431.1415551-13-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20250307122431.1415551-1-luca.boccassi@gmail.com>

Hi,

FYI, your patch has been queued to stable release 22.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/09/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ce45f96ea2efb031223e66b22f134ef2e53c7b36

Thanks.

Luca Boccassi

---
From ce45f96ea2efb031223e66b22f134ef2e53c7b36 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 17 Feb 2025 13:54:05 +0000
Subject: [PATCH] net/e1000: fix crashes in secondary processes

[ upstream commit b0ef6e7a970bc745537c5b5140d838431f118c5e ]

Currently, the architecture of e1000 base driver is such that it uses
function pointers internally. These are not guaranteed to be valid in
secondary processes, which can lead to crashes. This patch prevents EM,
IGB and IGC ethdev drivers from calling into these functions from
secondary processes

Fixes: af75078fece3 ("first public release")
Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Fixes: 4f09bc55ac3d ("net/igc: implement device base operations")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/nics/e1000em.rst    |   5 +
 doc/guides/nics/igb.rst        |  12 +++
 doc/guides/nics/igc.rst        |   5 +
 drivers/net/e1000/em_ethdev.c  |  80 +++++++++++++++
 drivers/net/e1000/igb_ethdev.c | 176 +++++++++++++++++++++++++++++++++
 drivers/net/igc/igc_ethdev.c   |  81 +++++++++++++++
 6 files changed, 359 insertions(+)

diff --git a/doc/guides/nics/e1000em.rst b/doc/guides/nics/e1000em.rst
index 5e752a29e5..ed4f57e9c6 100644
--- a/doc/guides/nics/e1000em.rst
+++ b/doc/guides/nics/e1000em.rst
@@ -153,3 +153,8 @@ The following are known limitations:
 #.  Qemu e1000 only supports one interrupt source, so link and Rx interrupt should be exclusive.
 
 #.  Qemu e1000 does not support interrupt auto-clear, application should disable interrupt immediately when woken up.
+
+Secondary Process Support
+-------------------------
+
+Control plane operations are currently not supported in secondary processes.
diff --git a/doc/guides/nics/igb.rst b/doc/guides/nics/igb.rst
index 8231f9eef4..76314f809b 100644
--- a/doc/guides/nics/igb.rst
+++ b/doc/guides/nics/igb.rst
@@ -23,6 +23,18 @@ Features of the IGB PMD are:
 * TCP segmentation offload
 * Jumbo frames supported
 
+Secondary Process Support
+-------------------------
+
+IGB Physical Function Driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Control plane operations are currently not supported in secondary processes.
+
+IGB Virtual Function Driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Control plane operations are currently not supported in secondary processes.
 
 Limitations or Known issues
 ---------------------------
diff --git a/doc/guides/nics/igc.rst b/doc/guides/nics/igc.rst
index 399d2d650c..e23dc46ea7 100644
--- a/doc/guides/nics/igc.rst
+++ b/doc/guides/nics/igc.rst
@@ -104,3 +104,8 @@ Add a rule to enable ipv4-udp RSS:
 .. code-block:: console
 
    testpmd> flow create 0 ingress pattern end actions rss types ipv4-udp end / end
+
+Secondary Process Support
+-------------------------
+
+Control plane operations are currently not supported in secondary processes.
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index efe3665cec..e74a58fbcf 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -532,6 +532,14 @@ eth_em_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	ret = eth_em_stop(dev);
 	if (ret != 0)
 		return ret;
@@ -716,6 +724,14 @@ eth_em_stop(struct rte_eth_dev *dev)
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	dev->data->dev_started = 0;
 
 	eth_em_rxtx_control(dev, false);
@@ -1003,6 +1019,10 @@ eth_em_rx_queue_intr_enable(struct rte_eth_dev *dev, __rte_unused uint16_t queue
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	em_rxq_intr_enable(hw);
 	rte_intr_ack(intr_handle);
 
@@ -1014,6 +1034,10 @@ eth_em_rx_queue_intr_disable(struct rte_eth_dev *dev, __rte_unused uint16_t queu
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	em_rxq_intr_disable(hw);
 
 	return 0;
@@ -1639,6 +1663,14 @@ eth_em_led_on(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	return e1000_led_on(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
 }
@@ -1648,6 +1680,14 @@ eth_em_led_off(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	return e1000_led_off(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
 }
@@ -1709,6 +1749,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	uint32_t max_high_water;
 	uint32_t rctl;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	if (fc_conf->autoneg != hw->mac.autoneg)
 		return -ENOTSUP;
@@ -1760,6 +1808,14 @@ eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	return e1000_rar_set(hw, mac_addr->addr_bytes, index);
 }
 
@@ -1769,6 +1825,14 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
 	uint8_t addr[RTE_ETHER_ADDR_LEN];
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return;
+
 	memset(addr, 0, sizeof(addr));
 
 	e1000_rar_set(hw, addr, index);
@@ -1778,6 +1842,14 @@ static int
 eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
 			    struct rte_ether_addr *addr)
 {
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	eth_em_rar_clear(dev, 0);
 
 	return eth_em_rar_set(dev, (void *)addr, 0, 0);
@@ -1822,6 +1894,14 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	e1000_update_mc_addr_list(hw, (u8 *)mc_addr_set, nb_mc_addr);
 	return 0;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index e9ad558c82..79d001e69a 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1206,6 +1206,14 @@ eth_igb_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* disable uio/vfio intr/eventfd mapping */
 	rte_intr_disable(intr_handle);
 
@@ -1421,6 +1429,14 @@ eth_igb_stop(struct rte_eth_dev *dev)
 	struct e1000_adapter *adapter =
 		E1000_DEV_PRIVATE(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (adapter->stopped)
 		return 0;
 
@@ -1474,6 +1490,14 @@ eth_igb_dev_set_link_up(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (hw->phy.media_type == e1000_media_type_copper)
 		e1000_power_up_phy(hw);
 	else
@@ -1487,6 +1511,14 @@ eth_igb_dev_set_link_down(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (hw->phy.media_type == e1000_media_type_copper)
 		e1000_power_down_phy(hw);
 	else
@@ -2108,6 +2140,14 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
 	struct e1000_fw_version fw;
 	int ret;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	e1000_get_fw_version(hw, &fw);
 
 	switch (hw->mac.type) {
@@ -2355,6 +2395,14 @@ eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 	struct rte_eth_link link;
 	int link_check, count;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	link_check = 0;
 	hw->mac.get_link_status = 1;
 
@@ -2977,6 +3025,14 @@ eth_igb_led_on(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	return e1000_led_on(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
 }
@@ -2986,6 +3042,14 @@ eth_igb_led_off(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	return e1000_led_off(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
 }
@@ -3048,6 +3112,14 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	uint32_t rctl;
 	uint32_t ctrl;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	if (fc_conf->autoneg != hw->mac.autoneg)
 		return -ENOTSUP;
@@ -3134,6 +3206,14 @@ eth_igb_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t rah;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	e1000_rar_set(hw, mac_addr->addr_bytes, index);
 	rah = E1000_READ_REG(hw, E1000_RAH(index));
 	rah |= (0x1 << (E1000_RAH_POOLSEL_SHIFT + pool));
@@ -3147,6 +3227,14 @@ eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index)
 	uint8_t addr[RTE_ETHER_ADDR_LEN];
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return;
+
 	memset(addr, 0, sizeof(addr));
 
 	e1000_rar_set(hw, addr, index);
@@ -3156,6 +3244,14 @@ static int
 eth_igb_default_mac_addr_set(struct rte_eth_dev *dev,
 				struct rte_ether_addr *addr)
 {
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	eth_igb_rar_clear(dev, 0);
 	eth_igb_rar_set(dev, (void *)addr, 0, 0);
 
@@ -3289,6 +3385,14 @@ igbvf_dev_start(struct rte_eth_dev *dev)
 	int ret;
 	uint32_t intr_vector = 0;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	PMD_INIT_FUNC_TRACE();
 
 	hw->mac.ops.reset_hw(hw);
@@ -3345,6 +3449,14 @@ igbvf_dev_stop(struct rte_eth_dev *dev)
 	struct e1000_adapter *adapter =
 		E1000_DEV_PRIVATE(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (adapter->stopped)
 		return 0;
 
@@ -3417,6 +3529,14 @@ igbvf_promiscuous_enable(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* Set both unicast and multicast promisc */
 	e1000_promisc_set_vf(hw, e1000_promisc_enabled);
 
@@ -3428,6 +3548,14 @@ igbvf_promiscuous_disable(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* If in allmulticast mode leave multicast promisc */
 	if (dev->data->all_multicast == 1)
 		e1000_promisc_set_vf(hw, e1000_promisc_multicast);
@@ -3442,6 +3570,14 @@ igbvf_allmulticast_enable(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* In promiscuous mode multicast promisc already set */
 	if (dev->data->promiscuous == 0)
 		e1000_promisc_set_vf(hw, e1000_promisc_multicast);
@@ -3454,6 +3590,14 @@ igbvf_allmulticast_disable(struct rte_eth_dev *dev)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* In promiscuous mode leave multicast promisc enabled */
 	if (dev->data->promiscuous == 0)
 		e1000_promisc_set_vf(hw, e1000_promisc_disabled);
@@ -4557,6 +4701,14 @@ eth_igb_set_mc_addr_list(struct rte_eth_dev *dev,
 {
 	struct e1000_hw *hw;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	e1000_update_mc_addr_list(hw, (u8 *)mc_addr_set, nb_mc_addr);
 	return 0;
@@ -4986,6 +5138,14 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
 	uint16_t *data = in_eeprom->data;
 	int first, length;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	first = in_eeprom->offset >> 1;
 	length = in_eeprom->length >> 1;
 	if ((first >= hw->nvm.word_size) ||
@@ -5010,6 +5170,14 @@ eth_igb_set_eeprom(struct rte_eth_dev *dev,
 	uint16_t *data = in_eeprom->data;
 	int first, length;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	first = in_eeprom->offset >> 1;
 	length = in_eeprom->length >> 1;
 	if ((first >= hw->nvm.word_size) ||
@@ -5110,6 +5278,10 @@ eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	uint32_t vec = E1000_MISC_VEC_ID;
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (rte_intr_allow_others(intr_handle))
 		vec = E1000_RX_VEC_START;
 
@@ -5130,6 +5302,10 @@ eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	uint32_t vec = E1000_MISC_VEC_ID;
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (rte_intr_allow_others(intr_handle))
 		vec = E1000_RX_VEC_START;
 
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index dcd262f0cf..ce1f425eaf 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -12,6 +12,7 @@
 #include <ethdev_pci.h>
 #include <rte_malloc.h>
 #include <rte_alarm.h>
+#include <rte_errno.h>
 
 #include "igc_logs.h"
 #include "igc_txrx.h"
@@ -357,6 +358,14 @@ eth_igc_set_link_up(struct rte_eth_dev *dev)
 {
 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (hw->phy.media_type == igc_media_type_copper)
 		igc_power_up_phy(hw);
 	else
@@ -369,6 +378,14 @@ eth_igc_set_link_down(struct rte_eth_dev *dev)
 {
 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (hw->phy.media_type == igc_media_type_copper)
 		igc_power_down_phy(hw);
 	else
@@ -442,6 +459,14 @@ eth_igc_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 	struct rte_eth_link link;
 	int link_check, count;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	link_check = 0;
 	hw->mac.get_link_status = 1;
 
@@ -619,6 +644,14 @@ eth_igc_stop(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	struct rte_eth_link link;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	dev->data->dev_started = 0;
 	adapter->stopped = 1;
 
@@ -925,6 +958,14 @@ eth_igc_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	/* disable all MSI-X interrupts */
 	IGC_WRITE_REG(hw, IGC_EIMC, 0x1f);
 	IGC_WRITE_FLUSH(hw);
@@ -1459,6 +1500,14 @@ eth_igc_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
 	struct igc_fw_version fw;
 	int ret;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	igc_get_fw_version(hw, &fw);
 
 	/* if option rom is valid, display its version too */
@@ -1549,6 +1598,14 @@ eth_igc_led_on(struct rte_eth_dev *dev)
 {
 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	return igc_led_on(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
 }
 
@@ -1557,6 +1614,14 @@ eth_igc_led_off(struct rte_eth_dev *dev)
 {
 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	return igc_led_off(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
 }
 
@@ -2099,6 +2164,10 @@ eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	uint32_t vec = IGC_MISC_VEC_ID;
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (rte_intr_allow_others(intr_handle))
 		vec = IGC_RX_VEC_START;
 
@@ -2118,6 +2187,10 @@ eth_igc_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 	struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
 	uint32_t vec = IGC_MISC_VEC_ID;
 
+	/* device interrupts are only subscribed to in primary processes */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (rte_intr_allow_others(intr_handle))
 		vec = IGC_RX_VEC_START;
 
@@ -2181,6 +2254,14 @@ eth_igc_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	uint32_t rctl;
 	int err;
 
+	/*
+	 * This function calls into the base driver, which in turn will use
+	 * function pointers, which are not guaranteed to be valid in secondary
+	 * processes, so avoid using this function in secondary processes.
+	 */
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return -E_RTE_SECONDARY;
+
 	if (fc_conf->autoneg != hw->mac.autoneg)
 		return -ENOTSUP;
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-03-07 12:23:38.506248723 +0000
+++ 0013-net-e1000-fix-crashes-in-secondary-processes.patch	2025-03-07 12:23:38.006838293 +0000
@@ -1 +1 @@
-From b0ef6e7a970bc745537c5b5140d838431f118c5e Mon Sep 17 00:00:00 2001
+From ce45f96ea2efb031223e66b22f134ef2e53c7b36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0ef6e7a970bc745537c5b5140d838431f118c5e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,7 +21,7 @@
- doc/guides/nics/e1000em.rst          |   5 +
- doc/guides/nics/igb.rst              |  13 ++
- doc/guides/nics/igc.rst              |   5 +
- drivers/net/intel/e1000/em_ethdev.c  |  80 ++++++++++++
- drivers/net/intel/e1000/igb_ethdev.c | 176 +++++++++++++++++++++++++++
- drivers/net/intel/e1000/igc_ethdev.c |  97 +++++++++++++++
- 6 files changed, 376 insertions(+)
+ doc/guides/nics/e1000em.rst    |   5 +
+ doc/guides/nics/igb.rst        |  12 +++
+ doc/guides/nics/igc.rst        |   5 +
+ drivers/net/e1000/em_ethdev.c  |  80 +++++++++++++++
+ drivers/net/e1000/igb_ethdev.c | 176 +++++++++++++++++++++++++++++++++
+ drivers/net/igc/igc_ethdev.c   |  81 +++++++++++++++
+ 6 files changed, 359 insertions(+)
@@ -42 +43 @@
-index e3a91c316b..3f7a4156ff 100644
+index 8231f9eef4..76314f809b 100644
@@ -45,2 +46 @@
-@@ -31,3 +31,16 @@ Features of the IGB PMD are:
- * Checksum offload
+@@ -23,6 +23,18 @@ Features of the IGB PMD are:
@@ -49 +49 @@
-+
+ 
@@ -61,0 +62,3 @@
+ 
+ Limitations or Known issues
+ ---------------------------
@@ -63 +66 @@
-index c267431c5f..9790b58102 100644
+index 399d2d650c..e23dc46ea7 100644
@@ -75,5 +78,5 @@
-diff --git a/drivers/net/intel/e1000/em_ethdev.c b/drivers/net/intel/e1000/em_ethdev.c
-index bd3f7e44df..39dddf3384 100644
---- a/drivers/net/intel/e1000/em_ethdev.c
-+++ b/drivers/net/intel/e1000/em_ethdev.c
-@@ -573,6 +573,14 @@ eth_em_start(struct rte_eth_dev *dev)
+diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
+index efe3665cec..e74a58fbcf 100644
+--- a/drivers/net/e1000/em_ethdev.c
++++ b/drivers/net/e1000/em_ethdev.c
+@@ -532,6 +532,14 @@ eth_em_start(struct rte_eth_dev *dev)
@@ -94 +97 @@
-@@ -757,6 +765,14 @@ eth_em_stop(struct rte_eth_dev *dev)
+@@ -716,6 +724,14 @@ eth_em_stop(struct rte_eth_dev *dev)
@@ -109 +112 @@
-@@ -1048,6 +1064,10 @@ eth_em_rx_queue_intr_enable(struct rte_eth_dev *dev, __rte_unused uint16_t queue
+@@ -1003,6 +1019,10 @@ eth_em_rx_queue_intr_enable(struct rte_eth_dev *dev, __rte_unused uint16_t queue
@@ -120 +123 @@
-@@ -1059,6 +1079,10 @@ eth_em_rx_queue_intr_disable(struct rte_eth_dev *dev, __rte_unused uint16_t queu
+@@ -1014,6 +1034,10 @@ eth_em_rx_queue_intr_disable(struct rte_eth_dev *dev, __rte_unused uint16_t queu
@@ -131 +134 @@
-@@ -1688,6 +1712,14 @@ eth_em_led_on(struct rte_eth_dev *dev)
+@@ -1639,6 +1663,14 @@ eth_em_led_on(struct rte_eth_dev *dev)
@@ -146 +149 @@
-@@ -1697,6 +1729,14 @@ eth_em_led_off(struct rte_eth_dev *dev)
+@@ -1648,6 +1680,14 @@ eth_em_led_off(struct rte_eth_dev *dev)
@@ -161 +164 @@
-@@ -1758,6 +1798,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1709,6 +1749,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -176 +179 @@
-@@ -1809,6 +1857,14 @@ eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+@@ -1760,6 +1808,14 @@ eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
@@ -191 +194 @@
-@@ -1818,6 +1874,14 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
+@@ -1769,6 +1825,14 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
@@ -206 +209 @@
-@@ -1827,6 +1891,14 @@ static int
+@@ -1778,6 +1842,14 @@ static int
@@ -221 +224 @@
-@@ -1871,6 +1943,14 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
+@@ -1822,6 +1894,14 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
@@ -236,5 +239,5 @@
-diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
-index be3123572f..cbd2f15f5f 100644
---- a/drivers/net/intel/e1000/igb_ethdev.c
-+++ b/drivers/net/intel/e1000/igb_ethdev.c
-@@ -1248,6 +1248,14 @@ eth_igb_start(struct rte_eth_dev *dev)
+diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
+index e9ad558c82..79d001e69a 100644
+--- a/drivers/net/e1000/igb_ethdev.c
++++ b/drivers/net/e1000/igb_ethdev.c
+@@ -1206,6 +1206,14 @@ eth_igb_start(struct rte_eth_dev *dev)
@@ -255 +258 @@
-@@ -1471,6 +1479,14 @@ eth_igb_stop(struct rte_eth_dev *dev)
+@@ -1421,6 +1429,14 @@ eth_igb_stop(struct rte_eth_dev *dev)
@@ -270 +273 @@
-@@ -1524,6 +1540,14 @@ eth_igb_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -1474,6 +1490,14 @@ eth_igb_dev_set_link_up(struct rte_eth_dev *dev)
@@ -285 +288 @@
-@@ -1537,6 +1561,14 @@ eth_igb_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -1487,6 +1511,14 @@ eth_igb_dev_set_link_down(struct rte_eth_dev *dev)
@@ -300 +303 @@
-@@ -2158,6 +2190,14 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+@@ -2108,6 +2140,14 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
@@ -315 +318 @@
-@@ -2406,6 +2446,14 @@ eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -2355,6 +2395,14 @@ eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -330 +333 @@
-@@ -3028,6 +3076,14 @@ eth_igb_led_on(struct rte_eth_dev *dev)
+@@ -2977,6 +3025,14 @@ eth_igb_led_on(struct rte_eth_dev *dev)
@@ -345 +348 @@
-@@ -3037,6 +3093,14 @@ eth_igb_led_off(struct rte_eth_dev *dev)
+@@ -2986,6 +3042,14 @@ eth_igb_led_off(struct rte_eth_dev *dev)
@@ -360 +363 @@
-@@ -3099,6 +3163,14 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -3048,6 +3112,14 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -375 +378 @@
-@@ -3185,6 +3257,14 @@ eth_igb_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+@@ -3134,6 +3206,14 @@ eth_igb_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
@@ -390 +393 @@
-@@ -3198,6 +3278,14 @@ eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index)
+@@ -3147,6 +3227,14 @@ eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index)
@@ -405 +408 @@
-@@ -3207,6 +3295,14 @@ static int
+@@ -3156,6 +3244,14 @@ static int
@@ -420 +423 @@
-@@ -3340,6 +3436,14 @@ igbvf_dev_start(struct rte_eth_dev *dev)
+@@ -3289,6 +3385,14 @@ igbvf_dev_start(struct rte_eth_dev *dev)
@@ -435 +438 @@
-@@ -3396,6 +3500,14 @@ igbvf_dev_stop(struct rte_eth_dev *dev)
+@@ -3345,6 +3449,14 @@ igbvf_dev_stop(struct rte_eth_dev *dev)
@@ -450 +453 @@
-@@ -3468,6 +3580,14 @@ igbvf_promiscuous_enable(struct rte_eth_dev *dev)
+@@ -3417,6 +3529,14 @@ igbvf_promiscuous_enable(struct rte_eth_dev *dev)
@@ -465 +468 @@
-@@ -3479,6 +3599,14 @@ igbvf_promiscuous_disable(struct rte_eth_dev *dev)
+@@ -3428,6 +3548,14 @@ igbvf_promiscuous_disable(struct rte_eth_dev *dev)
@@ -480 +483 @@
-@@ -3493,6 +3621,14 @@ igbvf_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -3442,6 +3570,14 @@ igbvf_allmulticast_enable(struct rte_eth_dev *dev)
@@ -495 +498 @@
-@@ -3505,6 +3641,14 @@ igbvf_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -3454,6 +3590,14 @@ igbvf_allmulticast_disable(struct rte_eth_dev *dev)
@@ -510 +513 @@
-@@ -4608,6 +4752,14 @@ eth_igb_set_mc_addr_list(struct rte_eth_dev *dev,
+@@ -4557,6 +4701,14 @@ eth_igb_set_mc_addr_list(struct rte_eth_dev *dev,
@@ -525 +528 @@
-@@ -5056,6 +5208,14 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
+@@ -4986,6 +5138,14 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
@@ -540 +543 @@
-@@ -5080,6 +5240,14 @@ eth_igb_set_eeprom(struct rte_eth_dev *dev,
+@@ -5010,6 +5170,14 @@ eth_igb_set_eeprom(struct rte_eth_dev *dev,
@@ -555 +558 @@
-@@ -5180,6 +5348,10 @@ eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -5110,6 +5278,10 @@ eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -566 +569 @@
-@@ -5200,6 +5372,10 @@ eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -5130,6 +5302,10 @@ eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -577,4 +580,4 @@
-diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
-index 136f5af2a0..e712cfcf7c 100644
---- a/drivers/net/intel/e1000/igc_ethdev.c
-+++ b/drivers/net/intel/e1000/igc_ethdev.c
+diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
+index dcd262f0cf..ce1f425eaf 100644
+--- a/drivers/net/igc/igc_ethdev.c
++++ b/drivers/net/igc/igc_ethdev.c
@@ -587 +590 @@
- #include "e1000_logs.h"
+ #include "igc_logs.h"
@@ -589 +592 @@
-@@ -397,6 +398,14 @@ eth_igc_set_link_up(struct rte_eth_dev *dev)
+@@ -357,6 +358,14 @@ eth_igc_set_link_up(struct rte_eth_dev *dev)
@@ -591 +594 @@
- 	struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -601,2 +604,2 @@
- 	if (hw->phy.media_type == e1000_media_type_copper)
- 		e1000_power_up_phy(hw);
+ 	if (hw->phy.media_type == igc_media_type_copper)
+ 		igc_power_up_phy(hw);
@@ -604 +607 @@
-@@ -409,6 +418,14 @@ eth_igc_set_link_down(struct rte_eth_dev *dev)
+@@ -369,6 +378,14 @@ eth_igc_set_link_down(struct rte_eth_dev *dev)
@@ -606 +609 @@
- 	struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -616,2 +619,2 @@
- 	if (hw->phy.media_type == e1000_media_type_copper)
- 		e1000_power_down_phy(hw);
+ 	if (hw->phy.media_type == igc_media_type_copper)
+ 		igc_power_down_phy(hw);
@@ -619 +622 @@
-@@ -482,6 +499,14 @@ eth_igc_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -442,6 +459,14 @@ eth_igc_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -634 +637 @@
-@@ -659,6 +684,14 @@ eth_igc_stop(struct rte_eth_dev *dev)
+@@ -619,6 +644,14 @@ eth_igc_stop(struct rte_eth_dev *dev)
@@ -649 +652 @@
-@@ -970,6 +1003,14 @@ eth_igc_start(struct rte_eth_dev *dev)
+@@ -925,6 +958,14 @@ eth_igc_start(struct rte_eth_dev *dev)
@@ -662,4 +665,4 @@
- 	E1000_WRITE_REG(hw, E1000_EIMC, 0x1f);
- 	E1000_WRITE_FLUSH(hw);
-@@ -1553,6 +1594,14 @@ eth_igc_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
- 	struct e1000_fw_version fw;
+ 	IGC_WRITE_REG(hw, IGC_EIMC, 0x1f);
+ 	IGC_WRITE_FLUSH(hw);
+@@ -1459,6 +1500,14 @@ eth_igc_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ 	struct igc_fw_version fw;
@@ -676 +679 @@
- 	e1000_get_fw_version(hw, &fw);
+ 	igc_get_fw_version(hw, &fw);
@@ -679 +682 @@
-@@ -1643,6 +1692,14 @@ eth_igc_led_on(struct rte_eth_dev *dev)
+@@ -1549,6 +1598,14 @@ eth_igc_led_on(struct rte_eth_dev *dev)
@@ -681 +684 @@
- 	struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -691 +694 @@
- 	return e1000_led_on(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
+ 	return igc_led_on(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
@@ -694 +697 @@
-@@ -1651,6 +1708,14 @@ eth_igc_led_off(struct rte_eth_dev *dev)
+@@ -1557,6 +1614,14 @@ eth_igc_led_off(struct rte_eth_dev *dev)
@@ -696 +699 @@
- 	struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ 	struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -706 +709 @@
- 	return e1000_led_off(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
+ 	return igc_led_off(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
@@ -709 +712 @@
-@@ -2194,6 +2259,10 @@ eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -2099,6 +2164,10 @@ eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -720 +723 @@
-@@ -2213,6 +2282,10 @@ eth_igc_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -2118,6 +2187,10 @@ eth_igc_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -731 +734 @@
-@@ -2276,6 +2349,14 @@ eth_igc_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -2181,6 +2254,14 @@ eth_igc_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -746,30 +748,0 @@
-@@ -2777,6 +2858,14 @@ eth_igc_timesync_read_rx_timestamp(__rte_unused struct rte_eth_dev *dev,
- 	struct igc_rx_queue *rxq;
- 	uint64_t rx_timestamp;
- 
-+	/*
-+	 * This function calls into the base driver, which in turn will use
-+	 * function pointers, which are not guaranteed to be valid in secondary
-+	 * processes, so avoid using this function in secondary processes.
-+	 */
-+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-+		return -E_RTE_SECONDARY;
-+
- 	/* Get current link speed. */
- 	eth_igc_link_update(dev, 1);
- 	rte_eth_linkstatus_get(dev, &link);
-@@ -2813,6 +2902,14 @@ eth_igc_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
- 	uint64_t tx_timestamp;
- 	int adjust = 0;
- 
-+	/*
-+	 * This function calls into the base driver, which in turn will use
-+	 * function pointers, which are not guaranteed to be valid in secondary
-+	 * processes, so avoid using this function in secondary processes.
-+	 */
-+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-+		return -E_RTE_SECONDARY;
-+
- 	val = E1000_READ_REG(hw, E1000_TSYNCTXCTL);
- 	if (!(val & E1000_TSYNCTXCTL_VALID))
- 		return -EINVAL;

  parent reply	other threads:[~2025-03-07 12:25 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 17:03 patch 'test/ring: fix init with custom number of lcores' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: clear ring addresses when getting vring base' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: check GSO size validity' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/cnxk: fix build with GCC 15' " luca.boccassi
2025-02-17 17:03 ` patch 'net/thunderx/base: " luca.boccassi
2025-02-17 17:03 ` patch 'eal/x86: fix some intrinsics header include for Windows' " luca.boccassi
2025-02-17 17:03 ` patch 'net/bonding: fix dedicated queue setup' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: fix mbuf freeing in simple Tx path' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: remove PVID info dump for VF' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: rename RAS module' " luca.boccassi
2025-02-17 17:03 ` patch 'net/sfc: remove unnecessary assignment' " luca.boccassi
2025-02-17 17:03 ` patch 'net/mlx5: fix polling CQEs' " luca.boccassi
2025-02-17 17:03 ` patch 'net/iavf: remove reset of Tx prepare function pointer' " luca.boccassi
2025-02-17 17:03 ` patch 'net/ice: fix memory leak in scalar Rx' " luca.boccassi
2025-02-17 17:03 ` patch 'common/cnxk: fix atomic load in batch ops' " luca.boccassi
2025-02-17 17:03 ` patch 'common/cnxk: fix DPI mailbox structure' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/virtio: fix redundant queue free' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/openssl: fix CMAC auth context update' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/virtio: fix data queues iteration' " luca.boccassi
2025-02-17 17:03 ` patch 'net/enetfec: remove useless assignment' " luca.boccassi
2025-02-17 17:03 ` patch 'net/cnxk: fix NIX send header L3 type' " luca.boccassi
2025-02-17 17:03 ` patch 'eal/linux: fix memseg length in legacy mem init' " luca.boccassi
2025-02-17 17:03 ` patch 'use Python raw string notation' " luca.boccassi
2025-02-17 17:03 ` patch 'net/af_packet: fix socket close on device stop' " luca.boccassi
2025-02-17 17:03 ` patch 'ethdev: fix functions available in new device event' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: add null callback checks' " luca.boccassi
2025-02-17 17:04 ` patch 'build: force GCC 15 to initialize padding bits' " luca.boccassi
2025-02-17 17:04 ` patch 'net/bnxt: fix indication of allocation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/bnxt: fix crash when representor is re-attached' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix Netlink socket leak' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: adjust actions per rule limitation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix flush of non-template flow rules' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix GRE flow match with SWS' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix deadlock when writing i225 register' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix infinite loop' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix bitwise operation type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: increase PHY power up delay' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: reset loop variable' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix LTR for i225' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix typo in LTR calculation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix unused value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix semaphore timeout " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix iterator type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix MAC address hash bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix data type in MAC hash' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix NVM data type in bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix semaphore timeout value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: correct mPHY access logic' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix iterator type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix MAC address hash bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix data type in MAC hash' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix uninitialized variable' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix bitwise operation type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix NVM data type in bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix reset for 82580' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix unchecked return' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: skip management check for 82575' " luca.boccassi
2025-02-17 17:04 ` patch 'common/idpf: fix void function returning a value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/intel: fix void functions " luca.boccassi
2025-02-17 17:04 ` patch 'net/intel: fix build with icx' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hns3: fix copper port initialization' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hns3: fix reset timeout' " luca.boccassi
2025-02-17 17:04 ` patch 'raw/cnxk_gpio: fix file descriptor leak' " luca.boccassi
2025-02-17 17:04 ` patch 'net/i40e: remove duplicate code' " luca.boccassi
2025-02-17 17:04 ` patch 'eal: fix devargs layers parsing out of bounds' " luca.boccassi
2025-02-17 17:04 ` patch 'net/qede: fix debug messages array' " luca.boccassi
2025-02-17 17:04 ` patch 'examples/ptpclient: fix message parsing' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hinic: fix flow type bitmask overflow' " luca.boccassi
2025-02-17 17:04 ` patch 'crypto/dpaa2_sec: fix bitmask truncation' " luca.boccassi
2025-02-17 17:04 ` patch 'crypto/dpaa_sec: " luca.boccassi
2025-02-17 17:04 ` patch 'event/dpaa: " luca.boccassi
2025-02-17 17:04 ` patch 'net/dpaa: " luca.boccassi
2025-02-17 17:04 ` patch 'net/dpaa2: " luca.boccassi
2025-02-17 17:04 ` patch 'net/qede: fix nested loops' " luca.boccassi
2025-02-17 17:04 ` patch 'examples/l3fwd: fix socket ID check' " luca.boccassi
2025-02-17 17:04 ` patch 'common/cnxk: fix null " luca.boccassi
2025-02-17 17:04 ` patch 'eal/linux: remove useless assignments' " luca.boccassi
2025-02-17 17:04 ` patch 'mempool: fix errno in empty create' " luca.boccassi
2025-02-17 17:04 ` patch 'ethdev: convert string initialization' " luca.boccassi
2025-03-07 12:24   ` patch 'net/netvsc: scan all net devices under the PCI device' " luca.boccassi
2025-03-07 12:24     ` patch 'net/netvsc: remove device if its net devices removed' " luca.boccassi
2025-03-07 12:24     ` patch 'doc: fix feature flags for queue start/stop' " luca.boccassi
2025-03-07 12:24     ` patch 'app/testpmd: show all DCB priority TC map' " luca.boccassi
2025-03-07 12:24     ` patch 'app/testpmd: avoid crash in DCB config' " luca.boccassi
2025-03-07 12:24     ` patch 'app/testpmd: fix out-of-bound reference in offload " luca.boccassi
2025-03-07 12:24     ` patch 'net/txgbe: remove useless condition for SW-FW sync' " luca.boccassi
2025-03-07 12:24     ` patch 'bus/pci: fix registered device name' " luca.boccassi
2025-03-07 12:24     ` patch 'examples/vhost_crypto: fix user callbacks' " luca.boccassi
2025-03-07 12:24     ` patch 'vhost: check descriptor chains length' " luca.boccassi
2025-03-07 12:24     ` patch 'test/bbdev: update FFT test vectors' " luca.boccassi
2025-03-07 12:24     ` patch 'test/event: fix number of queues in eventdev conf' " luca.boccassi
2025-03-07 12:24     ` luca.boccassi [this message]
2025-03-07 12:24     ` patch 'net/ixgbe: fix crashes in secondary processes' " luca.boccassi
2025-03-07 12:24     ` patch 'net/ixgbe: fix minimum Rx/Tx descriptors' " luca.boccassi
2025-03-07 12:24     ` patch 'net/mlx5: fix leak in HWS flow counter action' " luca.boccassi
2025-03-07 12:24     ` patch 'net/mlx5: fix actions translation error overwrite' " luca.boccassi
2025-03-07 12:24     ` patch 'net/mlx5: fix hardware packet type translation' " luca.boccassi
2025-03-07 12:24     ` patch 'common/cnxk: fix inbound IPsec SA setup' " luca.boccassi
2025-03-07 12:24     ` patch 'stack: fix pop in C11 implementation' " luca.boccassi
2025-03-07 12:24     ` patch 'test/crypto: fix AES-ECB test lengths' " luca.boccassi
2025-03-07 12:24     ` patch 'examples/ipsec-secgw: fix IV length in CTR 192/256' " luca.boccassi
2025-03-07 12:24     ` patch 'test/crypto: remove unused variable' " luca.boccassi
2025-03-07 12:24     ` patch 'crypto/openssl: validate incorrect RSA signature' " luca.boccassi
2025-03-07 12:24     ` patch 'test/crypto: fix check for OOP header data' " luca.boccassi
2025-03-07 12:24     ` patch 'test/dma: fix pointers in IOVA as PA mode' " luca.boccassi
2025-03-07 12:24     ` patch 'doc: update ionic driver guide' " luca.boccassi
2025-03-07 12:24     ` patch 'ci: point at GitHub mirror' " luca.boccassi
2025-03-19 14:21       ` patch 'net/iavf: fix mbuf release in Arm multi-process' " luca.boccassi
2025-03-19 14:21         ` patch 'net/ice: fix dropped packets when using VRRP' " luca.boccassi
2025-03-19 14:21         ` patch 'net/iavf: check interrupt registration failure' " luca.boccassi
2025-03-19 14:21         ` patch 'net/iavf: fix crash on app exit on FreeBSD' " luca.boccassi
2025-03-19 14:21         ` patch 'net/mlx5: fix LACP packet handling in isolated mode' " luca.boccassi
2025-03-19 14:21         ` patch 'net/mlx5/hws: fix crash using represented port without ID' " luca.boccassi
2025-03-19 14:21         ` patch 'net/mlx5/hws: fix GTP flags matching' " luca.boccassi
2025-03-19 14:21         ` patch 'net/mlx5: fix IPIP tunnel verification' " luca.boccassi
2025-03-19 14:21         ` patch 'net/mlx5: fix GRE matching on root table' " luca.boccassi
2025-03-19 14:21         ` patch 'pdump: clear statistics when enabled' " luca.boccassi
2025-03-19 14:21         ` patch 'examples/ipsec-secgw: fix cryptodev and eventdev IDs' " luca.boccassi
2025-03-25 11:24           ` patch 'eal: fix undetected NUMA nodes' " luca.boccassi
2025-03-25  8:20       ` patch 'ci: point at GitHub mirror' " Navin Srinivas
2025-03-25  8:38         ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250307122431.1415551-13-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).