]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlxsw: pci: Sync Rx buffers for CPU
authorAmit Cohen <amcohen@nvidia.com>
Fri, 25 Oct 2024 14:26:26 +0000 (16:26 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 01:24:39 +0000 (18:24 -0700)
commit15f73e601a9c67aa83bde92b2d940a6532d8614d
tree9b7e479a7690142d5a6fa6146785a31e1ed6d94c
parent0a66e5582b5102c4d7b866b977ff7c850c1174ce
mlxsw: pci: Sync Rx buffers for CPU

When Rx packet is received, drivers should sync the pages for CPU, to
ensure the CPU reads the data written by the device and not stale
data from its cache.

Add the missing sync call in Rx path, sync the actual length of data for
each fragment.

Cc: Jiri Pirko <jiri@resnulli.us>
Fixes: b5b60bb491b2 ("mlxsw: pci: Use page pool for Rx buffers allocation")
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/461486fac91755ca4e04c2068c102250026dcd0b.1729866134.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/pci.c