[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANXQDtYdxMq_EAPqu_WvnYqZ5SKW2k139Hwm+jW=kZpSQQgRtQ@mail.gmail.com>
Date: Thu, 18 Sep 2025 16:11:12 +0530
From: Bhargava Chenna Marreddy <bhargava.marreddy@...adcom.com>
To: Simon Horman <horms@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, andrew+netdev@...n.ch, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, michael.chan@...adcom.com,
pavan.chebbi@...adcom.com, vsrama-krishna.nemani@...adcom.com,
vikas.gupta@...adcom.com,
Rajashekar Hudumula <rajashekar.hudumula@...adcom.com>
Subject: Re: [v7, net-next 08/10] bng_en: Register rings with the firmware
On Tue, Sep 16, 2025 at 9:21 PM Simon Horman <horms@...nel.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@...adcom.com>
> > Reviewed-by: Vikas Gupta <vikas.gupta@...adcom.com>
> > Reviewed-by: Rajashekar Hudumula <rajashekar.hudumula@...adcom.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.
>
> ...
Powered by blists - more mailing lists