--- zzzz-none-000/linux-5.15.111/include/net/ip.h 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/include/net/ip.h 2024-02-07 10:23:27.000000000 +0000 @@ -15,6 +15,10 @@ * Changes: * Mike McLagan : Routing by source */ + /* + * Includes Intel Corporation's changes/modifications dated: 2018. + * Changed/modified portions - Copyright 2018, Intel Corporation. + */ #ifndef _IP_H #define _IP_H @@ -74,6 +78,9 @@ struct sockcm_cookie sockc; __be32 addr; int oif; +#ifdef CONFIG_TI_META_DATA + unsigned int ti_meta_info; +#endif /* CONFIG_TI_META_DATA */ struct ip_options_rcu *opt; __u8 ttl; __s16 tos; @@ -160,6 +167,7 @@ struct net_device *orig_dev); int ip_local_deliver(struct sk_buff *skb); void ip_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int proto); +int ip_local_deliver_finish(struct net *net, struct sock *sk, struct sk_buff *skb); int ip_mr_input(struct sk_buff *skb); int ip_output(struct net *net, struct sock *sk, struct sk_buff *skb); int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb); @@ -210,6 +218,7 @@ int __ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, __u8 tos); void ip_init(void); +void ip_input_init(void); int ip_append_data(struct sock *sk, struct flowi4 *fl4, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), @@ -437,32 +446,18 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, bool forwarding) { - const struct rtable *rt = container_of(dst, struct rtable, dst); struct net *net = dev_net(dst->dev); unsigned int mtu; if (READ_ONCE(net->ipv4.sysctl_ip_fwd_use_pmtu) || ip_mtu_locked(dst) || - !forwarding) { - mtu = rt->rt_pmtu; - if (mtu && time_before(jiffies, rt->dst.expires)) - goto out; - } + !forwarding) + return dst_mtu(dst); /* 'forwarding = true' case should always honour route mtu */ mtu = dst_metric_raw(dst, RTAX_MTU); - if (mtu) - goto out; - - mtu = READ_ONCE(dst->dev->mtu); - - if (unlikely(ip_mtu_locked(dst))) { - if (rt->rt_uses_gateway && mtu > 576) - mtu = 576; - } - -out: - mtu = min_t(unsigned int, mtu, IP_MAX_MTU); + if (!mtu) + mtu = min(READ_ONCE(dst->dev->mtu), IP_MAX_MTU); return mtu - lwtunnel_headroom(dst->lwtstate, mtu); }