From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Maor Dickman <maord@nvidia.com>,
Roi Dayan <roid@nvidia.com>, Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 04/11] net/mlx5e: Don't block routes with nexthop objects in SW
Date: Thu, 6 Jan 2022 16:58:24 -0800 [thread overview]
Message-ID: <20220107005831.78909-5-saeed@kernel.org> (raw)
In-Reply-To: <20220107005831.78909-1-saeed@kernel.org>
From: Maor Dickman <maord@nvidia.com>
Routes with nexthop objects is currently not supported by multipath offload
and any attempts to use it is blocked, however this also block adding SW
routes with nexthop.
Resolve this by returning NOTIFY_DONE instead of an error which will allow such
a route to be created in SW but not offloaded.
This fix also solve an issue which block adding such routes on different devices
due to missing check if the route FIB device is one of multipath devices.
Fixes: 6a87afc072c3 ("mlx5: Fail attempts to use routes with nexthop objects")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c
index bf4d3cbefa63..1ca01a5b6cdd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c
@@ -268,10 +268,8 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
fen_info = container_of(info, struct fib_entry_notifier_info,
info);
fi = fen_info->fi;
- if (fi->nh) {
- NL_SET_ERR_MSG_MOD(info->extack, "IPv4 route with nexthop objects is not supported");
- return notifier_from_errno(-EINVAL);
- }
+ if (fi->nh)
+ return NOTIFY_DONE;
fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
if (fib_dev != ldev->pf[MLX5_LAG_P1].netdev &&
fib_dev != ldev->pf[MLX5_LAG_P2].netdev) {
--
2.33.1
next prev parent reply other threads:[~2022-01-07 0:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 0:58 [pull request][net 00/11] mlx5 fixes 2022-01-06 Saeed Mahameed
2022-01-07 0:58 ` [net 01/11] net/mlx5e: Fix page DMA map/unmap attributes Saeed Mahameed
2022-01-07 11:20 ` patchwork-bot+netdevbpf
2022-01-07 0:58 ` [net 02/11] net/mlx5e: Fix nullptr on deleting mirroring rule Saeed Mahameed
2022-01-07 0:58 ` [net 03/11] net/mlx5e: Fix wrong usage of fib_info_nh when routes with nexthop objects are used Saeed Mahameed
2022-01-07 0:58 ` Saeed Mahameed [this message]
2022-01-07 0:58 ` [net 05/11] Revert "net/mlx5e: Block offload of outer header csum for UDP tunnels" Saeed Mahameed
2022-01-07 0:58 ` [net 06/11] Revert "net/mlx5e: Block offload of outer header csum for GRE tunnel" Saeed Mahameed
2022-01-07 0:58 ` [net 07/11] net/mlx5e: Fix matching on modified inner ip_ecn bits Saeed Mahameed
2022-01-07 0:58 ` [net 08/11] net/mlx5: Fix access to sf_dev_table on allocation failure Saeed Mahameed
2022-01-07 0:58 ` [net 09/11] net/mlx5e: Sync VXLAN udp ports during uplink representor profile change Saeed Mahameed
2022-01-07 0:58 ` [net 10/11] net/mlx5: Set command entry semaphore up once got index free Saeed Mahameed
2022-01-07 0:58 ` [net 11/11] Revert "net/mlx5: Add retry mechanism to the command entry index allocation" Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220107005831.78909-5-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=maord@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=roid@nvidia.com \
--cc=saeedm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).