cxgbe: RX perf fixes, doc update, and add support for more devices
cover cxgbe: RX perf fixes, doc update, and add support for more devices
This series of patches do the following:
1. RX performance fixes for cxgbe Poll Mode Driver.
2. Add more supported Chelsio T5 device ids.
3. Update cxgbe documentation to include instructions on how to flash firmware and enable/disable flow control. Also, provide a list of supported Chelsio T5 devices.
Rahul Lakkireddy (3):
cxgbe: Fix RX performance for cxgbe PMD.
cxgbe: Add more supported Chelsio T5 devices.
doc: Update cxgbe documentation
doc/guides/nics/cxgbe.rst | 84 ++++++++++- drivers/net/cxgbe/base/adapter.h | 2 + drivers/net/cxgbe/base/t4_pci_id_tbl.h | 3 + drivers/net/cxgbe/base/t4_regs_values.h | 1 + drivers/net/cxgbe/sge.c | 239 ++++++++++++-------------------- 5 files changed, 175 insertions(+), 154 deletions(-)
Signature · 1 line
2.4.1
PATCH 1/3 cxgbe: Fix RX performance for cxgbe PMD.
CXGBE PMD rx allocates a new mbuf everytime, which could lead to performance hit. Instead, do bulk allocation of mbufs and re-use them.
Also, simplify the overall rx-handler, and update its logic to fix rx perf.
--- drivers/net/cxgbe/base/adapter.h | 2 + drivers/net/cxgbe/base/t4_regs_values.h | 1 + drivers/net/cxgbe/sge.c | 239 ++++++++++++-------------------- 3 files changed, 89 insertions(+), 153 deletions(-)
drivers/net/cxgbe/base/adapter.h +2 -0
@@ -149,6 +149,7 @@ struct sge_rspq { /* state for an SGE response queue */unsigned int bar2_qid;/* Queue ID for BAR2 Queue registers */ unsigned int cidx;/* consumer index */ +unsigned int gts_idx;/* last gts write sent */ unsigned int iqe_len;/* entry size */ unsigned int size;/* capacity of response queue */ int offset;/* offset into current Rx buffer */
@@ -157,6 +158,7 @@ struct sge_rspq { /* state for an SGE response queue */u8 intr_params;/* interrupt holdoff parameters */ u8 next_intr_params;/* holdoff params for next interrupt */ u8 pktcnt_idx;/* interrupt packet threshold */ +u8 port_id;/* associated port-id */ u8 idx;/* queue index within its group */ u16 cntxt_id;/* SGE relative QID for the response Q */ u16 abs_id;/* absolute SGE id for the response q */
drivers/net/cxgbe/base/t4_regs_values.h +1 -0
@@ -68,6 +68,7 @@* Egress Context field values */ #define X_FETCHBURSTMIN_64B 2 +#define X_FETCHBURSTMIN_128B 3#define X_FETCHBURSTMAX_256B 2#define X_FETCHBURSTMAX_512B 3
drivers/net/cxgbe/sge.c +86 -153
349 lines not on this page · raw message
Signature · 1 line
2.4.1
Re: [PATCH 1/3] cxgbe: Fix RX performance for cxgbe PMD.
2015-07-07 22:42, Rahul Lakkireddy:
Quoted 4 lines
CXGBE PMD rx allocates a new mbuf everytime, which could lead to performance hit. Instead, do bulk allocation of mbufs and re-use them.
Also, simplify the overall rx-handler, and update its logic to fix rx perf.
For such change, it would be nice to provide some benchmark numbers. Thanks
Re: [PATCH 1/3] cxgbe: Fix RX performance for cxgbe PMD.
Hi Thomas,
Quoted 8 lines · Thomas Monjalon
2015-07-07 22:42, Rahul Lakkireddy:
Quoted 4 lines
CXGBE PMD rx allocates a new mbuf everytime, which could lead to performance hit. Instead, do bulk allocation of mbufs and re-use them.
Also, simplify the overall rx-handler, and update its logic to fix rx perf.
For such change, it would be nice to provide some benchmark numbers. Thanks
On my setup having T580-CR card which is 2-port 40G, I see Rx PPS improving for 64 byte size from ~25Mpps to ~37Mpps on single port. Similarly, roughly 10 Mpps improvement is seen for dual port also.
And for IO size 128 bytes, approx. 3Mpps improvement is seen. Of course, my setup is not a powerful one as used by our QA team. Nevertheless, the improvement is visible in my setup also.
Thanks,
Rahul
PATCH 2/3 cxgbe: Add more supported Chelsio T5 devices.
In reply to Rahul LakkireddyUpdate pci id table to include more supported Chelsio T5 devices.
--- drivers/net/cxgbe/base/t4_pci_id_tbl.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/cxgbe/base/t4_pci_id_tbl.h +3 -0
@@ -141,6 +141,9 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGINCH_PCI_ID_TABLE_FENTRY (0x5087 ),/* Custom T580-CR */ CH_PCI_ID_TABLE_FENTRY (0x5088 ),/* Custom T570-CR */ CH_PCI_ID_TABLE_FENTRY (0x5089 ),/* Custom T520-CR */ +CH_PCI_ID_TABLE_FENTRY (0x5090 ),/* Custom T540-CR */ +CH_PCI_ID_TABLE_FENTRY (0x5091 ),/* Custom T522-CR */ +CH_PCI_ID_TABLE_FENTRY (0x5092 ),/* Custom T520-CR */ CH_PCI_DEVICE_ID_TABLE_DEFINE_END ;#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */
Signature · 1 line
2.4.1
PATCH 3/3 doc: Update cxgbe documentation
In reply to Rahul LakkireddyUpdate cxgbe documentation with the following:
1. Add instructions on how to flash firmware and config file on Chelsio T5 devices.
2. Add a list of supported devices.
3. Add instructions on how to enable and disable flow control via testpmd.
--- doc/guides/nics/cxgbe.rst | 84 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-)
doc/guides/nics/cxgbe.rst +83 -1
@@ -102,7 +102,72 @@ Prerequisites ------------- - Requires firmware version **1.13.32.0** and higher. Visit - `Chelsio Communications <http://www.chelsio.com>`_ to get latest firmware. + `Chelsio Download Center <http://service.chelsio.com>`_ to get latest firmware + bundled with the latest Chelsio Unified Wire package. Installing and loading + the latest cxgb4 kernel driver from the Chelsio Unified Wire package should + get you the latest firmware. More information can be obtained from the User + Guide that is bundled with the Chelsio Unified Wire package. + +Steps to manually install the latest firmware from the downloaded source files +are as follows: + +#. Load the kernel module: + + .. code-block:: console + + modprobe cxgb4 + +#. Use ifconfig to get the interface name assigned to Chelsio card: + + .. code-block:: console + + ifconfig -a | grep "00:07:43" + + Example output: + + .. code-block:: console + + p1p1 Link encap:Ethernet HWaddr 00:07:43:2D:EA:C0 + p1p2 Link encap:Ethernet HWaddr 00:07:43:2D:EA:C8 + +#. Install cxgbtool: + + .. code-block:: console + + cd <path_to_uwire>/tools/cxgbtool + make install + +#. Use cxgbtool to load the firmware config file onto the card: + + .. code-block:: console + + cxgbtool p1p1 loadcfg <path_to_uwire>/src/network/firmware/t5-config.txt + +#. Use cxgbtool to load the firmware image onto the card: + + .. code-block:: console + + cxgbtool p1p1 loadfw <path_to_uwire>/src/network/firmware/t5fw-*.bin + +#. Verify with ethtool: + + .. code-block:: console + + ethtool -i p1p1 | grep "firmware" + + Example output: + + .. code-block:: console + + firmware-version: 1.13.32.0, TP 0.1.4.8 + +Supported Chelsio T5 NICs +------------------------- + +- 1G NICs: T502-BT +- 10G NICs: T520-BT, T520-CR, T520-LL-CR, T520-SO-CR, T540-CR +- 40G NICs: T580-CR, T580-LP-CR, T580-SO-CR +- Other T5 NICs: T522-CR Sample Application Notes -------------------------
@@ -207,3 +272,20 @@ devices managed by librte_pmd_cxgbe. Port 1 Link Up - speed 10000 Mbps - full-duplex Done testpmd> + +.. note:: + + Flow control pause TX/RX is disabled by default and can be enabled via + testpmd as follows: + + .. code-block:: console + + testpmd> set flow_ctrl rx on tx on 0 0 0 0 mac_ctrl_frame_fwd off autoneg on 0 + testpmd> set flow_ctrl rx on tx on 0 0 0 0 mac_ctrl_frame_fwd off autoneg on 1 + + To disable again, use: + + .. code-block:: console + + testpmd> set flow_ctrl rx off tx off 0 0 0 0 mac_ctrl_frame_fwd off autoneg off 0 + testpmd> set flow_ctrl rx off tx off 0 0 0 0 mac_ctrl_frame_fwd off autoneg off 1
Signature · 1 line
2.4.1
Thomas Monjalon
Applied2015-07-07 22:42, Rahul Lakkireddy:
Quoted 11 lines
This series of patches do the following:
1. RX performance fixes for cxgbe Poll Mode Driver.
2. Add more supported Chelsio T5 device ids.
3. Update cxgbe documentation to include instructions on how to flash firmware and enable/disable flow control. Also, provide a list of supported Chelsio T5 devices.Rahul Lakkireddy (3):
cxgbe: Fix RX performance for cxgbe PMD.
cxgbe: Add more supported Chelsio T5 devices.
doc: Update cxgbe documentation
Applied, thanks