From: Xueming Li <xuemingl@nvidia.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: Xueming Li <xuemingl@nvidia.com>,
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 23.11.4
Date: Tue, 8 Apr 2025 16:01:40 +0800 [thread overview]
Message-ID: <20250408080214.371154-2-xuemingl@nvidia.com> (raw)
In-Reply-To: <20250408080214.371154-1-xuemingl@nvidia.com>
Hi,
FYI, your patch has been queued to stable release 23.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/10/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=63e8bec024d537684da0bdffa122de96b8c565b2
Thanks.
Xueming Li <xuemingl@nvidia.com>
---
From 63e8bec024d537684da0bdffa122de96b8c565b2 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
Cc: Xueming Li <xuemingl@nvidia.com>
[ 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 | 13 +++
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 | 96 ++++++++++++++++++
6 files changed, 375 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 e3a91c316b..3f7a4156ff 100644
--- a/doc/guides/nics/igb.rst
+++ b/doc/guides/nics/igb.rst
@@ -31,3 +31,16 @@ Features of the IGB PMD are:
* Checksum offload
* 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.
diff --git a/doc/guides/nics/igc.rst b/doc/guides/nics/igc.rst
index c5af806b7b..07a1b12bcb 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 f6875b0762..e26930f1d6 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -543,6 +543,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;
@@ -727,6 +735,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);
@@ -1016,6 +1032,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);
@@ -1027,6 +1047,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;
@@ -1654,6 +1678,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;
}
@@ -1663,6 +1695,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;
}
@@ -1724,6 +1764,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;
@@ -1775,6 +1823,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);
}
@@ -1784,6 +1840,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);
@@ -1793,6 +1857,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);
@@ -1837,6 +1909,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 222e359ed9..c83ce5bc80 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 690736b6d1..bc8e0e127c 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"
@@ -392,6 +393,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
@@ -404,6 +413,13 @@ 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
+ * 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
@@ -477,6 +493,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;
@@ -654,6 +678,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;
@@ -965,6 +997,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);
@@ -1548,7 +1588,15 @@ 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.
+ */
igc_get_fw_version(hw, &fw);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
/* if option rom is valid, display its version too */
if (fw.or_valid) {
@@ -1638,6 +1686,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;
}
@@ -1646,6 +1702,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;
}
@@ -2188,6 +2252,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;
@@ -2207,6 +2275,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;
@@ -2270,6 +2342,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;
@@ -2771,6 +2851,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);
@@ -2807,6 +2895,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 = IGC_READ_REG(hw, IGC_TSYNCTXCTL);
if (!(val & IGC_TSYNCTXCTL_VALID))
return -EINVAL;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-04-08 15:39:06.475437904 +0800
+++ 0016-net-e1000-fix-crashes-in-secondary-processes.patch 2025-04-08 15:39:05.906436588 +0800
@@ -1 +1 @@
-From b0ef6e7a970bc745537c5b5140d838431f118c5e Mon Sep 17 00:00:00 2001
+From 63e8bec024d537684da0bdffa122de96b8c565b2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit b0ef6e7a970bc745537c5b5140d838431f118c5e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20,7 +22,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 | 13 +++
+ 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 | 96 ++++++++++++++++++
+ 6 files changed, 375 insertions(+)
@@ -63 +65 @@
-index c267431c5f..9790b58102 100644
+index c5af806b7b..07a1b12bcb 100644
@@ -75,5 +77,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 f6875b0762..e26930f1d6 100644
+--- a/drivers/net/e1000/em_ethdev.c
++++ b/drivers/net/e1000/em_ethdev.c
+@@ -543,6 +543,14 @@ eth_em_start(struct rte_eth_dev *dev)
@@ -94 +96 @@
-@@ -757,6 +765,14 @@ eth_em_stop(struct rte_eth_dev *dev)
+@@ -727,6 +735,14 @@ eth_em_stop(struct rte_eth_dev *dev)
@@ -109 +111 @@
-@@ -1048,6 +1064,10 @@ eth_em_rx_queue_intr_enable(struct rte_eth_dev *dev, __rte_unused uint16_t queue
+@@ -1016,6 +1032,10 @@ eth_em_rx_queue_intr_enable(struct rte_eth_dev *dev, __rte_unused uint16_t queue
@@ -120 +122 @@
-@@ -1059,6 +1079,10 @@ eth_em_rx_queue_intr_disable(struct rte_eth_dev *dev, __rte_unused uint16_t queu
+@@ -1027,6 +1047,10 @@ eth_em_rx_queue_intr_disable(struct rte_eth_dev *dev, __rte_unused uint16_t queu
@@ -131 +133 @@
-@@ -1688,6 +1712,14 @@ eth_em_led_on(struct rte_eth_dev *dev)
+@@ -1654,6 +1678,14 @@ eth_em_led_on(struct rte_eth_dev *dev)
@@ -146 +148 @@
-@@ -1697,6 +1729,14 @@ eth_em_led_off(struct rte_eth_dev *dev)
+@@ -1663,6 +1695,14 @@ eth_em_led_off(struct rte_eth_dev *dev)
@@ -161 +163 @@
-@@ -1758,6 +1798,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1724,6 +1764,14 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -176 +178 @@
-@@ -1809,6 +1857,14 @@ eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+@@ -1775,6 +1823,14 @@ eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
@@ -191 +193 @@
-@@ -1818,6 +1874,14 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
+@@ -1784,6 +1840,14 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
@@ -206 +208 @@
-@@ -1827,6 +1891,14 @@ static int
+@@ -1793,6 +1857,14 @@ static int
@@ -221 +223 @@
-@@ -1871,6 +1943,14 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
+@@ -1837,6 +1909,14 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
@@ -236,5 +238,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 222e359ed9..c83ce5bc80 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 +257 @@
-@@ -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 +272 @@
-@@ -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 +287 @@
-@@ -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 +302 @@
-@@ -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 +317 @@
-@@ -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 +332 @@
-@@ -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 +347 @@
-@@ -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 +362 @@
-@@ -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 +377 @@
-@@ -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 +392 @@
-@@ -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 +407 @@
-@@ -3207,6 +3295,14 @@ static int
+@@ -3156,6 +3244,14 @@ static int
@@ -420 +422 @@
-@@ -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 +437 @@
-@@ -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 +452 @@
-@@ -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 +467 @@
-@@ -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 +482 @@
-@@ -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 +497 @@
-@@ -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 +512 @@
-@@ -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 +527 @@
-@@ -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 +542 @@
-@@ -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 +557 @@
-@@ -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 +568 @@
-@@ -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 +579,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 690736b6d1..bc8e0e127c 100644
+--- a/drivers/net/igc/igc_ethdev.c
++++ b/drivers/net/igc/igc_ethdev.c
@@ -587 +589 @@
- #include "e1000_logs.h"
+ #include "igc_logs.h"
@@ -589 +591 @@
-@@ -397,6 +398,14 @@ eth_igc_set_link_up(struct rte_eth_dev *dev)
+@@ -392,6 +393,14 @@ eth_igc_set_link_up(struct rte_eth_dev *dev)
@@ -591 +593 @@
- struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -601,2 +603,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 +606 @@
-@@ -409,6 +418,14 @@ eth_igc_set_link_down(struct rte_eth_dev *dev)
+@@ -404,6 +413,13 @@ eth_igc_set_link_down(struct rte_eth_dev *dev)
@@ -606 +608 @@
- struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -610 +611,0 @@
-+ * function pointers, which are not guaranteed to be valid in secondary
@@ -616,2 +617,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 +620 @@
-@@ -482,6 +499,14 @@ eth_igc_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+@@ -477,6 +493,14 @@ eth_igc_link_update(struct rte_eth_dev *dev, int wait_to_complete)
@@ -634 +635 @@
-@@ -659,6 +684,14 @@ eth_igc_stop(struct rte_eth_dev *dev)
+@@ -654,6 +678,14 @@ eth_igc_stop(struct rte_eth_dev *dev)
@@ -649 +650 @@
-@@ -970,6 +1003,14 @@ eth_igc_start(struct rte_eth_dev *dev)
+@@ -965,6 +997,14 @@ eth_igc_start(struct rte_eth_dev *dev)
@@ -662,4 +663,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);
+@@ -1548,7 +1588,15 @@ eth_igc_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+ struct igc_fw_version fw;
@@ -672,0 +674 @@
+ igc_get_fw_version(hw, &fw);
@@ -676 +677,0 @@
- e1000_get_fw_version(hw, &fw);
@@ -679 +680,2 @@
-@@ -1643,6 +1692,14 @@ eth_igc_led_on(struct rte_eth_dev *dev)
+ if (fw.or_valid) {
+@@ -1638,6 +1686,14 @@ eth_igc_led_on(struct rte_eth_dev *dev)
@@ -681 +683 @@
- struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -691 +693 @@
- return e1000_led_on(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
+ return igc_led_on(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
@@ -694 +696 @@
-@@ -1651,6 +1708,14 @@ eth_igc_led_off(struct rte_eth_dev *dev)
+@@ -1646,6 +1702,14 @@ eth_igc_led_off(struct rte_eth_dev *dev)
@@ -696 +698 @@
- struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
+ struct igc_hw *hw = IGC_DEV_PRIVATE_HW(dev);
@@ -706 +708 @@
- return e1000_led_off(hw) == E1000_SUCCESS ? 0 : -ENOTSUP;
+ return igc_led_off(hw) == IGC_SUCCESS ? 0 : -ENOTSUP;
@@ -709 +711 @@
-@@ -2194,6 +2259,10 @@ eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -2188,6 +2252,10 @@ eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -720 +722 @@
-@@ -2213,6 +2282,10 @@ eth_igc_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -2207,6 +2275,10 @@ eth_igc_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -731 +733 @@
-@@ -2276,6 +2349,14 @@ eth_igc_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -2270,6 +2342,14 @@ eth_igc_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -746 +748 @@
-@@ -2777,6 +2858,14 @@ eth_igc_timesync_read_rx_timestamp(__rte_unused struct rte_eth_dev *dev,
+@@ -2771,6 +2851,14 @@ eth_igc_timesync_read_rx_timestamp(__rte_unused struct rte_eth_dev *dev,
@@ -761 +763 @@
-@@ -2813,6 +2902,14 @@ eth_igc_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
+@@ -2807,6 +2895,14 @@ eth_igc_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
@@ -773,2 +775,2 @@
- val = E1000_READ_REG(hw, E1000_TSYNCTXCTL);
- if (!(val & E1000_TSYNCTXCTL_VALID))
+ val = IGC_READ_REG(hw, IGC_TSYNCTXCTL);
+ if (!(val & IGC_TSYNCTXCTL_VALID))
next prev parent reply other threads:[~2025-04-08 8:03 UTC|newest]
Thread overview: 138+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 12:33 patch " Xueming Li
2025-02-18 12:33 ` patch 'test/ring: fix init with custom number of lcores' " Xueming Li
2025-02-18 12:33 ` patch 'vhost: clear ring addresses when getting vring base' " Xueming Li
2025-02-18 12:33 ` patch 'vhost: check GSO size validity' " Xueming Li
2025-02-18 12:33 ` patch 'vhost: fix log when setting max queue num' " Xueming Li
2025-02-18 12:34 ` patch 'vhost: reset packets count when not ready' " Xueming Li
2025-02-18 12:34 ` patch 'crypto/cnxk: fix build with GCC 15' " Xueming Li
2025-02-18 12:34 ` patch 'net/thunderx/base: " Xueming Li
2025-02-18 12:34 ` patch 'eal/x86: fix some intrinsics header include for Windows' " Xueming Li
2025-02-18 12:34 ` patch 'test/bonding: fix active backup receive test' " Xueming Li
2025-02-18 12:34 ` patch 'net/bonding: fix dedicated queue setup' " Xueming Li
2025-02-18 12:34 ` patch 'net/hns3: fix mbuf freeing in simple Tx path' " Xueming Li
2025-02-18 12:34 ` patch 'net/hns3: remove PVID info dump for VF' " Xueming Li
2025-02-18 12:34 ` patch 'net/hns3: rename RAS module' " Xueming Li
2025-02-18 12:34 ` patch 'net/sfc: remove unnecessary assignment' " Xueming Li
2025-02-18 12:34 ` patch 'net/mlx5: fix polling CQEs' " Xueming Li
2025-02-18 12:34 ` patch 'net/iavf: remove reset of Tx prepare function pointer' " Xueming Li
2025-02-18 12:34 ` patch 'net/ice: fix memory leak in scalar Rx' " Xueming Li
2025-02-18 12:34 ` patch 'common/cnxk: fix atomic load in batch ops' " Xueming Li
2025-02-18 12:34 ` patch 'common/cnxk: fix DPI mailbox structure' " Xueming Li
2025-02-18 12:34 ` patch 'eventdev: fix format string data type in log messages' " Xueming Li
2025-02-18 12:34 ` patch 'crypto/virtio: fix redundant queue free' " Xueming Li
2025-02-18 12:34 ` patch 'crypto/openssl: fix CMAC auth context update' " Xueming Li
2025-02-18 12:34 ` patch 'crypto/virtio: fix data queues iteration' " Xueming Li
2025-02-18 12:34 ` patch 'net/octeon_ep: remove useless assignment' " Xueming Li
2025-02-18 12:34 ` patch 'net/enetfec: " Xueming Li
2025-02-18 12:34 ` patch 'net/nfp: fix multiple PFs check from NSP' " Xueming Li
2025-02-18 12:34 ` patch 'net/nfp: fix misuse of function return values' " Xueming Li
2025-02-18 12:34 ` patch 'net/nfp: fix multi-PF control flag' " Xueming Li
2025-02-18 12:34 ` patch 'net/ice: fix flows handling' " Xueming Li
2025-02-18 12:34 ` patch 'net/cnxk: fix NIX send header L3 type' " Xueming Li
2025-02-18 12:34 ` patch 'gro: fix unprocessed IPv4 packets' " Xueming Li
2025-02-18 12:34 ` patch 'eal/linux: fix memseg length in legacy mem init' " Xueming Li
2025-02-18 12:34 ` patch 'buildtools: fix some Python regex syntax warnings' " Xueming Li
2025-02-18 12:34 ` patch 'use Python raw string notation' " Xueming Li
2025-02-18 12:34 ` patch 'net/af_packet: fix socket close on device stop' " Xueming Li
2025-02-18 12:34 ` patch 'ethdev: fix functions available in new device event' " Xueming Li
2025-02-18 12:34 ` patch 'vhost: add null callback checks' " Xueming Li
2025-02-18 12:34 ` patch 'build: force GCC 15 to initialize padding bits' " Xueming Li
2025-02-18 12:34 ` patch 'net/bnxt: fix indication of allocation' " Xueming Li
2025-02-18 12:34 ` patch 'net/bnxt: fix crash when representor is re-attached' " Xueming Li
2025-02-18 12:34 ` patch 'net/mlx5: fix Netlink socket leak' " Xueming Li
2025-02-18 12:34 ` patch 'net/mlx5: adjust actions per rule limitation' " Xueming Li
2025-02-18 12:34 ` patch 'net/mlx5: fix flush of non-template flow rules' " Xueming Li
2025-02-18 12:34 ` patch 'net/mlx5: fix GRE flow match with SWS' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix deadlock when writing i225 register' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix infinite loop' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix bitwise operation type' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: increase PHY power up delay' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: reset loop variable' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix LTR for i225' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix typo in LTR calculation' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix unused value' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix semaphore timeout " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix iterator type' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix MAC address hash bit shift' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix data type in MAC hash' " Xueming Li
2025-02-18 12:34 ` patch 'net/igc/base: fix NVM data type in bit shift' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix semaphore timeout value' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: correct mPHY access logic' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix iterator type' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix MAC address hash bit shift' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix data type in MAC hash' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix uninitialized variable' " Xueming Li
2025-02-18 12:34 ` patch 'net/e1000/base: fix bitwise operation type' " Xueming Li
2025-02-18 12:35 ` patch 'net/e1000/base: fix NVM data type in bit shift' " Xueming Li
2025-02-18 12:35 ` patch 'net/e1000/base: fix reset for 82580' " Xueming Li
2025-02-18 12:35 ` patch 'net/e1000/base: fix unchecked return' " Xueming Li
2025-02-18 12:35 ` patch 'net/e1000/base: skip management check for 82575' " Xueming Li
2025-02-18 12:35 ` patch 'common/idpf: fix void function returning a value' " Xueming Li
2025-02-18 12:35 ` patch 'net/intel: fix void functions " Xueming Li
2025-02-18 12:35 ` patch 'net/intel: fix build with icx' " Xueming Li
2025-02-18 12:35 ` patch 'net/hns3: fix copper port initialization' " Xueming Li
2025-02-18 12:35 ` patch 'net/hns3: fix reset timeout' " Xueming Li
2025-02-18 12:35 ` patch 'net/cpfl: fix representor parsing log' " Xueming Li
2025-02-18 12:35 ` patch 'raw/cnxk_gpio: fix file descriptor leak' " Xueming Li
2025-02-18 12:35 ` patch 'eal: fix devargs layers parsing out of bounds' " Xueming Li
2025-02-18 12:35 ` patch 'net/qede: fix debug messages array' " Xueming Li
2025-02-18 12:35 ` patch 'net/hinic: fix flow type bitmask overflow' " Xueming Li
2025-02-18 12:35 ` patch 'crypto/dpaa2_sec: fix bitmask truncation' " Xueming Li
2025-02-18 12:35 ` patch 'crypto/dpaa_sec: " Xueming Li
2025-02-18 12:35 ` patch 'event/dpaa: " Xueming Li
2025-02-18 12:35 ` patch 'net/dpaa: " Xueming Li
2025-02-18 12:35 ` patch 'net/dpaa2: " Xueming Li
2025-02-18 12:35 ` patch 'net/qede: fix nested loops' " Xueming Li
2025-02-18 12:35 ` patch 'examples/l3fwd: fix socket ID check' " Xueming Li
2025-02-18 12:35 ` patch 'common/cnxk: fix null " Xueming Li
2025-02-18 12:35 ` patch 'eal/linux: remove useless assignments' " Xueming Li
2025-02-18 12:35 ` patch 'mempool: fix errno in empty create' " Xueming Li
2025-04-08 7:44 ` patch " Xueming Li
2025-04-08 7:44 ` patch 'ci: build with MSVC in GHA' " Xueming Li
2025-04-08 7:44 ` patch 'net/netvsc: scan all net devices under the PCI device' " Xueming Li
2025-04-08 7:44 ` patch 'net/netvsc: remove device if its net devices removed' " Xueming Li
2025-04-08 7:44 ` patch 'doc: fix feature flags for queue start/stop' " Xueming Li
2025-04-08 7:44 ` patch 'app/testpmd: show all DCB priority TC map' " Xueming Li
2025-04-08 7:44 ` patch 'app/testpmd: avoid crash in DCB config' " Xueming Li
2025-04-08 7:44 ` patch 'net/mana: fix multi-process tracking' " Xueming Li
2025-04-08 7:44 ` patch 'app/testpmd: fix out-of-bound reference in offload config' " Xueming Li
2025-04-08 7:44 ` patch 'net/txgbe: remove useless condition for SW-FW sync' " Xueming Li
2025-04-08 7:44 ` patch 'bus/pci: fix registered device name' " Xueming Li
2025-04-08 7:44 ` patch 'vhost/crypto: skip fetch before vring init' " Xueming Li
2025-04-08 7:44 ` patch 'examples/vhost_crypto: fix user callbacks' " Xueming Li
2025-04-08 7:44 ` patch 'vhost: check descriptor chains length' " Xueming Li
2025-04-08 7:44 ` patch 'test/bbdev: update FFT test vectors' " Xueming Li
2025-04-08 8:01 ` patch 'test/event: fix number of queues in eventdev conf' " Xueming Li
2025-04-08 8:01 ` Xueming Li [this message]
2025-04-08 8:01 ` patch 'net/ixgbe: fix crashes in secondary processes' " Xueming Li
2025-04-08 8:01 ` patch 'net/ixgbe: fix minimum Rx/Tx descriptors' " Xueming Li
2025-04-08 8:01 ` patch 'net/mlx5/hws: fix fragmented packet type matching' " Xueming Li
2025-04-08 8:01 ` patch 'net/mlx5: fix leak in HWS flow counter action' " Xueming Li
2025-04-08 8:01 ` patch 'net/mlx5: fix hardware packet type translation' " Xueming Li
2025-04-08 8:01 ` patch 'common/cnxk: fix inbound IPsec SA setup' " Xueming Li
2025-04-08 8:01 ` patch 'stack: fix pop in C11 implementation' " Xueming Li
2025-04-08 8:01 ` patch 'test/crypto: fix AES-ECB test lengths' " Xueming Li
2025-04-08 8:01 ` patch 'examples/ipsec-secgw: fix IV length in CTR 192/256' " Xueming Li
2025-04-08 8:01 ` patch 'crypto/cnxk: fix asymmetric operation status code' " Xueming Li
2025-04-08 8:01 ` patch 'test/crypto: remove unused variable' " Xueming Li
2025-04-08 8:01 ` patch 'crypto/openssl: validate incorrect RSA signature' " Xueming Li
2025-04-08 8:01 ` patch 'test/crypto: fix check for OOP header data' " Xueming Li
2025-04-08 8:01 ` patch 'crypto/qat: fix SM3 state size' " Xueming Li
2025-04-08 8:01 ` patch 'test/dma: fix pointers in IOVA as PA mode' " Xueming Li
2025-04-08 8:01 ` patch 'net/iavf: fix mbuf release in Arm multi-process' " Xueming Li
2025-04-08 8:01 ` patch 'net/ice: fix flow engines order' " Xueming Li
2025-04-08 8:01 ` patch 'net/ice: fix dropped packets when using VRRP' " Xueming Li
2025-04-08 8:10 ` patch 'net/iavf: check interrupt registration failure' " Xueming Li
2025-04-08 8:10 ` patch 'net/iavf: fix crash on app exit on FreeBSD' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5: fix hairpin queue release' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5: fix LACP packet handling in isolated mode' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5/hws: fix crash using represented port without ID' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5/hws: fix GTP flags matching' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5: fix IPIP tunnel verification' " Xueming Li
2025-04-08 8:10 ` patch 'net/mlx5: fix GRE matching on root table' " Xueming Li
2025-04-08 8:10 ` patch 'pdump: clear statistics when enabled' " Xueming Li
2025-04-08 8:10 ` patch 'examples/ipsec-secgw: fix cryptodev and eventdev IDs' " Xueming Li
2025-04-08 8:16 ` patch 'eal: fix undetected NUMA nodes' " Xueming Li
2025-04-08 8:16 ` patch 'examples/ptpclient: fix message parsing' " Xueming Li
2025-04-08 8:16 ` patch 'net/nfp: fix VF link speed problem' " Xueming Li
2025-04-08 8:16 ` patch 'net/gve: allocate Rx QPL pages using malloc' " Xueming Li
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=20250408080214.371154-2-xuemingl@nvidia.com \
--to=xuemingl@nvidia.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).