Skip to contentSkip to conversation

ipvs: Remove useless ipvsh param of frag_safe_skb_hp

PATCH In review [email protected] 3 participants 8 messages Oct 26, 2017 – Nov 22, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipvs: Remove useless ipvsh param of frag_safe_skb_hp

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

---
 include/net/ip_vs.h             |  3 +--
 net/netfilter/ipvs/ip_vs_conn.c |  2 +-
 net/netfilter/ipvs/ip_vs_core.c | 12 ++++++------
 3 files changed, 8 insertions(+), 9 deletions(-)
include/net/ip_vs.h +1 -2
index 4f4f786..6fccd24 100644
@@ -68,8 +68,7 @@ struct ip_vs_iphdr {
 };
 
 static inline void *frag_safe_skb_hp(const struct sk_buff *skb, int offset,
-				      int len, void *buffer,
-				      const struct ip_vs_iphdr *ipvsh)
+				      int len, void *buffer)
 {
 	return skb_header_pointer(skb, offset, len, buffer);
 }
net/netfilter/ipvs/ip_vs_conn.c +1 -1
index 3d2ac71a..9ee73cf 100644
@@ -322,7 +322,7 @@ struct ip_vs_conn *ip_vs_conn_in_get(const struct ip_vs_conn_param *p)
 {
 	__be16 _ports[2], *pptr;
 
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (pptr == NULL)
 		return 1;
 
net/netfilter/ipvs/ip_vs_core.c +6 -6
index 5cb7cac..5f6f73c 100644
@@ -433,7 +433,7 @@ struct ip_vs_conn *
 	/*
 	 * IPv6 frags, only the first hit here.
 	 */
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (pptr == NULL)
 		return NULL;
 
@@ -566,7 +566,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
 	struct netns_ipvs *ipvs = svc->ipvs;
 	struct net *net = ipvs->net;
 
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (!pptr)
 		return NF_DROP;
 	dport = likely(!ip_vs_iph_inverse(iph)) ? pptr[1] : pptr[0];
@@ -982,7 +982,7 @@ static int ip_vs_out_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
 	unsigned int offset;
 
 	*related = 1;
-	ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph, ipvsh);
+	ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph);
 	if (ic == NULL)
 		return NF_DROP;
 
@@ -1214,7 +1214,7 @@ static struct ip_vs_conn *__ip_vs_rs_conn_out(unsigned int hooknum,
 		return NULL;
 
 	pptr = frag_safe_skb_hp(skb, iph->len,
-				sizeof(_ports), _ports, iph);
+				sizeof(_ports), _ports);
 	if (!pptr)
 		return NULL;
 
@@ -1407,7 +1407,7 @@ static struct ip_vs_conn *__ip_vs_rs_conn_out(unsigned int hooknum,
 		__be16 _ports[2], *pptr;
 
 		pptr = frag_safe_skb_hp(skb, iph.len,
-					 sizeof(_ports), _ports, &iph);
+					 sizeof(_ports), _ports);
 		if (pptr == NULL)
 			return NF_ACCEPT;	/* Not for me */
 		if (ip_vs_has_real_service(ipvs, af, iph.protocol, &iph.saddr,
@@ -1741,7 +1741,7 @@ static int ip_vs_in_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
 
 	*related = 1;
 
-	ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph, iph);
+	ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph);
 	if (ic == NULL)
 		return NF_DROP;
 
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hello,

Quoted 6 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Looks good to me. Simon, please apply to ipvs-next tree.

Quoted 93 lines
---
 include/net/ip_vs.h             |  3 +--
 net/netfilter/ipvs/ip_vs_conn.c |  2 +-
 net/netfilter/ipvs/ip_vs_core.c | 12 ++++++------
 3 files changed, 8 insertions(+), 9 deletions(-)
include/net/ip_vs.h +1 -2
index 4f4f786..6fccd24 100644
@@ -68,8 +68,7 @@ struct ip_vs_iphdr {
 };
 
 static inline void *frag_safe_skb_hp(const struct sk_buff *skb, int offset,
-				      int len, void *buffer,
-				      const struct ip_vs_iphdr *ipvsh)
+				      int len, void *buffer)
 {
 	return skb_header_pointer(skb, offset, len, buffer);
 }
net/netfilter/ipvs/ip_vs_conn.c +1 -1
index 3d2ac71a..9ee73cf 100644
@@ -322,7 +322,7 @@ struct ip_vs_conn *ip_vs_conn_in_get(const struct ip_vs_conn_param *p)
 {
 	__be16 _ports[2], *pptr;
 
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (pptr == NULL)
 		return 1;
 
net/netfilter/ipvs/ip_vs_core.c +6 -6
index 5cb7cac..5f6f73c 100644
@@ -433,7 +433,7 @@ struct ip_vs_conn *
 	/*
 	 * IPv6 frags, only the first hit here.
 	 */
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (pptr == NULL)
 		return NULL;
 
@@ -566,7 +566,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
 	struct netns_ipvs *ipvs = svc->ipvs;
 	struct net *net = ipvs->net;
 
-	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports, iph);
+	pptr = frag_safe_skb_hp(skb, iph->len, sizeof(_ports), _ports);
 	if (!pptr)
 		return NF_DROP;
 	dport = likely(!ip_vs_iph_inverse(iph)) ? pptr[1] : pptr[0];
