Skip to contentSkip to conversation

mld: convert ip6_sf_list to list macros

PATCH Superseded Taehee Yoo 1 participant 1 message Feb 8, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Taehee Yoo

author
#0 lore raw

PATCH 2/8 mld: convert ip6_sf_list to list macros

Currently, struct ip6_sf_list doesn't use list API so that code shape is a little bit different from others.
So it converts ip6_sf_list to use list API so it would improve readability.

---
 include/net/if_inet6.h |   6 +-
 net/ipv6/mcast.c       | 267 +++++++++++++++++++++++------------------
 2 files changed, 155 insertions(+), 118 deletions(-)
include/net/if_inet6.h +3 -3
index 1262ccd5221e..cd17b756a2a5 100644
@@ -97,7 +97,7 @@ struct ipv6_mc_socklist {
 };
 
 struct ip6_sf_list {
-	struct ip6_sf_list	*sf_next;
+	struct list_head	list;
 	struct in6_addr		sf_addr;
 	unsigned long		sf_count[2];	/* include/exclude counts */
 	unsigned char		sf_gsresp;	/* include in g & s response? */
@@ -115,8 +115,8 @@ struct ifmcaddr6 {
 	struct in6_addr		mca_addr;
 	struct inet6_dev	*idev;
 	struct list_head	list;
-	struct ip6_sf_list	*mca_sources;
-	struct ip6_sf_list	*mca_tomb;
+	struct list_head	mca_source_list;
+	struct list_head	mca_tomb_list;
 	unsigned int		mca_sfmode;
 	unsigned char		mca_crcount;
 	unsigned long		mca_sfcount[2];
net/ipv6/mcast.c +152 -115

522 lines not on this page · raw message

Signature · 1 line
2.17.1