Re: [PATCH net-next] net: copy routing table more efficiently in rt_dst_clone

From: David Ahern
Date: Tue Feb 20 2024 - 21:44:34 EST


On 2/18/24 6:35 AM, Oliver Crumrine wrote:
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 16615d107cf0..ebb17c3a0dec 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1664,22 +1664,8 @@ struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt)
> rt->dst.flags);
>
> if (new_rt) {
> + *new_rt = *rt;

rtable is a container of dst_entry, so this is copying those fields as well.

pw-bot: reject