raw/ntb: add Icelake support for Intel NTB
PATCH 1/1 raw/ntb: add Icelake support for Intel NTB
Add NTB device support (4th generation) for Intel Icelake platform.
--- doc/guides/rawdevs/ntb.rst | 11 +- doc/guides/rel_notes/release_20_11.rst | 3 + drivers/raw/ntb/ntb.c | 2 + drivers/raw/ntb/ntb.h | 1 + drivers/raw/ntb/ntb_hw_intel.c | 236 ++++++++++++++++++++++--- drivers/raw/ntb/ntb_hw_intel.h | 28 ++- usertools/dpdk-devbind.py | 4 +- 7 files changed, 246 insertions(+), 39 deletions(-)
doc/guides/rawdevs/ntb.rst +6 -5
@@ -14,16 +14,17 @@ allocation for the peer to access and read/write allocated memory from peer. Also, the PMD allows to use doorbell registers to notify the peer and share some information by using scratchpad registers. -BIOS setting on Intel Skylake ------------------------------ +BIOS setting on Intel Xeon +-------------------------- Intel Non-transparent Bridge needs special BIOS setting. Since the PMD only supports Intel Skylake platform, introduce BIOS setting here. The referencce is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf - Set the needed PCIe port as NTB to NTB mode on both hosts. -- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (2K-512M) - on both hosts. Note that bar size on both hosts should be the same. +- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (4K-512M) + on both hosts (for Icelake, bar size can be set as 12-51, namely 4K-128PB). + Note that bar size on both hosts should be the same. - Disable split bars for both hosts. - Set crosslink control override as DSD/USP on one host, USD/DSP on another host.
@@ -151,4 +152,4 @@ like the following: Limitation ---------- -- This PMD only supports Intel Skylake platform. +- This PMD only supports Intel Skylake and Icelake platforms.
doc/guides/rel_notes/release_20_11.rst +3 -0
@@ -55,6 +55,9 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added Icelake (Gen4) support for Intel NTB.** + + Added NTB device support (4th generation) for Intel Icelake platform. Removed Items -------------
drivers/raw/ntb/ntb.c +2 -0
@@ -25,6 +25,7 @@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 ) }, { .vendor_id =0 ,/* sentinel */ }, };
@@ -1333,6 +1334,7 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)switch (pci_dev->id.device_id) {case NTB_INTEL_DEV_ID_B2B_SKX : +case NTB_INTEL_DEV_ID_B2B_ICX : hw->ntb_ops = &intel_ntb_ops;break ;default :
drivers/raw/ntb/ntb.h +1 -0
@@ -18,6 +18,7 @@ extern int ntb_logtype;/* Device IDs */ #define NTB_INTEL_DEV_ID_B2B_SKX 0x201C +#define NTB_INTEL_DEV_ID_B2B_ICX 0x347E/* Reserved to app to use. */ #define NTB_SPAD_USER "spad_user_"
drivers/raw/ntb/ntb_hw_intel.c +207 -29
307 lines not on this page · raw message
drivers/raw/ntb/ntb_hw_intel.h +24 -4
@@ -22,7 +22,7 @@#define NTB_LNK_STA_SPEED (x) ((x) & NTB_LNK_STA_SPEED_MASK)#define NTB_LNK_STA_WIDTH (x) (((x) & NTB_LNK_STA_WIDTH_MASK) >> 4) -/* Intel Skylake Xeon hardware */ +/* Intel Xeon hardware */ #define XEON_IMBAR1SZ_OFFSET 0x00d0#define XEON_IMBAR2SZ_OFFSET 0x00d1#define XEON_EMBAR1SZ_OFFSET 0x00d2
@@ -31,7 +31,13 @@#define XEON_DEVSTS_OFFSET 0x009a#define XEON_UNCERRSTS_OFFSET 0x014c#define XEON_CORERRSTS_OFFSET 0x0158 -#define XEON_LINK_STATUS_OFFSET 0x01a2 +#define XEON_GEN3_LINK_STATUS_OFFSET 0x01a2 +/* Link status and PPD are in MMIO but not config space for Gen4 NTB */ +#define XEON_GEN4_PPD0_OFFSET 0xb0d4 +#define XEON_GEN4_PPD1_OFFSET 0xb4c0 +#define XEON_GEN4_LINK_CTRL_OFFSET 0xb050 +#define XEON_GEN4_LINK_STATUS_OFFSET 0xb052 +#define XEON_GEN4_LINK_CTRL_LINK_DIS 0x0010#define XEON_NTBCNTL_OFFSET 0x0000#define XEON_BAR_INTERVAL_OFFSET 0x0010
@@ -39,13 +45,18 @@#define XEON_IMBAR1XLMT_OFFSET 0x0018/* SBAR2LMT */ #define XEON_IMBAR2XBASE_OFFSET 0x0020/* SBAR4XLAT */ #define XEON_IMBAR2XLMT_OFFSET 0x0028/* SBAR4LMT */ +#define XEON_GEN4_XBASEIDX_INTERVAL 0x0002 +#define XEON_GEN4_IM1XBASEIDX_OFFSET 0x0074 +#define XEON_GEN4_IM2XBASEIDX_OFFSET 0x0076#define XEON_IM_INT_STATUS_OFFSET 0x0040#define XEON_IM_INT_DISABLE_OFFSET 0x0048#define XEON_IM_SPAD_OFFSET 0x0080/* SPAD */ +#define XEON_GEN3_B2B_SPAD_OFFSET 0x0180/* GEN3 B2B SPAD */ +#define XEON_GEN4_B2B_SPAD_OFFSET 0x8080/* GEN4 B2B SPAD */ #define XEON_USMEMMISS_OFFSET 0x0070 -#define XEON_INTVEC_OFFSET 0x00d0 +#define XEON_GEN3_INTVEC_OFFSET 0x00d0 +#define XEON_GEN4_INTVEC_OFFSET 0x0050#define XEON_IM_DOORBELL_OFFSET 0x0100/* SDOORBELL0 */ -#define XEON_B2B_SPAD_OFFSET 0x0180/* B2B SPAD */ #define XEON_EMBAR0XBASE_OFFSET 0x4008/* B2B_XLAT */ #define XEON_EMBAR1XBASE_OFFSET 0x4010/* PBAR2XLAT */ #define XEON_EMBAR1XLMT_OFFSET 0x4018/* PBAR2LMT */
@@ -60,6 +71,7 @@#define XEON_EMBAR1_OFFSET 0x4518/* SBAR23BASE */ #define XEON_EMBAR2_OFFSET 0x4520/* SBAR45BASE */ +#define XEON_PPD_OFFSET 0x00d4#define XEON_PPD_CONN_MASK 0x03#define XEON_PPD_CONN_TRANSPARENT 0x00
@@ -70,6 +82,14 @@#define XEON_PPD_DEV_DSD 0x10#define XEON_PPD_SPLIT_BAR_MASK 0x40 +#define XEON_GEN4_PPD_CONN_MASK 0x0300 +#define XEON_GEN4_PPD_CONN_B2B 0x0200 +#define XEON_GEN4_PPD_DEV_MASK 0x1000 +#define XEON_GEN4_PPD_DEV_DSD 0x1000 +#define XEON_GEN4_PPD_DEV_USD 0x0000 +#define XEON_GEN4_PPD_LINKTRN 0x0008 +#define XEON_GEN4_SLOTSTS 0xb05a +#define XEON_GEN4_SLOTSTS_DLLSCS 0x100#define XEON_MW_COUNT 2
usertools/dpdk-devbind.py +3 -1
@@ -53,6 +53,8 @@ '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} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class]
@@ -60,7 +62,7 @@ eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] -misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, octeontx2_dma] +misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, intel_ntb_icx, octeontx2_dma] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties
Signature · 1 line
2.17.1
PATCH v2 1/1 raw/ntb: add Icelake support for Intel NTB
Add NTB device support (4th generation) for Intel Icelake platform.
--- doc/guides/rawdevs/ntb.rst | 16 +- doc/guides/rel_notes/release_20_11.rst | 3 + drivers/raw/ntb/ntb.c | 5 + drivers/raw/ntb/ntb.h | 1 + drivers/raw/ntb/ntb_hw_intel.c | 229 +++++++++++++++++++++---- drivers/raw/ntb/ntb_hw_intel.h | 28 ++- usertools/dpdk-devbind.py | 4 +- 7 files changed, 244 insertions(+), 42 deletions(-)
doc/guides/rawdevs/ntb.rst +8 -8
@@ -14,16 +14,16 @@ allocation for the peer to access and read/write allocated memory from peer. Also, the PMD allows to use doorbell registers to notify the peer and share some information by using scratchpad registers. -BIOS setting on Intel Skylake ------------------------------ +BIOS setting on Intel Xeon +-------------------------- -Intel Non-transparent Bridge needs special BIOS setting. Since the PMD only -supports Intel Skylake platform, introduce BIOS setting here. The referencce -is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf +Intel Non-transparent Bridge needs special BIOS setting. The referencce for +Skylake is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf - Set the needed PCIe port as NTB to NTB mode on both hosts. -- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (2K-512M) - on both hosts. Note that bar size on both hosts should be the same. +- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (4K-512M) + on both hosts (for Icelake, bar size can be set as 12-51, namely 4K-128PB). + Note that bar size on both hosts should be the same. - Disable split bars for both hosts. - Set crosslink control override as DSD/USP on one host, USD/DSP on another host.
@@ -151,4 +151,4 @@ like the following: Limitation ---------- -- This PMD only supports Intel Skylake platform. +- This PMD only supports Intel Skylake and Icelake platforms.
doc/guides/rel_notes/release_20_11.rst +3 -0
@@ -55,6 +55,9 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added Icelake (Gen4) support for Intel NTB.** + + Added NTB device support (4th generation) for Intel Icelake platform. Removed Items -------------
drivers/raw/ntb/ntb.c +5 -0
@@ -25,6 +25,7 @@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 ) }, { .vendor_id =0 ,/* sentinel */ }, };
@@ -244,6 +245,9 @@ ntb_dev_intr_handler(void *param) hw->peer_dev_up =0 ;return ; } + +/* Clear other received doorbells. */ + (*hw->ntb_ops->db_clear)(dev, db_bits); } static void
@@ -1333,6 +1337,7 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)switch (pci_dev->id.device_id) {case NTB_INTEL_DEV_ID_B2B_SKX : +case NTB_INTEL_DEV_ID_B2B_ICX : hw->ntb_ops = &intel_ntb_ops;break ;default :
drivers/raw/ntb/ntb.h +1 -0
@@ -18,6 +18,7 @@ extern int ntb_logtype;/* Device IDs */ #define NTB_INTEL_DEV_ID_B2B_SKX 0x201C +#define NTB_INTEL_DEV_ID_B2B_ICX 0x347E/* Reserved to app to use. */ #define NTB_SPAD_USER "spad_user_"
drivers/raw/ntb/ntb_hw_intel.c +200 -29
300 lines not on this page · raw message
drivers/raw/ntb/ntb_hw_intel.h +24 -4
@@ -22,7 +22,7 @@#define NTB_LNK_STA_SPEED (x) ((x) & NTB_LNK_STA_SPEED_MASK)#define NTB_LNK_STA_WIDTH (x) (((x) & NTB_LNK_STA_WIDTH_MASK) >> 4) -/* Intel Skylake Xeon hardware */ +/* Intel Xeon hardware */ #define XEON_IMBAR1SZ_OFFSET 0x00d0#define XEON_IMBAR2SZ_OFFSET 0x00d1#define XEON_EMBAR1SZ_OFFSET 0x00d2
@@ -31,7 +31,13 @@#define XEON_DEVSTS_OFFSET 0x009a#define XEON_UNCERRSTS_OFFSET 0x014c#define XEON_CORERRSTS_OFFSET 0x0158 -#define XEON_LINK_STATUS_OFFSET 0x01a2 +#define XEON_GEN3_LINK_STATUS_OFFSET 0x01a2 +/* Link status and PPD are in MMIO but not config space for Gen4 NTB */ +#define XEON_GEN4_PPD0_OFFSET 0xb0d4 +#define XEON_GEN4_PPD1_OFFSET 0xb4c0 +#define XEON_GEN4_LINK_CTRL_OFFSET 0xb050 +#define XEON_GEN4_LINK_STATUS_OFFSET 0xb052 +#define XEON_GEN4_LINK_CTRL_LINK_DIS 0x0010#define XEON_NTBCNTL_OFFSET 0x0000#define XEON_BAR_INTERVAL_OFFSET 0x0010
@@ -39,13 +45,18 @@#define XEON_IMBAR1XLMT_OFFSET 0x0018/* SBAR2LMT */ #define XEON_IMBAR2XBASE_OFFSET 0x0020/* SBAR4XLAT */ #define XEON_IMBAR2XLMT_OFFSET 0x0028/* SBAR4LMT */ +#define XEON_GEN4_XBASEIDX_INTERVAL 0x0002 +#define XEON_GEN4_IM1XBASEIDX_OFFSET 0x0074 +#define XEON_GEN4_IM2XBASEIDX_OFFSET 0x0076#define XEON_IM_INT_STATUS_OFFSET 0x0040#define XEON_IM_INT_DISABLE_OFFSET 0x0048#define XEON_IM_SPAD_OFFSET 0x0080/* SPAD */ +#define XEON_GEN3_B2B_SPAD_OFFSET 0x0180/* GEN3 B2B SPAD */ +#define XEON_GEN4_B2B_SPAD_OFFSET 0x8080/* GEN4 B2B SPAD */ #define XEON_USMEMMISS_OFFSET 0x0070 -#define XEON_INTVEC_OFFSET 0x00d0 +#define XEON_GEN3_INTVEC_OFFSET 0x00d0 +#define XEON_GEN4_INTVEC_OFFSET 0x0050#define XEON_IM_DOORBELL_OFFSET 0x0100/* SDOORBELL0 */ -#define XEON_B2B_SPAD_OFFSET 0x0180/* B2B SPAD */ #define XEON_EMBAR0XBASE_OFFSET 0x4008/* B2B_XLAT */ #define XEON_EMBAR1XBASE_OFFSET 0x4010/* PBAR2XLAT */ #define XEON_EMBAR1XLMT_OFFSET 0x4018/* PBAR2LMT */
@@ -60,6 +71,7 @@#define XEON_EMBAR1_OFFSET 0x4518/* SBAR23BASE */ #define XEON_EMBAR2_OFFSET 0x4520/* SBAR45BASE */ +#define XEON_PPD_OFFSET 0x00d4#define XEON_PPD_CONN_MASK 0x03#define XEON_PPD_CONN_TRANSPARENT 0x00
@@ -70,6 +82,14 @@#define XEON_PPD_DEV_DSD 0x10#define XEON_PPD_SPLIT_BAR_MASK 0x40 +#define XEON_GEN4_PPD_CONN_MASK 0x0300 +#define XEON_GEN4_PPD_CONN_B2B 0x0200 +#define XEON_GEN4_PPD_DEV_MASK 0x1000 +#define XEON_GEN4_PPD_DEV_DSD 0x1000 +#define XEON_GEN4_PPD_DEV_USD 0x0000 +#define XEON_GEN4_PPD_LINKTRN 0x0008 +#define XEON_GEN4_SLOTSTS 0xb05a +#define XEON_GEN4_SLOTSTS_DLLSCS 0x100#define XEON_MW_COUNT 2
usertools/dpdk-devbind.py +3 -1
@@ -53,6 +53,8 @@ '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} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class]
@@ -60,7 +62,7 @@ eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] -misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, octeontx2_dma] +misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, intel_ntb_icx, octeontx2_dma] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties
Signature · 1 line
2.17.1
PATCH v3 1/1 raw/ntb: add Icelake support for Intel NTB
In reply to Xiaoyun LiAdd NTB device support (4th generation) for Intel Icelake platform.
---
v3:
* Removed a blank line.
* Added change doc for v2.
v2:
* Corrected and polished the doc.
* Fixed a link setup issue.
--- doc/guides/rawdevs/ntb.rst | 16 +- doc/guides/rel_notes/release_20_11.rst | 3 + drivers/raw/ntb/ntb.c | 5 + drivers/raw/ntb/ntb.h | 1 + drivers/raw/ntb/ntb_hw_intel.c | 229 +++++++++++++++++++++---- drivers/raw/ntb/ntb_hw_intel.h | 27 ++- usertools/dpdk-devbind.py | 4 +- 7 files changed, 243 insertions(+), 42 deletions(-)
doc/guides/rawdevs/ntb.rst +8 -8
@@ -14,16 +14,16 @@ allocation for the peer to access and read/write allocated memory from peer. Also, the PMD allows to use doorbell registers to notify the peer and share some information by using scratchpad registers. -BIOS setting on Intel Skylake ------------------------------ +BIOS setting on Intel Xeon +-------------------------- -Intel Non-transparent Bridge needs special BIOS setting. Since the PMD only -supports Intel Skylake platform, introduce BIOS setting here. The referencce -is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf +Intel Non-transparent Bridge needs special BIOS setting. The referencce for +Skylake is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf - Set the needed PCIe port as NTB to NTB mode on both hosts. -- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (2K-512M) - on both hosts. Note that bar size on both hosts should be the same. +- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (4K-512M) + on both hosts (for Icelake, bar size can be set as 12-51, namely 4K-128PB). + Note that bar size on both hosts should be the same. - Disable split bars for both hosts. - Set crosslink control override as DSD/USP on one host, USD/DSP on another host.
@@ -151,4 +151,4 @@ like the following: Limitation ---------- -- This PMD only supports Intel Skylake platform. +- This PMD only supports Intel Skylake and Icelake platforms.
doc/guides/rel_notes/release_20_11.rst +3 -0
@@ -55,6 +55,9 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added Icelake (Gen4) support for Intel NTB.** + + Added NTB device support (4th generation) for Intel Icelake platform. Removed Items -------------
drivers/raw/ntb/ntb.c +5 -0
@@ -25,6 +25,7 @@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 ) }, { .vendor_id =0 ,/* sentinel */ }, };
@@ -244,6 +245,9 @@ ntb_dev_intr_handler(void *param) hw->peer_dev_up =0 ;return ; } + +/* Clear other received doorbells. */ + (*hw->ntb_ops->db_clear)(dev, db_bits); } static void
@@ -1333,6 +1337,7 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)switch (pci_dev->id.device_id) {case NTB_INTEL_DEV_ID_B2B_SKX : +case NTB_INTEL_DEV_ID_B2B_ICX : hw->ntb_ops = &intel_ntb_ops;break ;default :
drivers/raw/ntb/ntb.h +1 -0
@@ -18,6 +18,7 @@ extern int ntb_logtype;/* Device IDs */ #define NTB_INTEL_DEV_ID_B2B_SKX 0x201C +#define NTB_INTEL_DEV_ID_B2B_ICX 0x347E/* Reserved to app to use. */ #define NTB_SPAD_USER "spad_user_"
drivers/raw/ntb/ntb_hw_intel.c +200 -29
300 lines not on this page · raw message
drivers/raw/ntb/ntb_hw_intel.h +23 -4
@@ -22,7 +22,7 @@#define NTB_LNK_STA_SPEED (x) ((x) & NTB_LNK_STA_SPEED_MASK)#define NTB_LNK_STA_WIDTH (x) (((x) & NTB_LNK_STA_WIDTH_MASK) >> 4) -/* Intel Skylake Xeon hardware */ +/* Intel Xeon hardware */ #define XEON_IMBAR1SZ_OFFSET 0x00d0#define XEON_IMBAR2SZ_OFFSET 0x00d1#define XEON_EMBAR1SZ_OFFSET 0x00d2
@@ -31,7 +31,13 @@#define XEON_DEVSTS_OFFSET 0x009a#define XEON_UNCERRSTS_OFFSET 0x014c#define XEON_CORERRSTS_OFFSET 0x0158 -#define XEON_LINK_STATUS_OFFSET 0x01a2 +#define XEON_GEN3_LINK_STATUS_OFFSET 0x01a2 +/* Link status and PPD are in MMIO but not config space for Gen4 NTB */ +#define XEON_GEN4_PPD0_OFFSET 0xb0d4 +#define XEON_GEN4_PPD1_OFFSET 0xb4c0 +#define XEON_GEN4_LINK_CTRL_OFFSET 0xb050 +#define XEON_GEN4_LINK_STATUS_OFFSET 0xb052 +#define XEON_GEN4_LINK_CTRL_LINK_DIS 0x0010#define XEON_NTBCNTL_OFFSET 0x0000#define XEON_BAR_INTERVAL_OFFSET 0x0010
@@ -39,13 +45,18 @@#define XEON_IMBAR1XLMT_OFFSET 0x0018/* SBAR2LMT */ #define XEON_IMBAR2XBASE_OFFSET 0x0020/* SBAR4XLAT */ #define XEON_IMBAR2XLMT_OFFSET 0x0028/* SBAR4LMT */ +#define XEON_GEN4_XBASEIDX_INTERVAL 0x0002 +#define XEON_GEN4_IM1XBASEIDX_OFFSET 0x0074 +#define XEON_GEN4_IM2XBASEIDX_OFFSET 0x0076#define XEON_IM_INT_STATUS_OFFSET 0x0040#define XEON_IM_INT_DISABLE_OFFSET 0x0048#define XEON_IM_SPAD_OFFSET 0x0080/* SPAD */ +#define XEON_GEN3_B2B_SPAD_OFFSET 0x0180/* GEN3 B2B SPAD */ +#define XEON_GEN4_B2B_SPAD_OFFSET 0x8080/* GEN4 B2B SPAD */ #define XEON_USMEMMISS_OFFSET 0x0070 -#define XEON_INTVEC_OFFSET 0x00d0 +#define XEON_GEN3_INTVEC_OFFSET 0x00d0 +#define XEON_GEN4_INTVEC_OFFSET 0x0050#define XEON_IM_DOORBELL_OFFSET 0x0100/* SDOORBELL0 */ -#define XEON_B2B_SPAD_OFFSET 0x0180/* B2B SPAD */ #define XEON_EMBAR0XBASE_OFFSET 0x4008/* B2B_XLAT */ #define XEON_EMBAR1XBASE_OFFSET 0x4010/* PBAR2XLAT */ #define XEON_EMBAR1XLMT_OFFSET 0x4018/* PBAR2LMT */
@@ -70,6 +81,14 @@#define XEON_PPD_DEV_DSD 0x10#define XEON_PPD_SPLIT_BAR_MASK 0x40 +#define XEON_GEN4_PPD_CONN_MASK 0x0300 +#define XEON_GEN4_PPD_CONN_B2B 0x0200 +#define XEON_GEN4_PPD_DEV_MASK 0x1000 +#define XEON_GEN4_PPD_DEV_DSD 0x1000 +#define XEON_GEN4_PPD_DEV_USD 0x0000 +#define XEON_GEN4_PPD_LINKTRN 0x0008 +#define XEON_GEN4_SLOTSTS 0xb05a +#define XEON_GEN4_SLOTSTS_DLLSCS 0x100#define XEON_MW_COUNT 2
usertools/dpdk-devbind.py +3 -1
@@ -53,6 +53,8 @@ '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} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class]
@@ -60,7 +62,7 @@ eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] -misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, octeontx2_dma] +misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, intel_ntb_icx, octeontx2_dma] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties
Signature · 1 line
2.17.1
Quoted 11 lines
drivers/raw/ntb/ntb_hw_intel.c +11
-0+ +static int +intel_ntb_dev_init (const struct rte_rawdev *dev) { +struct ntb_hw *hw = dev->dev_private; +uint8_t bar; +int ret, i; + +if (hw ==NULL ) { +NTB_LOG (ERR ,"Invalid device." ); +return -EINVAL ; + }
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_dev_init(const struct rte_rawdev *dev) · line 138
Quoted 10 lines
drivers/raw/ntb/ntb_hw_intel.c +8
-0+ hw->hw_addr = (char *)hw->pci_dev->mem_resource[0 ].addr; +if (is_gen3_ntb (hw)) { + ret =intel_ntb3_check_ppd (hw); + }else if (is_gen4_ntb (hw)) { +/* PPD is in MMIO but not config space for NTB Gen4 */ + ret =intel_ntb4_check_ppd (hw); +if (ret) +return ret;
Above two lines are not necessary.
Quoted 27 lines
drivers/raw/ntb/ntb_hw_intel.c +9
-9+ }else { +return -ENOTSUP ; + } + +if (ret) +return ret; + hw->mw_cnt =XEON_MW_COUNT ; hw->db_cnt =XEON_DB_COUNT ; hw->spad_cnt =XEON_SPAD_COUNT ;@@ -149,15 +219,28 @@ intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx,rte_write64 (base, xlat_addr);rte_write64 (limit, limit_addr); -/* Setup the external point so that remote can access. */ - xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; - xlat_addr = hw->hw_addr + xlat_off; - limit_off =XEON_EMBAR1XLMT_OFFSET + mw_idx *XEON_BAR_INTERVAL_OFFSET ; - limit_addr = hw->hw_addr + limit_off; - base =rte_read64 (xlat_addr); - base &= ~0xf ; - limit = base + size; -rte_write64 (limit, limit_addr); +if (is_gen3_ntb (hw)) { +/* Setup the external point so that remote can access. */
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev · line 235
Quoted 10 lines
drivers/raw/ntb/ntb_hw_intel.c +10
-0+ xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; + xlat_addr = hw->hw_addr + xlat_off; + limit_off =XEON_EMBAR1XLMT_OFFSET + + mw_idx *XEON_BAR_INTERVAL_OFFSET ; + limit_addr = hw->hw_addr + limit_off; + base =rte_read64 (xlat_addr); + base &= ~0xf ; + limit = base + size; +rte_write64 (limit, limit_addr); + }else if (is_gen4_ntb (hw)) {
Can we use a variable in struct to indicate it's gen4 or gen3 after init instead of check it every time?
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 243
Quoted 10 lines
drivers/raw/ntb/ntb_hw_intel.c +10
-0+/* Set translate base address index register */ + xlat_off =XEON_GEN4_IM1XBASEIDX_OFFSET + + mw_idx *XEON_GEN4_XBASEIDX_INTERVAL ; + xlat_addr = hw->hw_addr + xlat_off; +rte_write16 (rte_log2_u64 (size), xlat_addr); + }else { +rte_write64 (base, limit_addr); +rte_write64 (0 , xlat_addr); +return -ENOTSUP ; + }
Is the else branch necessary? As if neither gen3 or gen4, the init would fail. Would be better to print an ERR instead of just return NO support.
Quoted 3 lines
(quoted diff) +0
-0return 0;}
Hi
Quoted 21 lines
-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Monday, September 7, 2020 16:35
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; Maslekar, Omkar <[email protected]>
Subject: RE: [PATCH v3] raw/ntb: add Icelake support for Intel NTBQuoted 14 lines
drivers/raw/ntb/ntb_hw_intel.c +12
-0+ +static int +intel_ntb_dev_init (const struct rte_rawdev *dev) { +struct ntb_hw *hw = dev->dev_private; +uint8_t bar; +int ret, i; + +if (hw ==NULL ) { +NTB_LOG (ERR ,"Invalid device." ); +return -EINVAL ; + } + hw->hw_addr = (char *)hw->pci_dev->mem_resource[0 ].addr;
Quoted 8 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_dev_init(const struct rte_rawdev *dev) · line 138
Quoted 7 lines
drivers/raw/ntb/ntb_hw_intel.c +7
-0+if (is_gen3_ntb (hw)) { + ret =intel_ntb3_check_ppd (hw); + }else if (is_gen4_ntb (hw)) { +/* PPD is in MMIO but not config space for NTB Gen4 */ + ret =intel_ntb4_check_ppd (hw); +if (ret) +return ret;Above two lines are not necessary.
OK.
Quoted 31 lines
Quoted 31 lines
drivers/raw/ntb/ntb_hw_intel.c +13
-9+ }else { +return -ENOTSUP ; + } + +if (ret) +return ret; + hw->mw_cnt =XEON_MW_COUNT ; hw->db_cnt =XEON_DB_COUNT ; hw->spad_cnt =XEON_SPAD_COUNT ;@@ -149,15 +219,28 @@ intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx,rte_write64 (base, xlat_addr);rte_write64 (limit, limit_addr); -/* Setup the external point so that remote can access. */ - xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; - xlat_addr = hw->hw_addr + xlat_off; - limit_off =XEON_EMBAR1XLMT_OFFSET + mw_idx *XEON_BAR_INTERVAL_OFFSET ; - limit_addr = hw->hw_addr + limit_off; - base =rte_read64 (xlat_addr); - base &= ~0xf ; - limit = base + size; -rte_write64 (limit, limit_addr); +if (is_gen3_ntb (hw)) { +/* Setup the external point so that remote can access. */ + xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; + xlat_addr = hw->hw_addr + xlat_off; + limit_off =XEON_EMBAR1XLMT_OFFSET + + mw_idx *XEON_BAR_INTERVAL_OFFSET ;
Quoted 8 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 233
Quoted 6 lines
drivers/raw/ntb/ntb_hw_intel.c +6
-0+ limit_addr = hw->hw_addr + limit_off; + base =rte_read64 (xlat_addr); + base &= ~0xf ; + limit = base + size; +rte_write64 (limit, limit_addr); + }else if (is_gen4_ntb (hw)) {Can we use a variable in struct to indicate it's gen4 or gen3 after init instead of check it every time?
What's the difference? It comes from the value in hw->pci_dev->id.device_id.
Checking it in this way is trying to make it easier to extend it for gen2 ntb in the future. It's not either gen3 or gen4. I don't think it makes sense to have a bool value to indicate it's gen3 or gen4.
Quoted 13 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 243
Quoted 11 lines
drivers/raw/ntb/ntb_hw_intel.c +10
-0+/* Set translate base address index register */ + xlat_off =XEON_GEN4_IM1XBASEIDX_OFFSET + + mw_idx *XEON_GEN4_XBASEIDX_INTERVAL ; + xlat_addr = hw->hw_addr + xlat_off; +rte_write16 (rte_log2_u64 (size), xlat_addr); + }else { +rte_write64 (base, limit_addr); +rte_write64 (0 , xlat_addr); +return -ENOTSUP ; + }Is the else branch necessary? As if neither gen3 or gen4, the init would fail. Would be better to print an ERR instead of just return NO support.
I don't think so.
Yes. It will fail in init. Returning err is to stop other following actions like in intel_ntb_vector_bind() since it should be stopped. And I'd like to keep them in one coding style. As to the print, I think that can be upper layer's job to check the value and print err. Choosing ENOTSUP is because that in init, if it's not supported hw, it will return -ENOTSUP err.
Quoted 4 lines
Quoted 3 lines
(quoted diff) +0
-0return 0;}
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
drivers/raw/ntb/ntb_hw_intel.c +6
-1-rte_write64 (limit, limit_addr); +if (is_gen3_ntb (hw)) { +/* Setup the external point so that remote can access. */ + xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; + xlat_addr = hw->hw_addr + xlat_off; + limit_off =XEON_EMBAR1XLMT_OFFSET + + mw_idx *XEON_BAR_INTERVAL_OFFSET ;Quoted 8 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 233
Quoted 6 lines
drivers/raw/ntb/ntb_hw_intel.c +6
-0+ limit_addr = hw->hw_addr + limit_off; + base =rte_read64 (xlat_addr); + base &= ~0xf ; + limit = base + size; +rte_write64 (limit, limit_addr); + }else if (is_gen4_ntb (hw)) {Can we use a variable in struct to indicate it's gen4 or gen3 after init instead of check it every time?
Quoted 4 lines
What's the difference? It comes from the value in
hw->pci_dev->id.device_id. Checking it in this way is trying to make it easier to extend it for gen2 ntb in the future. It's not either gen3 or gen4.
I don't think it makes sense to have a bool value to indicate it's gen3 or gen4.
Understand, as the inline function is very simple, it looks OK.
Quoted 15 lines
Quoted 14 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 243
Quoted 12 lines
drivers/raw/ntb/ntb_hw_intel.c +10
-0+/* Set translate base address index register */ + xlat_off =XEON_GEN4_IM1XBASEIDX_OFFSET + + mw_idx *XEON_GEN4_XBASEIDX_INTERVAL ; + xlat_addr = hw->hw_addr + xlat_off; +rte_write16 (rte_log2_u64 (size), xlat_addr); + }else { +rte_write64 (base, limit_addr); +rte_write64 (0 , xlat_addr); +return -ENOTSUP ; + }Is the else branch necessary? As if neither gen3 or gen4, the init would fail. Would be better to print an ERR instead of just return NO support.
Quoted 8 lines
I don't think so.
Yes. It will fail in init. Returning err is to stop other following actions like inintel_ntb_vector_bind()since it should be stopped.
And I'd like to keep them in one coding style. As to the print, I think that can be upper layer's job to check the value and print err.
Choosing ENOTSUP is because that in init, if it's not supported hw, it will return - ENOTSUP err.
I cannot say what you did is incorrect. But try to think it like this way: according current API design, ntb raw device is allocated when driver probe, if init fails, raw device would be free. How the ops be called?
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
return 0;
}
Hi
Quoted 54 lines
-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Tuesday, September 8, 2020 00:16
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; Maslekar, Omkar <[email protected]>
Subject: RE: [PATCH v3] raw/ntb: add Icelake support for Intel NTBQuoted 16 lines
Quoted 7 lines
Quoted 7 lines
drivers/raw/ntb/ntb_hw_intel.c +6
-1-rte_write64 (limit, limit_addr); +if (is_gen3_ntb (hw)) { +/* Setup the external point so that remote can access. */ + xlat_off =XEON_EMBAR1_OFFSET +8 * mw_idx; + xlat_addr = hw->hw_addr + xlat_off; + limit_off =XEON_EMBAR1XLMT_OFFSET + + mw_idx *XEON_BAR_INTERVAL_OFFSET ;Quoted 8 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 233
Quoted 6 lines
drivers/raw/ntb/ntb_hw_intel.c +6
-0+ limit_addr = hw->hw_addr + limit_off; + base =rte_read64 (xlat_addr); + base &= ~0xf ; + limit = base + size; +rte_write64 (limit, limit_addr); + }else if (is_gen4_ntb (hw)) {Can we use a variable in struct to indicate it's gen4 or gen3 after init instead of check it every time?
Quoted 2 lines
What's the difference? It comes from the value in
hw->pci_dev->id.device_id. Checking it in this way is trying to make it easier to extend it for gen2 ntb in thefuture.
Quoted 2 lines
It's not either gen3 or gen4.
I don't think it makes sense to have a bool value to indicate it's gen3 or gen4.Understand, as the inline function is very simple, it looks OK.
Quoted 15 lines
Quoted 14 lines
drivers/raw/ntb/ntb_hw_intel.c intel_ntb_mw_set_trans(const struct rte_rawdev *dev, int mw_idx, · line 243
Quoted 12 lines
drivers/raw/ntb/ntb_hw_intel.c +10
-0+/* Set translate base address index register */ + xlat_off =XEON_GEN4_IM1XBASEIDX_OFFSET + + mw_idx *XEON_GEN4_XBASEIDX_INTERVAL ; + xlat_addr = hw->hw_addr + xlat_off; +rte_write16 (rte_log2_u64 (size), xlat_addr); + }else { +rte_write64 (base, limit_addr); +rte_write64 (0 , xlat_addr); +return -ENOTSUP ; + }Is the else branch necessary? As if neither gen3 or gen4, the init would fail. Would be better to print an ERR instead of just return NO support.
Quoted 9 lines
I don't think so.
Yes. It will fail in init. Returning err is to stop other following actions like inintel_ntb_vector_bind()since it should be stopped.
And I'd like to keep them in one coding style. As to the print, I think that can be upper layer's job to check the value and print err. Choosing ENOTSUP is because that in init, if it's not supported hw, it will return - ENOTSUP err.
Quoted 3 lines
I cannot say what you did is incorrect. But try to think it like this way: according current API design, ntb raw device is allocated when driver probe, if init fails, raw device would be free. How the ops be called?
I'll add a err print later.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
return 0;
}
PATCH v4 1/1 raw/ntb: add Ice Lake support for Intel NTB
In reply to Xiaoyun LiAdd NTB device support (4th generation) for Intel Ice Lake platform.
---
v4:
* Removed unnecessary return.
* Added more print log.
* Replaced "Icelake" with "Ice Lake".
v3:
* Removed a blank line.
* Added change doc for v2.
v2:
* Corrected and polished the doc.
* Fixed a link setup issue.
--- doc/guides/rawdevs/ntb.rst | 16 +- doc/guides/rel_notes/release_20_11.rst | 3 + drivers/raw/ntb/ntb.c | 5 + drivers/raw/ntb/ntb.h | 1 + drivers/raw/ntb/ntb_hw_intel.c | 241 ++++++++++++++++++++++--- drivers/raw/ntb/ntb_hw_intel.h | 27 ++- usertools/dpdk-devbind.py | 4 +- 7 files changed, 255 insertions(+), 42 deletions(-)
doc/guides/rawdevs/ntb.rst +8 -8
@@ -14,16 +14,16 @@ allocation for the peer to access and read/write allocated memory from peer. Also, the PMD allows to use doorbell registers to notify the peer and share some information by using scratchpad registers. -BIOS setting on Intel Skylake ------------------------------ +BIOS setting on Intel Xeon +-------------------------- -Intel Non-transparent Bridge needs special BIOS setting. Since the PMD only -supports Intel Skylake platform, introduce BIOS setting here. The referencce -is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf +Intel Non-transparent Bridge needs special BIOS setting. The referencce for +Skylake is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf - Set the needed PCIe port as NTB to NTB mode on both hosts. -- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (2K-512M) - on both hosts. Note that bar size on both hosts should be the same. +- Enable NTB bars and set bar size of bar 23 and bar 45 as 12-29 (4K-512M) + on both hosts (for Ice Lake, bar size can be set as 12-51, namely 4K-128PB). + Note that bar size on both hosts should be the same. - Disable split bars for both hosts. - Set crosslink control override as DSD/USP on one host, USD/DSP on another host.
@@ -151,4 +151,4 @@ like the following: Limitation ---------- -- This PMD only supports Intel Skylake platform. +- This PMD only supports Intel Skylake and Ice Lake platforms.
doc/guides/rel_notes/release_20_11.rst +3 -0
@@ -55,6 +55,9 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added Ice Lake (Gen4) support for Intel NTB.** + + Added NTB device support (4th generation) for Intel Ice Lake platform. Removed Items -------------
drivers/raw/ntb/ntb.c +5 -0
@@ -25,6 +25,7 @@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 ) }, { .vendor_id =0 ,/* sentinel */ }, };
@@ -244,6 +245,9 @@ ntb_dev_intr_handler(void *param) hw->peer_dev_up =0 ;return ; } + +/* Clear other received doorbells. */ + (*hw->ntb_ops->db_clear)(dev, db_bits); } static void
@@ -1333,6 +1337,7 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)switch (pci_dev->id.device_id) {case NTB_INTEL_DEV_ID_B2B_SKX : +case NTB_INTEL_DEV_ID_B2B_ICX : hw->ntb_ops = &intel_ntb_ops;break ;default :
drivers/raw/ntb/ntb.h +1 -0
@@ -18,6 +18,7 @@ extern int ntb_logtype;/* Device IDs */ #define NTB_INTEL_DEV_ID_B2B_SKX 0x201C +#define NTB_INTEL_DEV_ID_B2B_ICX 0x347E/* Reserved to app to use. */ #define NTB_SPAD_USER "spad_user_"
drivers/raw/ntb/ntb_hw_intel.c +212 -29
312 lines not on this page · raw message
drivers/raw/ntb/ntb_hw_intel.h +23 -4
@@ -22,7 +22,7 @@#define NTB_LNK_STA_SPEED (x) ((x) & NTB_LNK_STA_SPEED_MASK)#define NTB_LNK_STA_WIDTH (x) (((x) & NTB_LNK_STA_WIDTH_MASK) >> 4) -/* Intel Skylake Xeon hardware */ +/* Intel Xeon hardware */ #define XEON_IMBAR1SZ_OFFSET 0x00d0#define XEON_IMBAR2SZ_OFFSET 0x00d1#define XEON_EMBAR1SZ_OFFSET 0x00d2
@@ -31,7 +31,13 @@#define XEON_DEVSTS_OFFSET 0x009a#define XEON_UNCERRSTS_OFFSET 0x014c#define XEON_CORERRSTS_OFFSET 0x0158 -#define XEON_LINK_STATUS_OFFSET 0x01a2 +#define XEON_GEN3_LINK_STATUS_OFFSET 0x01a2 +/* Link status and PPD are in MMIO but not config space for Gen4 NTB */ +#define XEON_GEN4_PPD0_OFFSET 0xb0d4 +#define XEON_GEN4_PPD1_OFFSET 0xb4c0 +#define XEON_GEN4_LINK_CTRL_OFFSET 0xb050 +#define XEON_GEN4_LINK_STATUS_OFFSET 0xb052 +#define XEON_GEN4_LINK_CTRL_LINK_DIS 0x0010#define XEON_NTBCNTL_OFFSET 0x0000#define XEON_BAR_INTERVAL_OFFSET 0x0010
@@ -39,13 +45,18 @@#define XEON_IMBAR1XLMT_OFFSET 0x0018/* SBAR2LMT */ #define XEON_IMBAR2XBASE_OFFSET 0x0020/* SBAR4XLAT */ #define XEON_IMBAR2XLMT_OFFSET 0x0028/* SBAR4LMT */ +#define XEON_GEN4_XBASEIDX_INTERVAL 0x0002 +#define XEON_GEN4_IM1XBASEIDX_OFFSET 0x0074 +#define XEON_GEN4_IM2XBASEIDX_OFFSET 0x0076#define XEON_IM_INT_STATUS_OFFSET 0x0040#define XEON_IM_INT_DISABLE_OFFSET 0x0048#define XEON_IM_SPAD_OFFSET 0x0080/* SPAD */ +#define XEON_GEN3_B2B_SPAD_OFFSET 0x0180/* GEN3 B2B SPAD */ +#define XEON_GEN4_B2B_SPAD_OFFSET 0x8080/* GEN4 B2B SPAD */ #define XEON_USMEMMISS_OFFSET 0x0070 -#define XEON_INTVEC_OFFSET 0x00d0 +#define XEON_GEN3_INTVEC_OFFSET 0x00d0 +#define XEON_GEN4_INTVEC_OFFSET 0x0050#define XEON_IM_DOORBELL_OFFSET 0x0100/* SDOORBELL0 */ -#define XEON_B2B_SPAD_OFFSET 0x0180/* B2B SPAD */ #define XEON_EMBAR0XBASE_OFFSET 0x4008/* B2B_XLAT */ #define XEON_EMBAR1XBASE_OFFSET 0x4010/* PBAR2XLAT */ #define XEON_EMBAR1XLMT_OFFSET 0x4018/* PBAR2LMT */
@@ -70,6 +81,14 @@#define XEON_PPD_DEV_DSD 0x10#define XEON_PPD_SPLIT_BAR_MASK 0x40 +#define XEON_GEN4_PPD_CONN_MASK 0x0300 +#define XEON_GEN4_PPD_CONN_B2B 0x0200 +#define XEON_GEN4_PPD_DEV_MASK 0x1000 +#define XEON_GEN4_PPD_DEV_DSD 0x1000 +#define XEON_GEN4_PPD_DEV_USD 0x0000 +#define XEON_GEN4_PPD_LINKTRN 0x0008 +#define XEON_GEN4_SLOTSTS 0xb05a +#define XEON_GEN4_SLOTSTS_DLLSCS 0x100#define XEON_MW_COUNT 2
usertools/dpdk-devbind.py +3 -1
@@ -53,6 +53,8 @@ '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} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class]
@@ -60,7 +62,7 @@ eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] -misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, octeontx2_dma] +misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ioat_icx, intel_ntb_skx, intel_ntb_icx, octeontx2_dma] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v4] raw/ntb: add Ice Lake support for Intel NTB
Quoted 10 lines
-----Original Message-----
From: Li, Xiaoyun <[email protected]>
Sent: Tuesday, September 8, 2020 11:28 AM
To: Wu, Jingjing <[email protected]>
Cc: [email protected]; Maslekar, Omkar <[email protected]>; Li, Xiaoyun <[email protected]>
Subject: [PATCH v4] raw/ntb: add Ice Lake support for Intel NTB
Quoted 3 lines
Add NTB device support (4th generation) for Intel Ice Lake platform.
Signed-off-by Xiaoyun Li <[email protected]>
Thomas Monjalon
AppliedRe: [dpdk-dev] [PATCH v4] raw/ntb: add Ice Lake support for Intel NTB
Quoted 4 lines
Quoted 3 lines
Add NTB device support (4th generation) for Intel Ice Lake platform.
Signed-off-by Xiaoyun Li <[email protected]>Acked-by Jingjing Wu <[email protected]>
Applied, thanks