[v2,00/14] support new 5760X P7 devices

Message ID 20231210012455.20229-1-ajit.khaparde@broadcom.com (mailing list archive)
Headers
Series support new 5760X P7 devices |

Message

Ajit Khaparde Dec. 10, 2023, 1:24 a.m. UTC
  While some of the patches refactor and improve existing code,
this series adds support for the new 5760X P7 device family.
Follow-on patches will incrementally add more functionality.

v1->v2:
- Fixed unused variable error
- Fixed some spellings
- Code refactoring and fixes in backing store v2

Ajit Khaparde (12):
  net/bnxt: refactor epoch setting
  net/bnxt: update HWRM API
  net/bnxt: use the correct COS queue for Tx
  net/bnxt: refactor mem zone allocation
  net/bnxt: add support for p7 device family
  net/bnxt: refactor code to support P7 devices
  net/bnxt: fix array overflow
  net/bnxt: add support for backing store v2
  net/bnxt: modify sending new HWRM commands to firmware
  net/bnxt: retry HWRM ver get if the command fails
  net/bnxt: cap ring resources for P7 devices
  net/bnxt: add support for v3 Rx completion

Kalesh AP (1):
  net/bnxt: log a message when multicast promisc mode changes

Kishore Padmanabha (1):
  net/bnxt: refactor the ulp initialization

 drivers/net/bnxt/bnxt.h                |   97 +-
 drivers/net/bnxt/bnxt_cpr.h            |    5 +-
 drivers/net/bnxt/bnxt_ethdev.c         |  319 ++++-
 drivers/net/bnxt/bnxt_flow.c           |    2 +-
 drivers/net/bnxt/bnxt_hwrm.c           |  416 ++++++-
 drivers/net/bnxt/bnxt_hwrm.h           |   15 +
 drivers/net/bnxt/bnxt_ring.c           |   15 +-
 drivers/net/bnxt/bnxt_rxq.c            |    2 +-
 drivers/net/bnxt/bnxt_rxr.c            |   93 +-
 drivers/net/bnxt/bnxt_rxr.h            |   92 ++
 drivers/net/bnxt/bnxt_util.c           |   10 +
 drivers/net/bnxt/bnxt_util.h           |    1 +
 drivers/net/bnxt/bnxt_vnic.c           |   58 +-
 drivers/net/bnxt/bnxt_vnic.h           |    1 -
 drivers/net/bnxt/hsi_struct_def_dpdk.h | 1531 ++++++++++++++++++++++--
 15 files changed, 2408 insertions(+), 249 deletions(-)
  

Comments

Ajit Khaparde Dec. 13, 2023, 5:33 a.m. UTC | #1
On Sat, Dec 9, 2023 at 5:31 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
>
> While some of the patches refactor and improve existing code,
> this series adds support for the new 5760X P7 device family.
> Follow-on patches will incrementally add more functionality.
>
> v1->v2:
> - Fixed unused variable error
> - Fixed some spellings
> - Code refactoring and fixes in backing store v2

Patchset applied to dpdk-next-net-brcm for-next-net branch.
Thanks

>
> Ajit Khaparde (12):
>   net/bnxt: refactor epoch setting
>   net/bnxt: update HWRM API
>   net/bnxt: use the correct COS queue for Tx
>   net/bnxt: refactor mem zone allocation
>   net/bnxt: add support for p7 device family
>   net/bnxt: refactor code to support P7 devices
>   net/bnxt: fix array overflow
>   net/bnxt: add support for backing store v2
>   net/bnxt: modify sending new HWRM commands to firmware
>   net/bnxt: retry HWRM ver get if the command fails
>   net/bnxt: cap ring resources for P7 devices
>   net/bnxt: add support for v3 Rx completion
>
> Kalesh AP (1):
>   net/bnxt: log a message when multicast promisc mode changes
>
> Kishore Padmanabha (1):
>   net/bnxt: refactor the ulp initialization
>
>  drivers/net/bnxt/bnxt.h                |   97 +-
>  drivers/net/bnxt/bnxt_cpr.h            |    5 +-
>  drivers/net/bnxt/bnxt_ethdev.c         |  319 ++++-
>  drivers/net/bnxt/bnxt_flow.c           |    2 +-
>  drivers/net/bnxt/bnxt_hwrm.c           |  416 ++++++-
>  drivers/net/bnxt/bnxt_hwrm.h           |   15 +
>  drivers/net/bnxt/bnxt_ring.c           |   15 +-
>  drivers/net/bnxt/bnxt_rxq.c            |    2 +-
>  drivers/net/bnxt/bnxt_rxr.c            |   93 +-
>  drivers/net/bnxt/bnxt_rxr.h            |   92 ++
>  drivers/net/bnxt/bnxt_util.c           |   10 +
>  drivers/net/bnxt/bnxt_util.h           |    1 +
>  drivers/net/bnxt/bnxt_vnic.c           |   58 +-
>  drivers/net/bnxt/bnxt_vnic.h           |    1 -
>  drivers/net/bnxt/hsi_struct_def_dpdk.h | 1531 ++++++++++++++++++++++--
>  15 files changed, 2408 insertions(+), 249 deletions(-)
>
> --
> 2.39.2 (Apple Git-143)
>
  
David Marchand Dec. 13, 2023, 7:57 a.m. UTC | #2
On Wed, Dec 13, 2023 at 6:34 AM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> On Sat, Dec 9, 2023 at 5:31 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
> >
> > While some of the patches refactor and improve existing code,
> > this series adds support for the new 5760X P7 device family.
> > Follow-on patches will incrementally add more functionality.
> >
> > v1->v2:
> > - Fixed unused variable error
> > - Fixed some spellings
> > - Code refactoring and fixes in backing store v2
>
> Patchset applied to dpdk-next-net-brcm for-next-net branch.
> Thanks

In case you did not read my mail about mirroring in github, this
for-next-net branch has been mirrored (cool).
And now GHA runs on this branch, but it failed (not cool).
https://github.com/DPDK/dpdk/actions/runs/7191182897/job/19585464602


Looking at the error, I think you applied the v2 (series 30499) and
not the v3 (series 30511) of this work.

$ git diff ovsrobot/series_30499..ovsrobot/series_30511
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8aca3c6fba..75e968394f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1312,7 +1312,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 }

 static eth_tx_burst_t
-bnxt_transmit_function(struct rte_eth_dev *eth_dev)
+bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
 #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
        uint64_t offloads = eth_dev->data->dev_conf.txmode.offloads;
@@ -2929,7 +2929,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
        bp->nb_mc_addr = nb_mc_addr;

        if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
-               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%d)
exceeded Max supported (%d)\n",
+               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%u)
exceeded Max supported (%u)\n",
                            nb_mc_addr, BNXT_MAX_MC_ADDRS);
                PMD_DRV_LOG(INFO, "Turning on Mcast promiscuous mode\n");
                vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index c6d774bd14..e56f7693af 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5653,8 +5653,6 @@ int
bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
                req.type = rte_cpu_to_le_16(type);
                rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
BNXT_USE_CHIMP_MB);
                HWRM_CHECK_RESULT();
-               if (rc != 0)
-                       return rc;

                flags = rte_le_to_cpu_32(resp->flags);
                type = rte_le_to_cpu_16(resp->next_valid_type);
  
Ajit Khaparde Dec. 13, 2023, 2:49 p.m. UTC | #3
On Tue, Dec 12, 2023 at 11:57 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Wed, Dec 13, 2023 at 6:34 AM Ajit Khaparde
> <ajit.khaparde@broadcom.com> wrote:
> >
> > On Sat, Dec 9, 2023 at 5:31 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
> > >
> > > While some of the patches refactor and improve existing code,
> > > this series adds support for the new 5760X P7 device family.
> > > Follow-on patches will incrementally add more functionality.
> > >
> > > v1->v2:
> > > - Fixed unused variable error
> > > - Fixed some spellings
> > > - Code refactoring and fixes in backing store v2
> >
> > Patchset applied to dpdk-next-net-brcm for-next-net branch.
> > Thanks
>
> In case you did not read my mail about mirroring in github, this
> for-next-net branch has been mirrored (cool).
> And now GHA runs on this branch, but it failed (not cool).
> https://github.com/DPDK/dpdk/actions/runs/7191182897/job/19585464602
Hmm. It tested ok on my setup. Let me take a look.

>
>
> Looking at the error, I think you applied the v2 (series 30499) and
> not the v3 (series 30511) of this work.
Let me check.

>
> $ git diff ovsrobot/series_30499..ovsrobot/series_30511
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 8aca3c6fba..75e968394f 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -1312,7 +1312,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
>  }
>
>  static eth_tx_burst_t
> -bnxt_transmit_function(struct rte_eth_dev *eth_dev)
> +bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
>  {
>  #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
>         uint64_t offloads = eth_dev->data->dev_conf.txmode.offloads;
> @@ -2929,7 +2929,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
>         bp->nb_mc_addr = nb_mc_addr;
>
>         if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
> -               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%d)
> exceeded Max supported (%d)\n",
> +               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%u)
> exceeded Max supported (%u)\n",
>                             nb_mc_addr, BNXT_MAX_MC_ADDRS);
>                 PMD_DRV_LOG(INFO, "Turning on Mcast promiscuous mode\n");
>                 vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index c6d774bd14..e56f7693af 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -5653,8 +5653,6 @@ int
> bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
>                 req.type = rte_cpu_to_le_16(type);
>                 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
> BNXT_USE_CHIMP_MB);
>                 HWRM_CHECK_RESULT();
> -               if (rc != 0)
> -                       return rc;
>
>                 flags = rte_le_to_cpu_32(resp->flags);
>                 type = rte_le_to_cpu_16(resp->next_valid_type);
>
>
> --
> David Marchand
>
  
Ajit Khaparde Dec. 13, 2023, 7:09 p.m. UTC | #4
On Wed, Dec 13, 2023 at 6:49 AM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> On Tue, Dec 12, 2023 at 11:57 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > On Wed, Dec 13, 2023 at 6:34 AM Ajit Khaparde
> > <ajit.khaparde@broadcom.com> wrote:
> > >
> > > On Sat, Dec 9, 2023 at 5:31 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
> > > >
> > > > While some of the patches refactor and improve existing code,
> > > > this series adds support for the new 5760X P7 device family.
> > > > Follow-on patches will incrementally add more functionality.
> > > >
> > > > v1->v2:
> > > > - Fixed unused variable error
> > > > - Fixed some spellings
> > > > - Code refactoring and fixes in backing store v2
> > >
> > > Patchset applied to dpdk-next-net-brcm for-next-net branch.
> > > Thanks
> >
> > In case you did not read my mail about mirroring in github, this
> > for-next-net branch has been mirrored (cool).
> > And now GHA runs on this branch, but it failed (not cool).
> > https://github.com/DPDK/dpdk/actions/runs/7191182897/job/19585464602
> Hmm. It tested ok on my setup. Let me take a look.
>
> >
> >
> > Looking at the error, I think you applied the v2 (series 30499) and
> > not the v3 (series 30511) of this work.
> Let me check.

I spent some time trying to dig this up.
It turns out that I had not updated my staging branch
after I mailed the v3 patchset.
And that's how v2 ended up getting merged.
Thanks for catching it and pointing it out.

I pushed the v3 to the dpdk-next-net-brcm for-next-net
branch and the GHA completed successfully.
https://github.com/DPDK/dpdk/actions/runs/7199579031

Please pick this version from the subtree.

----
While some of the patches refactor and improve existing code,
this series adds support for the new 5760X P7 device family.
Follow-on patches will incrementally add more functionality.

v1->v2:
- Fixed unused variable error
- Fixed some spellings
- Code refactoring and fixes in backing store v2

v2->v3:
- Addressed review comments
- Fixed unused arg error


>
> >
> > $ git diff ovsrobot/series_30499..ovsrobot/series_30511
> > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> > index 8aca3c6fba..75e968394f 100644
> > --- a/drivers/net/bnxt/bnxt_ethdev.c
> > +++ b/drivers/net/bnxt/bnxt_ethdev.c
> > @@ -1312,7 +1312,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
> >  }
> >
> >  static eth_tx_burst_t
> > -bnxt_transmit_function(struct rte_eth_dev *eth_dev)
> > +bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
> >  {
> >  #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> >         uint64_t offloads = eth_dev->data->dev_conf.txmode.offloads;
> > @@ -2929,7 +2929,7 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
> >         bp->nb_mc_addr = nb_mc_addr;
> >
> >         if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
> > -               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%d)
> > exceeded Max supported (%d)\n",
> > +               PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%u)
> > exceeded Max supported (%u)\n",
> >                             nb_mc_addr, BNXT_MAX_MC_ADDRS);
> >                 PMD_DRV_LOG(INFO, "Turning on Mcast promiscuous mode\n");
> >                 vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
> > diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> > index c6d774bd14..e56f7693af 100644
> > --- a/drivers/net/bnxt/bnxt_hwrm.c
> > +++ b/drivers/net/bnxt/bnxt_hwrm.c
> > @@ -5653,8 +5653,6 @@ int
> > bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
> >                 req.type = rte_cpu_to_le_16(type);
> >                 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
> > BNXT_USE_CHIMP_MB);
> >                 HWRM_CHECK_RESULT();
> > -               if (rc != 0)
> > -                       return rc;
> >
> >                 flags = rte_le_to_cpu_32(resp->flags);
> >                 type = rte_le_to_cpu_16(resp->next_valid_type);
> >
> >
> > --
> > David Marchand
> >