[Devel] [PATCH RH8 02/11] venetdev: drop src_lh/dst_lh lists from veip_struct

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Fri Jun 4 17:45:29 MSK 2021


From: Konstantin Khorenko <khorenko at virtuozzo.com>

These lists were used for ip redirect, now it's not used,
so drop redundant fields.

Found during investigation of
https://jira.sw.ru/browse/PSBM-90395

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>

(cherry-picked from 3986d04a5b7fa1ba856861bbb98a50ca3129a240)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>

diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index 2849f84..9541ac6 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -62,10 +62,6 @@ int veip_put(struct veip_struct *veip)
 {
 	if (!list_empty(&veip->ip_lh))
 		return 0;
-	if (!list_empty(&veip->src_lh))
-		return 0;
-	if (!list_empty(&veip->dst_lh))
-		return 0;
 
 	list_del(&veip->list);
 	call_rcu(&veip->rcu, veip_free);
@@ -196,8 +192,6 @@ struct veip_struct *veip_findcreate(envid_t veid)
 		return NULL;
 	memset(ptr, 0, sizeof(struct veip_struct));
 	INIT_LIST_HEAD(&ptr->ip_lh);
-	INIT_LIST_HEAD(&ptr->src_lh);
-	INIT_LIST_HEAD(&ptr->dst_lh);
 	INIT_LIST_HEAD(&ptr->ext_lh);
 	ptr->veid = veid;
 	list_add(&ptr->list, &veip_lh);
diff --git a/include/linux/venet.h b/include/linux/venet.h
index fe8197c..eb15025 100644
--- a/include/linux/venet.h
+++ b/include/linux/venet.h
@@ -42,8 +42,6 @@ struct ext_entry_struct
 
 struct veip_struct
 {
-	struct list_head	src_lh;
-	struct list_head	dst_lh;
 	struct list_head	ip_lh;
 	struct list_head	list;
 	struct list_head	ext_lh;
-- 
1.8.3.1



More information about the Devel mailing list