--- zzzz-none-000/linux-5.15.111/net/l2tp/l2tp_core.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/l2tp/l2tp_core.c 2024-02-07 09:28:10.000000000 +0000 @@ -13,6 +13,10 @@ * Arnaldo Carvalho de Melo * David S. Miller (davem@redhat.com) */ +/* + * Includes Intel Corporation's changes/modifications dated: [10/03/2016]. + * Changed/modified portions - Copyright © [2016], Intel Corporation. + */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -66,6 +70,10 @@ #define CREATE_TRACE_POINTS #include "trace.h" +#ifdef CONFIG_TI_PACKET_PROCESSOR +#include +#endif + #define L2TP_DRV_VERSION "V2.0" /* L2TP header constants */ @@ -385,6 +393,15 @@ hlist_add_head(&session->hlist, head); write_unlock_bh(&tunnel->hlist_lock); +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Ignore management session in session count value */ + if (session->session_id != 0) { + /* For L2TPv3 (PP does not support send_seq option) - Generate the HIL Event indicating that the L2TPv3 session has been created. */ + if ((tunnel->version == L2TP_HDR_VER_3) && (!session->send_seq)) + ti_hil_pp_event (TI_L2TP_ENTRY_CREATED, (void *)session); + } +#endif// CONFIG_TI_PACKET_PROCESSOR + trace_register_session(session); return 0; @@ -1552,6 +1569,12 @@ if (test_and_set_bit(0, &session->dead)) return; +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* For L2TPv3 - Generate the HIL Event indicating that the L2TPv3 session has been deleted. */ + if (session->tunnel->version == L2TP_HDR_VER_3) + ti_hil_pp_event (TI_L2TP_ENTRY_DELETED, (void *)session); +#endif// CONFIG_TI_PACKET_PROCESSOR + trace_delete_session(session); l2tp_session_unhash(session); l2tp_session_queue_purge(session);