@@ -982,7 +982,7 @@ static int ip_vs_out_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
 	unsigned int offset;
 
 	*related = 1;
-	ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph, ipvsh);
+	ic = frag_safe_skb_hp(skb, ipvsh->len, sizeof(_icmph), &_icmph);
 	if (ic == NULL)
 		return NF_DROP;
 
@@ -1214,7 +1214,7 @@ static struct ip_vs_conn *__ip_vs_rs_conn_out(unsigned int hooknum,
 		return NULL;
 
 	pptr = frag_safe_skb_hp(skb, iph->len,
-				sizeof(_ports), _ports, iph);
+				sizeof(_ports), _ports);
 	if (!pptr)
 		return NULL;
 
@@ -1407,7 +1407,7 @@ static struct ip_vs_conn *__ip_vs_rs_conn_out(unsigned int hooknum,
 		__be16 _ports[2], *pptr;
 
 		pptr = frag_safe_skb_hp(skb, iph.len,
-					 sizeof(_ports), _ports, &iph);
+					 sizeof(_ports), _ports);
 		if (pptr == NULL)
 			return NF_ACCEPT;	/* Not for me */
 		if (ip_vs_has_real_service(ipvs, af, iph.protocol, &iph.saddr,
@@ -1741,7 +1741,7 @@ static int ip_vs_in_icmp_v6(struct netns_ipvs *ipvs, struct sk_buff *skb,
 
 	*related = 1;
 
-	ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph, iph);
+	ic = frag_safe_skb_hp(skb, iph->len, sizeof(_icmph), &_icmph);
 	if (ic == NULL)
 		return NF_DROP;
 
Signature · 1 line
1.9.1

Regards

--
Julian Anastasov <[email protected]>

maintainer
#2 lore raw
Quoted 7 lines · Julian Anastasov

Hello,

Quoted 2 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

Quoted 8 lines
Quoted 4 lines

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Looks good to me. Simon, please apply to ipvs-next tree.

Pablo, can you take this one?

maintainer
#3 lore raw
Quoted 13 lines · Simon Horman
Quoted 12 lines · Julian Anastasov

Hello,

Quoted 6 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Quoted 7 lines
Quoted 3 lines

Looks good to me. Simon, please apply to ipvs-next tree.

Pablo, can you take this one?

I think I would rather it go via Pablo's tree and in turn net-next as that is the normal route for IPVS patches.

maintainer
#4 lore raw
Quoted 16 lines · Simon Horman
Quoted 15 lines · Simon Horman
Quoted 14 lines · Julian Anastasov

Hello,

Quoted 6 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Looks good to me. Simon, please apply to ipvs-next tree.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Pablo, can you take this one?

I think I would rather it go via Pablo's tree and in turn net-next as that is the normal route for IPVS patches.

I seem to have responded to the wrong email here.

maintainer
#5 lore raw

Hello,

Quoted 19 lines · Simon Horman
Quoted 18 lines · Simon Horman
Quoted 17 lines · Simon Horman
Quoted 15 lines · Julian Anastasov

Hello,

Quoted 6 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Looks good to me. Simon, please apply to ipvs-next tree.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Pablo, can you take this one?

I think I would rather it go via Pablo's tree and in turn net-next as that is the normal route for IPVS patches.

I seem to have responded to the wrong email here.

Recently we see only few small patches for -next, so
you can write to Pablo to take them directly.

Regards

--
Julian Anastasov <[email protected]>

maintainer
#6 lore raw
Quoted 28 lines · Julian Anastasov

Hello,

Quoted 23 lines · Simon Horman
Quoted 22 lines · Simon Horman
Quoted 20 lines · Simon Horman
Quoted 7 lines · Julian Anastasov

Hello,

Quoted 2 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

Quoted 8 lines
Quoted 4 lines

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Looks good to me. Simon, please apply to ipvs-next tree.

Pablo, can you take this one?

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I think I would rather it go via Pablo's tree and in turn net-next as that is the normal route for IPVS patches.

I seem to have responded to the wrong email here.

Recently we see only few small patches for -next, so
you can write to Pablo to take them directly.

Yes, agreed.

author
#7 lore raw
In reply to Simon Horman
Quoted 13 lines · Simon Horman
Quoted 12 lines · Julian Anastasov

Hello,

Quoted 6 lines · On Thu, 26 Oct 2017, [email protected] wrote:

From: Gao Feng <[email protected]>

The param of frag_safe_skb_hp, ipvsh, isn't used now. So remove it and change the callers' codes.

Quoted 8 lines
Quoted 3 lines

Looks good to me. Simon, please apply to ipvs-next tree.

Pablo, can you take this one?

Hi Pablo & Simon,

Need I resend a new patch to nf-next ?

Best Regards
Feng