--- zzzz-none-000/linux-5.15.111/net/8021q/vlan.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/net/8021q/vlan.c 2024-02-07 09:28:09.000000000 +0000 @@ -14,6 +14,18 @@ * Use hash table for VLAN groups - David S. Miller */ +/* + * Includes MaxLinear's changes dated: 2022. + * Changed portions - Copyright (c) 2022, MaxLinear, Inc. + * Includes Intel Corporation's changes dated: 2017. + * Changed portions - Copyright (c) 2017, Intel Corporation. + */ + +/* + * Includes Intel Corporation's changes/modifications dated: 2017. + * Changed/modified portions - Copyright (c) 2017, Intel Corporation. + */ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include @@ -33,6 +45,7 @@ #include #include +#include #include "vlan.h" #include "vlanproc.h" @@ -98,7 +111,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--; @@ -193,6 +212,16 @@ vlan_group_set_device(grp, vlan->vlan_proto, vlan_id, dev); grp->nr_vlan_devs++; +#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(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 *)dev); +#endif return 0; out_unregister_netdev: @@ -277,7 +306,16 @@ err = register_vlan_dev(new_dev, NULL); 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: