--- zzzz-none-000/linux-5.15.111/net/ipv6/ip6_output.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/ipv6/ip6_output.c 2024-02-07 09:28:09.000000000 +0000 @@ -22,6 +22,13 @@ * for datagram xmit */ +/* + * Includes MaxLinear's changes dated: 2022. + * Changed portions - Copyright 2020-2022, MaxLinear, Inc. + * Includes Intel Corporation's changes dated: 2017, 2018, 2020. + * Changed portions - Copyright (c) 2017-2020, Intel Corporation. + */ + #include #include #include @@ -56,6 +63,17 @@ #include #include +#ifdef CONFIG_TI_DOCSIS_INPUT_DEV +#define DBRIDGE_IFINDEX_CHK(__ifindex, format, args...) \ +{ \ + if (((__ifindex) < 0) || ((__ifindex) >= TI_MAX_DEVICE_INDEX)) \ + { \ + printk("\n===>>> %s - %d: Currupt " #__ifindex " - %d\n" format, __func__, __LINE__, __ifindex, ##args); \ + BUG(); \ + } \ +} +#endif + static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); @@ -66,6 +84,11 @@ struct ipv6hdr *hdr; struct neighbour *neigh; int ret; +#ifdef CONFIG_TI_PACKET_PROCESSOR +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) + const struct nf_conn *ct; +#endif +#endif /* Be paranoid, rather than too clever. */ if (unlikely(hh_len > skb_headroom(skb)) && dev->header_ops) { @@ -108,6 +131,16 @@ return 0; } } +#ifdef CONFIG_TI_PACKET_PROCESSOR +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) + ct = (struct nf_conn *)skb_nfct(skb); + + if (ct != NULL) + { + ti_hil_pp_event( TI_CT_NETFILTER_CANCEL_DISCARD_ACCELERATION, (void *)ct ); + } +#endif +#endif if (lwtunnel_xmit_redirect(dst->lwtstate)) { int res = lwtunnel_xmit(skb); @@ -652,6 +685,27 @@ to->tc_index = from->tc_index; #endif nf_copy(to, from); + +#ifdef CONFIG_TI_DOCSIS_INPUT_DEV + to->ti_docsis_input_dev = from->ti_docsis_input_dev; + if (to->ti_docsis_input_dev) + { + DBRIDGE_IFINDEX_CHK(to->ti_docsis_input_dev->ifindex, "dev %p, devname %s, ti_docsis_input_dev %p, ti_docsis_input_dev->name %s", to->dev, to->dev ? to->dev->name : NULL, to->ti_docsis_input_dev, to->ti_docsis_input_dev->name); + } +#endif /* CONFIG_TI_DOCSIS_INPUT_DEV */ + +#ifdef CONFIG_INTEL_DOCSIS_ICMP_IIF + to->docsis_icmp_iif = from->docsis_icmp_iif; +#endif /* CONFIG_INTEL_DOCSIS_ICMP_IIF */ + +#ifdef CONFIG_TI_L2_SELECTIVE_FORWARDER + to->ti_selective_fwd_dev_info = from->ti_selective_fwd_dev_info; +#endif /* CONFIG_TI_L2_SELECTIVE_FORWARDER */ + +#ifdef CONFIG_TI_PACKET_PROCESSOR + memcpy((void *)SKB_GET_PP_INFO_P(to), (void *)SKB_GET_PP_INFO_P(from), sizeof(*SKB_GET_PP_INFO_P(from))); +#endif /* CONFIG_TI_PACKET_PROCESSOR */ + skb_ext_copy(to, from); skb_copy_secmark(to, from); }