[PATCH mptcp-net 1/2] mptcp: mptcp_parse_option is no longer exported

Matthieu Baerts posted 2 patches 4 years ago
Maintainers: "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, Yonglong Li <liyonglong@chinatelecom.cn>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Geliang Tang <geliangtang@gmail.com>, Shuah Khan <shuah@kernel.org>, Paolo Abeni <pabeni@redhat.com>
[PATCH mptcp-net 1/2] mptcp: mptcp_parse_option is no longer exported
Posted by Matthieu Baerts 4 years ago
Options parsing in now done from mptcp_incoming_options().

mptcp_parse_option() has been removed from mptcp.h when CONFIG_MPTCP is
defined but not when it is not.

Fixes: cfde141ea3fa ("mptcp: move option parsing into mptcp_incoming_options()")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 include/net/mptcp.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index 04f53352a1c9..8b1afd6f5cc4 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -218,12 +218,6 @@ static inline bool rsk_drop_req(const struct request_sock *req)
 	return false;
 }
 
-static inline void mptcp_parse_option(const struct sk_buff *skb,
-				      const unsigned char *ptr, int opsize,
-				      struct tcp_options_received *opt_rx)
-{
-}
-
 static inline bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
 				     unsigned int *size,
 				     struct mptcp_out_options *opts)
-- 
2.33.1


Re: [PATCH mptcp-net 1/2] mptcp: mptcp_parse_option is no longer exported
Posted by Paolo Abeni 4 years ago
On Sat, 2022-01-22 at 10:31 +0100, Matthieu Baerts wrote:
> Options parsing in now done from mptcp_incoming_options().
> 
> mptcp_parse_option() has been removed from mptcp.h when CONFIG_MPTCP is
> defined but not when it is not.
> 
> Fixes: cfde141ea3fa ("mptcp: move option parsing into mptcp_incoming_options()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
>  include/net/mptcp.h | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/include/net/mptcp.h b/include/net/mptcp.h
> index 04f53352a1c9..8b1afd6f5cc4 100644
> --- a/include/net/mptcp.h
> +++ b/include/net/mptcp.h
> @@ -218,12 +218,6 @@ static inline bool rsk_drop_req(const struct request_sock *req)
>  	return false;
>  }
>  
> -static inline void mptcp_parse_option(const struct sk_buff *skb,
> -				      const unsigned char *ptr, int opsize,
> -				      struct tcp_options_received *opt_rx)
> -{
> -}
> -
>  static inline bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
>  				     unsigned int *size,
>  				     struct mptcp_out_options *opts)

Nice catch!

Acked-by: Paolo Abeni <pabeni@redhat.com>


Re: [PATCH mptcp-net 1/2] mptcp: mptcp_parse_option is no longer exported
Posted by Mat Martineau 4 years ago
On Sat, 22 Jan 2022, Matthieu Baerts wrote:

> Options parsing in now done from mptcp_incoming_options().
>
> mptcp_parse_option() has been removed from mptcp.h when CONFIG_MPTCP is
> defined but not when it is not.
>
> Fixes: cfde141ea3fa ("mptcp: move option parsing into mptcp_incoming_options()")
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
> include/net/mptcp.h | 6 ------
> 1 file changed, 6 deletions(-)
>

Looks good to me, but it seems more like a net-next cleanup patch. When 
building without CONFIG_MPTCP I don't see mptcp_parse_option showing up as 
a symbol in the files that include mptcp.h.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

> diff --git a/include/net/mptcp.h b/include/net/mptcp.h
> index 04f53352a1c9..8b1afd6f5cc4 100644
> --- a/include/net/mptcp.h
> +++ b/include/net/mptcp.h
> @@ -218,12 +218,6 @@ static inline bool rsk_drop_req(const struct request_sock *req)
> 	return false;
> }
>
> -static inline void mptcp_parse_option(const struct sk_buff *skb,
> -				      const unsigned char *ptr, int opsize,
> -				      struct tcp_options_received *opt_rx)
> -{
> -}
> -
> static inline bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
> 				     unsigned int *size,
> 				     struct mptcp_out_options *opts)
> -- 
> 2.33.1
>
>
>

--
Mat Martineau
Intel