netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/2] Third Round of IPVS Updates for v4.12
@ 2017-04-28 10:11 Simon Horman
  2017-04-28 10:11 ` [PATCH 1/2] ipvs: remove unused function ip_vs_set_state_timeout Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Simon Horman @ 2017-04-28 10:11 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Simon Horman

Hi Pablo,

please consider these enhancements to IPVS for v4.12.
If it is too late for v4.12 then please consider them for v4.13.

* Remove unused function
* Correct comparison of unsigned value

The following changes since commit 9a08ecfe74d7796ddc92ec312d3b7eaeba5a7c22:

  netfilter: don't attach a nat extension by default (2017-04-26 09:30:22 +0200)

are available in the git repository at:

  http://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git tags/ipvs3-for-v4.12

for you to fetch changes up to fb90e8dedb465bd06512f718b139ed8680d26dbe:

  ipvs: change comparison on sync_refresh_period (2017-04-28 12:00:10 +0200)

----------------------------------------------------------------
Aaron Conole (2):
      ipvs: remove unused function ip_vs_set_state_timeout
      ipvs: change comparison on sync_refresh_period

 include/net/ip_vs.h              |  2 --
 net/netfilter/ipvs/ip_vs_proto.c | 22 ----------------------
 net/netfilter/ipvs/ip_vs_sync.c  |  2 +-
 3 files changed, 1 insertion(+), 25 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ipvs: remove unused function ip_vs_set_state_timeout
  2017-04-28 10:11 [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Simon Horman
@ 2017-04-28 10:11 ` Simon Horman
  2017-04-28 10:11 ` [PATCH 2/2] ipvs: change comparison on sync_refresh_period Simon Horman
  2017-05-01  9:47 ` [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Pablo Neira Ayuso
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2017-04-28 10:11 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Aaron Conole, Simon Horman

From: Aaron Conole <aconole@bytheb.org>

There are no in-tree callers of this function and it isn't exported.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 include/net/ip_vs.h              |  2 --
 net/netfilter/ipvs/ip_vs_proto.c | 22 ----------------------
 2 files changed, 24 deletions(-)

diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 632082300e77..4f4f786255ef 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1349,8 +1349,6 @@ int ip_vs_protocol_init(void);
 void ip_vs_protocol_cleanup(void);
 void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags);
 int *ip_vs_create_timeout_table(int *table, int size);
-int ip_vs_set_state_timeout(int *table, int num, const char *const *names,
-			    const char *name, int to);
 void ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp,
 			       const struct sk_buff *skb, int offset,
 			       const char *msg);
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 8ae480715cea..ca880a3ad033 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -193,28 +193,6 @@ ip_vs_create_timeout_table(int *table, int size)
 }
 
 
-/*
- *	Set timeout value for state specified by name
- */
-int
-ip_vs_set_state_timeout(int *table, int num, const char *const *names,
-			const char *name, int to)
-{
-	int i;
-
-	if (!table || !name || !to)
-		return -EINVAL;
-
-	for (i = 0; i < num; i++) {
-		if (strcmp(names[i], name))
-			continue;
-		table[i] = to * HZ;
-		return 0;
-	}
-	return -ENOENT;
-}
-

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ipvs: change comparison on sync_refresh_period
  2017-04-28 10:11 [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Simon Horman
  2017-04-28 10:11 ` [PATCH 1/2] ipvs: remove unused function ip_vs_set_state_timeout Simon Horman
@ 2017-04-28 10:11 ` Simon Horman
  2017-05-01  9:47 ` [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Pablo Neira Ayuso
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2017-04-28 10:11 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Aaron Conole, Simon Horman

From: Aaron Conole <aconole@bytheb.org>

The sync_refresh_period variable is unsigned, so it can never be < 0.

Signed-off-by: Aaron Conole <aconole@bytheb.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index 30d6b2cc00a0..0e5b64a75da0 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -520,7 +520,7 @@ static int ip_vs_sync_conn_needed(struct netns_ipvs *ipvs,
 		if (!(cp->flags & IP_VS_CONN_F_TEMPLATE) &&
 		    pkts % sync_period != sysctl_sync_threshold(ipvs))
 			return 0;
-	} else if (sync_refresh_period <= 0 &&
+	} else if (!sync_refresh_period &&
 		   pkts != sysctl_sync_threshold(ipvs))
 		return 0;
 
-- 
2.12.2.816.g2cccc81164


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [GIT PULL 0/2] Third Round of IPVS Updates for v4.12
  2017-04-28 10:11 [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Simon Horman
  2017-04-28 10:11 ` [PATCH 1/2] ipvs: remove unused function ip_vs_set_state_timeout Simon Horman
  2017-04-28 10:11 ` [PATCH 2/2] ipvs: change comparison on sync_refresh_period Simon Horman
@ 2017-05-01  9:47 ` Pablo Neira Ayuso
  2 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-05-01  9:47 UTC (permalink / raw)
  To: Simon Horman
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov

On Fri, Apr 28, 2017 at 12:11:57PM +0200, Simon Horman wrote:
> Hi Pablo,
> 
> please consider these enhancements to IPVS for v4.12.
> If it is too late for v4.12 then please consider them for v4.13.
> 
> * Remove unused function
> * Correct comparison of unsigned value

Pulled, thanks Simon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-01  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 10:11 [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Simon Horman
2017-04-28 10:11 ` [PATCH 1/2] ipvs: remove unused function ip_vs_set_state_timeout Simon Horman
2017-04-28 10:11 ` [PATCH 2/2] ipvs: change comparison on sync_refresh_period Simon Horman
2017-05-01  9:47 ` [GIT PULL 0/2] Third Round of IPVS Updates for v4.12 Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).