Message ID | 20210506103734.3845725-1-matthieu.baerts@tessares.net |
---|---|
State | Accepted, archived |
Commit | d1af2c92ce6e3859ef7da26baf3e146593bf48a8 |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [mptcp-next] Squash to "mptcp: add a new sysctl checksum_enabled" | expand |
Hi Matt, Matthieu Baerts <matthieu.baerts@tessares.net> 于2021年5月6日周四 下午6:38写道: > > Fix a compilation error without CONFIG_SYSCTL: > > ld: net/mptcp/protocol.o: in function `__mptcp_init_sock': > protocol.c:(.text+0x43e): undefined reference to `mptcp_is_checksum_enabled' > ld: net/mptcp/subflow.o: in function `subflow_v6_route_req': > subflow.c:(.text+0xa0a): undefined reference to `mptcp_is_checksum_enabled' > ld: net/mptcp/subflow.o: in function `subflow_v4_route_req': > subflow.c:(.text+0xabd): undefined reference to `mptcp_is_checksum_enabled' > ld: net/mptcp/subflow.o: in function `mptcp_subflow_init_cookie_req': > subflow.c:(.text+0xb74): undefined reference to `mptcp_is_checksum_enabled' > ld: net/mptcp/options.o: in function `mptcp_syn_options': > options.c:(.text+0x68a): undefined reference to `mptcp_is_checksum_enabled' > > Simply moved this function outside CONFIG_SYSCTL with the other ones. Thanks for this fix. Acked-by: Geliang Tang <geliangtang@gmail.com> -Geliang > > Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> > --- > > Notes: > to be squashed in "mptcp: add a new sysctl checksum_enabled" > > net/mptcp/ctrl.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c > index 014752c481d0..603e0c851d2d 100644 > --- a/net/mptcp/ctrl.c > +++ b/net/mptcp/ctrl.c > @@ -41,6 +41,11 @@ unsigned int mptcp_get_add_addr_timeout(struct net *net) > return mptcp_get_pernet(net)->add_addr_timeout; > } > > +int mptcp_is_checksum_enabled(struct net *net) > +{ > + return mptcp_get_pernet(net)->checksum_enabled; > +} > + > static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet) > { > pernet->mptcp_enabled = 1; > @@ -49,11 +54,6 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet) > } > > #ifdef CONFIG_SYSCTL > -int mptcp_is_checksum_enabled(struct net *net) > -{ > - return mptcp_get_pernet(net)->checksum_enabled; > -} > - > static struct ctl_table mptcp_sysctl_table[] = { > { > .procname = "enabled", > -- > 2.30.2 > >
Hi Geliang, On 06/05/2021 13:23, Geliang Tang wrote: > Hi Matt, > > Matthieu Baerts <matthieu.baerts@tessares.net> 于2021年5月6日周四 下午6:38写道: >> >> Fix a compilation error without CONFIG_SYSCTL: >> >> ld: net/mptcp/protocol.o: in function `__mptcp_init_sock': >> protocol.c:(.text+0x43e): undefined reference to `mptcp_is_checksum_enabled' >> ld: net/mptcp/subflow.o: in function `subflow_v6_route_req': >> subflow.c:(.text+0xa0a): undefined reference to `mptcp_is_checksum_enabled' >> ld: net/mptcp/subflow.o: in function `subflow_v4_route_req': >> subflow.c:(.text+0xabd): undefined reference to `mptcp_is_checksum_enabled' >> ld: net/mptcp/subflow.o: in function `mptcp_subflow_init_cookie_req': >> subflow.c:(.text+0xb74): undefined reference to `mptcp_is_checksum_enabled' >> ld: net/mptcp/options.o: in function `mptcp_syn_options': >> options.c:(.text+0x68a): undefined reference to `mptcp_is_checksum_enabled' >> >> Simply moved this function outside CONFIG_SYSCTL with the other ones. > > Thanks for this fix. > > Acked-by: Geliang Tang <geliangtang@gmail.com> Thank you for the quick review! Applying it now to unblock the CI: - d1af2c92ce6e: Squash to "mptcp: add a new sysctl checksum_enabled" - Results: e2c6acaa5239..dd923e74b091 Builds and tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210506T122849 https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210506T122849 Cheers, Matt
diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c index 014752c481d0..603e0c851d2d 100644 --- a/net/mptcp/ctrl.c +++ b/net/mptcp/ctrl.c @@ -41,6 +41,11 @@ unsigned int mptcp_get_add_addr_timeout(struct net *net) return mptcp_get_pernet(net)->add_addr_timeout; } +int mptcp_is_checksum_enabled(struct net *net) +{ + return mptcp_get_pernet(net)->checksum_enabled; +} + static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet) { pernet->mptcp_enabled = 1; @@ -49,11 +54,6 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet) } #ifdef CONFIG_SYSCTL -int mptcp_is_checksum_enabled(struct net *net) -{ - return mptcp_get_pernet(net)->checksum_enabled; -} - static struct ctl_table mptcp_sysctl_table[] = { { .procname = "enabled",
Fix a compilation error without CONFIG_SYSCTL: ld: net/mptcp/protocol.o: in function `__mptcp_init_sock': protocol.c:(.text+0x43e): undefined reference to `mptcp_is_checksum_enabled' ld: net/mptcp/subflow.o: in function `subflow_v6_route_req': subflow.c:(.text+0xa0a): undefined reference to `mptcp_is_checksum_enabled' ld: net/mptcp/subflow.o: in function `subflow_v4_route_req': subflow.c:(.text+0xabd): undefined reference to `mptcp_is_checksum_enabled' ld: net/mptcp/subflow.o: in function `mptcp_subflow_init_cookie_req': subflow.c:(.text+0xb74): undefined reference to `mptcp_is_checksum_enabled' ld: net/mptcp/options.o: in function `mptcp_syn_options': options.c:(.text+0x68a): undefined reference to `mptcp_is_checksum_enabled' Simply moved this function outside CONFIG_SYSCTL with the other ones. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- Notes: to be squashed in "mptcp: add a new sysctl checksum_enabled" net/mptcp/ctrl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)