netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com, vsrama-krishna.nemani@broadcom.com,
	vikas.gupta@broadcom.com,
	Rajashekar Hudumula <rajashekar.hudumula@broadcom.com>
Subject: Re: [v7, net-next 08/10] bng_en: Register rings with the firmware
Date: Thu, 18 Sep 2025 20:06:47 +0100	[thread overview]
Message-ID: <20250918190647.GB589538@horms.kernel.org> (raw)
In-Reply-To: <CANXQDtYdxMq_EAPqu_WvnYqZ5SKW2k139Hwm+jW=kZpSQQgRtQ@mail.gmail.com>

On Thu, Sep 18, 2025 at 04:11:12PM +0530, Bhargava Chenna Marreddy wrote:
> On Tue, Sep 16, 2025 at 9:21 PM Simon Horman <horms@kernel.org> wrote:
> >
> > On Fri, Sep 12, 2025 at 01:05:03AM +0530, Bhargava Marreddy wrote:
> > > Enable ring functionality by registering RX, AGG, TX, CMPL, and
> > > NQ rings with the firmware. Initialise the doorbells associated
> > > with the rings.
> > >
> > > Signed-off-by: Bhargava Marreddy <bhargava.marreddy@broadcom.com>
> > > Reviewed-by: Vikas Gupta <vikas.gupta@broadcom.com>
> > > Reviewed-by: Rajashekar Hudumula <rajashekar.hudumula@broadcom.com>
> >
> > ...
> >
> > > diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_db.h b/drivers/net/ethernet/broadcom/bnge/bnge_db.h
> > > new file mode 100644
> > > index 00000000000..950ed582f1d
> > > --- /dev/null
> > > +++ b/drivers/net/ethernet/broadcom/bnge/bnge_db.h
> > > @@ -0,0 +1,34 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +/* Copyright (c) 2025 Broadcom */
> > > +
> > > +#ifndef _BNGE_DB_H_
> > > +#define _BNGE_DB_H_
> > > +
> > > +/* 64-bit doorbell */
> > > +#define DBR_EPOCH_SFT                                        24
> > > +#define DBR_TOGGLE_SFT                                       25
> > > +#define DBR_XID_SFT                                  32
> > > +#define DBR_PATH_L2                                  (0x1ULL << 56)
> > > +#define DBR_VALID                                    (0x1ULL << 58)
> > > +#define DBR_TYPE_SQ                                  (0x0ULL << 60)
> > > +#define DBR_TYPE_SRQ                                 (0x2ULL << 60)
> > > +#define DBR_TYPE_CQ                                  (0x4ULL << 60)
> > > +#define DBR_TYPE_CQ_ARMALL                           (0x6ULL << 60)
> > > +#define DBR_TYPE_NQ                                  (0xaULL << 60)
> > > +#define DBR_TYPE_NQ_ARM                                      (0xbULL << 60)
> > > +#define DBR_TYPE_NQ_MASK                             (0xeULL << 60)
> >
> > Perhaps BIT_ULL() and GENMASK_ULL() can be used here?
> 
> Thanks for the suggestion, Simon. Some macros have non-contiguous
> bits, requiring combinations with "|",
> which would make the definitions longer and harder to follow. Since
> these Doorbell Register (DBR) values
> are hardware-specified, I believe it's better to keep them as they
> are. Please let me know if you see any issues.

Thanks, understood.
If you prefer the current approach, that is fine by me.

  reply	other threads:[~2025-09-18 19:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 19:34 [v7, net-next 00/10] Add more functionality to BNGE Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 01/10] bng_en: make bnge_alloc_ring() self-unwind on failure Bhargava Marreddy
2025-09-16 15:12   ` Simon Horman
2025-09-18  9:50     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman
2025-09-11 19:34 ` [v7, net-next 02/10] bng_en: Add initial support for RX and TX rings Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 03/10] bng_en: Add initial support for CP and NQ rings Bhargava Marreddy
2025-09-16 14:54   ` Simon Horman
2025-09-18  9:40     ` Bhargava Chenna Marreddy
2025-09-11 19:34 ` [v7, net-next 04/10] bng_en: Introduce VNIC Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 05/10] bng_en: Initialise core resources Bhargava Marreddy
2025-09-16 15:45   ` Simon Horman
2025-09-18 10:49     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 06/10] bng_en: Allocate packet buffers Bhargava Marreddy
2025-09-14 20:31   ` Jakub Kicinski
2025-09-15 17:56     ` Bhargava Chenna Marreddy
2025-09-15 21:52       ` Jakub Kicinski
2025-09-11 19:35 ` [v7, net-next 07/10] bng_en: Allocate stat contexts Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 08/10] bng_en: Register rings with the firmware Bhargava Marreddy
2025-09-16 15:51   ` Simon Horman
2025-09-18 10:41     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman [this message]
2025-09-17 20:14   ` [External] : " ALOK TIWARI
2025-09-11 19:35 ` [v7, net-next 09/10] bng_en: Register default VNIC Bhargava Marreddy
2025-09-17 20:18   ` ALOK TIWARI
2025-09-19  6:28     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 10/10] bng_en: Configure " Bhargava Marreddy

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=20250918190647.GB589538@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhargava.marreddy@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=rajashekar.hudumula@broadcom.com \
    --cc=vikas.gupta@broadcom.com \
    --cc=vsrama-krishna.nemani@broadcom.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;
as well as URLs for NNTP newsgroup(s).