Prerequisites
-------------
-- Requires firmware version **1.24.17.0** and higher. Visit
+- Requires firmware version **1.25.4.0** and higher. Visit
`Chelsio Download Center <http://service.chelsio.com>`_ to get latest firmware
bundled with the latest Chelsio Unified Wire package.
.. code-block:: console
- firmware-version: 1.24.17.0, TP 0.1.23.2
+ firmware-version: 1.25.4.0, TP 0.1.23.2
Running testpmd
~~~~~~~~~~~~~~~
EAL: PCI memory mapped at 0x7fd7c0200000
EAL: PCI memory mapped at 0x7fd77cdfd000
EAL: PCI memory mapped at 0x7fd7c10b7000
- PMD: rte_cxgbe_pmd: fw: 1.24.17.0, TP: 0.1.23.2
+ PMD: rte_cxgbe_pmd: fw: 1.25.4.0, TP: 0.1.23.2
PMD: rte_cxgbe_pmd: Coming up as MASTER: Initializing adapter
Interactive-mode selected
Configuring Port 0 (socket 0)
[...]
EAL: PCI device 0000:02:01.0 on NUMA socket 0
EAL: probe driver: 1425:5803 net_cxgbevf
- PMD: rte_cxgbe_pmd: Firmware version: 1.24.17.0
+ PMD: rte_cxgbe_pmd: Firmware version: 1.25.4.0
PMD: rte_cxgbe_pmd: TP Microcode version: 0.1.23.2
PMD: rte_cxgbe_pmd: Chelsio rev 0
PMD: rte_cxgbe_pmd: No bootstrap loaded
PMD: rte_cxgbe_pmd: 0000:02:01.0 Chelsio rev 0 1G/10GBASE-SFP
EAL: PCI device 0000:02:01.1 on NUMA socket 0
EAL: probe driver: 1425:5803 net_cxgbevf
- PMD: rte_cxgbe_pmd: Firmware version: 1.24.17.0
+ PMD: rte_cxgbe_pmd: Firmware version: 1.25.4.0
PMD: rte_cxgbe_pmd: TP Microcode version: 0.1.23.2
PMD: rte_cxgbe_pmd: Chelsio rev 0
PMD: rte_cxgbe_pmd: No bootstrap loaded
.. code-block:: console
- dev.t5nex.0.firmware_version: 1.24.17.0
+ dev.t5nex.0.firmware_version: 1.25.4.0
Running testpmd
~~~~~~~~~~~~~~~
EAL: PCI memory mapped at 0x8007ec000
EAL: PCI memory mapped at 0x842800000
EAL: PCI memory mapped at 0x80086c000
- PMD: rte_cxgbe_pmd: fw: 1.24.17.0, TP: 0.1.23.2
+ PMD: rte_cxgbe_pmd: fw: 1.25.4.0, TP: 0.1.23.2
PMD: rte_cxgbe_pmd: Coming up as MASTER: Initializing adapter
Interactive-mode selected
Configuring Port 0 (socket 0)
else
adap->params.max_tx_coalesce_num = ETH_COALESCE_PKT_NUM;
+ params[0] = CXGBE_FW_PARAM_DEV(VI_ENABLE_INGRESS_AFTER_LINKUP);
+ ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, params, val);
+ adap->params.vi_enable_rx = (ret == 0 && val[0] != 0);
+
/*
* The MTU/MSS Table is initialized by now, so load their values. If
* we're initializing the adapter, then we'll make any modifications
pi->port_id, pi->link_cfg.mod_type);
}
+void t4_os_link_changed(struct adapter *adap, int port_id)
+{
+ struct port_info *pi = adap2pinfo(adap, port_id);
+
+ /* If link status has not changed or if firmware doesn't
+ * support enabling/disabling VI's Rx path during runtime,
+ * then return.
+ */
+ if (adap->params.vi_enable_rx == 0 ||
+ pi->vi_en_rx == pi->link_cfg.link_ok)
+ return;
+
+ /* Don't enable VI Rx path, if link has been administratively
+ * turned off.
+ */
+ if (pi->vi_en_tx == 0 && pi->vi_en_rx == 0)
+ return;
+
+ /* When link goes down, disable the port's Rx path to drop
+ * Rx traffic closer to the wire, instead of processing it
+ * further in the Rx pipeline. The Rx path will be re-enabled
+ * once the link up message comes in firmware event queue.
+ */
+ pi->vi_en_rx = pi->link_cfg.link_ok;
+ t4_enable_vi(adap, adap->mbox, pi->viid, pi->vi_en_rx, pi->vi_en_tx);
+}
+
bool cxgbe_force_linkup(struct adapter *adap)
{
if (is_pf4(adap))
if (ret == 0 && is_pf4(adapter))
ret = t4_link_l1cfg(pi, pi->link_cfg.admin_caps);
if (ret == 0) {
- /*
- * Enabling a Virtual Interface can result in an interrupt
- * during the processing of the VI Enable command and, in some
- * paths, result in an attempt to issue another command in the
- * interrupt context. Thus, we disable interrupts during the
- * course of the VI Enable command ...
+ /* Disable VI Rx until link up message is received in
+ * firmware event queue, if firmware supports enabling/
+ * disabling VI Rx at runtime.
*/
+ pi->vi_en_rx = adapter->params.vi_enable_rx ? 0 : 1;
+ pi->vi_en_tx = 1;
ret = t4_enable_vi_params(adapter, adapter->mbox, pi->viid,
- true, true, false);
+ pi->vi_en_rx, pi->vi_en_tx, false);
}
if (ret == 0 && cxgbe_force_linkup(adapter))
struct adapter *adapter = pi->adapter;
int err = 0;
- err = t4_enable_vi(adapter, adapter->mbox, pi->viid, status, status);
+ /* Wait for link up message from firmware to enable Rx path,
+ * if firmware supports enabling/disabling VI Rx at runtime.
+ */
+ pi->vi_en_rx = adapter->params.vi_enable_rx ? 0 : status;
+ pi->vi_en_tx = status;
+ err = t4_enable_vi(adapter, adapter->mbox, pi->viid, pi->vi_en_rx,
+ pi->vi_en_tx);
if (err) {
dev_err(adapter, "%s: disable_vi failed: %d\n", __func__, err);
return err;