[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AS8PR04MB849779A6392D543049A3F5BE88ABA@AS8PR04MB8497.eurprd04.prod.outlook.com>
Date: Wed, 17 Dec 2025 12:49:19 +0000
From: Wei Fang <wei.fang@....com>
To: Hariprasad Kelam <hkelam@...vell.com>
CC: "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
"alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
"ast@...nel.org" <ast@...nel.org>, "daniel@...earbox.net"
<daniel@...earbox.net>, "hawk@...nel.org" <hawk@...nel.org>,
"john.fastabend@...il.com" <john.fastabend@...il.com>, "sdf@...ichev.me"
<sdf@...ichev.me>, "rmk+kernel@...linux.org.uk" <rmk+kernel@...linux.org.uk>,
"0x1207@...il.com" <0x1207@...il.com>, "hayashi.kunihiko@...ionext.com"
<hayashi.kunihiko@...ionext.com>, Vladimir Oltean <vladimir.oltean@....com>,
"boon.leong.ong@...el.com" <boon.leong.ong@...el.com>, "imx@...ts.linux.dev"
<imx@...ts.linux.dev>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "bpf@...r.kernel.org"
<bpf@...r.kernel.org>
Subject: RE: [PATCH net] net: stmmac: fix the crash issue for zero copy XDP_TX
action
> > - res = stmmac_xdp_xmit_xdpf(priv, queue, xdpf, false);
> > - if (res == STMMAC_XDP_TX)
> > + /* For zero copy XDP_TX action, dma_map is true */
> > + res = stmmac_xdp_xmit_xdpf(priv, queue, xdpf, zc);
> Seems stmmac_xdp_xmit_xdpf is using dma_map_single if we pass zc is
> true.
> Ideally in case of zc, driver can use page_pool_get_dma_addr, may be
> you
> need pass zc param as false. Please check
>
No, the memory type of xdpf->data is MEM_TYPE_PAGE_ORDER0 rather
than MEM_TYPE_PAGE_POOL, so we should use dma_map_single().
Otherwise, it will lead to invalid mappings and cause the crash.
Powered by blists - more mailing lists