net/eth: Better describe _eth_get_rss_ex_dst_addr's offset argument
The 'offset' argument represents the offset to the ip6_ext_hdr header, rename it as 'ext_hdr_offset'. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
38462440ca
commit
dbd8d3f959
@ -401,7 +401,7 @@ eth_is_ip6_extension_header_type(uint8_t hdr_type)
|
|||||||
|
|
||||||
static bool
|
static bool
|
||||||
_eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
|
_eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
|
||||||
size_t rthdr_offset,
|
size_t ext_hdr_offset,
|
||||||
struct ip6_ext_hdr *ext_hdr,
|
struct ip6_ext_hdr *ext_hdr,
|
||||||
struct in6_address *dst_addr)
|
struct in6_address *dst_addr)
|
||||||
{
|
{
|
||||||
@ -412,12 +412,12 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
|
|||||||
size_t input_size = iov_size(pkt, pkt_frags);
|
size_t input_size = iov_size(pkt, pkt_frags);
|
||||||
size_t bytes_read;
|
size_t bytes_read;
|
||||||
|
|
||||||
if (input_size < rthdr_offset + sizeof(*ext_hdr)) {
|
if (input_size < ext_hdr_offset + sizeof(*ext_hdr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_read = iov_to_buf(pkt, pkt_frags,
|
bytes_read = iov_to_buf(pkt, pkt_frags,
|
||||||
rthdr_offset + sizeof(*rthdr),
|
ext_hdr_offset + sizeof(*rthdr),
|
||||||
dst_addr, sizeof(*dst_addr));
|
dst_addr, sizeof(*dst_addr));
|
||||||
|
|
||||||
return bytes_read == sizeof(*dst_addr);
|
return bytes_read == sizeof(*dst_addr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user