netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check
@ 2025-06-25  2:20 Yue Haibing
  2025-06-25 16:54 ` Kuniyuki Iwashima
  2025-06-27  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2025-06-25  2:20 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni, horms, kuniyu
  Cc: netdev, linux-kernel, yuehaibing

lwtunnel_build_state() has check validity of encap_type,
so no need to do this before call it.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
v2: Restore encap_type check in fib_encap_match()
---
 net/ipv4/fib_semantics.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f7c9c6a9f53e..a2f04992f579 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -625,11 +625,6 @@ int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
 	if (encap) {
 		struct lwtunnel_state *lwtstate;
 
-		if (encap_type == LWTUNNEL_ENCAP_NONE) {
-			NL_SET_ERR_MSG(extack, "LWT encap type not specified");
-			err = -EINVAL;
-			goto lwt_failure;
-		}
 		err = lwtunnel_build_state(net, encap_type, encap,
 					   nhc->nhc_family, cfg, &lwtstate,
 					   extack);
-- 
2.34.1


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

* Re: [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check
  2025-06-25  2:20 [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check Yue Haibing
@ 2025-06-25 16:54 ` Kuniyuki Iwashima
  2025-06-27  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2025-06-25 16:54 UTC (permalink / raw)
  To: Yue Haibing
  Cc: davem, dsahern, edumazet, kuba, pabeni, horms, netdev,
	linux-kernel

On Tue, Jun 24, 2025 at 7:04 PM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> lwtunnel_build_state() has check validity of encap_type,
> so no need to do this before call it.
>
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

Next time please wait 24h before reposting.
https://docs.kernel.org/process/maintainer-netdev.html

Thanks!


> ---
> v2: Restore encap_type check in fib_encap_match()
> ---
>  net/ipv4/fib_semantics.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
> index f7c9c6a9f53e..a2f04992f579 100644
> --- a/net/ipv4/fib_semantics.c
> +++ b/net/ipv4/fib_semantics.c
> @@ -625,11 +625,6 @@ int fib_nh_common_init(struct net *net, struct fib_nh_common *nhc,
>         if (encap) {
>                 struct lwtunnel_state *lwtstate;
>
> -               if (encap_type == LWTUNNEL_ENCAP_NONE) {
> -                       NL_SET_ERR_MSG(extack, "LWT encap type not specified");
> -                       err = -EINVAL;
> -                       goto lwt_failure;
> -               }
>                 err = lwtunnel_build_state(net, encap_type, encap,
>                                            nhc->nhc_family, cfg, &lwtstate,
>                                            extack);
> --
> 2.34.1
>

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

* Re: [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check
  2025-06-25  2:20 [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check Yue Haibing
  2025-06-25 16:54 ` Kuniyuki Iwashima
@ 2025-06-27  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-27  0:30 UTC (permalink / raw)
  To: Yue Haibing
  Cc: davem, dsahern, edumazet, kuba, pabeni, horms, kuniyu, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 25 Jun 2025 10:20:59 +0800 you wrote:
> lwtunnel_build_state() has check validity of encap_type,
> so no need to do this before call it.
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
> v2: Restore encap_type check in fib_encap_match()
> 
> [...]

Here is the summary with links:
  - [v2,net-next] ipv4: fib: Remove unnecessary encap_type check
    https://git.kernel.org/netdev/net-next/c/77e12dba07d0

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-06-27  0:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25  2:20 [PATCH v2 net-next] ipv4: fib: Remove unnecessary encap_type check Yue Haibing
2025-06-25 16:54 ` Kuniyuki Iwashima
2025-06-27  0:30 ` patchwork-bot+netdevbpf

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