* [dpdk-dev] [PATCH] net/octeontx2: add cn98xx support @ 2020-06-17 15:05 Harman Kalra 2020-06-24 8:59 ` Jerin Jacob 0 siblings, 1 reply; 7+ messages in thread From: Harman Kalra @ 2020-06-17 15:05 UTC (permalink / raw) To: Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K Cc: dev, Harman Kalra New cn98xx SOC comes up with two NIX blocks wrt cn96xx, cn93xx, to achieve higher performance. Adding support for cn98xx where need a logic to detect if the LF is attached to NIX0 or NIX1 and then accordingly use the respective NIX block. Signed-off-by: Harman Kalra <hkalra@marvell.com> --- doc/guides/platform/octeontx2.rst | 1 + drivers/common/octeontx2/hw/otx2_rvu.h | 3 ++- drivers/net/octeontx2/otx2_ethdev.c | 17 ++++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst index 15b1641cf..13255eec5 100644 --- a/doc/guides/platform/octeontx2.rst +++ b/doc/guides/platform/octeontx2.rst @@ -13,6 +13,7 @@ More information about OCTEON TX2 SoC can be found at `Marvell Official Website Supported OCTEON TX2 SoCs ------------------------- +- CN98xx - CN96xx - CN93xx diff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeontx2/hw/otx2_rvu.h index f2037ec57..330bfb37f 100644 --- a/drivers/common/octeontx2/hw/otx2_rvu.h +++ b/drivers/common/octeontx2/hw/otx2_rvu.h @@ -134,11 +134,12 @@ #define RVU_BLOCK_ADDR_RVUM (0x0ull) #define RVU_BLOCK_ADDR_LMT (0x1ull) #define RVU_BLOCK_ADDR_NPA (0x3ull) +#define RVU_BLOCK_ADDR_NIX0 (0x4ull) +#define RVU_BLOCK_ADDR_NIX1 (0x5ull) #define RVU_BLOCK_ADDR_NPC (0x6ull) #define RVU_BLOCK_ADDR_SSO (0x7ull) #define RVU_BLOCK_ADDR_SSOW (0x8ull) #define RVU_BLOCK_ADDR_TIM (0x9ull) -#define RVU_BLOCK_ADDR_NIX0 (0x4ull) #define RVU_BLOCK_ADDR_CPT0 (0xaull) #define RVU_BLOCK_ADDR_NDC0 (0xcull) #define RVU_BLOCK_ADDR_NDC1 (0xdull) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 3f3f0a693..095506034 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -2177,6 +2177,20 @@ otx2_eth_dev_is_sdp(struct rte_pci_device *pci_dev) return false; } +static inline uint64_t +nix_get_blkaddr(struct otx2_eth_dev *dev) +{ + uint64_t reg; + + /* Reading the discovery register to know which NIX is the LF + * attached to. + */ + reg = otx2_read64(dev->bar2 + + RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_NIX0)); + + return reg & 0x1FFULL ? RVU_BLOCK_ADDR_NIX0 : RVU_BLOCK_ADDR_NIX1; +} + static int otx2_eth_dev_init(struct rte_eth_dev *eth_dev) { @@ -2236,7 +2250,6 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) dev->configured = 0; dev->drv_inited = true; dev->ptype_disable = 0; - dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20); dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20); /* Attach NIX LF */ @@ -2244,6 +2257,8 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) if (rc) goto otx2_npa_uninit; + dev->base = dev->bar2 + (nix_get_blkaddr(dev) << 20); + /* Get NIX MSIX offset */ rc = nix_lf_get_msix_offset(dev); if (rc) -- 2.18.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] net/octeontx2: add cn98xx support 2020-06-17 15:05 [dpdk-dev] [PATCH] net/octeontx2: add cn98xx support Harman Kalra @ 2020-06-24 8:59 ` Jerin Jacob 2020-06-24 12:46 ` [dpdk-dev] [PATCH v2] " Harman Kalra 0 siblings, 1 reply; 7+ messages in thread From: Jerin Jacob @ 2020-06-24 8:59 UTC (permalink / raw) To: Harman Kalra Cc: Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K, dpdk-dev On Wed, Jun 17, 2020 at 8:36 PM Harman Kalra <hkalra@marvell.com> wrote: > > New cn98xx SOC comes up with two NIX blocks wrt > cn96xx, cn93xx, to achieve higher performance. > > Adding support for cn98xx where need a logic to > detect if the LF is attached to NIX0 or NIX1 and > then accordingly use the respective NIX block. > > Signed-off-by: Harman Kalra <hkalra@marvell.com> In addition to the above changes, The cores are increased to 36 from 24. Please update the meson and make config for the same. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] net/octeontx2: add cn98xx support 2020-06-24 8:59 ` Jerin Jacob @ 2020-06-24 12:46 ` Harman Kalra 2020-06-25 15:33 ` Jerin Jacob 2020-06-26 9:40 ` Ferruh Yigit 0 siblings, 2 replies; 7+ messages in thread From: Harman Kalra @ 2020-06-24 12:46 UTC (permalink / raw) To: Thomas Monjalon, Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K Cc: dev, Harman Kalra New cn98xx SOC comes up with two NIX blocks wrt cn96xx, cn93xx, to achieve higher performance. Also the no of cores increased to 36 from 24. Adding support for cn98xx where need a logic to detect if the LF is attached to NIX0 or NIX1 and then accordingly use the respective NIX block. Signed-off-by: Harman Kalra <hkalra@marvell.com> --- *V2: updated make/meson configs with the increased no of cores. config/arm/meson.build | 2 +- config/defconfig_arm64-octeontx2-linuxapp-gcc | 2 +- doc/guides/platform/octeontx2.rst | 1 + drivers/common/octeontx2/hw/otx2_rvu.h | 3 ++- drivers/net/octeontx2/otx2_ethdev.c | 17 ++++++++++++++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 6e75e6d97..8728051d5 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -82,7 +82,7 @@ flags_thunderx2_extra = [ flags_octeontx2_extra = [ ['RTE_MACHINE', '"octeontx2"'], ['RTE_MAX_NUMA_NODES', 1], - ['RTE_MAX_LCORE', 24], + ['RTE_MAX_LCORE', 36], ['RTE_ARM_FEATURE_ATOMICS', true], ['RTE_EAL_IGB_UIO', false], ['RTE_USE_C11_MEM_MODEL', true]] diff --git a/config/defconfig_arm64-octeontx2-linuxapp-gcc b/config/defconfig_arm64-octeontx2-linuxapp-gcc index 7cfb81872..0d83becf5 100644 --- a/config/defconfig_arm64-octeontx2-linuxapp-gcc +++ b/config/defconfig_arm64-octeontx2-linuxapp-gcc @@ -7,7 +7,7 @@ CONFIG_RTE_MACHINE="octeontx2" CONFIG_RTE_MAX_NUMA_NODES=1 -CONFIG_RTE_MAX_LCORE=24 +CONFIG_RTE_MAX_LCORE=36 CONFIG_RTE_ARM_FEATURE_ATOMICS=y # Doesn't support NUMA diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst index d38a4c1ed..7dd695175 100644 --- a/doc/guides/platform/octeontx2.rst +++ b/doc/guides/platform/octeontx2.rst @@ -13,6 +13,7 @@ More information about OCTEON TX2 SoC can be found at `Marvell Official Website Supported OCTEON TX2 SoCs ------------------------- +- CN98xx - CN96xx - CN93xx diff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeontx2/hw/otx2_rvu.h index f2037ec57..330bfb37f 100644 --- a/drivers/common/octeontx2/hw/otx2_rvu.h +++ b/drivers/common/octeontx2/hw/otx2_rvu.h @@ -134,11 +134,12 @@ #define RVU_BLOCK_ADDR_RVUM (0x0ull) #define RVU_BLOCK_ADDR_LMT (0x1ull) #define RVU_BLOCK_ADDR_NPA (0x3ull) +#define RVU_BLOCK_ADDR_NIX0 (0x4ull) +#define RVU_BLOCK_ADDR_NIX1 (0x5ull) #define RVU_BLOCK_ADDR_NPC (0x6ull) #define RVU_BLOCK_ADDR_SSO (0x7ull) #define RVU_BLOCK_ADDR_SSOW (0x8ull) #define RVU_BLOCK_ADDR_TIM (0x9ull) -#define RVU_BLOCK_ADDR_NIX0 (0x4ull) #define RVU_BLOCK_ADDR_CPT0 (0xaull) #define RVU_BLOCK_ADDR_NDC0 (0xcull) #define RVU_BLOCK_ADDR_NDC1 (0xdull) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 3f3f0a693..095506034 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -2177,6 +2177,20 @@ otx2_eth_dev_is_sdp(struct rte_pci_device *pci_dev) return false; } +static inline uint64_t +nix_get_blkaddr(struct otx2_eth_dev *dev) +{ + uint64_t reg; + + /* Reading the discovery register to know which NIX is the LF + * attached to. + */ + reg = otx2_read64(dev->bar2 + + RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_NIX0)); + + return reg & 0x1FFULL ? RVU_BLOCK_ADDR_NIX0 : RVU_BLOCK_ADDR_NIX1; +} + static int otx2_eth_dev_init(struct rte_eth_dev *eth_dev) { @@ -2236,7 +2250,6 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) dev->configured = 0; dev->drv_inited = true; dev->ptype_disable = 0; - dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20); dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20); /* Attach NIX LF */ @@ -2244,6 +2257,8 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) if (rc) goto otx2_npa_uninit; + dev->base = dev->bar2 + (nix_get_blkaddr(dev) << 20); + /* Get NIX MSIX offset */ rc = nix_lf_get_msix_offset(dev); if (rc) -- 2.18.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/octeontx2: add cn98xx support 2020-06-24 12:46 ` [dpdk-dev] [PATCH v2] " Harman Kalra @ 2020-06-25 15:33 ` Jerin Jacob 2020-06-26 9:40 ` Ferruh Yigit 1 sibling, 0 replies; 7+ messages in thread From: Jerin Jacob @ 2020-06-25 15:33 UTC (permalink / raw) To: Harman Kalra, Ferruh Yigit Cc: Thomas Monjalon, Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K, dpdk-dev On Wed, Jun 24, 2020 at 6:17 PM Harman Kalra <hkalra@marvell.com> wrote: > > New cn98xx SOC comes up with two NIX blocks wrt > cn96xx, cn93xx, to achieve higher performance. > Also the no of cores increased to 36 from 24. > > Adding support for cn98xx where need a logic to > detect if the LF is attached to NIX0 or NIX1 and > then accordingly use the respective NIX block. > > Signed-off-by: Harman Kalra <hkalra@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Applied to dpdk-next-net-mrvl/master. Thanks > --- > *V2: updated make/meson configs with the increased no of > cores. > > config/arm/meson.build | 2 +- > config/defconfig_arm64-octeontx2-linuxapp-gcc | 2 +- > doc/guides/platform/octeontx2.rst | 1 + > drivers/common/octeontx2/hw/otx2_rvu.h | 3 ++- > drivers/net/octeontx2/otx2_ethdev.c | 17 ++++++++++++++++- > 5 files changed, 21 insertions(+), 4 deletions(-) > > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 6e75e6d97..8728051d5 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -82,7 +82,7 @@ flags_thunderx2_extra = [ > flags_octeontx2_extra = [ > ['RTE_MACHINE', '"octeontx2"'], > ['RTE_MAX_NUMA_NODES', 1], > - ['RTE_MAX_LCORE', 24], > + ['RTE_MAX_LCORE', 36], > ['RTE_ARM_FEATURE_ATOMICS', true], > ['RTE_EAL_IGB_UIO', false], > ['RTE_USE_C11_MEM_MODEL', true]] > diff --git a/config/defconfig_arm64-octeontx2-linuxapp-gcc b/config/defconfig_arm64-octeontx2-linuxapp-gcc > index 7cfb81872..0d83becf5 100644 > --- a/config/defconfig_arm64-octeontx2-linuxapp-gcc > +++ b/config/defconfig_arm64-octeontx2-linuxapp-gcc > @@ -7,7 +7,7 @@ > CONFIG_RTE_MACHINE="octeontx2" > > CONFIG_RTE_MAX_NUMA_NODES=1 > -CONFIG_RTE_MAX_LCORE=24 > +CONFIG_RTE_MAX_LCORE=36 > CONFIG_RTE_ARM_FEATURE_ATOMICS=y > > # Doesn't support NUMA > diff --git a/doc/guides/platform/octeontx2.rst b/doc/guides/platform/octeontx2.rst > index d38a4c1ed..7dd695175 100644 > --- a/doc/guides/platform/octeontx2.rst > +++ b/doc/guides/platform/octeontx2.rst > @@ -13,6 +13,7 @@ More information about OCTEON TX2 SoC can be found at `Marvell Official Website > Supported OCTEON TX2 SoCs > ------------------------- > > +- CN98xx > - CN96xx > - CN93xx > > diff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeontx2/hw/otx2_rvu.h > index f2037ec57..330bfb37f 100644 > --- a/drivers/common/octeontx2/hw/otx2_rvu.h > +++ b/drivers/common/octeontx2/hw/otx2_rvu.h > @@ -134,11 +134,12 @@ > #define RVU_BLOCK_ADDR_RVUM (0x0ull) > #define RVU_BLOCK_ADDR_LMT (0x1ull) > #define RVU_BLOCK_ADDR_NPA (0x3ull) > +#define RVU_BLOCK_ADDR_NIX0 (0x4ull) > +#define RVU_BLOCK_ADDR_NIX1 (0x5ull) > #define RVU_BLOCK_ADDR_NPC (0x6ull) > #define RVU_BLOCK_ADDR_SSO (0x7ull) > #define RVU_BLOCK_ADDR_SSOW (0x8ull) > #define RVU_BLOCK_ADDR_TIM (0x9ull) > -#define RVU_BLOCK_ADDR_NIX0 (0x4ull) > #define RVU_BLOCK_ADDR_CPT0 (0xaull) > #define RVU_BLOCK_ADDR_NDC0 (0xcull) > #define RVU_BLOCK_ADDR_NDC1 (0xdull) > diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c > index 3f3f0a693..095506034 100644 > --- a/drivers/net/octeontx2/otx2_ethdev.c > +++ b/drivers/net/octeontx2/otx2_ethdev.c > @@ -2177,6 +2177,20 @@ otx2_eth_dev_is_sdp(struct rte_pci_device *pci_dev) > return false; > } > > +static inline uint64_t > +nix_get_blkaddr(struct otx2_eth_dev *dev) > +{ > + uint64_t reg; > + > + /* Reading the discovery register to know which NIX is the LF > + * attached to. > + */ > + reg = otx2_read64(dev->bar2 + > + RVU_PF_BLOCK_ADDRX_DISC(RVU_BLOCK_ADDR_NIX0)); > + > + return reg & 0x1FFULL ? RVU_BLOCK_ADDR_NIX0 : RVU_BLOCK_ADDR_NIX1; > +} > + > static int > otx2_eth_dev_init(struct rte_eth_dev *eth_dev) > { > @@ -2236,7 +2250,6 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) > dev->configured = 0; > dev->drv_inited = true; > dev->ptype_disable = 0; > - dev->base = dev->bar2 + (RVU_BLOCK_ADDR_NIX0 << 20); > dev->lmt_addr = dev->bar2 + (RVU_BLOCK_ADDR_LMT << 20); > > /* Attach NIX LF */ > @@ -2244,6 +2257,8 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev) > if (rc) > goto otx2_npa_uninit; > > + dev->base = dev->bar2 + (nix_get_blkaddr(dev) << 20); > + > /* Get NIX MSIX offset */ > rc = nix_lf_get_msix_offset(dev); > if (rc) > -- > 2.18.0 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/octeontx2: add cn98xx support 2020-06-24 12:46 ` [dpdk-dev] [PATCH v2] " Harman Kalra 2020-06-25 15:33 ` Jerin Jacob @ 2020-06-26 9:40 ` Ferruh Yigit 2020-06-26 13:34 ` [dpdk-dev] [EXT] " Harman Kalra 1 sibling, 1 reply; 7+ messages in thread From: Ferruh Yigit @ 2020-06-26 9:40 UTC (permalink / raw) To: Harman Kalra, Thomas Monjalon, Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K Cc: dev On 6/24/2020 1:46 PM, Harman Kalra wrote: > New cn98xx SOC comes up with two NIX blocks wrt > cn96xx, cn93xx, to achieve higher performance. > Also the no of cores increased to 36 from 24. > > Adding support for cn98xx where need a logic to > detect if the LF is attached to NIX0 or NIX1 and > then accordingly use the respective NIX block. > > Signed-off-by: Harman Kalra <hkalra@marvell.com> > --- > *V2: updated make/meson configs with the increased no of > cores. Since this is new SoC support I think can be good to highlight in the release notes, what do you think? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [EXT] Re: [PATCH v2] net/octeontx2: add cn98xx support 2020-06-26 9:40 ` Ferruh Yigit @ 2020-06-26 13:34 ` Harman Kalra 2020-06-26 13:45 ` Ferruh Yigit 0 siblings, 1 reply; 7+ messages in thread From: Harman Kalra @ 2020-06-26 13:34 UTC (permalink / raw) To: Ferruh Yigit Cc: Thomas Monjalon, Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K, dev On Fri, Jun 26, 2020 at 10:40:16AM +0100, Ferruh Yigit wrote: > External Email > > ---------------------------------------------------------------------- > On 6/24/2020 1:46 PM, Harman Kalra wrote: > > New cn98xx SOC comes up with two NIX blocks wrt > > cn96xx, cn93xx, to achieve higher performance. > > Also the no of cores increased to 36 from 24. > > > > Adding support for cn98xx where need a logic to > > detect if the LF is attached to NIX0 or NIX1 and > > then accordingly use the respective NIX block. > > > > Signed-off-by: Harman Kalra <hkalra@marvell.com> > > --- > > *V2: updated make/meson configs with the increased no of > > cores. > > Since this is new SoC support I think can be good to highlight in the release > notes, what do you think? Yes, this PMD update information should be captured in release notes. But since this patch has already been merged to dpdk-next-net-mrvl tree, so can I send a new patch with release notes only and later you can squash both the patches together. Thanks Harman ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [EXT] Re: [PATCH v2] net/octeontx2: add cn98xx support 2020-06-26 13:34 ` [dpdk-dev] [EXT] " Harman Kalra @ 2020-06-26 13:45 ` Ferruh Yigit 0 siblings, 0 replies; 7+ messages in thread From: Ferruh Yigit @ 2020-06-26 13:45 UTC (permalink / raw) To: Harman Kalra Cc: Thomas Monjalon, Jerin Jacob, Nithin Dabilpuram, John McNamara, Marko Kovacevic, Kiran Kumar K, dev On 6/26/2020 2:34 PM, Harman Kalra wrote: > On Fri, Jun 26, 2020 at 10:40:16AM +0100, Ferruh Yigit wrote: >> External Email >> >> ---------------------------------------------------------------------- >> On 6/24/2020 1:46 PM, Harman Kalra wrote: >>> New cn98xx SOC comes up with two NIX blocks wrt >>> cn96xx, cn93xx, to achieve higher performance. >>> Also the no of cores increased to 36 from 24. >>> >>> Adding support for cn98xx where need a logic to >>> detect if the LF is attached to NIX0 or NIX1 and >>> then accordingly use the respective NIX block. >>> >>> Signed-off-by: Harman Kalra <hkalra@marvell.com> >>> --- >>> *V2: updated make/meson configs with the increased no of >>> cores. >> >> Since this is new SoC support I think can be good to highlight in the release >> notes, what do you think? > > Yes, this PMD update information should be captured in release notes. > But since this patch has already been merged to dpdk-next-net-mrvl tree, > so can I send a new patch with release notes only and later you can > squash both the patches together. That is OK, please send the release notes update, I will squash it to this patch. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-06-26 13:45 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-17 15:05 [dpdk-dev] [PATCH] net/octeontx2: add cn98xx support Harman Kalra 2020-06-24 8:59 ` Jerin Jacob 2020-06-24 12:46 ` [dpdk-dev] [PATCH v2] " Harman Kalra 2020-06-25 15:33 ` Jerin Jacob 2020-06-26 9:40 ` Ferruh Yigit 2020-06-26 13:34 ` [dpdk-dev] [EXT] " Harman Kalra 2020-06-26 13:45 ` Ferruh Yigit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).