[Devel] [PATCH] venet: remove SS hook
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Apr 11 01:55:40 PDT 2017
On 10.04.2017 17:05, Stanislav Kinsburskiy wrote:
> Finally, this silly hook can and has to be removed.
> It was added, because venet was created in a automated way on container start.
> Now, venet is created by vzctl via netlink (as it should).
> And it's destroyed automatilly on network namespace shutdown in cleanup_net().
>
> https://jira.sw.ru/browse/PSBM-64015
>
> Notes: this patch obsoletes the following commits:
>
> 455d5ba9506998f589b9929266c12627c9baf589
> 3e48f57a452b597b23039c3278e67788ac48f8d4
> ed93afb07e58beb447556adbb25af11b9da1b62c
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ---
> drivers/net/venetdev.c | 32 --------------------------------
> 1 file changed, 32 deletions(-)
>
> diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
> index 6853154..4a7876f 100644
> --- a/drivers/net/venetdev.c
> +++ b/drivers/net/venetdev.c
> @@ -1110,37 +1110,6 @@ static struct cftype venet_cftypes[] = {
> { }
> };
>
> -/*
> - * VE context dropping is happening earlier than
> - * pernet_operations::exit method so we can't
> - * rely on it and do the cleanup earlier.
> - */
> -static void venet_stop_notifier(void *data)
> -{
> - struct ve_struct *env = data;
> -
> - if (env->ve_netns) {
> - struct net_device *dev = env->_venet_dev;
> -
> - venet_ext_clean(env);
> - veip_stop(env);
> -
> - if (dev) {
> - env->_venet_dev = NULL;
> - rtnl_lock();
> - unregister_netdevice(dev);
> - rtnl_unlock();
> - free_netdev(dev);
> - }
> - }
> -}
> -
> -static struct ve_hook venet_stop_hook = {
> - .fini = venet_stop_notifier,
> - .priority = HOOK_PRIO_FINISHING,
> - .owner = THIS_MODULE,
> -};
> -
> static int venet_changelink(struct net_device *dev, struct nlattr *tb[],
> struct nlattr *data[])
> {
> @@ -1220,7 +1189,6 @@ __init int venet_init(void)
>
> vzioctl_register(&venetcalls);
> vzmon_register_veaddr_print_cb(veaddr_seq_print);
> - ve_hook_register(VE_SS_CHAIN, &venet_stop_hook);
>
> return rtnl_link_register(&venet_link_ops);
>
>
More information about the Devel
mailing list