* [GIT 0/3] Second Round of IPVS Updates for v4.12
@ 2017-04-10 16:58 Simon Horman
2017-04-10 16:58 ` [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension Simon Horman
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Simon Horman @ 2017-04-10 16:58 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Simon Horman
Hi Pablo,
please consider these clean-ups and enhancements to IPVS for v4.12.
* Removal unused variable
* Use kzalloc where appropriate
* More efficient detection of presence of NAT extension
The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8:
Merge branch 'qed-IOV-cleanups' (2017-03-21 19:02:38 -0700)
are available in the git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
for you to fetch changes up to e24113769960980579610ecfd657bb17f19373a3:
ipvs: remove unused variable (2017-03-30 14:54:47 +0200)
----------------------------------------------------------------
Arushi Singhal (1):
ipvs: remove unused variable
Florian Westphal (1):
netfilter: ipvs: don't check for presence of nat extension
Varsha Rao (1):
netfilter: ipvs: Replace kzalloc with kcalloc.
net/netfilter/ipvs/ip_vs_ftp.c | 7 ++-----
net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
2 files changed, 4 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
@ 2017-04-10 16:58 ` Simon Horman
2017-04-10 16:58 ` [PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2017-04-10 16:58 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Florian Westphal
From: Florian Westphal <fw@strlen.de>
Check for the NAT status bits, they are set once conntrack needs NAT in source or
reply direction, this is slightly faster than nfct_nat() as that has to check the
extension area.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/netfilter/ipvs/ip_vs_ftp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index d30c327bb578..2e2bf7428cd1 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -260,7 +260,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
buf_len = strlen(buf);
ct = nf_ct_get(skb, &ctinfo);
- if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) {
+ if (ct && !nf_ct_is_untracked(ct) && (ct->status & IPS_NAT_MASK)) {
/* If mangling fails this function will return 0
* which will cause the packet to be dropped.
* Mangling can only fail under memory pressure,
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc.
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
2017-04-10 16:58 ` [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension Simon Horman
@ 2017-04-10 16:58 ` Simon Horman
2017-04-10 16:58 ` [PATCH 3/3] ipvs: remove unused variable Simon Horman
2017-04-13 23:01 ` [GIT 0/3] Second Round of IPVS Updates for v4.12 Pablo Neira Ayuso
3 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2017-04-10 16:58 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Varsha Rao
From: Varsha Rao <rvarsha016@gmail.com>
Replace kzalloc with kcalloc. As kcalloc is preferred for allocating an
array instead of kzalloc. This patch fixes the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
net/netfilter/ipvs/ip_vs_sync.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index b03c28084f81..30d6b2cc00a0 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1849,7 +1849,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
if (state == IP_VS_STATE_MASTER) {
struct ipvs_master_sync_state *ms;
- ipvs->ms = kzalloc(count * sizeof(ipvs->ms[0]), GFP_KERNEL);
+ ipvs->ms = kcalloc(count, sizeof(ipvs->ms[0]), GFP_KERNEL);
if (!ipvs->ms)
goto out;
ms = ipvs->ms;
@@ -1862,7 +1862,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
ms->ipvs = ipvs;
}
} else {
- array = kzalloc(count * sizeof(struct task_struct *),
+ array = kcalloc(count, sizeof(struct task_struct *),
GFP_KERNEL);
if (!array)
goto out;
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] ipvs: remove unused variable
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
2017-04-10 16:58 ` [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension Simon Horman
2017-04-10 16:58 ` [PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc Simon Horman
@ 2017-04-10 16:58 ` Simon Horman
2017-04-13 23:01 ` [GIT 0/3] Second Round of IPVS Updates for v4.12 Pablo Neira Ayuso
3 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2017-04-10 16:58 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Arushi Singhal, Simon Horman
From: Arushi Singhal <arushisinghal19971997@gmail.com>
This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_ftp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index 2e2bf7428cd1..6caf4459e981 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
static int __init ip_vs_ftp_init(void)
{
- int rv;
-
- rv = register_pernet_subsys(&ip_vs_ftp_ops);
/* rcu_barrier() is called by netns on error */
- return rv;
+ return register_pernet_subsys(&ip_vs_ftp_ops);
}
/*
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [GIT 0/3] Second Round of IPVS Updates for v4.12
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
` (2 preceding siblings ...)
2017-04-10 16:58 ` [PATCH 3/3] ipvs: remove unused variable Simon Horman
@ 2017-04-13 23:01 ` Pablo Neira Ayuso
2017-04-13 23:51 ` Simon Horman
3 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-13 23:01 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
Hi Simon,
On Mon, Apr 10, 2017 at 09:58:32AM -0700, Simon Horman wrote:
> Hi Pablo,
>
> please consider these clean-ups and enhancements to IPVS for v4.12.
>
> * Removal unused variable
> * Use kzalloc where appropriate
> * More efficient detection of presence of NAT extension
>
>
> The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8:
>
> Merge branch 'qed-IOV-cleanups' (2017-03-21 19:02:38 -0700)
>
> are available in the git repository at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
This says:
$ git pull
https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
fatal: Couldn't find remote ref ipvs2-for-v4.12
I don't any tag for this name in:
https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git/refs/tags
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT 0/3] Second Round of IPVS Updates for v4.12
2017-04-13 23:01 ` [GIT 0/3] Second Round of IPVS Updates for v4.12 Pablo Neira Ayuso
@ 2017-04-13 23:51 ` Simon Horman
2017-04-14 0:06 ` Pablo Neira Ayuso
0 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2017-04-13 23:51 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
On Fri, Apr 14, 2017 at 01:01:34AM +0200, Pablo Neira Ayuso wrote:
> Hi Simon,
>
> On Mon, Apr 10, 2017 at 09:58:32AM -0700, Simon Horman wrote:
> > Hi Pablo,
> >
> > please consider these clean-ups and enhancements to IPVS for v4.12.
> >
> > * Removal unused variable
> > * Use kzalloc where appropriate
> > * More efficient detection of presence of NAT extension
> >
> >
> > The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8:
> >
> > Merge branch 'qed-IOV-cleanups' (2017-03-21 19:02:38 -0700)
> >
> > are available in the git repository at:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
>
> This says:
>
> $ git pull
> https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
> fatal: Couldn't find remote ref ipvs2-for-v4.12
>
> I don't any tag for this name in:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git/refs/tags
Sorry about that, it looks like I forgot to push the tag.
It should be there now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT 0/3] Second Round of IPVS Updates for v4.12
2017-04-13 23:51 ` Simon Horman
@ 2017-04-14 0:06 ` Pablo Neira Ayuso
2017-04-15 8:59 ` Pablo Neira Ayuso
0 siblings, 1 reply; 8+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-14 0:06 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
On Fri, Apr 14, 2017 at 08:51:19AM +0900, Simon Horman wrote:
> On Fri, Apr 14, 2017 at 01:01:34AM +0200, Pablo Neira Ayuso wrote:
> > Hi Simon,
> >
> > On Mon, Apr 10, 2017 at 09:58:32AM -0700, Simon Horman wrote:
> > > Hi Pablo,
> > >
> > > please consider these clean-ups and enhancements to IPVS for v4.12.
> > >
> > > * Removal unused variable
> > > * Use kzalloc where appropriate
> > > * More efficient detection of presence of NAT extension
> > >
> > >
> > > The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8:
> > >
> > > Merge branch 'qed-IOV-cleanups' (2017-03-21 19:02:38 -0700)
> > >
> > > are available in the git repository at:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
> >
> > This says:
> >
> > $ git pull
> > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
> > fatal: Couldn't find remote ref ipvs2-for-v4.12
> >
> > I don't any tag for this name in:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git/refs/tags
>
> Sorry about that, it looks like I forgot to push the tag.
> It should be there now.
I'm hitting a conflict between this and what I have in nf-next.git.
If you can have a look, otherwise I will check tomorrow with fresher
mind.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [GIT 0/3] Second Round of IPVS Updates for v4.12
2017-04-14 0:06 ` Pablo Neira Ayuso
@ 2017-04-15 8:59 ` Pablo Neira Ayuso
0 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2017-04-15 8:59 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
On Fri, Apr 14, 2017 at 02:06:25AM +0200, Pablo Neira Ayuso wrote:
> On Fri, Apr 14, 2017 at 08:51:19AM +0900, Simon Horman wrote:
> > On Fri, Apr 14, 2017 at 01:01:34AM +0200, Pablo Neira Ayuso wrote:
> > > Hi Simon,
> > >
> > > On Mon, Apr 10, 2017 at 09:58:32AM -0700, Simon Horman wrote:
> > > > Hi Pablo,
> > > >
> > > > please consider these clean-ups and enhancements to IPVS for v4.12.
> > > >
> > > > * Removal unused variable
> > > > * Use kzalloc where appropriate
> > > > * More efficient detection of presence of NAT extension
> > > >
> > > >
> > > > The following changes since commit 592d42ac7fd36408979e09bf2f170f2595dab7b8:
> > > >
> > > > Merge branch 'qed-IOV-cleanups' (2017-03-21 19:02:38 -0700)
> > > >
> > > > are available in the git repository at:
> > > >
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
> > >
> > > This says:
> > >
> > > $ git pull
> > > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git ipvs2-for-v4.12
> > > fatal: Couldn't find remote ref ipvs2-for-v4.12
> > >
> > > I don't any tag for this name in:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git/refs/tags
> >
> > Sorry about that, it looks like I forgot to push the tag.
> > It should be there now.
>
> I'm hitting a conflict between this and what I have in nf-next.git.
>
> If you can have a look, otherwise I will check tomorrow with fresher
> mind.
Fixed this here.
Pulled, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-04-15 8:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 16:58 [GIT 0/3] Second Round of IPVS Updates for v4.12 Simon Horman
2017-04-10 16:58 ` [PATCH 1/3] netfilter: ipvs: don't check for presence of nat extension Simon Horman
2017-04-10 16:58 ` [PATCH 2/3] netfilter: ipvs: Replace kzalloc with kcalloc Simon Horman
2017-04-10 16:58 ` [PATCH 3/3] ipvs: remove unused variable Simon Horman
2017-04-13 23:01 ` [GIT 0/3] Second Round of IPVS Updates for v4.12 Pablo Neira Ayuso
2017-04-13 23:51 ` Simon Horman
2017-04-14 0:06 ` Pablo Neira Ayuso
2017-04-15 8:59 ` 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).