patch 'net/ixgbe: add option for link up check on pin SDP3' has been queued to stable release 19.11.13
christian.ehrhardt at canonical.com
christian.ehrhardt at canonical.com
Thu Jul 7 09:54:41 CEST 2022
Hi,
FYI, your patch has been queued to stable release 19.11.13
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/2ed9b68967bc8e8ec3e0af4aa046ffac911ab8d7
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From 2ed9b68967bc8e8ec3e0af4aa046ffac911ab8d7 Mon Sep 17 00:00:00 2001
From: Jeff Daly <jeffd at silicom-usa.com>
Date: Tue, 10 May 2022 14:57:25 -0400
Subject: [PATCH] net/ixgbe: add option for link up check on pin SDP3
[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]
1ca05831b9b added a check that SDP3 (used as a TX_DISABLE output to the
SFP cage on these cards) is not asserted to avoid incorrectly reporting
link up when the SFP's laser is turned off.
ff8162cb957 limited this workaround to fiber ports
This patch:
* Adds devarg 'fiber_sdp3_no_tx_disable' not all fiber ixgbe devs use
SDP3 as TX_DISABLE
Fixes: 1ca05831b9b ("net/ixgbe: fix link status")
Fixes: ff8162cb957 ("net/ixgbe: fix link status")
Signed-off-by: Jeff Daly <jeffd at silicom-usa.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
doc/guides/nics/ixgbe.rst | 17 ++++++++++++++
drivers/net/ixgbe/ixgbe_ethdev.c | 39 +++++++++++++++++++++++++++++++-
drivers/net/ixgbe/ixgbe_ethdev.h | 3 +++
3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 6ca2a33f09..8305bf0dbb 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -82,6 +82,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
fdir_conf->mode will also be checked.
+Disable SDP3 TX_DISABLE for Fiber Links
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following ``devargs`` option can be enabled at runtime. It must
+be passed as part of EAL arguments. For example,
+
+.. code-block:: console
+
+ dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i
+
+- ``fiber_sdp3_no_tx_disable`` (default **0**)
+
+ Not all IXGBE implementations with SFP cages use the SDP3 signal as
+ TX_DISABLE as a means to disable the laser on fiber SFP modules.
+ This option informs the driver that in this case, SDP3 is not to be
+ used as a check for link up by testing for laser on/off.
+
VF Runtime Options
^^^^^^^^^^^^^^^^^^
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b06ff64faa..65d81c6cec 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -128,6 +128,13 @@
#define IXGBE_EXVET_VET_EXT_SHIFT 16
#define IXGBE_DMATXCTL_VT_MASK 0xFFFF0000
+#define IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "fiber_sdp3_no_tx_disable"
+
+static const char * const ixgbe_valid_arguments[] = {
+ IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+ NULL
+};
+
#define IXGBEVF_DEVARG_PFLINK_FULLCHK "pflink_fullchk"
static const char * const ixgbevf_valid_arguments[] = {
@@ -381,6 +388,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
static int ixgbe_filter_restore(struct rte_eth_dev *dev);
static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
static int ixgbe_wait_for_link_up(struct ixgbe_hw *hw);
+static int devarg_handle_int(__rte_unused const char *key, const char *value,
+ void *extra_args);
/*
* Define VF Stats MACRO for Non "cleared on read" register
@@ -1085,6 +1094,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
ixgbe_release_swfw_semaphore(hw, mask);
}
+static void
+ixgbe_parse_devargs(struct ixgbe_adapter *adapter,
+ struct rte_devargs *devargs)
+{
+ struct rte_kvargs *kvlist;
+ uint16_t sdp3_no_tx_disable;
+
+ if (devargs == NULL)
+ return;
+
+ kvlist = rte_kvargs_parse(devargs->args, ixgbe_valid_arguments);
+ if (kvlist == NULL)
+ return;
+
+ if (rte_kvargs_count(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE) == 1 &&
+ rte_kvargs_process(kvlist, IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE,
+ devarg_handle_int, &sdp3_no_tx_disable) == 0 &&
+ sdp3_no_tx_disable == 1)
+ adapter->sdp3_no_tx_disable = 1;
+
+ rte_kvargs_free(kvlist);
+}
+
/*
* This function is based on code in ixgbe_attach() in base/ixgbe.c.
* It returns 0 on success.
@@ -1145,6 +1177,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
}
rte_atomic32_clear(&ad->link_thread_running);
+ ixgbe_parse_devargs(eth_dev->data->dev_private,
+ pci_dev->device.devargs);
rte_eth_copy_pci_info(eth_dev, pci_dev);
/* Vendor and Device ID need to be set before init of shared code */
@@ -4321,7 +4355,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
return rte_eth_linkstatus_set(dev, &link);
}
- if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
+ if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber &&
+ !ad->sdp3_no_tx_disable) {
esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
if ((esdp_reg & IXGBE_ESDP_SDP3))
link_up = 0;
@@ -9183,6 +9218,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe,
+ IXGBE_DEVARG_FIBER_SDP3_NOT_TX_DISABLE "=<0|1>");
RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index e406b754e8..77ed07cf4c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -509,6 +509,9 @@ struct ixgbe_adapter {
/* For RSS reta table update */
uint8_t rss_reta_updated;
+ /* Used for limiting SDP3 TX_DISABLE checks */
+ uint8_t sdp3_no_tx_disable;
+
/* Used for VF link sync with PF's physical and logical (by checking
* mailbox status) link status.
*/
--
2.37.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-07-07 09:54:13.118996628 +0200
+++ 0046-net-ixgbe-add-option-for-link-up-check-on-pin-SDP3.patch 2022-07-07 09:54:10.929824395 +0200
@@ -1 +1 @@
-From 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 Mon Sep 17 00:00:00 2001
+From 2ed9b68967bc8e8ec3e0af4aa046ffac911ab8d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f9fb100f6c6ed1dcadaf76352f4b4f2bd5501f6 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 82fa453fa2..ad1a3da610 100644
+index 6ca2a33f09..8305bf0dbb 100644
@@ -32 +33 @@
-@@ -101,6 +101,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
+@@ -82,6 +82,23 @@ To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be ch
@@ -57 +58 @@
-index 2da3f67bbc..f31bbb7895 100644
+index b06ff64faa..65d81c6cec 100644
@@ -74 +75 @@
-@@ -348,6 +355,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
+@@ -381,6 +388,8 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
@@ -83 +84 @@
-@@ -1032,6 +1041,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
+@@ -1085,6 +1094,29 @@ ixgbe_swfw_lock_reset(struct ixgbe_hw *hw)
@@ -113 +114 @@
-@@ -1095,6 +1127,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1145,6 +1177,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -120 +120,0 @@
- eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
@@ -122 +122,2 @@
-@@ -4261,7 +4295,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+ /* Vendor and Device ID need to be set before init of shared code */
+@@ -4321,7 +4355,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -132 +133 @@
-@@ -8250,6 +8285,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
+@@ -9183,6 +9218,8 @@ ixgbe_dev_macsec_register_disable(struct rte_eth_dev *dev)
@@ -142 +143 @@
-index 69e0e82a5b..cc6049a66a 100644
+index e406b754e8..77ed07cf4c 100644
@@ -145 +146 @@
-@@ -501,6 +501,9 @@ struct ixgbe_adapter {
+@@ -509,6 +509,9 @@ struct ixgbe_adapter {
More information about the stable
mailing list