Re: [PATCH net-next 2/4] net: dst_cache: add input_dst_cache API

From: Jakub Kicinski
Date: Fri Mar 08 2024 - 22:55:42 EST


On Thu, 7 Mar 2024 18:12:00 +0100 Leone Fernando wrote:
> +static inline u64 create_dst_cache_key_ip4(const struct sk_buff *skb)
> +{
> + struct iphdr *iphdr = ip_hdr(skb);
> +
> + return (((u64)iphdr->daddr) << 8) | iphdr->tos;

Sparse complains that you're ignoring bitwise types:

include/net/dst_cache.h:170:19: warning: cast from restricted __be32
include/net/dst_cache.h:170:19: warning: cast from restricted __be32
--
pw-bot: cr