qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 3/7] net/eth: Make ip6_ext_hdr *ext_hdr pointer to const


From: Stefano Garzarella
Subject: Re: [PATCH v5 3/7] net/eth: Make ip6_ext_hdr *ext_hdr pointer to const
Date: Wed, 10 Mar 2021 17:46:39 +0100

On Wed, Mar 10, 2021 at 05:01:31PM +0100, Philippe Mathieu-Daudé wrote:
As the callee doesn't need to modify the ext_hdr buffer,
mark it const.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
net/eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth.c b/net/eth.c
index 6a5a1d04e0b..7c47a267a7a 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -402,7 +402,7 @@ eth_is_ip6_extension_header_type(uint8_t hdr_type)
static bool
_eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
                        size_t ext_hdr_offset,
-                        struct ip6_ext_hdr *ext_hdr,
+                        const struct ip6_ext_hdr *ext_hdr,
                        struct in6_address *dst_addr)
{
    struct ip6_ext_hdr_routing *rthdr = (struct ip6_ext_hdr_routing *) ext_hdr;
--
2.26.2


This patch is fine, but after the last patch of this series, 'ext_hdr' is not used anymore, so what about removing this parameter?

Thanks,
Stefano




reply via email to

[Prev in Thread] Current Thread [Next in Thread]