mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
eth: fbnic: Correct packet header prefetch
The existing call to net_prefetch() fetched a stale address. The data
pointer is not initialized until after the call to xdp_prepare_buff().
Thus, making the prefetch ineffective.
Open code the address calcuation to give the prefetch as much time
as possible.
This was found by manual code inspection. No issues have been observed
from this.
Fixes: 9064ab485f ("eth: fbnic: Prefetch packet headers on Rx")
Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261020172706.1090951-1-dimitri.daskalakis1@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e3aaeebbef
commit
286154ae69
|
|
@ -1025,7 +1025,7 @@ static void fbnic_pkt_prepare(struct fbnic_napi_vector *nv, u64 rcd,
|
|||
|
||||
/* Build frame around buffer */
|
||||
hdr_start = page_address(page) + hdr_pg_start;
|
||||
net_prefetch(pkt->buff.data);
|
||||
net_prefetch(hdr_start + headroom);
|
||||
xdp_prepare_buff(&pkt->buff, hdr_start, headroom,
|
||||
len - FBNIC_RX_PAD, true);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user