--- zzzz-none-000/linux-4.9.279/net/ipv6/ip6_output.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/ipv6/ip6_output.c 2023-02-08 10:58:16.000000000 +0000 @@ -26,6 +26,11 @@ * for datagram xmit */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017, 2018, 2020. + * Changed/modified portions - Copyright (c) 2017-2020, Intel Corporation. + */ + #include #include #include @@ -58,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); @@ -65,6 +81,11 @@ struct neighbour *neigh; struct in6_addr *nexthop; int ret; +#ifdef CONFIG_TI_PACKET_PROCESSOR +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) + const struct nf_conn *ct; +#endif +#endif skb->protocol = htons(ETH_P_IPV6); skb->dev = dev; @@ -104,6 +125,16 @@ return 0; } } +#ifdef CONFIG_TI_PACKET_PROCESSOR +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) + ct = (struct nf_conn *)skb->nfct; + + if (ct != NULL) + { + ti_hil_pp_event( TI_CT_NETFILTER_CANCEL_DISCARD_ACCELERATION, skb->nfct ); + } +#endif +#endif if (lwtunnel_xmit_redirect(dst->lwtstate)) { int res = lwtunnel_xmit(skb); @@ -580,6 +611,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_copy_secmark(to, from); }