[Devel] [PATCH] venet: remove obsolete tgt_veip variable

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Mon Nov 27 20:10:31 MSK 2017


This was used for "vzredir" feature in vz6 and not used anymore.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 drivers/net/venetdev.c |   12 +++---------
 include/linux/venet.h  |    1 -
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 11f4a66..dffebdc 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -256,8 +256,7 @@ static void __veip_stop(struct ve_struct *ve)
 		ptr = list_entry(p, struct ip_entry_struct, ve_list);
 		ptr->active_env = NULL;
 
-		if (ptr->tgt_veip == NULL)
-			ip_entry_unhash(ptr);
+		ip_entry_unhash(ptr);
 	}
 
 	veip_pool_ops->veip_release(ve);
@@ -277,8 +276,6 @@ static int veip_entry_conflict(struct ip_entry_struct *entry, struct ve_struct *
 {
 	if (entry->active_env != NULL)
 		return -EADDRINUSE;
-	if (entry->tgt_veip && entry->tgt_veip->veid != ve->veid)
-		return -EADDRNOTAVAIL;
 
 	entry->active_env = ve;
 	return 0;
@@ -340,8 +337,7 @@ static int veip_entry_del(struct ve_struct *ve, struct ve_addr_struct *addr)
 	err = 0;
 	found->active_env = NULL;
 
-	if (found->tgt_veip == NULL)
-		ip_entry_unhash(found);
+	ip_entry_unhash(found);
 out:
 	spin_unlock(&veip_lock);
 	return err;
@@ -891,7 +887,6 @@ static int veip_seq_show(struct seq_file *m, void *v)
 {
 	struct hlist_node *p;
 	struct ip_entry_struct *entry;
-	struct veip_struct *veip;
 	char s[40];
 
 	if (v == SEQ_START_TOKEN) {
@@ -902,8 +897,7 @@ static int veip_seq_show(struct seq_file *m, void *v)
 	p = (struct hlist_node *)v;
 	entry = hlist_entry(p, struct ip_entry_struct, ip_hash);
 	veaddr_print(s, sizeof(s), &entry->addr);
-	veip = ACCESS_ONCE(entry->tgt_veip);
-	seq_printf(m, "%39s %10u\n", s, veip == NULL ? 0 : veip->veid);
+	seq_printf(m, "%39s 0\n", s);
 	return 0;
 }
 
diff --git a/include/linux/venet.h b/include/linux/venet.h
index 7562996..08d89bc 100644
--- a/include/linux/venet.h
+++ b/include/linux/venet.h
@@ -28,7 +28,6 @@ struct ip_entry_struct
 {
 	struct ve_addr_struct	addr;
 	struct ve_struct	*active_env;
-	struct veip_struct	*tgt_veip;
 	struct hlist_node 	ip_hash;
 	union {
 		struct list_head 	ve_list;



More information about the Devel mailing list