From: "Abhishek Chauhan (ABC)" <quic_abchauha@quicinc.com>
To: <jitendra.vegiraju@broadcom.com>, <netdev@vger.kernel.org>
Cc: <alexandre.torgue@foss.st.com>, <joabreu@synopsys.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <mcoquelin.stm32@gmail.com>,
<bcm-kernel-feedback-list@broadcom.com>,
<richardcochran@gmail.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <hawk@kernel.org>,
<john.fastabend@gmail.com>, <fancer.lancer@gmail.com>,
<rmk+kernel@armlinux.org.uk>, <ahalaney@redhat.com>,
<xiaolei.wang@windriver.com>, <rohan.g.thomas@intel.com>,
<Jianheng.Zhang@synopsys.com>, <leong.ching.swee@intel.com>,
<linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>, <bpf@vger.kernel.org>,
<andrew@lunn.ch>, <linux@armlinux.org.uk>, <horms@kernel.org>,
<florian.fainelli@broadcom.com>,
Sagar Cheluvegowda <quic_scheluve@quicinc.com>
Subject: Re: [net-next v4 1/5] net: stmmac: Add HDMA mapping for dw25gmac support
Date: Thu, 15 Aug 2024 16:30:31 -0700 [thread overview]
Message-ID: <2ad03012-8a10-49fc-9e80-3b91762b9cc3@quicinc.com> (raw)
In-Reply-To: <20240814221818.2612484-2-jitendra.vegiraju@broadcom.com>
On 8/14/2024 3:18 PM, jitendra.vegiraju@broadcom.com wrote:
> From: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
>
> Add hdma configuration support in include/linux/stmmac.h file.
> The hdma configuration includes mapping of virtual DMAs to physical DMAs.
> Define a new data structure stmmac_hdma_cfg to provide the mapping.
>
> Signed-off-by: Jitendra Vegiraju <jitendra.vegiraju@broadcom.com>
> ---
> include/linux/stmmac.h | 50 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 338991c08f00..1775bd2b7c14 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -89,6 +89,55 @@ struct stmmac_mdio_bus_data {
> bool needs_reset;
> };
>
> +/* DW25GMAC Hyper-DMA Overview
> + * Hyper-DMA allows support for large number of Virtual DMA(VDMA)
> + * channels using a smaller set of physical DMA channels(PDMA).
> + * This is supported by the mapping of VDMAs to Traffic Class (TC)
> + * and PDMA to TC in each traffic direction as shown below.
> + *
> + * VDMAs Traffic Class PDMA
> + * +--------+ +------+ +-----------+
> + * |VDMA0 |--------->| TC0 |-------->|PDMA0/TXQ0 |
> + *TX +--------+ |----->+------+ +-----------+
> + *Host=> +--------+ | +------+ +-----------+ => MAC
> + *SW |VDMA1 |---+ | TC1 | +--->|PDMA1/TXQ1 |
> + * +--------+ +------+ | +-----------+
> + * +--------+ +------+----+ +-----------+
> + * |VDMA2 |--------->| TC2 |-------->|PDMA2/TXQ1 |
> + * +--------+ +------+ +-----------+
> + * . . .
> + * +--------+ +------+ +-----------+
> + * |VDMAn-1 |--------->| TCx-1|-------->|PDMAm/TXQm |
> + * +--------+ +------+ +-----------+
> + *
> + * +------+ +------+ +------+
> + * |PDMA0 |--------->| TC0 |-------->|VDMA0 |
> + * +------+ |----->+------+ +------+
> + *MAC => +------+ | +------+ +------+
> + *RXQs |PDMA1 |---+ | TC1 | +--->|VDMA1 | => Host
> + * +------+ +------+ | +------+
> + * . . .
> + */
> +
> +#define STMMAC_DW25GMAC_MAX_NUM_TX_VDMA 128
> +#define STMMAC_DW25GMAC_MAX_NUM_RX_VDMA 128
> +
> +#define STMMAC_DW25GMAC_MAX_NUM_TX_PDMA 8
> +#define STMMAC_DW25GMAC_MAX_NUM_RX_PDMA 10
> +
I have a query here.
Why do we need to hardcode the number of TX PDMA and RX PDMA to 8 an 10. On some platforms the number of supported TXPDMA and RXPDMA are 11 and 11 respectively ?
how do we overcome this problem, do we increase the value in such case?
> +#define STMMAC_DW25GMAC_MAX_TC 8
> +
> +/* Hyper-DMA mapping configuration
> + * Traffic Class associated with each VDMA/PDMA mapping
> + * is stored in corresponding array entry.
> + */
> +struct stmmac_hdma_cfg {
> + u8 tvdma_tc[STMMAC_DW25GMAC_MAX_NUM_TX_VDMA];
> + u8 rvdma_tc[STMMAC_DW25GMAC_MAX_NUM_RX_VDMA];
> + u8 tpdma_tc[STMMAC_DW25GMAC_MAX_NUM_TX_PDMA];
> + u8 rpdma_tc[STMMAC_DW25GMAC_MAX_NUM_RX_PDMA];
> +};
> +
> struct stmmac_dma_cfg {
> int pbl;
> int txpbl;
> @@ -101,6 +150,7 @@ struct stmmac_dma_cfg {
> bool multi_msi_en;
> bool dche;
> bool atds;
> + struct stmmac_hdma_cfg *hdma_cfg;
> };
>
> #define AXI_BLEN 7
next prev parent reply other threads:[~2024-08-15 23:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 22:18 [net-next v4 0/5] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-14 22:18 ` [net-next v4 1/5] net: stmmac: Add HDMA mapping for dw25gmac support jitendra.vegiraju
2024-08-15 23:30 ` Abhishek Chauhan (ABC) [this message]
2024-08-20 23:10 ` Jitendra Vegiraju
2024-08-20 23:12 ` Abhishek Chauhan (ABC)
2024-08-14 22:18 ` [net-next v4 2/5] net: stmmac: Add basic dw25gmac support to stmmac core jitendra.vegiraju
2024-08-22 17:16 ` Amit Singh Tomar
2024-08-26 17:41 ` Jitendra Vegiraju
2024-08-14 22:18 ` [net-next v4 3/5] net: stmmac: Integrate dw25gmac into stmmac hwif handling jitendra.vegiraju
2024-08-23 13:48 ` Serge Semin
2024-08-26 18:53 ` Jitendra Vegiraju
2024-08-29 10:52 ` Serge Semin
2024-08-30 23:35 ` Jitendra Vegiraju
2024-08-14 22:18 ` [net-next v4 4/5] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-16 18:27 ` Jakub Kicinski
2024-08-20 23:16 ` Jitendra Vegiraju
2024-08-22 16:35 ` Amit Singh Tomar
2024-08-26 17:30 ` Jitendra Vegiraju
2024-08-27 20:32 ` Amit Singh Tomar
2024-08-14 22:18 ` [net-next v4 5/5] net: stmmac: Add BCM8958x driver to build system jitendra.vegiraju
2024-08-16 18:46 ` [net-next v4 0/5] net: stmmac: Add PCI driver support for BCM8958x Serge Semin
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=2ad03012-8a10-49fc-9e80-3b91762b9cc3@quicinc.com \
--to=quic_abchauha@quicinc.com \
--cc=Jianheng.Zhang@synopsys.com \
--cc=ahalaney@redhat.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=ast@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jitendra.vegiraju@broadcom.com \
--cc=joabreu@synopsys.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leong.ching.swee@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_scheluve@quicinc.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rohan.g.thomas@intel.com \
--cc=xiaolei.wang@windriver.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®