diff options
author | 2021-06-30 13:45:05 +0300 | |
---|---|---|
committer | 2021-07-27 16:10:03 -0700 | |
commit | e2351e517068718724f1d3b4010e2a41ec91fa76 (patch) | |
tree | c1329e8ce22ee09c2c96a3031f1b2bd7ac7eb000 /net/unix/af_unix.c | |
parent | net/mlx5: E-Switch, handle devcom events only for ports on the same device (diff) | |
download | wireguard-linux-e2351e517068718724f1d3b4010e2a41ec91fa76.tar.xz wireguard-linux-e2351e517068718724f1d3b4010e2a41ec91fa76.zip |
net/mlx5e: RX, Avoid possible data corruption when relaxed ordering and LRO combined
When HW aggregates packets for an LRO session, it writes the payload
of two consecutive packets of a flow contiguously, so that they usually
share a cacheline.
The first byte of a packet's payload is written immediately after
the last byte of the preceding packet.
In this flow, there are two consecutive write requests to the shared
cacheline:
1. Regular write for the earlier packet.
2. Read-modify-write for the following packet.
In case of relaxed-ordering on, these two writes might be re-ordered.
Using the end padding optimization (to avoid partial write for the last
cacheline of a packet) becomes problematic if the two writes occur
out-of-order, as the padding would overwrite payload that belongs to
the following packet, causing data corruption.
Avoid this by disabling the end padding optimization when both
LRO and relaxed-ordering are enabled.
Fixes: 17347d5430c4 ("net/mlx5e: Add support for PCI relaxed ordering")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions