[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53eafc84-c51e-4c88-93ad-18c33ffe426c@kernel.org>
Date: Mon, 29 Apr 2024 12:51:40 -0600
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] inet: introduce dst_rtable() helper
On 4/29/24 7:30 AM, Eric Dumazet wrote:
> I added dst_rt6_info() in commit
> e8dfd42c17fa ("ipv6: introduce dst_rt6_info() helper")
>
> This patch does a similar change for IPv4.
>
> Instead of (struct rtable *)dst casts, we can use :
>
> #define dst_rtable(_ptr) \
> container_of_const(_ptr, struct rtable, dst)
>
> Patch is smaller than IPv6 one, because IPv4 has skb_rtable() helper.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
> drivers/infiniband/core/addr.c | 12 +++---------
> drivers/net/vrf.c | 2 +-
> drivers/s390/net/qeth_core.h | 5 ++---
> include/linux/skbuff.h | 9 ---------
> include/net/ip.h | 4 ++--
> include/net/route.h | 11 +++++++++++
> net/atm/clip.c | 2 +-
> net/core/dst_cache.c | 2 +-
> net/core/filter.c | 3 +--
> net/ipv4/af_inet.c | 2 +-
> net/ipv4/icmp.c | 26 ++++++++++++++------------
> net/ipv4/ip_input.c | 2 +-
> net/ipv4/ip_output.c | 8 ++++----
> net/ipv4/route.c | 24 +++++++++++-------------
> net/ipv4/udp.c | 2 +-
> net/ipv4/xfrm4_policy.c | 2 +-
> net/l2tp/l2tp_ip.c | 2 +-
> net/mpls/mpls_iptunnel.c | 2 +-
> net/netfilter/ipvs/ip_vs_xmit.c | 2 +-
> net/netfilter/nf_flow_table_ip.c | 4 ++--
> net/netfilter/nft_rt.c | 2 +-
> net/sctp/protocol.c | 4 ++--
> net/tipc/udp_media.c | 2 +-
> 23 files changed, 64 insertions(+), 70 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists