linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX
@ 2020-06-12  5:27 Geliang Tang
  2020-06-12 17:33 ` Matthieu Baerts
  0 siblings, 1 reply; 3+ messages in thread
From: Geliang Tang @ 2020-06-12  5:27 UTC (permalink / raw)
  To: Mat Martineau, Matthieu Baerts, David S. Miller, Jakub Kicinski
  Cc: Geliang Tang, netdev, mptcp, linux-kernel

Unify these two duplicate macros into 8.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 net/mptcp/pm_netlink.c | 2 --
 net/mptcp/protocol.h   | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index b78edf237ba0..b694f13caba8 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -41,8 +41,6 @@ struct pm_nl_pernet {
 	unsigned int		next_id;
 };
 
-#define MPTCP_PM_ADDR_MAX	8
-
 static bool addresses_equal(const struct mptcp_addr_info *a,
 			    struct mptcp_addr_info *b, bool use_port)
 {
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 809687d3f410..86d265500cf6 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -135,7 +135,7 @@ static inline __be32 mptcp_option(u8 subopt, u8 len, u8 nib, u8 field)
 		     ((nib & 0xF) << 8) | field);
 }
 
-#define MPTCP_PM_MAX_ADDR	4
+#define MPTCP_PM_ADDR_MAX	8
 
 struct mptcp_addr_info {
 	sa_family_t		family;
-- 
2.17.1


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

* Re: [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX
  2020-06-12  5:27 [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX Geliang Tang
@ 2020-06-12 17:33 ` Matthieu Baerts
  2020-06-15  8:44   ` Geliang Tang
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts @ 2020-06-12 17:33 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Mat Martineau, David S. Miller, Jakub Kicinski, netdev, mptcp,
	linux-kernel

Hi Geliang,

On 12/06/2020 07:27, Geliang Tang wrote:
> Unify these two duplicate macros into 8.

Thank you for this new patch!

(...)

> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 809687d3f410..86d265500cf6 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -135,7 +135,7 @@ static inline __be32 mptcp_option(u8 subopt, u8 len, u8 nib, u8 field)
>   		     ((nib & 0xF) << 8) | field);
>   }
>   
> -#define MPTCP_PM_MAX_ADDR	4
> +#define MPTCP_PM_ADDR_MAX	8

I think it would be better to drop MPTCP_PM_MAX_ADDR and keep 
MPTCP_PM_ADDR_MAX in pm_netlink.c where it is used. Each PM can decide 
what's the maximum number of addresses it can support.

MPTCP_PM_MAX_ADDR seems to be a left over from a previous implementation 
of a PM that has not been upstreamed but replaced by the Netlink PM later.

Also, please always add "net" or "net-next" prefix in the subject of 
your email to help -net maintainers. Do not hesitate to look at the 
netdev FAQ for more details.

Here this patch looks like a fix so you should have [PATCH net] and a 
"Fixes" tag. I guess for this patch you can use:

   Fixes: 1b1c7a0ef7f3 ("mptcp: Add path manager interface")

That's where MPTCP_PM_MAX_ADDR has been introduced. It was already not 
used and never used later.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX
  2020-06-12 17:33 ` Matthieu Baerts
@ 2020-06-15  8:44   ` Geliang Tang
  0 siblings, 0 replies; 3+ messages in thread
From: Geliang Tang @ 2020-06-15  8:44 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: Mat Martineau, David S. Miller, Jakub Kicinski, netdev, mptcp,
	linux-kernel

On Fri, Jun 12, 2020 at 07:33:11PM +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 12/06/2020 07:27, Geliang Tang wrote:
> > Unify these two duplicate macros into 8.
> 
> Thank you for this new patch!
> 
> (...)
> 
> > diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> > index 809687d3f410..86d265500cf6 100644
> > --- a/net/mptcp/protocol.h
> > +++ b/net/mptcp/protocol.h
> > @@ -135,7 +135,7 @@ static inline __be32 mptcp_option(u8 subopt, u8 len, u8 nib, u8 field)
> >   		     ((nib & 0xF) << 8) | field);
> >   }
> > -#define MPTCP_PM_MAX_ADDR	4
> > +#define MPTCP_PM_ADDR_MAX	8
> 
> I think it would be better to drop MPTCP_PM_MAX_ADDR and keep
> MPTCP_PM_ADDR_MAX in pm_netlink.c where it is used. Each PM can decide
> what's the maximum number of addresses it can support.
> 
> MPTCP_PM_MAX_ADDR seems to be a left over from a previous implementation of
> a PM that has not been upstreamed but replaced by the Netlink PM later.
> 
> Also, please always add "net" or "net-next" prefix in the subject of your
> email to help -net maintainers. Do not hesitate to look at the netdev FAQ
> for more details.
> 
> Here this patch looks like a fix so you should have [PATCH net] and a
> "Fixes" tag. I guess for this patch you can use:
> 
>   Fixes: 1b1c7a0ef7f3 ("mptcp: Add path manager interface")
> 
> That's where MPTCP_PM_MAX_ADDR has been introduced. It was already not used
> and never used later.
> 
> Cheers,
> Matt
> -- 
> Tessares | Belgium | Hybrid Access Solutions
> www.tessares.net

Hi Matt,

Thanks for your reply.
I have already resend patch v2 to you.

-Geliang

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

end of thread, other threads:[~2020-06-15  8:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12  5:27 [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX Geliang Tang
2020-06-12 17:33 ` Matthieu Baerts
2020-06-15  8:44   ` Geliang Tang

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).