--- zzzz-none-000/linux-4.9.279/net/ipv4/fib_trie.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/ipv4/fib_trie.c 2023-02-08 10:58:16.000000000 +0000 @@ -47,6 +47,10 @@ * Paul E. McKenney * Patrick McHardy */ +/* +Includes Intel Corporation's changes/modifications dated: 2014. +Changed/modified portions - Copyright © 2014, Intel Corporation. +*/ #define VERSION "0.409" @@ -82,6 +86,7 @@ #include #include #include +#include #include "fib_lookup.h" static BLOCKING_NOTIFIER_HEAD(fib_chain); @@ -1264,6 +1269,13 @@ rt_cache_flush(cfg->fc_nlinfo.nl_net); call_fib_entry_notifiers(net, FIB_EVENT_ENTRY_ADD, key, plen, fi, tos, cfg->fc_type, tb->tb_id, cfg->fc_nlflags); +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Send an event to HIL in PP indicating that a new route is being added. + * The HIL will take the appropriate action, i.e. either selectively flush + * the sessions that are affected by this route addition or just flush all + * sessions to be coherent with the updated routing table. */ + ti_hil_pp_event(TI_ROUTE_ADDED, (void *)new_fa); +#endif //CONFIG_TI_PACKET_PROCESSOR rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id, &cfg->fc_nlinfo, nlflags); succeeded: @@ -1566,6 +1578,13 @@ call_fib_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, key, plen, fa_to_delete->fa_info, tos, cfg->fc_type, tb->tb_id, 0); +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Send an event to the HIL Packet Processor indicating + * that this route is being deleted. The HIL will take + * the appropriate action - selectively flush its sessions + * which could be affected by this route / flush all sessions */ + ti_hil_pp_event(TI_ROUTE_DELETED, (void *)fa); +#endif // CONFIG_TI_PACKET_PROCESSOR rtmsg_fib(RTM_DELROUTE, htonl(key), fa_to_delete, plen, tb->tb_id, &cfg->fc_nlinfo, 0);