--- zzzz-none-000/linux-4.9.279/net/8021q/vlan.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/net/8021q/vlan.c 2023-02-08 10:58:16.000000000 +0000 @@ -18,6 +18,11 @@ * 2 of the License, or (at your option) any later version. */ +/* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include @@ -37,6 +42,7 @@ #include #include +#include #include "vlan.h" #include "vlanproc.h" @@ -87,7 +93,13 @@ vlan_info = rtnl_dereference(real_dev->vlan_info); BUG_ON(!vlan_info); - +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Send an event to HIL PP indicating that the VLAN + * device is being brought down. The HIL PP could + * clean up any if existing references to this VLAN + * device in its domain. */ + ti_hil_pp_event(TI_VLAN_DEV_DELETED, (void *)dev); +#endif //CONFIG_TI_PACKET_PROCESSOR grp = &vlan_info->grp; grp->nr_vlan_devs--; @@ -268,7 +280,16 @@ err = register_vlan_dev(new_dev); if (err < 0) goto out_free_newdev; - +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Inheritance at work here. We copy the VPID Information block from the parent device + * to the new VLAN virtual device. */ + ti_hil_clone_netdev_pp_info(new_dev, real_dev); + + /* Send an event to HIL PP indicating that a new VLAN device + * is being created. The HIL may store the VLAN info and use it + * later for PP session creation and acceleration decision making */ + ti_hil_pp_event(TI_VLAN_DEV_CREATED, (void *)new_dev); +#endif return 0; out_free_newdev: