[Devel] [PATCH RHEL7 COMMIT] venet: remove SS hook

Konstantin Khorenko khorenko at virtuozzo.com
Tue Apr 11 02:58:02 PDT 2017


The commit is pushed to "branch-rh7-3.10.0-514.10.2.vz7.29.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.10.2.vz7.29.14
------>
commit 60836f581089a23dd7fb147ec18f247f0a9ed7fa
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Tue Apr 11 13:58:02 2017 +0400

    venet: remove SS hook
    
    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:
    
    455d5ba sunrpc: print connect status value upon retry
    3e48f57 ve/sunrpc: fix ve is dying check on -ENETUNREACH error upon connect
    ed93afb sunrpc: handle -ENETUNREACH error on connect as fatal if VE is dying
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky 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