diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-02-18 13:07:18 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-02-18 08:43:12 +0100 |
| commit | 354bc0bab1cb6095592288674d375511443427fd (patch) | |
| tree | 71e8f82fd0847458a95e4e7b81a9f690de0ae4e7 /contrib | |
| parent | 0a51060f7ac3e1e1a9d87ffdb037b9c367a2a4d9 (diff) | |
| download | passt-354bc0bab1cb6095592288674d375511443427fd.tar passt-354bc0bab1cb6095592288674d375511443427fd.tar.gz passt-354bc0bab1cb6095592288674d375511443427fd.tar.bz2 passt-354bc0bab1cb6095592288674d375511443427fd.tar.lz passt-354bc0bab1cb6095592288674d375511443427fd.tar.xz passt-354bc0bab1cb6095592288674d375511443427fd.tar.zst passt-354bc0bab1cb6095592288674d375511443427fd.zip | |
packet: Don't pass start and offset separately to packet_check_range()
Fundamentally what packet_check_range() does is to check whether a given
memory range is within the allowed / expected memory set aside for packets
from a particular pool. That range could represent a whole packet (from
packet_add_do()) or part of a packet (from packet_get_do()), but it doesn't
really matter which.
However, we pass the start of the range as two parameters: @start which is
the start of the packet, and @offset which is the offset within the packet
of the range we're interested in. We never use these separately, only as
(start + offset). Simplify the interface of packet_check_range() and
vu_packet_check_range() to directly take the start of the relevant range.
This will allow some additional future improvements.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions
