Skip to content

Commit e35d7da

Browse files
Jianbo LiuPaolo Abeni
authored andcommitted
net/mlx5e: Use ip6_dst_lookup instead of ipv6_dst_lookup_flow for MAC init
Replace ipv6_stub->ipv6_dst_lookup_flow() with ip6_dst_lookup() in mlx5e_ipsec_init_macs() since IPsec transformations are not needed during Security Association setup - only basic routing information is required for nexthop MAC address resolution. This resolves an issue where XfrmOutNoStates error counter would be incremented when xfrm policy is configured before xfrm state, as the IPsec-aware routing function would attempt policy checks during SA initialization. Fixes: 71670f7 ("net/mlx5e: Support routed networks during IPsec MACs initialization") Signed-off-by: Jianbo Liu <jianbol@nvidia.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/1765284977-1363052-7-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 367e501 commit e35d7da

File tree

1 file changed

+2
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

1 file changed

+2
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,8 @@ static void mlx5e_ipsec_init_macs(struct mlx5e_ipsec_sa_entry *sa_entry,
342342
rt_dst_entry = &rt->dst;
343343
break;
344344
case AF_INET6:
345-
rt_dst_entry = ipv6_stub->ipv6_dst_lookup_flow(
346-
dev_net(netdev), NULL, &fl6, NULL);
347-
if (IS_ERR(rt_dst_entry))
345+
if (!IS_ENABLED(CONFIG_IPV6) ||
346+
ip6_dst_lookup(dev_net(netdev), NULL, &rt_dst_entry, &fl6))
348347
goto neigh;
349348
break;
350349
default:

0 commit comments

Comments
 (0)