--- zzzz-none-000/linux-5.15.111/net/openvswitch/dp_notify.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-atom-6670-761/linux-5.15.111/net/openvswitch/dp_notify.c 2024-02-07 10:23:30.000000000 +0000 @@ -3,6 +3,16 @@ * Copyright (c) 2007-2012 Nicira, Inc. */ +/* + * Includes Inango Systems Ltd’s changes/modifications dated: 2021. + * Changed/modified portions - Copyright (c) 2021 , Inango Systems Ltd. + */ + +/* + Includes MaxLinear's changes dated: 2021, 2022, 2023. + Changed portions - Copyright 2021-2023 MaxLinear, Inc. +*/ + #include #include #include @@ -68,7 +78,28 @@ if (!vport) return NOTIFY_DONE; +#ifdef CONFIG_OPENVSWITCH_BRCOMPAT + switch (event) { + case NETDEV_UNREGISTER: + { + if (brc_handle_event_hook) + brc_handle_event_hook(dev, NETDEV_UNREGISTER); + /* upper_dev_unlink and decrement promisc immediately */ + ovs_netdev_detach_dev(vport); + + /* schedule vport destroy, dev_put and genl notification */ + ovs_net = net_generic(dev_net(dev), ovs_net_id); + queue_work(system_wq, &ovs_net->dp_notify_work); + } + break; + case NETDEV_CHANGENAME: + if (vport->port_no != OVSP_LOCAL) { + ovs_dp_sysfs_del_if(vport); + ovs_dp_sysfs_add_if(vport, NULL); + } + break; +#else if (event == NETDEV_UNREGISTER) { /* upper_dev_unlink and decrement promisc immediately */ ovs_netdev_detach_dev(vport); @@ -76,6 +107,7 @@ /* schedule vport destroy, dev_put and genl notification */ ovs_net = net_generic(dev_net(dev), ovs_net_id); queue_work(system_wq, &ovs_net->dp_notify_work); +#endif } return NOTIFY_DONE;