From: Paolo Abeni <pabeni@redhat.com>
To: Sai Krishna <saikrishnag@marvell.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
sgoutham@marvell.com, gakula@marvell.com, lcherian@marvell.com,
jerinj@marvell.com, hkelam@marvell.com, sbhatta@marvell.com,
andrew+netdev@lunn.ch, kalesh-anakkur.purayil@broadcom.com
Subject: Re: [net-next PATCH v10 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality
Date: Thu, 20 Feb 2025 12:59:10 +0100 [thread overview]
Message-ID: <1a053f30-4a13-4199-bf1f-40b729b4a146@redhat.com> (raw)
In-Reply-To: <20250217085257.173652-4-saikrishnag@marvell.com>
On 2/17/25 9:52 AM, Sai Krishna wrote:
> This implementation uses separate trigger interrupts for request,
> response MBOX messages against using trigger message data in CN10K.
> This patch adds support for basic mbox implementation for CN20K
> from AF side.
>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
> ---
> .../ethernet/marvell/octeontx2/af/cn20k/api.h | 8 +
> .../marvell/octeontx2/af/cn20k/mbox_init.c | 215 ++++++++++++++++++
> .../ethernet/marvell/octeontx2/af/cn20k/reg.h | 17 ++
> .../marvell/octeontx2/af/cn20k/struct.h | 25 ++
> .../net/ethernet/marvell/octeontx2/af/mbox.c | 83 ++++++-
> .../net/ethernet/marvell/octeontx2/af/mbox.h | 1 +
> .../net/ethernet/marvell/octeontx2/af/rvu.c | 69 ++++--
> .../net/ethernet/marvell/octeontx2/af/rvu.h | 16 +-
> .../marvell/octeontx2/nic/otx2_common.c | 10 +-
> .../ethernet/marvell/octeontx2/nic/otx2_pf.c | 9 +-
> 10 files changed, 420 insertions(+), 33 deletions(-)
> create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cn20k/struct.h
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/api.h b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/api.h
> index b57bd38181aa..9436a4a4d815 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cn20k/api.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cn20k/api.h
> @@ -15,8 +15,16 @@ struct ng_rvu {
> struct qmem *pf_mbox_addr;
> };
>
> +struct rvu;
> +
A few lines above the header file rvu.h is included, the forward
declararions should not be needed...
> /* Mbox related APIs */
> int cn20k_rvu_mbox_init(struct rvu *rvu, int type, int num);
... otherwise this line will give warns in the previous patch.
[...]
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> index 9f145c540253..acd9e1ca6d2b 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> @@ -597,8 +597,7 @@ static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
> base = pci_resource_start(pf->pdev, PCI_MBOX_BAR_NUM) +
> MBOX_SIZE;
> else
> - base = readq((void __iomem *)((u64)pf->reg_base +
> - RVU_PF_VF_BAR4_ADDR));
> + base = readq((pf->reg_base + RVU_PF_VF_BAR4_ADDR));
>
> hwbase = ioremap_wc(base, MBOX_SIZE * pf->total_vfs);
> if (!hwbase) {
> @@ -647,7 +646,7 @@ static void otx2_pfvf_mbox_destroy(struct otx2_nic *pf)
> }
>
> if (mbox->mbox.hwbase)
> - iounmap(mbox->mbox.hwbase);
> + iounmap((void __iomem *)mbox->mbox.hwbase);
>
> otx2_mbox_destroy(&mbox->mbox);
> }
> @@ -1312,7 +1311,7 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
>
> /* CQ */
> for (qidx = 0; qidx < pf->qset.cq_cnt; qidx++) {
> - ptr = otx2_get_regaddr(pf, NIX_LF_CQ_OP_INT);
> + ptr = (__force u64 *)otx2_get_regaddr(pf, NIX_LF_CQ_OP_INT);
> val = otx2_atomic64_add((qidx << 44), ptr);
>
> otx2_write64(pf, NIX_LF_CQ_OP_INT, (qidx << 44) |
> @@ -1351,7 +1350,7 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
> * these are fatal errors.
> */
>
> - ptr = otx2_get_regaddr(pf, NIX_LF_SQ_OP_INT);
> + ptr = (__force u64 *)otx2_get_regaddr(pf, NIX_LF_SQ_OP_INT);
> val = otx2_atomic64_add((qidx << 44), ptr);
> otx2_write64(pf, NIX_LF_SQ_OP_INT, (qidx << 44) |
> (val & NIX_SQINT_BITS));
All the changes here looks unrelated. I guess they fix compile warnings.
Should go into a separate patch, earlier in the series.
/P
next prev parent reply other threads:[~2025-02-20 11:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 8:52 [net-next PATCH v10 0/6] CN20K silicon with mbox support Sai Krishna
2025-02-17 8:52 ` [net-next PATCH v10 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon Sai Krishna
2025-02-17 8:52 ` [net-next PATCH v10 2/6] octeontx2-af: CN20k basic mbox operations and structures Sai Krishna
2025-02-20 11:50 ` Paolo Abeni
2025-02-25 6:05 ` Sai Krishna Gajula
2025-02-17 8:52 ` [net-next PATCH v10 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality Sai Krishna
2025-02-20 11:59 ` Paolo Abeni [this message]
2025-02-25 6:12 ` Sai Krishna Gajula
2025-02-17 8:52 ` [net-next PATCH v10 4/6] octeontx2-pf: CN20K mbox REQ/ACK implementation for NIC PF Sai Krishna
2025-02-17 8:52 ` [net-next PATCH v10 5/6] octeontx2-af: CN20K mbox implementation for AF's VF Sai Krishna
2025-02-20 12:06 ` Paolo Abeni
2025-02-23 14:40 ` Sai Krishna Gajula
2025-02-17 8:52 ` [net-next PATCH v10 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF Sai Krishna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a053f30-4a13-4199-bf1f-40b729b4a146@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saikrishnag@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®