raw/ntb: refactor to support NTB on 5th Gen Intel Xeon
PATCH 1/1 raw/ntb: refactor to support NTB on 5th Gen Intel Xeon
Refactor to support for 5th Gen Intel Xeon Scalable processors. Note that NTB devices within the 3rd, 4th and 5th Gen Intel Xeon Scalable processors share the same device id, and compliant to PCIe 4.0 spec.
It is more reasonable to distinguish NTB devices by their PCIe generation.
--- doc/guides/rawdevs/ntb.rst | 7 +- doc/guides/rel_notes/release_24_03.rst | 4 + drivers/raw/ntb/ntb.c | 8 +- drivers/raw/ntb/ntb.h | 5 +- drivers/raw/ntb/ntb_hw_intel.c | 182 +++++++++++-------------- drivers/raw/ntb/ntb_hw_intel.h | 90 ++++++------ usertools/dpdk-devbind.py | 8 +- 7 files changed, 149 insertions(+), 155 deletions(-)
doc/guides/rawdevs/ntb.rst +4 -3
@@ -153,6 +153,7 @@ Limitation This PMD is only supported on Intel Xeon Platforms: -- 4th Generation Intel® Xeon® Scalable Processors. -- 3rd Generation Intel® Xeon® Scalable Processors. -- 2nd Generation Intel® Xeon® Scalable Processors. +- 5th Generation Intel® Xeon® Scalable Processors. (NTB GEN4 device id: 0x347E) +- 4th Generation Intel® Xeon® Scalable Processors. (NTB GEN4 device id: 0x347E) +- 3rd Generation Intel® Xeon® Scalable Processors. (NTB GEN4 device id: 0x347E) +- 2nd Generation Intel® Xeon® Scalable Processors. (NTB GEN3 device id: 0x201C)
doc/guides/rel_notes/release_24_03.rst +4 -0
@@ -55,6 +55,10 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added support for Intel NTB with 5th Gen Intel Xeon Scalable processors..** + +Added NTB device (4th generation) support for the 5th Gen Intel Xeon Platforms. + * **Improved support of RSS hash algorithm.** * Added new function ``rte_eth_find_rss_algo`` to get RSS hash
drivers/raw/ntb/ntb.c +4 -4
@@ -24,8 +24,8 @@#include "ntb.h" static const struct rte_pci_id pci_id_ntb_map[] = { - {RTE_PCI_DEVICE (NTB_INTEL_VENDOR_ID ,NTB_INTEL_DEV_ID_B2B_SKX ) }, - {RTE_PCI_DEVICE (NTB_INTEL_VENDOR_ID ,NTB_INTEL_DEV_ID_B2B_ICX ) }, + {RTE_PCI_DEVICE (NTB_INTEL_VENDOR_ID ,NTB_INTEL_DEV_ID_B2B_GEN3 ) }, + {RTE_PCI_DEVICE (NTB_INTEL_VENDOR_ID ,NTB_INTEL_DEV_ID_B2B_GEN4 ) }, { .vendor_id =0 ,/* sentinel */ }, };
@@ -1378,8 +1378,8 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev) hw->link_width =NTB_WIDTH_NONE ;switch (pci_dev->id.device_id) { -case NTB_INTEL_DEV_ID_B2B_SKX : -case NTB_INTEL_DEV_ID_B2B_ICX : +case NTB_INTEL_DEV_ID_B2B_GEN3 : +case NTB_INTEL_DEV_ID_B2B_GEN4 : hw->ntb_ops = &intel_ntb_ops;break ;default :
drivers/raw/ntb/ntb.h +2 -3
@@ -17,9 +17,8 @@ extern int ntb_logtype;#define NTB_INTEL_VENDOR_ID 0x8086/* Device IDs */ -#define NTB_INTEL_DEV_ID_B2B_SKX 0x201C -#define NTB_INTEL_DEV_ID_B2B_ICX 0x347E -#define NTB_INTEL_DEV_ID_B2B_SPR 0x347E +#define NTB_INTEL_DEV_ID_B2B_GEN3 0x201C +#define NTB_INTEL_DEV_ID_B2B_GEN4 0x347E/* Reserved to app to use. */ #define NTB_SPAD_USER "spad_user_"
drivers/raw/ntb/ntb_hw_intel.c +80 -102
327 lines not on this page · raw message
drivers/raw/ntb/ntb_hw_intel.h +52 -38
122 lines not on this page · raw message
usertools/dpdk-devbind.py +3 -5
@@ -60,10 +60,8 @@ 'SVendor': None, 'SDevice': None} intel_idxd_spr = {'Class': '08', 'Vendor': '8086', 'Device': '0b25', 'SVendor': None, 'SDevice': None} -intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c', - 'SVendor': None, 'SDevice': None} -intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e', - 'SVendor': None, 'SDevice': None} +intel_ntb = {'Class': '06', 'Vendor': '8086', 'Device': '201c,347e', + 'SVendor': None, 'SDevice': None} cnxk_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f9,a0fa', 'SVendor': None, 'SDevice': None}
@@ -89,7 +87,7 @@ regex_devices = [cn9k_ree] ml_devices = [cnxk_ml] misc_devices = [cnxk_bphy, cnxk_bphy_cgx, cnxk_inl_dev, - intel_ntb_skx, intel_ntb_icx, + intel_ntb, virtio_blk] # global dict ethernet devices present. Dictionary indexed by PCI address.
Signature · 1 line
2.34.1
Quoted 9 lines · On Wed, 6 Dec 2023 11:00:25 +0800 Junfeng Guo <[email protected]> wrote:
Refactor to support for 5th Gen Intel Xeon Scalable processors. Note that NTB devices within the 3rd, 4th and 5th Gen Intel Xeon Scalable processors share the same device id, and compliant to PCIe 4.0 spec.
It is more reasonable to distinguish NTB devices by their PCIe generation.Signed-off-by Junfeng Guo <[email protected]>--- doc/guides/rawdevs/ntb.rst | 7 +- doc/guides/rel_notes/release_24_03.rst | 4 +
Needs to be rebased to target the correct release note.