From: Felix Fietkau <nbd@nbd.name> To: netdev@vger.kernel.org, John Crispin <john@phrozen.org>, Sean Wang <sean.wang@mediatek.com>, Mark Lee <Mark-MC.Lee@mediatek.com>, Lorenzo Bianconi <lorenzo@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/6] net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full Date: Wed, 16 Nov 2022 09:07:30 +0100 [thread overview] Message-ID: <20221116080734.44013-3-nbd@nbd.name> (raw) In-Reply-To: <20221116080734.44013-1-nbd@nbd.name> Improves handling of DMA ring overflow. Clarify other WDMA drop related comment. Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index a9a6b53b4286..fbfc23923bf5 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3393,9 +3393,12 @@ static int mtk_hw_init(struct mtk_eth *eth) mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { - /* PSE should not drop port8 and port9 packets */ + /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); + /* PSE should drop packets to port 8/9 on WDMA Rx ring full */ + mtk_w32(eth, 0x00000300, PSE_PPE0_DROP); + /* PSE Free Queue Flow Control */ mtk_w32(eth, 0x01fa01f4, PSE_FQFC_CFG2); diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h index 72d3bfc2323d..eaaa0c67ef2a 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -127,6 +127,7 @@ #define PSE_FQFC_CFG1 0x100 #define PSE_FQFC_CFG2 0x104 #define PSE_DROP_CFG 0x108 +#define PSE_PPE0_DROP 0x110 /* PSE Input Queue Reservation Register*/ #define PSE_IQ_REV(x) (0x140 + (((x) - 1) << 2)) -- 2.38.1
WARNING: multiple messages have this Message-ID (diff)
From: Felix Fietkau <nbd@nbd.name> To: netdev@vger.kernel.org, John Crispin <john@phrozen.org>, Sean Wang <sean.wang@mediatek.com>, Mark Lee <Mark-MC.Lee@mediatek.com>, Lorenzo Bianconi <lorenzo@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/6] net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full Date: Wed, 16 Nov 2022 09:07:30 +0100 [thread overview] Message-ID: <20221116080734.44013-3-nbd@nbd.name> (raw) In-Reply-To: <20221116080734.44013-1-nbd@nbd.name> Improves handling of DMA ring overflow. Clarify other WDMA drop related comment. Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index a9a6b53b4286..fbfc23923bf5 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -3393,9 +3393,12 @@ static int mtk_hw_init(struct mtk_eth *eth) mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { - /* PSE should not drop port8 and port9 packets */ + /* PSE should not drop port8 and port9 packets from WDMA Tx */ mtk_w32(eth, 0x00000300, PSE_DROP_CFG); + /* PSE should drop packets to port 8/9 on WDMA Rx ring full */ + mtk_w32(eth, 0x00000300, PSE_PPE0_DROP); + /* PSE Free Queue Flow Control */ mtk_w32(eth, 0x01fa01f4, PSE_FQFC_CFG2); diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h index 72d3bfc2323d..eaaa0c67ef2a 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h @@ -127,6 +127,7 @@ #define PSE_FQFC_CFG1 0x100 #define PSE_FQFC_CFG2 0x104 #define PSE_DROP_CFG 0x108 +#define PSE_PPE0_DROP 0x110 /* PSE Input Queue Reservation Register*/ #define PSE_IQ_REV(x) (0x140 + (((x) - 1) << 2)) -- 2.38.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-16 8:08 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-16 8:07 Multiqueue support for mtk_eth_soc Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau 2022-11-16 8:07 ` [PATCH net-next 1/6] net: ethernet: mtk_eth_soc: increase tx ring size for QDMA devices Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau 2022-11-19 3:50 ` patchwork-bot+netdevbpf 2022-11-19 3:50 ` patchwork-bot+netdevbpf 2022-11-16 8:07 ` Felix Fietkau [this message] 2022-11-16 8:07 ` [PATCH net-next 2/6] net: ethernet: mtk_eth_soc: drop packets to WDMA if the ring is full Felix Fietkau 2022-11-16 8:07 ` [PATCH net-next 3/6] net: ethernet: mtk_eth_soc: avoid port_mg assignment on MT7622 and newer Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau 2022-11-16 8:07 ` [PATCH net-next 4/6] net: ethernet: mtk_eth_soc: implement multi-queue support for per-port queues Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau 2022-11-18 15:13 ` Alexander 'lynxis' Couzens 2022-11-18 15:13 ` Alexander 'lynxis' Couzens 2022-11-18 16:30 ` Felix Fietkau 2022-11-18 16:30 ` Felix Fietkau 2022-11-16 8:07 ` [PATCH net-next 5/6] net: dsa: tag_mtk: assign " Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau 2022-11-16 18:26 ` Florian Fainelli 2022-11-16 18:26 ` Florian Fainelli 2022-11-16 8:07 ` [PATCH net-next 6/6] net: ethernet: mediatek: ppe: assign per-port queues for offloaded traffic Felix Fietkau 2022-11-16 8:07 ` Felix Fietkau
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=20221116080734.44013-3-nbd@nbd.name \ --to=nbd@nbd.name \ --cc=Mark-MC.Lee@mediatek.com \ --cc=davem@davemloft.net \ --cc=edumazet@google.com \ --cc=john@phrozen.org \ --cc=kuba@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=lorenzo@kernel.org \ --cc=matthias.bgg@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=sean.wang@mediatek.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.